Browse Source

菜单管理

beijing
陈鹏飞 3 years ago
parent
commit
aa30362531
  1. 2
      src/app/system-management/menu/menu.component.html
  2. 7
      src/app/system-management/menu/menu.component.ts

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

@ -27,7 +27,7 @@
<span>组织机构</span>
<span>操作</span>
</div>
<nz-tree [nzHideUnMatched]='true' [nzSearchValue]="searchValue" #nzTreeComponent [nzData]="nodes"
<nz-tree [nzHideUnMatched]='true' [nzSearchValue]="searchValue" #nzTreeComponent [nzData]="datas"
[nzExpandAll]="nzExpandAll" [nzExpandedKeys]="defaultExpandedKeys" [nzTreeTemplate]="nzTreeTemplate" nzDraggable
nzBlockNode (nzOnDrop)="nzEvent($event)" [nzBeforeDrop]="beforeDrop" [nzExpandedIcon]="multiExpandedIconTpl">
</nz-tree>

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

@ -41,6 +41,7 @@ export class MenuComponent implements OnInit {
allOrList: any
getAllOrganization() {
let OrganizationUnitId = sessionStorage.getItem('isGasStation') == 'true' ? JSON.parse(sessionStorage.getItem('userdataOfgasstation')).organization.id : JSON.parse(sessionStorage.getItem('userdata')).organization.id
let params = {
OrganizationUnitId: OrganizationUnitId,
@ -59,6 +60,10 @@ export class MenuComponent implements OnInit {
this.nodes = [...this.toTree.toTree(data.result.items)]
this.defaultExpandedKeys = [this.nodes[0].id]
this.defaultExpandedKeys = [...this.defaultExpandedKeys]
console.log(...this.nodes,444);
console.log(this.defaultExpandedKeys,45);
})
}
@ -68,7 +73,7 @@ export class MenuComponent implements OnInit {
defaultExpandedKeys = [];
nodes: any[] = []
datas:any[]=[{id:0,title:"首页",children:[]},{id:1,title:"数字油站",children:[]},{id:2,title:"今日预警",children:[]},{id:3,title:"预警记录",children:[{title:'预警类型统计',isGasStation:true},{title:'卸油统计',isGasStation:true},{title:'证照预警统计',isGasStation:true}]},{id:4,title:"证照管理",children:[{title:'经营类证照',isGasStation:true},{title:'资产类证照',isGasStation:true},{title:'待办',isGasStation:true},{title:'审批记录',isGasStation:true}]}]
addOr(node?: any) {
console.log(node)

Loading…
Cancel
Save