From 6e92e7b101c2ea468a4b0d2a19066bc1b4d31764 Mon Sep 17 00:00:00 2001 From: Surpriseplus <845948745@qq.com> Date: 星期五, 12 五月 2023 18:03:14 +0800 Subject: [PATCH] 发布管理,图层管理页面修改 --- src/views/Tools/LayerTree.vue | 47 +++++++++++++++++++++++++++-------------------- 1 files changed, 27 insertions(+), 20 deletions(-) diff --git a/src/views/Tools/LayerTree.vue b/src/views/Tools/LayerTree.vue index cce059f..085b369 100644 --- a/src/views/Tools/LayerTree.vue +++ b/src/views/Tools/LayerTree.vue @@ -399,6 +399,9 @@ } else if (Node.data.children == null && Node.data.serveType != "Tileset") { this.showlocal = false; this.showopaque = false; + } else if (Node.data.children == null && Node.data.serveType != "DEM") { + this.showlocal = false; + this.showopaque = false; } this.menuVisible = true; @@ -936,6 +939,7 @@ tileset.readyPromise.then((tileset) => { + tileset.id = res.cnName; tileset.layerId = res.id; tileset.pubid = res.pubid; @@ -962,6 +966,9 @@ window.modelHeight = height; } else window.modelHeight = 0; this.getTilesetArgs(tileset, res); + + + }); this.$store.state.setAlphaList.push({ name: res.cnName, @@ -1013,7 +1020,11 @@ if (data.code != 200) { } else { - this.reload(tileset, data.result.json) + if (res.bak != '3dml') { + this.reload(tileset, data.result.json) + } else { + this.tileSet(tileset, parseFloat(res.elev)) + } } } else { this.tileSet(tileset, parseFloat(res.elev)) @@ -1208,7 +1219,7 @@ }, getNewTree(obj, result) { for (const i in obj) { - console.log(obj[i].cnName) + result.push(obj[i]) if (obj[i].children && obj[i].children.length > 0) { this.getNewTree(obj[i].children, result) @@ -1240,20 +1251,22 @@ if (rs.enName == st_code[0].code) { return rs } + if (rs.enName && rs.enName.indexOf(st_code[0].code) > -1) { + return rs + } }) + this.removeAllLayer(); var obj = { dirid: res, pageIndex: 1, pageSize: 10, } - const data = await project_selectByDirid(obj); if (data.code != 200) { this.$message.error("鍒楄〃鑾峰彇澶辫触"); return; } - if (data.result[0]) { var geom = data.result[0].geom if (geom) { @@ -1262,34 +1275,28 @@ destination: Cesium.Cartesian3.fromDegrees(wkt.coordinates[0].toFixed(6), wkt.coordinates[1].toFixed(6), 5000), }); } - } this.cannelTerrainLayer(); this.setTerrainMptLayer(); //娓呯┖鍥惧眰鏍戦�変腑鐘舵�� this.$refs.tree.setCheckedKeys([]); if (val.length > 0) { - - if (val[0].type == 1 && val[0].isProject == 1) {//椤圭洰鍒嗙被 - - var std_check = []; - for (var i in val) { + var std_check = []; + for (var i in val) { + if (val[i].type == 1 && val[i].isProject == 1) {//椤圭洰鍒嗙被 var std_val = this.getNewTree([this.$refs.tree.getNode(val[i].id).data], []) for (var j in std_val) { std_check.push(std_val[j]) } } - - - var value = this.$store.state.isProjectLayer; - for (var i in value) { - - std_check.push(value[i]) - } - this.setProjectLayer(std_check); - } else { - this.setChangeProLayer(); } + var value = this.$store.state.isProjectLayer; + for (var i in value) { + std_check.push(value[i]) + } + + + this.setProjectLayer(std_check); } else { this.setChangeProLayer(); } -- Gitblit v1.9.3