From 63be6c3a6e0308812cb9f0ab26a15aff293200a0 Mon Sep 17 00:00:00 2001
From: Surpriseplus <845948745@qq.com>
Date: 星期四, 11 五月 2023 16:06:43 +0800
Subject: [PATCH] 模型发布预览修改,属性查询修改

---
 src/components/MapView/mapSpaceTop.vue    |   74 ++++-------
 src/views/datamanage/uploadmanage.vue     |   40 +++---
 src/assets/lang/zh.js                     |    5 
 src/views/Tools/LayerTree.vue             |   12 +
 src/views/datamanage/dictionaryManage.vue |   30 ++--
 src/views/datamanage/projectManage.vue    |  119 +++++++++++++------
 src/components/preview_map.vue            |   23 ++-
 src/assets/lang/en.js                     |    4 
 src/components/mapsdk.vue                 |   11 +
 9 files changed, 172 insertions(+), 146 deletions(-)

diff --git a/src/assets/lang/en.js b/src/assets/lang/en.js
index 3a85e64..6326636 100644
--- a/src/assets/lang/en.js
+++ b/src/assets/lang/en.js
@@ -78,8 +78,8 @@
     layerObj: {
       menuName: 'menu name',
       menuType: 'Menu Type',
-      menuName: 'Layer Name',
-      menuType: 'Layer Type',
+      layerName: 'Layer Name',
+      layerType: 'Layer Type',
       serviceName: 'service name',
       serviceType: 'service type',
       serviceAddress: 'Service Address',
diff --git a/src/assets/lang/zh.js b/src/assets/lang/zh.js
index ee89852..0b1f412 100644
--- a/src/assets/lang/zh.js
+++ b/src/assets/lang/zh.js
@@ -77,8 +77,8 @@
     layerObj: {
       menuName: '鑿滃崟鍚嶇О',
       menuType: '鑿滃崟绫诲瀷',
-      menuName: '鍥惧眰鍚嶇О',
-      menuType: '鍥惧眰绫诲瀷',
+      layerName: '鍥惧眰鍚嶇О',
+      layerType: '鍥惧眰绫诲瀷',
       serviceName: '鏈嶅姟鍚嶇О',
       serviceType: '鏈嶅姟绫诲瀷',
       serviceAddress: '鏈嶅姟鍦板潃',
@@ -92,7 +92,6 @@
       prompt2: '璇烽�夋嫨鍥惧眰绫诲瀷',
       prompt3: '璇烽�夋嫨鏈嶅姟绫诲瀷',
       prompt4: '璇疯緭鍏ユ湇鍔″湴鍧�',
-
       prompt6: '璇疯緭鍏ヨ嫳鏂囪〃鍚嶇О(濡�:m_geocontrolpoint)',
       prompt7: '璇疯緭鍏ュ娉ㄤ俊鎭�',
       prompt8: '璇烽�夋嫨鏁版嵁绫诲瀷',
diff --git a/src/components/MapView/mapSpaceTop.vue b/src/components/MapView/mapSpaceTop.vue
index ffdfb51..fb4b322 100644
--- a/src/components/MapView/mapSpaceTop.vue
+++ b/src/components/MapView/mapSpaceTop.vue
@@ -2,16 +2,25 @@
   <div class="spaceBox">
     <el-select
       v-model="menuTopFrom.queryLayer"
-      @change="menuTreeCheck"
-      placeholder="璇烽�夋嫨..."
+      placeholder="璇烽�夋嫨鏁版嵁..."
       filterable
+      ref="selectTree1"
     >
       <el-option
-        v-for="item in layerData"
-        :key="item.entity"
-        :label="item.tabDesc"
-        :value="item.entity"
+        :value="menuTopFrom.queryLayer"
+        style="height: 100%"
       >
+        <div style="height: 200px; overflow: auto">
+          <el-tree
+            :data="layerData"
+            node-key="id"
+            ref="tree"
+            @node-click="handleNodeClick"
+            highlight-current
+            :props="defaultProps"
+          >
+          </el-tree>
+        </div>
       </el-option>
     </el-select>
     <!-- <el-select
@@ -72,6 +81,7 @@
       layerData: [
 
       ],
+
       defaultProps: {
         children: "children",
         label: "label",
@@ -94,50 +104,20 @@
         this.$message.error("鍒楄〃璋冪敤澶辫触");
       }
       var option = data.result;
-      this.layerData = option.filter((res) => {
+      this.layerData = getTreeData(option)
 
-        return res;
-
-      });
-      // this.layerData = getTreeData(option)
-      // var val = data.result
-      // var std = [];
-      // val.filter((item) => {
-      //   if (std.indexOf(item.bak) == -1) {
-      //     std.push(item.bak);
-      //     this.layerData.push(
-      //       {
-      //         val: item.bak,
-      //         label: item.bak,
-      //         children: [],
-      //       }
-      //     )
-      //   }
+      // = option.filter((res) => {
+      //   return res;
       // });
-      // for (var i in this.layerData) {
-      //   var item = this.layerData[i];
-      //   for (var j in val) {
-      //     var res = val[j];
+    },
+    handleNodeClick(data) {
+      if (data.children) return;
+      this.menuTopFrom.queryLayer = data.tabDesc
+      this.$refs.selectTree1.blur();
+      this.mapSpaceQueryLayer = data.entity;
+      this.$store.state.propertiesName = data;
+      this.getCheckedNodes();
 
-      //     if (item.val === res.bak) {
-
-      //       res.label = res.tabDesc
-      //       this.layerData[i].children.push(res)
-      //     }
-      //   }
-      // }
-
-      // for (var i in option) {
-      //   // console.log(option[i].tableType)
-      //   var val_Data = option[i];
-      //   val_Data.id = '1' + i;
-      //   val_Data.label = val_Data.tabDesc;
-      //   if (option[i].ns == 'bd') {
-      //     this.layerData[0].children.push(val_Data);
-      //   } else {
-      //     this.layerData[1].children.push(val_Data);
-      //   }
-      // }
     },
     getCheckedNodes() {
       this.$store.state.mapSpaceQueryLayer = this.mapSpaceQueryLayer;
diff --git a/src/components/mapsdk.vue b/src/components/mapsdk.vue
index cc64bbf..f80f26d 100644
--- a/src/components/mapsdk.vue
+++ b/src/components/mapsdk.vue
@@ -1016,7 +1016,9 @@
       window.pickedColor;
       window.modeCatchHandler = new Cesium.ScreenSpaceEventHandler(Viewer.scene.canvas);
       window.modeCatchHandler.setInputAction((event) => {
-        window.pickedFeature && (window.pickedFeature.color = window.pickedColor);
+        if (window.pickedColor) {
+          window.pickedFeature && (window.pickedFeature.color = window.pickedColor);
+        }
         window.pickedFeature = sgworld.Viewer.scene.pick(event.position);
         if (Cesium.defined(window.pickedFeature)) {
           if (window.pickedFeature.primitive instanceof Cesium.Cesium3DTileset) {
@@ -1038,10 +1040,11 @@
         const data = await comprehensive_selectPubById({ id: result.tileset.pubid })
         if (data.code != 200) {
           return
-        } else {
-
-          modelKey = JSON.parse(data.result.json).modelid
         }
+        if (!JSON.parse(data.result.json)) {
+          return this.$message('娌℃湁鏁版嵁,鏃犳硶鑾峰彇涓婚敭ID');
+        }
+        modelKey = JSON.parse(data.result.json).modelid
         if (!modelKey) {
           return this.$message('娌℃湁妯″瀷涓婚敭ID,鏃犳硶鏌ヨ鏁版嵁');
         }
diff --git a/src/components/preview_map.vue b/src/components/preview_map.vue
index c2a5c09..1705e6a 100644
--- a/src/components/preview_map.vue
+++ b/src/components/preview_map.vue
@@ -945,7 +945,7 @@
           Viewer.camera.flyTo({
             destination: Cesium.Cartesian3.fromDegrees(wkt.coordinates[1], wkt.coordinates[0], height),
           });
-        } else if (type == '3dml') {
+        } else if (type == '3dml' || type == 'fbx' || type == 'ifc' || type == 'rvt') {
           if (this.app.tileset) viewer.scene.primitives.remove(this.app.tileset);
           this.app.tileset = this.createTileset(res);
           var that = this;
@@ -1213,18 +1213,19 @@
 
       } else {
         var std = data.result
-        var val = std.filter((str) => {
-          if (str.type == 1 && str.pid == 1) {
-            return str;
-          }
-          if (str.id == 1 && str.pid == 0) {
-            return str;
-          }
-          if (str.type == 1 && str.cnName == '涓夌淮鍦拌川妯″瀷' || str.cnName == '鍗曚綋妯″瀷' || str.cnName == '娲炲簱妯″瀷') {
-            return str;
+        var val = [];
+        std.filter((str) => {
+          // if (str.type == 1 && str.pid == 1) {
+          //   return str;
+          // }
+          // if (str.id == 1 && str.pid == 0) {
+          //   return str;
+          // }
+          if (str.type == 1) {
+            val.push(str);
           }
           if (str.url != null && str.type == 2 && str.serveType == 'Tileset') {
-            return str;
+            val.push(str);
           }
         });
 
diff --git a/src/views/Tools/LayerTree.vue b/src/views/Tools/LayerTree.vue
index d7e14da..02cb596 100644
--- a/src/views/Tools/LayerTree.vue
+++ b/src/views/Tools/LayerTree.vue
@@ -696,8 +696,10 @@
           std.push(val[i])
         }
       }
+
       var result = data[0]
       if (this.$refs.tree.getNode(result.id).checked) {
+
         std.push(result.id);
         var base_ulr = result.url;
         if (base_ulr.indexOf('{host}') > -1) {
@@ -1232,7 +1234,7 @@
             return rs
           }
         })
-        debugger
+
         var val = this.$store.state.oldTree.filter(rs => {
           if (rs.enName == st_code[0].code) {
             return rs
@@ -1325,6 +1327,7 @@
       window.terrainMptLayer = sgworld.Creator.sfsterrainprovider("", option, "", true, "");
     },
     setTerrainDemLayer(res) {
+
       window.terrainDemLayer = new Cesium.CesiumTerrainProvider({
         url: res
       });
@@ -1344,6 +1347,7 @@
       var listTileset = [];
       var listTMS = [];
       var listMpt = [];
+      var listDem = [];
       for (var i in res) {
         if (res[i].type == 2) {
           switch (res[i].serveType) {
@@ -1362,11 +1366,13 @@
             case 'TMS':
               listTMS.push(res[i])
               break;
-
+            case 'DEM':
+              listDem.push(this.childOption[i])
+              break;
           }
         }
       }
-      // this.setChangeProLayer();
+      this.setChangeDem(listDem, true);
       this.setChangeWMS(listWMS, true);
       this.setChangeWFS(listWFS, true);
       this.setChangeTileset(listTileset, true);
diff --git a/src/views/datamanage/dictionaryManage.vue b/src/views/datamanage/dictionaryManage.vue
index 3dc8e52..39afbf6 100644
--- a/src/views/datamanage/dictionaryManage.vue
+++ b/src/views/datamanage/dictionaryManage.vue
@@ -461,7 +461,7 @@
               v-model="insertform.orderNum"
               autocomplete="off"
               style="width:85%"
-               :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuenumber')"
+              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuenumber')"
             ></el-input>
           </el-form-item>
           <el-form-item
@@ -496,7 +496,7 @@
               v-model="insertform.field"
               autocomplete="off"
               style="width:85%"
-                :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuefieldName')"
+              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuefieldName')"
             ></el-input>
           </el-form-item>
           <el-form-item
@@ -507,7 +507,7 @@
               v-model="insertform.alias"
               autocomplete="off"
               style="width:85%"
-                  :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuefieldDisplayName')"
+              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuefieldDisplayName')"
             ></el-input>
           </el-form-item>
           <el-form-item
@@ -518,7 +518,7 @@
               v-model="insertform.type"
               autocomplete="off"
               style="width:85%"
-               :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuefieldType')"
+              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuefieldType')"
             ></el-input>
           </el-form-item>
           <el-form-item
@@ -529,7 +529,7 @@
               v-model="insertform.len"
               autocomplete="off"
               style="width:85%"
-               :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuefieldLength')"
+              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuefieldLength')"
             ></el-input>
           </el-form-item>
           <el-form-item
@@ -540,7 +540,7 @@
               v-model="insertform.precision"
               autocomplete="off"
               style="width:85%"
-                :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('dataManage.dictionaryManageObj.FieldPrecision')"
+              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('dataManage.dictionaryManageObj.FieldPrecision')"
             ></el-input>
           </el-form-item>
 
@@ -552,7 +552,7 @@
               v-model="insertform.bak"
               autocomplete="off"
               style="width:85%"
-                :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('dataManage.dictionaryManageObj.remark')"
+              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('dataManage.dictionaryManageObj.remark')"
             ></el-input>
           </el-form-item>
         </el-form>
@@ -674,18 +674,20 @@
       if (res.children) {
         return
       }
-      this.insertform.tab = res.tab;
-      this.insertform.tabDesc = res.tabDesc;
-      this.insertform.ns = res.ns;
-      this.activeName = res.tab;
-      this.listData.tab = res.tab;
-      this.listData.ns = res.ns;
+      var val = JSON.parse(JSON.stringify(res))
+      this.insertform.tab = val.tab;
+      this.insertform.tabDesc = val.tabDesc;
+      this.insertform.ns = val.ns;
+      this.activeName = val.tab;
+      this.listData.tab = val.tab;
+      this.listData.ns = val.ns;
       this.startQueryNameData();
     },
     async startQueryNameData() {
       if (this.listData.tab == "") {
         delete this.listData.tab;
       }
+      this.tableData = [];
       const data = await selectByPageAndCount(this.listData);
 
       if (data.code != 200) {
@@ -716,6 +718,7 @@
         return;
       }
       this.dialogFormVisible = false;
+      // this.startQueryNameData();
       this.startQueryNameData();
     },
     //淇敼璇︽儏寮规
@@ -865,6 +868,7 @@
       this.$confirm("鍏抽棴鍚庢棤娉曚繚瀛橈紝鏄惁鍏抽棴?")
         .then((_) => {
           this.InsertFormdialog = false
+          this.insertform = {};
         })
         .catch((_) => { });
     },
diff --git a/src/views/datamanage/projectManage.vue b/src/views/datamanage/projectManage.vue
index 56eb6a4..ba43022 100644
--- a/src/views/datamanage/projectManage.vue
+++ b/src/views/datamanage/projectManage.vue
@@ -1,18 +1,19 @@
 <template>
   <div class="verSionBox">
-    <My-bread
-      :list="[
+    <My-bread :list="[
         `${$t('dataManage.dataManage')}`,
         `${$t('dataManage.projectManage')}`,
-      ]"
-    ></My-bread>
+      ]"></My-bread>
     <el-divider />
     <div class="verSionContent">
       <div
         class="verSion_leftTree subpage_Div"
         style="border: 1px solid #dcdfe6"
       >
-        <el-form :inline="true" class="demo-form-inline">
+        <el-form
+          :inline="true"
+          class="demo-form-inline"
+        >
           <el-form-item>
             <el-input
               size="small"
@@ -30,8 +31,7 @@
               :disabled="count1 != 0 ? true : false"
               type="success"
               size="small"
-              >{{ $t("common.increase") }}</el-button
-            >
+            >{{ $t("common.increase") }}</el-button>
           </el-form-item>
         </el-form>
         <el-tree
@@ -51,7 +51,10 @@
         <!--
         <!-- <el-divider class="eldivider" /> -->
         <!-- <div class="dividing-line"></div> -->
-        <div class="table_box" style="height: 100%">
+        <div
+          class="table_box"
+          style="height: 100%"
+        >
           <el-table
             ref="filterTable"
             :data="dbTableData"
@@ -114,7 +117,10 @@
               prop="remarks"
               :label="$t('dataManage.projectObj.remarks')"
             />
-            <el-table-column label="鎿嶄綔" width="200">
+            <el-table-column
+              label="鎿嶄綔"
+              width="200"
+            >
               <template slot-scope="scope">
                 <el-button
                   v-if="btnStatus.delete"
@@ -122,16 +128,14 @@
                   size="small"
                   plain
                   type="danger"
-                  >{{ $t("common.delete") }}</el-button
-                >
+                >{{ $t("common.delete") }}</el-button>
                 <el-button
                   v-if="btnStatus.update"
                   @click="EditProject(scope.row)"
                   type="warning"
                   plain
                   size="small"
-                  >{{ $t("common.update") }}</el-button
-                >
+                >{{ $t("common.update") }}</el-button>
               </template>
             </el-table-column>
           </el-table>
@@ -207,16 +211,32 @@
           </el-form-item>
 
           <el-form-item :label="$t('dataManage.projectObj.country')">
-            <el-input v-model="editFrom.country" style="width: 85%"  :placeholder="$t('shuJuGuanLi.shuJuJianSuo.country')"></el-input>
+            <el-input
+              v-model="editFrom.country"
+              style="width: 85%"
+              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.country')"
+            ></el-input>
           </el-form-item>
           <el-form-item :label="$t('dataManage.projectObj.province')">
-            <el-input v-model="editFrom.province" style="width: 85%"  :placeholder="$t('shuJuGuanLi.shuJuJianSuo.province')"></el-input>
+            <el-input
+              v-model="editFrom.province"
+              style="width: 85%"
+              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.province')"
+            ></el-input>
           </el-form-item>
           <el-form-item :label="$t('dataManage.projectObj.county')">
-            <el-input v-model="editFrom.location" style="width: 85%"  :placeholder="$t('shuJuGuanLi.shuJuJianSuo.city')"></el-input>
+            <el-input
+              v-model="editFrom.location"
+              style="width: 85%"
+              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.city')"
+            ></el-input>
           </el-form-item>
           <el-form-item :label="$t('dataManage.projectObj.corpname')">
-            <el-input v-model="editFrom.corpname" style="width: 85%"  :placeholder="$t('shuJuGuanLi.shuJuJianSuo.construction')"></el-input>
+            <el-input
+              v-model="editFrom.corpname"
+              style="width: 85%"
+              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.construction')"
+            ></el-input>
           </el-form-item>
           <el-form-item :label="$t('dataManage.projectObj.department')">
             <el-input
@@ -229,11 +249,15 @@
             <el-input
               v-model="editFrom.conperiod"
               style="width: 85%"
-               :placeholder="$t('shuJuGuanLi.shuJuJianSuo.constructionperiod')"
+              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.constructionperiod')"
             ></el-input>
           </el-form-item>
           <el-form-item :label="$t('dataManage.projectObj.contents')">
-            <el-input v-model="editFrom.contents" style="width: 85%"  :placeholder="$t('shuJuGuanLi.shuJuJianSuo.projectContent')"></el-input>
+            <el-input
+              v-model="editFrom.contents"
+              style="width: 85%"
+              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.projectContent')"
+            ></el-input>
           </el-form-item>
           <el-form-item :label="$t('dataManage.projectObj.projstate')">
             <el-input
@@ -243,19 +267,29 @@
             ></el-input>
           </el-form-item>
           <el-form-item :label="$t('dataManage.projectObj.remarks')">
-            <el-input v-model="editFrom.remarks" style="width: 85%"    :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueRemarks')"></el-input>
+            <el-input
+              v-model="editFrom.remarks"
+              style="width: 85%"
+              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueRemarks')"
+            ></el-input>
           </el-form-item>
         </el-form>
       </div>
-      <div slot="footer" class="dialog-footer">
+      <div
+        slot="footer"
+        class="dialog-footer"
+      >
         <el-button
           type="info"
           size="small"
           :disabled="behavior != '鏂板椤圭洰' ? true : false"
           @click="setRestEditFrom"
-          >{{ $t("common.reset") }}</el-button
-        >
-        <el-button size="small" type="primary" @click="insertEditFrom">{{
+        >{{ $t("common.reset") }}</el-button>
+        <el-button
+          size="small"
+          type="primary"
+          @click="insertEditFrom"
+        >{{
           $t("common.confirm")
         }}</el-button>
       </div>
@@ -344,7 +378,7 @@
           this.getSelectProject();
           done();
         })
-        .catch((_) => {});
+        .catch((_) => { });
     },
     async innerClose() {
       this.showMap = false;
@@ -397,30 +431,33 @@
       this.editFrom = { geom: " " };
       this.$store.state.projeOl = null;
     },
-
+    async delprojectData(id) {
+      const data = await project_delete({ gid: id });
+      if (data.code == 200) {
+        this.$message({
+          message: "鍒犻櫎鎴愬姛锛�",
+          type: "success",
+        });
+        this.getSelectProject();
+      } else {
+        this.$message({
+          message: "鍒犻櫎澶辫触锛�",
+          type: "warning",
+        });
+      }
+    },
     //鍒犻櫎椤圭洰
     async deleteProject(row) {
+      var that = this;
       this.$confirm("姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ラ」鐩�, 鏄惁缁х画?", "鎻愮ず", {
         confirmButtonText: "纭畾",
         cancelButtonText: "鍙栨秷",
         type: "warning",
       })
         .then(async () => {
-          const data = await project_delete({ gid: row.gid });
-          if (data.code == 200) {
-            this.$message({
-              message: "鍒犻櫎鎴愬姛锛�",
-              type: "success",
-            });
-            this.getRoleTabelData();
-          } else {
-            this.$message({
-              message: "鍒犻櫎澶辫触锛�",
-              type: "warning",
-            });
-          }
-        })
-        .catch(() => {
+
+          that.delprojectData(row.gid)
+        }).catch(() => {
           this.$message({
             type: "info",
             message: "宸插彇娑堝垹闄�",
diff --git a/src/views/datamanage/uploadmanage.vue b/src/views/datamanage/uploadmanage.vue
index a6d3a59..29bd7b6 100644
--- a/src/views/datamanage/uploadmanage.vue
+++ b/src/views/datamanage/uploadmanage.vue
@@ -129,14 +129,13 @@
             size="small"
             :title="$t('dataManage.vmobj.keyword')"
             v-model="formInline.name"
-              :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuedataName')"
+            :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuedataName')"
           > <i
               @click="getTableData"
               :title="$t('common.iquery')"
               slot="suffix"
               class="el-icon-search"
               style="padding-right: 8px"
-            
             ></i></el-input>
         </el-form-item>
         <el-form-item style="float:right">
@@ -674,25 +673,19 @@
         this.$message.error("鍚嶇О涓嶈兘涓虹┖")
         return
       }
-      if (!min) {
-        this.$message.error("璇疯緭鍏ユ渶灏忕骇鍒�(0 ~ 20)")
-        return
-      } else {
 
-        if (parseInt(min) < 0 || parseInt(min) > 20) {
-          this.$message.error(" 鏈�灏忕骇鍒笉鑳藉皬浜� 0 鎴栧ぇ浜� 20 ")
-          return
-        }
-      }
-      if (!max) {
-        this.$message.error("璇疯緭鍏ユ渶澶х骇鍒�(0 ~ 20)")
+
+      if (parseInt(min) < 0 || parseInt(min) > 20) {
+        this.$message.error("鏈�灏忕骇鍒笉鑳藉皬浜� 0 鎴栧ぇ浜� 20 ")
         return
-      } else {
-        if (parseInt(max) < 0 || parseInt(max) > 20) {
-          this.$message.error(" 鏈�澶х骇鍒笉鑳藉皬浜� 0 鎴栧ぇ浜� 20 ")
-          return
-        }
       }
+
+
+      if (parseInt(max) < 0 || parseInt(max) > 20) {
+        this.$message.error(" 鏈�澶х骇鍒笉鑳藉皬浜� 0 鎴栧ぇ浜� 20 ")
+        return
+      }
+
       if (parseInt(min) > parseInt(max)) {
         this.$message.error("鏈�灏忕骇鍒笉寰楀ぇ浜庢渶澶х骇鍒�")
         return
@@ -715,14 +708,14 @@
       this.insertDialogVisible = false;
 
       const data = await publish_insert(obj);
-      if (data.code != 200 || data.count > 0) {
-        this.$message.error("鏁版嵁鍙戝竷澶辫触")
 
-      } else {
+      if (data.code == 200 && data.result > 0) {
         this.$message({
           message: '鏁版嵁鍙戝竷鎴愬姛',
           type: 'success'
         });
+      } else {
+        this.$message.error("鏁版嵁鍙戝竷澶辫触")
       }
       this.loadDialogVisible = false
       this.getTableData();
@@ -735,7 +728,8 @@
         return
       }
       if (this.formInline.type == "DOM" || this.formInline.type == "DEM") {
-        this.insertLayer.name = this.formInline.dirName;
+
+        this.insertLayer.name = this.multipleSelection[0].name.split('.')[0];
         this.insertLayer.number = this.multipleSelection.length
         this.insertLayer.noData = '0';
         this.insertDialogVisible = true;
@@ -744,12 +738,14 @@
         for (var i in this.multipleSelection) {
           std.push(this.multipleSelection[i].id)
         }
+
         var obj = {
           dircode: this.formInline.dirid,
           depcode: this.formInline.depid,
           ids: std,
           type: this.formInline.type
         }
+
         this.loadDialogVisible = true
         this.insertDialogVisible = false;
 

--
Gitblit v1.9.3