From 865fe880b2ee89fd7ac358fa48da5e9510864aa6 Mon Sep 17 00:00:00 2001
From: Surpriseplus <845948745@qq.com>
Date: 星期四, 16 三月 2023 15:30:43 +0800
Subject: [PATCH] 拾取效果修改,地下模型效果优化

---
 src/views/Synthesis/LeftMenu.vue |  138 +++++++++++++++++++++++++++------------------
 1 files changed, 82 insertions(+), 56 deletions(-)

diff --git a/src/views/Synthesis/LeftMenu.vue b/src/views/Synthesis/LeftMenu.vue
index c0211f6..d0e7a8c 100644
--- a/src/views/Synthesis/LeftMenu.vue
+++ b/src/views/Synthesis/LeftMenu.vue
@@ -17,6 +17,7 @@
     <queryinfo ref="queryinfo" />
     <terrainDig ref="terrainDig" />
     <modelAttach ref="modelAttach" />
+    <undergroundModel ref="undergroundModel" />
     <input
       type="file"
       accept=".kml"
@@ -184,50 +185,6 @@
           </el-tab-pane>
 
         </el-tabs>
-        <!-- <el-form :model="formInline">
-          <el-form-item>
-            <el-row :gutter="20">
-              <el-col :span="20">
-                <el-input
-                  size="small"
-                  disabled
-                  v-model="formInline.file"
-                ></el-input>
-
-                <input
-                  name="file1"
-                  type="file"
-                  id="insertFile"
-                  multiple="multiple"
-                  style="display: none"
-                  @change="insertFile( )"
-                />
-              </el-col>
-              <el-col :span="4">
-                <el-link
-                  @click="getInsertFile( )"
-                  :underline="false"
-                  icon="el-icon-folder"
-                > </el-link>
-              </el-col>
-            </el-row>
-          </el-form-item>
-          <el-form-item>
-            <el-button
-              @click="setAttachInsert"
-              size="mini"
-              type="primary"
-              plain
-            >娣诲姞</el-button>
-            <el-button
-              type="danger"
-              plain
-              size="mini"
-              @click="setAttachDel"
-            >鍒犻櫎</el-button>
-          </el-form-item>
-        </el-form> -->
-        <!--     @selection-change="handleAttatchChange" -->
 
       </div>
     </el-dialog>
@@ -241,6 +198,7 @@
 import queryinfo from "../Tools/queryinfo.vue";
 import terrainDig from "../Tools/terrainDig.vue";
 import modelAttach from "../Tools/ModelAttach.vue";
+import undergroundModel from "../Tools/undergroundModel";
 import $ from "jquery";
 import { getToken } from "@/utils/auth";
 import ImageWMS from "ol/source/ImageWMS";
@@ -255,7 +213,11 @@
   comprehensive_deletes,
   comprehensive_selectModelByPageAndCount,
   comprehensive_insertModel,
-  comprehensive_updateModel, selectByBuffer
+  comprehensive_updateModel, selectByBuffer,
+  dataQuery_selectTabByEntity,
+  inquiry_selectDomains,
+  inquiry_selectFields,
+  dataQuery_selectByGid,
 } from '../../api/api.js'
 import {
   OverviewMap,
@@ -268,7 +230,7 @@
 import { geometry } from "@turf/turf";
 
 export default {
-  components: { mapinfo, maplayer, queryinfo, terrainDig, modelAttach },
+  components: { mapinfo, maplayer, queryinfo, terrainDig, modelAttach, undergroundModel },
   data() {
     return {
       showTwoMenuFlag: false,
@@ -2202,8 +2164,11 @@
           this.$store.state.isNaviget = this.isNaviget;
           break;
         case "b9": //鍦颁笅妯″紡
-          this.UndergroundMode = !this.UndergroundMode;
-          window.sgworld.Analysis.UndergroundMode(this.UndergroundMode, 0.3);
+          // this.UndergroundMode = !this.UndergroundMode;
+          // window.sgworld.Analysis.UndergroundMode(this.UndergroundMode, 0.3);
+          this.$refs &&
+            this.$refs.undergroundModel &&
+            this.$refs.undergroundModel.open("鍦颁笅妯″紡", null,);
           break;
       }
     },
@@ -2368,19 +2333,80 @@
           name: tab.replaceAll("_", "")
         }
 
-        this.$refs &&
-          this.$refs.queryinfo &&
-          this.$refs.queryinfo.close("queryinfo");
-        this.$store.state.mapPopBoxFlag = "4";
+        const res = await dataQuery_selectTabByEntity({
+          name: this.$store.state.pickoption.name
+        })
+        if (res.code != 200) {
+          return;
+        }
+        var value = res.result.split('.')
+        this.$store.state.propertiesName = {
+          ns: value[0],
+          enName: value[1],
+          tabDesc: '鎷惧彇淇℃伅'
+        }
+        var name = this.$store.state.pickoption.name;
+        const data = await inquiry_selectFields({ name: name })
+        if (data.code != 200) {
+          this.$message.error("鍒楄〃璋冪敤澶辫触")
+        }
+        const data1 = await inquiry_selectDomains({ name: name })
+        if (data1.code != 200) {
+          this.$message.error("鍒楄〃璋冪敤澶辫触")
+        }
+        this.optionx = []
+        this.attributeData = []
+        var valadata = data.result
+        var laydomain = data1.result
+        for (var i in valadata) {
+          if (valadata[i].showtype == 1) {
+            if (
+              valadata[i].domainNa != null &&
+              valadata[i].domainNa != undefined
+            ) {
+              for (var j in laydomain) {
+                if (laydomain[j].domName == valadata[i].domainNa) {
+                  valadata[i].domainNa = laydomain[j].codeDesc
+                }
+              }
+            }
+            this.optionx.push(valadata[i])
+            this.attributeData.push(valadata[i])
+          }
+        }
 
-        this.$refs &&
-          this.$refs.queryinfo &&
-          this.$refs.queryinfo.open("鎷惧彇鍒嗘瀽", null,);
+        this.getTableData()
       }
+    },
+    async getTableData() {
+      this.tableData = []
+      const data = await dataQuery_selectByGid(this.$store.state.pickoption)
+      if (data.code != 200) {
+        return
+      }
+      var valste = data.result
 
+
+      for (var j in this.optionx) {
+        if (
+          this.optionx[j].domainNa != null &&
+          this.optionx[j].domainNa != undefined
+        ) {
+
+          valste[this.optionx[j].field] = this.optionx[j].domainNa
+        }
+      }
+      var arr = {}
+      for (var i = (this.attributeData.length - 1); i >= 0; i--) {
+        var vla = this.attributeData[i]
+        arr[vla.alias] = valste[vla.field]
+      }
+      arr['eventid'] = valste.eventid
+      this.$store.state.propertiesInfo = arr;
+
+      this.$store.state.propertiesFlag = '1'
 
     },
-
 
     showModelAttach() {
       if (this.$store.state.attachModel) {

--
Gitblit v1.9.3