From 198b83ce825fbbf912cb26d592e3c7b0b586ca92 Mon Sep 17 00:00:00 2001 From: 王旭 <1377869194@qq.com> Date: 星期一, 20 二月 2023 17:38:22 +0800 Subject: [PATCH] 数据管理页面格式 --- src/views/Tools/LayerTree.vue | 39 ++++++++++++++++++++++++++++++++++++--- 1 files changed, 36 insertions(+), 3 deletions(-) diff --git a/src/views/Tools/LayerTree.vue b/src/views/Tools/LayerTree.vue index 6696753..c924ce0 100644 --- a/src/views/Tools/LayerTree.vue +++ b/src/views/Tools/LayerTree.vue @@ -49,14 +49,14 @@ v-show="menuVisible" > <div @click="addSameLevelNode()"> - <i class="el-icon-circle-plus-outline"></i> 鍚岀骇澧炲姞 + <i class="el-icon-circle-plus-outline"></i> 娣诲姞鍥惧眰缁� </div> <div class="add" @click="addChildNode()" v-show="firstLevel" > - <i class="el-icon-circle-plus-outline"></i> 瀛愮骇澧炲姞 + <i class="el-icon-circle-plus-outline"></i> 娣诲姞鍥惧眰 </div> <div class="delete" @@ -69,6 +69,12 @@ @click="editNode()" > <i class="el-icon-edit"></i> 淇敼鑺傜偣 + </div> + <div + class="edit" + @click="showLayerAttribute()" + > + <i class="el-icon-edit"></i> 灞炴�� </div> <!-- <div class="edit" @@ -137,6 +143,7 @@ >纭� 瀹�</el-button> </span> </el-dialog> + <queryinfo ref="queryinfo" /> </div> </template> @@ -146,7 +153,7 @@ import Image from 'ol/layer/Image'; import GeoJSON from 'ol/format/GeoJSON.js'; import Map from 'ol/Map.js'; - +import queryinfo from './queryinfo.vue'; import { Vector as VectorSource } from "ol/source"; import { Vector as VectorLayer, } from "ol/layer"; @@ -155,6 +162,7 @@ import { perms_selectLayers } from '../../api/api.js' export default { name: 'tree', + components: { queryinfo }, data() { return { eleId: '', @@ -332,7 +340,29 @@ this.$refs.tree.remove(this.currentNode); }, + //灞炴�ф樉绀� + showLayerAttribute(data) { + this.foo(); + this.currentData = data ? data : this.currentData; + var layer = this.currentData.layer.replaceAll('_', ""); + this.$store.state.mapSpaceQueryLayer = layer; + // this.$store.state.mapPopBoolean = true; + this.$store.state.mapPopBoxFlag = '2'; + this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.close(); + this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.open("灞炴��", null, { + close: () => { + if (this.$store.state.primitLayer != null) { + sgworld.Creator.DeleteObject(this.$store.state.primitLayer); + this.$store.state.primitLayer = null; + } + + if (window.Viewer.scene.primitives.length != 0) { + window.Viewer.scene.primitives.removeAll() + } + } + }); + }, // 缂栬緫鑺傜偣 editNode(data) { @@ -536,6 +566,7 @@ return this.$message.error("鍥惧眰鍒楄〃鏌ヨ澶辫触"); } + this.newData = data.result; this.oriData = data.result; var std = []; @@ -553,6 +584,7 @@ } else if (data.result[i].type == 2) { if (data.result[i].url != null) { + var layer_entity = { id: data.result[i].id, pid: data.result[i].pid, @@ -560,6 +592,7 @@ resource: data.result[i].url, type: data.result[i].type, isEdit: false, + layer: data.result[i].enName, layerType: data.result[i].serveType } layer_list.push(layer_entity) -- Gitblit v1.9.3