中化加油站项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
1.6 KiB

import { Component, OnInit, ViewChild } from '@angular/core';
import { NzTreeComponent, NzTreeNodeOptions } from 'ng-zorro-antd/tree';
import { PlanComponent } from '../plan/plan.component';
@Component({
selector: 'app-left-domain',
templateUrl: './left-domain.component.html',
styleUrls: ['./left-domain.component.scss']
})
export class LeftDomainComponent implements OnInit {
constructor() { }
ngOnInit(): void {
this.initComponent()
}
beforeFence: number; //当前选中功能栏
@ViewChild('nzTreeComponent', { static: false }) nzTreeComponent!: NzTreeComponent;
treeData: NzTreeNodeOptions[] = treeData.nodes; //tree data
//初始化组件
initComponent(type?: number) {
if (type != undefined && type != null) {
this.beforeFence = type
} else {
this.beforeFence = PlanComponent.instance.selectFence
}
}
//编辑信息
editInfo() {
}
//导出Excel
deriveExcel() {
}
}
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: []
},
];
}