|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
import { Component, OnInit } from '@angular/core'; |
|
|
|
|
import { Component, OnInit, ViewChild } from '@angular/core'; |
|
|
|
|
import { NzTreeComponent, NzTreeNodeOptions } from 'ng-zorro-antd/tree'; |
|
|
|
|
import { PlanComponent } from '../plan/plan.component'; |
|
|
|
|
|
|
|
|
|
@Component({ |
|
|
|
@ -15,6 +16,8 @@ export class LeftDomainComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
beforeFence: number; //当前选中功能栏
|
|
|
|
|
@ViewChild('nzTreeComponent', { static: false }) nzTreeComponent!: NzTreeComponent; |
|
|
|
|
treeData: NzTreeNodeOptions[] = treeData.nodes; //tree data
|
|
|
|
|
|
|
|
|
|
//初始化组件
|
|
|
|
|
initComponent(type?: number) { |
|
|
|
@ -38,3 +41,31 @@ export class LeftDomainComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export class treeData { |
|
|
|
|
static nodes: NzTreeNodeOptions[] = [ |
|
|
|
|
{ |
|
|
|
|
title: '灭火器', |
|
|
|
|
key: '1', |
|
|
|
|
selectable: false, |
|
|
|
|
children: [ |
|
|
|
|
{ title: '4KG手提干粉灭火器', key: '1', selectable: false, }, |
|
|
|
|
{ title: '4KG手提泡沫灭火器', key: '2', selectable: false, }, |
|
|
|
|
{ title: '4KG手提二氧化碳灭火器', key: '3', selectable: false, }, |
|
|
|
|
{ title: '35KG手推灭火器', key: '4', selectable: false, }, |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: '灭火毯', |
|
|
|
|
key: '2', |
|
|
|
|
selectable: false, |
|
|
|
|
children: [] |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: '消防锹', |
|
|
|
|
key: '3', |
|
|
|
|
selectable: false, |
|
|
|
|
children: [] |
|
|
|
|
}, |
|
|
|
|
]; |
|
|
|
|
} |
|
|
|
|