import {Component, Emit, Vue} from 'vue-property-decorator'; import template from "./viewLeft.component.html" import TitleComponent from "@/components/title.component.vue" import WarningListComponent from "@/components/warningList.component.vue" import * as turf from '@turf/turf' import Mock from "mockjs" import moment from "moment" import("@/assets/style/pageCommon.component.scss") Component.registerHooks([ 'beforeRouteLeave', ]); @Component({ template, components: { TitleComponent, WarningListComponent }, }) export default class ViewLeftComponent extends Vue { //标题左侧图标 imgSrc = require("@/assets/icons/png/env/env-title-icon.png"); treeData = [ { label: '技能训练设施', children: [] }, { label: '灾害事故处置训练设施', children: [{ label: '火灾扑救训练设', children: [ { label: '综合训练楼', children: [] },{ label: '化工装置火灾事故处置训练设施', children: [] } ] }] }, { label: '战勤保障训练设施', children: [] }] //获取class类 getNodeClass(node){ const arr:string[] = [] if (node.level>1){ arr.push('sub-item') } if (node.childNodes.length === 0 || !node.expanded){ arr.push('sub-item-border-none') } return arr } @Emit('showView') showView(){ //todo 展开自由导览 } //点击告警信息 @Emit() getItem(item) { // console.log('item', item) } //点击节点 nodeClick(data,node,self){ if (node.isLeaf){ this.showViewRight(node.data) } } //显示右侧 @Emit('showViewRight') showViewRight(item){ // } playView(){ console.log('导览') } count = 1 mounted() { } destroyed() { } changeMore() { console.log(1) } changeClose() { console.log(1) } }