From 7a0c7de021aebbef3ec137f2f94ff73ab41014d7 Mon Sep 17 00:00:00 2001 From: 王旭 <1377869194@qq.com> Date: 星期三, 10 五月 2023 14:44:47 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.20.39:8989/r/LFWEB_NEW --- src/views/Tools/LayerTree.vue | 69 ++++++++++++++++++++++++++++++++-- 1 files changed, 64 insertions(+), 5 deletions(-) diff --git a/src/views/Tools/LayerTree.vue b/src/views/Tools/LayerTree.vue index 3b587fb..cd3b9aa 100644 --- a/src/views/Tools/LayerTree.vue +++ b/src/views/Tools/LayerTree.vue @@ -126,6 +126,14 @@ > <i class="el-icon-tickets"></i> 閽诲瓟鏌辩姸鍥� </div> + <div + class="edit" + v-show="shwoTitle" + @click="tileDownload()" + > + <i class="el-icon-download"></i> 鐡︾墖涓嬭浇 + + </div> <!-- <div class="edit" v-show="showModelAttach" @@ -220,6 +228,7 @@ perms_selectLayers, inquiry_selectDomains, comprehensive_selectPubById, project_selectDirAll, project_selectByDirid, dataQuerySelectWktById } from "../../api/api.js"; +import { conditions } from '../Archive/Archive.js'; export default { name: "tree", components: { queryinfo }, @@ -271,11 +280,47 @@ mptLayer: [], optionts: [], proValue: null, - setCheeckedLayer: [] + setCheeckedLayer: [], + shwoTitle: false, }; }, methods: { + //鐡︾墖涓嬭浇 + tileDownload() { + var that = this; + this.menuVisible = false + sgworld.Creator.createSimpleGraphic( + "rectangle", + {}, + function (entity) { + that.getTileRectangle(entity); + sgworld.Creator.SimpleGraphic.clear() + } + ); + }, + getTileRectangle(res) { + var value = res.rectangle.coordinates.getValue(); + var val = { + pubid: this.currentData.pubid, + pwd: "", + title: "", + xmax: Cesium.Math.toDegrees( + value.east + ), + xmin: Cesium.Math.toDegrees( + value.west + ), + ymax: Cesium.Math.toDegrees( + value.north + ), + ymin: Cesium.Math.toDegrees( + value.south + ) + } + this.$bus.$emit("titleDown", val) + + }, //杞瓟鏌辩姸鍥� async histogram() { this.menuVisible = false @@ -325,10 +370,14 @@ this.currentNode = Node; this.$store.state.propertiesName = this.currentData; - if (this.currentData.serveType == "Tileset") { + this.showModelAttach = false; + this.shwoTitle = false; + + + if (this.currentData.serveType == 'TMS') { + this.shwoTitle = true + } else if (this.currentData.serveType == "Tileset") { this.showModelAttach = true; - } else { - this.showModelAttach = false; } if (this.currentData.enName == "s_explorationpoint") { this.shwoHistogram = true; @@ -1081,7 +1130,15 @@ let cloneData = JSON.parse(JSON.stringify(source)); // 瀵规簮鏁版嵁娣卞害鍏嬮殕 return cloneData.filter((father) => { // 寰幆鎵�鏈夐」 - let branchArr = cloneData.filter((child) => father.id == child.pid); // 瀵规瘮ID锛屽垎鍒笂涓嬬骇鑿滃崟锛屽苟杩斿洖鏁版嵁 + let branchArr = cloneData.filter((child) => father.id == child.pid); + if (branchArr.length > 0) { + + branchArr.sort(function (a, b) { + + return a.orderNum - b.orderNum + }) + } + branchArr.length > 0 ? (father.children = branchArr) : ""; // 缁欑埗绾ф坊鍔犱竴涓猚hildren灞炴�э紝骞惰祴鍊� // 灞炰簬鍚屼竴瀵硅薄闂锛屼緥濡傦細浠� a=b銆乧=1 锛岀劧鍚庡啀浠� b.c=c 锛� 閭d箞 a.c=b.c=c=1 锛涘悓鐞嗭紝鍚庣画浠� c.d=2 ,閭d箞 a.c.d 涔熸槸=2锛� // 鐢辨寰幆澶氭鍚庯紝灏辫兘褰㈡垚鐩稿簲鐨勬爲褰㈡暟鎹粨鏋� @@ -1391,7 +1448,9 @@ if (this.$store.state.showAllLayers == true) { this.layersStart(); this.$store.state.showAllLayers = false; + } else { + this.treeData = this.$store.state.treeData; this.$refs.tree.setCheckedKeys(this.$store.state.checkedKeys); } -- Gitblit v1.9.3