forked from xxhjsb/hbt-prevention-ui
36 lines
890 B
Vue
36 lines
890 B
Vue
<template>
|
|
|
|
<el-tree :data="treeData" :props="{children:'children',label:'name'}" :expand-on-click-node="false" default-expand-all highlight-current @node-click="handleNodeClick">
|
|
</el-tree>
|
|
</template>
|
|
<script lang="ts">
|
|
import { Component, Emit, Prop, Vue } from 'vue-property-decorator';
|
|
import mapboxgl from "mapbox-gl";
|
|
import "mapbox-gl/dist/mapbox-gl.css"
|
|
import UnitService from '@/service/unit.service';
|
|
@Component
|
|
export default class UnitTreeComponent extends Vue {
|
|
public unitService:UnitService = new UnitService();
|
|
public treeData = [] as any;
|
|
|
|
@Emit("callback")
|
|
handleNodeClick(data){
|
|
//
|
|
}
|
|
|
|
created(){
|
|
this.unitService.getUnitTree().then(res=>{
|
|
this.treeData = res.data;
|
|
})
|
|
}
|
|
beforeDestory(){
|
|
|
|
}
|
|
}
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
.map{
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
</style> |