|
@@ -12,6 +12,9 @@
|
|
|
>
|
|
|
<template #default="{ node, data }">
|
|
|
<span class="custom-tree-label">{{ node.label }}</span>
|
|
|
+ <span v-if="node.isLeaf" class="custom-tree-gl-icon" @click="showLayerGL(data)">
|
|
|
+ <OfficeBuilding />
|
|
|
+ </span>
|
|
|
<span v-if="node.isLeaf" class="custom-tree-detail-icon" @click="showDetailDialog(data)">
|
|
|
<Document />
|
|
|
</span>
|
|
@@ -28,16 +31,18 @@
|
|
|
import {onMounted, ref, watch} from "vue";
|
|
|
import CommonTitle from "@/views/c-cpns/CommonTitle.vue";
|
|
|
import {getServiceTree} from "@/service/http.js";
|
|
|
-import {AddSingleLayer} from "@/unit/map/addLayer.js";
|
|
|
+import {AddSingleLayer, FeatureThreeDimension} from "@/unit/map/addLayer.js";
|
|
|
import {useMapStore} from "@/store/mapStore.js";
|
|
|
-import {Edit,Document} from "@element-plus/icons-vue";
|
|
|
+import {Edit,Document,OfficeBuilding} from "@element-plus/icons-vue";
|
|
|
export default {
|
|
|
name: "ServiceTree",
|
|
|
- components: {CommonTitle,Edit,Document},
|
|
|
+ components: {CommonTitle,Edit,Document,OfficeBuilding},
|
|
|
setup(){
|
|
|
const mapStore = useMapStore()
|
|
|
let treeData = ref([]);
|
|
|
const treeRef = ref(null);
|
|
|
+ const showGL = ref(false);
|
|
|
+ const GLLayer = ref('');
|
|
|
function getTreeData(){
|
|
|
getServiceTree({
|
|
|
TYPE:"",
|
|
@@ -55,6 +60,22 @@ export default {
|
|
|
mapStore.layerDetailObj = data;
|
|
|
mapStore.layerDetailShow = true;
|
|
|
}
|
|
|
+ function showLayerGL(data){
|
|
|
+ if(showGL&&data.ADDRESS == GLLayer.value){
|
|
|
+ showGL.value = false;
|
|
|
+ GLLayer.value = '';
|
|
|
+ FeatureThreeDimension({
|
|
|
+ url:data.ADDRESS,
|
|
|
+ status:"hide"
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ GLLayer.value = data.ADDRESS;
|
|
|
+ FeatureThreeDimension({
|
|
|
+ url:data.ADDRESS,
|
|
|
+ status:"show"
|
|
|
+ });
|
|
|
+ }
|
|
|
function changeChange(){
|
|
|
let nowChecked = treeRef.value.getCheckedNodes(true);
|
|
|
//找到原来有现在没有的删除
|
|
@@ -100,6 +121,7 @@ export default {
|
|
|
changeChange,
|
|
|
treeRef,
|
|
|
applyData,
|
|
|
+ showLayerGL,
|
|
|
showDetailDialog
|
|
|
}
|
|
|
}
|
|
@@ -116,6 +138,13 @@ export default {
|
|
|
.custom-tree-label{
|
|
|
font-size: 16px;
|
|
|
}
|
|
|
+ .custom-tree-gl-icon{
|
|
|
+ position: absolute;
|
|
|
+ right: 70px;
|
|
|
+ width: 16px;
|
|
|
+ height: 16px;
|
|
|
+ font-size: 10px;
|
|
|
+ }
|
|
|
.custom-tree-detail-icon{
|
|
|
position: absolute;
|
|
|
right: 40px;
|