邵佳豪 2 years ago
parent
commit
c58ddd3ec6
  1. 2
      proxy.config.json
  2. 10
      src/app/system-management/menu/menu.component.html
  3. 7
      src/app/system-management/menu/menu.component.ts

2
proxy.config.json

@ -10,4 +10,4 @@
"ws": true, "ws": true,
"logLevel": "debug" "logLevel": "debug"
} }
} }

10
src/app/system-management/menu/menu.component.html

@ -1,9 +1,9 @@
<div class="orbox" id="orbox"> <div class="orbox" id="orbox">
<div class="topbox"> <div class="topbox">
<div class="lefttop"> <div class="lefttop">
<span>组织机构列表</span> <span>菜单列表</span>
<span><img style="vertical-align: top;" src="../../../assets/images/icon/orgrey.png" alt=""> <span><img style="vertical-align: top;" src="../../../assets/images/icon/orgrey.png" alt="">
{{totalCount}}个单位</span> {{totalCount}}个</span>
</div> </div>
<div class="righttop"> <div class="righttop">
<!-- <form nz-form [formGroup]="validateForm" (ngSubmit)="submitForm()"> <!-- <form nz-form [formGroup]="validateForm" (ngSubmit)="submitForm()">
@ -16,15 +16,15 @@
<button style="display: none;" type="submit"></button> <button style="display: none;" type="submit"></button>
</nz-form-item> </nz-form-item>
</form> --> </form> -->
<nz-input-group nzPrefixIcon="search"> <!-- <nz-input-group nzPrefixIcon="search">
<input type="text" nz-input placeholder="请输入单位" [(ngModel)]="searchValue" /> <input type="text" nz-input placeholder="请输入单位" [(ngModel)]="searchValue" />
</nz-input-group> </nz-input-group> -->
<button nz-button nzType="primary" (click)="addOr()"><i nz-icon nzType="plus-circle" <button nz-button nzType="primary" (click)="addOr()"><i nz-icon nzType="plus-circle"
nzTheme="outline"></i>新增</button> nzTheme="outline"></i>新增</button>
</div> </div>
</div> </div>
<div class="treeTitle"> <div class="treeTitle">
<span>组织机构</span> <span>菜单名称</span>
<span>操作</span> <span>操作</span>
</div> </div>
<nz-tree [nzHideUnMatched]='true' [nzSearchValue]="searchValue" #nzTreeComponent [nzData]="nodes" <nz-tree [nzHideUnMatched]='true' [nzSearchValue]="searchValue" #nzTreeComponent [nzData]="nodes"

7
src/app/system-management/menu/menu.component.ts

@ -45,7 +45,8 @@ export class MenuComponent implements OnInit {
let OrganizationUnitId = sessionStorage.getItem('isGasStation') == 'true' ? JSON.parse(sessionStorage.getItem('userdataOfgasstation')).organization.id : JSON.parse(sessionStorage.getItem('userdata')).organization.id let OrganizationUnitId = sessionStorage.getItem('isGasStation') == 'true' ? JSON.parse(sessionStorage.getItem('userdataOfgasstation')).organization.id : JSON.parse(sessionStorage.getItem('userdata')).organization.id
let params = { let params = {
OrganizationUnitId: OrganizationUnitId, OrganizationUnitId: OrganizationUnitId,
IsContainsChildren: "true" IsContainsChildren: "true",
MaxResultCount:"999"
} }
this.http.get('/api/services/app/Menu/GetAll', { this.http.get('/api/services/app/Menu/GetAll', {
params: params params: params
@ -73,7 +74,7 @@ export class MenuComponent implements OnInit {
addOr(node?: any) { addOr(node?: any) {
console.log(node) console.log(node)
const modal = this.modal.create({ const modal = this.modal.create({
nzTitle: node ? '新增组织机构' : '新增一级组织机构', nzTitle: node ? '新增子菜单' : '新增一级菜单',
nzContent: AddmenuComponent, nzContent: AddmenuComponent,
nzViewContainerRef: this.viewContainerRef, nzViewContainerRef: this.viewContainerRef,
nzWidth: 288, nzWidth: 288,
@ -159,7 +160,7 @@ export class MenuComponent implements OnInit {
this.message.create('warning', '请先删除所有子节点'); this.message.create('warning', '请先删除所有子节点');
} else { } else {
this.modal.confirm({ this.modal.confirm({
nzTitle: `确定要删除${item.title}这个机构吗?`, nzTitle: `确定要删除${item.title}这个菜单吗?`,
nzOkText: '确定', nzOkText: '确定',
nzOkType: 'danger', nzOkType: 'danger',
nzOnOk: () => { nzOnOk: () => {

Loading…
Cancel
Save