From 64479e2ce8b7c30e36f08c41eed226a1def1be82 Mon Sep 17 00:00:00 2001
From: Surpriseplus <845948745@qq.com>
Date: 星期二, 09 五月 2023 17:00:39 +0800
Subject: [PATCH] 瓦片下载功能添加;综合展示图层管理修改;数据管理字段管理编辑修改

---
 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>&nbsp;&nbsp;閽诲瓟鏌辩姸鍥�
       </div>
+      <div
+        class="edit"
+        v-show="shwoTitle"
+        @click="tileDownload()"
+      >
+        <i class="el-icon-download"></i>&nbsp;&nbsp;鐡︾墖涓嬭浇
+
+      </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