From 1496203eb8194c26ff9350e4673927565df41705 Mon Sep 17 00:00:00 2001
From: Surpriseplus <845948745@qq.com>
Date: 星期四, 23 二月 2023 17:56:56 +0800
Subject: [PATCH] 综合展示图层管理添加3dTilset,资料馆下下调整,综合展示分析功能优化

---
 src/components/MapView/mapMenuPop.vue |  156 +++++++++++++++++++--------------------------------
 1 files changed, 59 insertions(+), 97 deletions(-)

diff --git a/src/components/MapView/mapMenuPop.vue b/src/components/MapView/mapMenuPop.vue
index a862f2a..96b91ca 100644
--- a/src/components/MapView/mapMenuPop.vue
+++ b/src/components/MapView/mapMenuPop.vue
@@ -1,15 +1,9 @@
 <template>
   <div class="menuPop">
     <div class="leftBox">
-      <div
-        class="leftDown"
-        v-if="$store.state.download"
-      >
+      <div class="leftDown" v-if="$store.state.download">
         <div @click="getDownloadDep">
-          <el-link
-            style="color:white"
-            icon="el-icon-download"
-          > </el-link>
+          <el-link icon="el-icon-download"> </el-link>
         </div>
       </div>
       <ul>
@@ -36,11 +30,7 @@
             label="搴忓彿"
             width="50"
           />
-          <el-table-column
-            label="瀹氫綅"
-            width="100"
-            align="center"
-          >
+          <el-table-column label="瀹氫綅" width="100" align="center">
             <template slot-scope="scope">
               <el-button
                 icon="el-icon-map-location"
@@ -87,20 +77,14 @@
         label-width="100px"
         class="codeForm"
       >
-        <el-form-item
-          :label="$t('common.passworld')"
-          prop="password"
-        >
+        <el-form-item :label="$t('common.passworld')" prop="password">
           <el-input
             type="password"
             v-model="codeForm.password"
             show-password
           ></el-input>
         </el-form-item>
-        <el-form-item
-          :label="$t('common.SPassword')"
-          prop="repassword"
-        >
+        <el-form-item :label="$t('common.SPassword')" prop="repassword">
           <el-input
             type="password"
             v-model="codeForm.repassword"
@@ -112,12 +96,9 @@
             class="primary"
             size="small"
             @click="download('codeForm')"
-          >{{ $t("common.confirm") }}</el-button>
-          <el-button
-            type="info"
-            size="small"
-            @click="closeDown('codeForm')"
-          >{{
+            >{{ $t("common.confirm") }}</el-button
+          >
+          <el-button type="info" size="small" @click="closeDown('codeForm')">{{
             $t("common.cancel")
           }}</el-button>
         </el-form-item>
@@ -131,17 +112,13 @@
       :modal="false"
       :before-close="handleInsertClose"
     >
-      <div style="width:100%; max-height:450px;overflow-y:auto">
-        <el-form
-          ref="form"
-          :model="ruleForm"
-          label-width="100px"
-        >
+      <div style="width: 100%; max-height: 450px; overflow-y: auto">
+        <el-form ref="form" :model="ruleForm" label-width="100px">
           <el-form-item label="瀹℃牳鍗曚綅">
             <div>
               <ul>
                 <li v-for="item in ruleForm.depid">
-                  {{item.name}}
+                  {{ item.name }}
                 </li>
               </ul>
             </div>
@@ -150,7 +127,7 @@
             <div>
               <ul>
                 <li v-for="item in ruleForm.tabs">
-                  {{item.tabDesc}}
+                  {{ item.tabDesc }}
                 </li>
               </ul>
             </div>
@@ -158,7 +135,7 @@
           <el-form-item label="鏉′欢">
             <el-input
               :title="ruleForm.wkt"
-              v-model=" ruleForm.wkt"
+              v-model="ruleForm.wkt"
               disabled
             ></el-input>
           </el-form-item>
@@ -173,18 +150,12 @@
             </el-input>
           </el-form-item>
           <el-form-item>
-            <el-button
-              class="primary"
-              size="small"
-              @click="getInsertDown"
-            >{{ $t("common.confirm") }}</el-button>
-            <el-button
-              type="info"
-              size="small"
-              @click="closeInsertDown"
-            >{{
-            $t("common.cancel")
-          }}</el-button>
+            <el-button class="primary" size="small" @click="getInsertDown">{{
+              $t("common.confirm")
+            }}</el-button>
+            <el-button type="info" size="small" @click="closeInsertDown">{{
+              $t("common.cancel")
+            }}</el-button>
           </el-form-item>
         </el-form>
       </div>
@@ -196,7 +167,7 @@
     ></iframe>
   </div>
 </template>
- 
+
 <script>
 import {
   dataQuery_selectByPage,
@@ -207,7 +178,8 @@
   dataLib_selectDownloadFile,
   dataQuery_selectDbOverflowDep,
   apply_insertApply,
-  decr, encr,
+  decr,
+  encr,
   dataLib_selectDepsByIds,
 } from "../../api/api.js";
 import { getToken } from "@/utils/auth";
@@ -266,7 +238,6 @@
         entity: [],
         wkt: null,
         descr: null,
-
       },
       listPage: {
         pageSize: 10,
@@ -299,11 +270,11 @@
       this.dialogVisible = true;
     },
     handleInsertClose() {
-      this.$confirm('纭鍏抽棴锛�')
-        .then(_ => {
+      this.$confirm("纭鍏抽棴锛�")
+        .then((_) => {
           this.closeInsertDown();
         })
-        .catch(_ => { });
+        .catch((_) => {});
     },
     closeInsertDown() {
       this.ruleForm = {
@@ -313,27 +284,25 @@
         repwd: null,
         wkt: null,
         descr: null,
-      }
-      this.dialogInsertVisible = false
+      };
+      this.dialogInsertVisible = false;
     },
     async getDownloadDep() {
       var std = [];
       for (var i in this.option) {
-        std.push(this.option[i].entity
-        )
+        std.push(this.option[i].entity);
       }
       var obj = {
         entities: std,
-        wkt: this.listdata.wkt
-      }
-      const data = await dataQuery_selectDbOverflowDep(JSON.stringify(obj))
+        wkt: this.listdata.wkt,
+      };
+      const data = await dataQuery_selectDbOverflowDep(JSON.stringify(obj));
       if (data.code != 200) {
         this.$message.error("鏁版嵁璇锋眰澶辫触");
         return;
       }
 
       if (data.result.length == 0 || data.result == null) {
-
         this.insertFlag = 1;
         this.dialogVisible = true;
       } else {
@@ -343,24 +312,23 @@
         var val = "";
         for (var i in data.result) {
           if (val == "") {
-            val += "ids=" + data.result[i]
+            val += "codes=" + data.result[i];
           } else {
-            val += "&ids=" + data.result[i]
+            val += "&codes=" + data.result[i];
           }
 
           std.push({
-            name: data.result[i]
-          })
+            name: data.result[i],
+          });
         }
         const data1 = await dataLib_selectDepsByIds(val);
 
         this.ruleForm.depid = data1.result;
         this.ruleForm.depname = std;
-        this.ruleForm.wkt = decr(this.listdata.wkt)
+        this.ruleForm.wkt = decr(this.listdata.wkt);
         this.ruleForm.tabs = this.option;
         this.dialogInsertVisible = true;
-      }download
-
+      }
     },
     async signGetPublicKey() {
       const res = await sign_getPublicKey();
@@ -400,31 +368,29 @@
         var std = [];
         var std1 = [];
         for (var i in this.option) {
-
-          std.push(this.option[i].tabDesc)
-          std1.push(this.option[i].entity)
+          std.push(this.option[i].tabDesc);
+          std1.push(this.option[i].entity);
         }
         var obj = {
-          ids: this.insertOption.ids,
+          depcodes: this.insertOption.ids,
           pwd: encr(this.codeForm.password),
           tabs: std,
           entities: std1,
           wkt: this.listdata.wkt,
           descr: this.ruleForm.descr,
-        }
-        const data1 = await apply_insertApply(JSON.stringify(obj))
+        };
+        const data1 = await apply_insertApply(JSON.stringify(obj));
         if (data1.code != 200) {
           this.$message.error("鏁版嵁鐢宠澶辫触");
-          return
+          return;
         }
         this.$message({
-          message: '鏁版嵁鐢宠鎴愬姛',
-          type: 'success'
+          message: "鏁版嵁鐢宠鎴愬姛",
+          type: "success",
         });
 
         this.closeDown();
       }
-
     },
     async selectDownloadFile(rsid, rspwd) {
       var downObj = {
@@ -453,7 +419,7 @@
         .then((_) => {
           this.closeDown();
         })
-        .catch((_) => { });
+        .catch((_) => {});
     },
     closeDown() {
       this.dialogVisible = false;
@@ -474,7 +440,7 @@
         }
         this.$store.state.queryInfo = [];
         if (this.$store.state.primitLayer != null) {
-            sgworld.Viewer.entities.remove(this.$store.state.primitLayer);
+          sgworld.Viewer.entities.remove(this.$store.state.primitLayer);
           sgworld.Creator.DeleteObject(this.$store.state.primitLayer);
           this.$store.state.primitLayer = null;
         }
@@ -642,7 +608,6 @@
       this.showAllImage(data.result);
     },
     async showAllImage(res) {
-
       for (var i in res) {
         var param = {
           gid: res[i].gid,
@@ -670,13 +635,11 @@
       }
     },
     primitivesAddLayer(res) {
-
       switch (res.type) {
         case "Point":
           var val = Cesium.Cartesian3.fromDegrees(
             res.coordinates[0],
-            res.coordinates[1],
-
+            res.coordinates[1]
           );
           var point = Viewer.entities.add({
             position: val,
@@ -693,11 +656,11 @@
               // 搴旂敤浜庡浘鍍忕殑缁熶竴姣斾緥銆傛瘮渚嬪ぇ浜庝細1.0鏀惧ぇ鏍囩锛岃�屾瘮渚嬪皬浜庝細1.0缂╁皬鏍囩銆�
               scale: 1.0,
               // 鏄惁鏄剧ず
-              show: true
-            }
+              show: true,
+            },
           });
-          point.billboard.disableDepthTestDistance = Number.POSITIVE_INFINITY; 
-          this.$store.state.queryInfo.push(point)
+          point.billboard.disableDepthTestDistance = Number.POSITIVE_INFINITY;
+          this.$store.state.queryInfo.push(point);
           break;
         case "LineString":
         case "MultiLineString":
@@ -712,9 +675,9 @@
               width: 5,
               material: new Cesium.Color(1.0, 0.0, 0.0, 0.3),
               clampToGround: true,
-            }
-          })
-          this.$store.state.queryInfo.push(polyline)
+            },
+          });
+          this.$store.state.queryInfo.push(polyline);
           break;
         case "MultiPolygon":
           var val = res.coordinates[0][0];
@@ -729,9 +692,9 @@
               material: new Cesium.Color(1.0, 0.0, 0.0, 0.3),
               outline: true,
               outlineColor: new Cesium.Color(1.0, 0.0, 0.0, 0.3),
-            }
-          })
-          this.$store.state.queryInfo.push(entity)
+            },
+          });
+          this.$store.state.queryInfo.push(entity);
           break;
       }
     },
@@ -758,7 +721,7 @@
   },
 };
 </script>
- 
+
 <style scoped lang="less">
 .menuPop {
   width: 100%;
@@ -822,4 +785,3 @@
   padding: 5px;
 }
 </style>
- 

--
Gitblit v1.9.3