From c2a6c53657baaf0830cd881e1a23a15af23ac6fa Mon Sep 17 00:00:00 2001
From: Surpriseplus <845948745@qq.com>
Date: 星期四, 21 九月 2023 18:35:14 +0800
Subject: [PATCH] 代码更新

---
 src/views/datamanage/dataUpdata.vue |  351 ++++++++++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 288 insertions(+), 63 deletions(-)

diff --git a/src/views/datamanage/dataUpdata.vue b/src/views/datamanage/dataUpdata.vue
index 4a5a696..d18246f 100644
--- a/src/views/datamanage/dataUpdata.vue
+++ b/src/views/datamanage/dataUpdata.vue
@@ -57,7 +57,10 @@
                   :label="$t('shuJuGuanLi.pselect.dFiles')"
                   value="v2"
                 />
-
+                <el-option
+                  :label="$t('shuJuGuanLi.pselect.dFfilest')"
+                  value="v3"
+                />
               </el-select>
 
             </el-form-item>
@@ -204,6 +207,45 @@
             </el-form-item>
             <div class="flex_box">
               <div style="margin-right: auto">
+                <!-- 绾胯矾绫诲埆 -->
+                <el-form-item
+                  size="small"
+                  :label="$t('dataManage.dataUpObj.labe11')"
+                  v-show="formInline.uploadType =='v3'"
+                >
+                  <el-select
+                    v-model="formInline.tab"
+                    placeholder="璇烽�夋嫨"
+                  >
+                    <el-option
+                      v-for="item in lineOptions"
+                      :key="item.value"
+                      :label="item.label"
+                      :value="item.value"
+                    >
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+                <!-- 绾胯矾绫诲埆 -->
+                <el-form-item
+                  :label="$t('dataManage.dataUpObj.labe12')"
+                  v-show="formInline.uploadType =='v3'"
+                  size="small"
+                >
+                  <el-select
+                    v-model="formInline.medium"
+                    size="small"
+                    placeholder="璇烽�夋嫨"
+                  >
+                    <el-option
+                      v-for="item in mediumOptions"
+                      :key="item.value"
+                      :label="item.label"
+                      :value="item.value"
+                    >
+                    </el-option>
+                  </el-select>
+                </el-form-item>
                 <!-- 閫夋嫨鏁版嵁 -->
                 <el-form-item size="small">
                   <el-link
@@ -243,7 +285,8 @@
                 </el-form-item>
                 <!-- 閫夋嫨鍏冩暟鎹� -->
                 <el-form-item
-                  v-show="uploadFlag"
+                  v-show="uploadFlag "
+                  v-if="formInline.uploadType =='v1'"
                   style="padding-left: 16px"
                 >
                   <el-link
@@ -273,6 +316,7 @@
                 </el-form-item>
                 <el-form-item
                   v-show="uploadFlag"
+                  v-if="formInline.uploadType =='v1'"
                   size="small"
                 >
                   <el-input
@@ -642,7 +686,7 @@
               @size-change="handleSizeChange"
               @current-change="handleCurrentChange"
               :current-page="listData.pageIndex"
-              :page-sizes="[10, 50, 100, 200]"
+              :page-sizes="[10, 50, 100, 200,500]"
               :page-size="listData.pageSize"
               layout="total, sizes, prev, pager, next, jumper"
               :total="count"
@@ -1436,6 +1480,37 @@
       style="display: none"
       @change="uploadAnFilesChange"
     />
+    <el-dialog :visible.sync="noteVisible">
+      <div class="nodeBox">
+        <div style="text-align: center;">
+          <h1>
+            鏁版嵁涓婁紶娉ㄦ剰浜嬮」
+          </h1>
+        </div>
+        <h3>
+          1銆侀」鐩暣浣撲笂浼�
+        </h3>
+
+        <h5>&nbsp; &nbsp; &nbsp; &nbsp;鎸夌収椤圭洰鏍囧噯缁撴瀯缁勭粐鏁版嵁骞舵墦zip鍖咃紝鎸夎姹傜紪杈戝ソWBS鏂囦欢銆傞�夋嫨闇�瑕佷笂浼犲搴旂殑椤圭洰鍚嶇О锛岄�夋嫨zip鏁版嵁鍖呭拰WBS鏂囦欢锛屽畬鎴愭暣浣撻」鐩暟鎹笂浼狅紝涓婁紶鍏ュ簱瀹屾垚鍚庯紝绯荤粺鑷姩瑙e帇zip鍖咃紝浠ip鍖呭唴鍘熷鏂囦欢鏍煎紡瀛樺偍鍦ㄩ鍏堢粍缁囩殑鐩綍缁撴瀯涓嬨��</h5>
+        <h3>
+          2銆佸崟鏂囦欢涓婁紶
+        </h3>
+        <h5>&nbsp; &nbsp; &nbsp; &nbsp;涓婁紶鍗曚釜鏂囦欢锛岄�夋嫨闇�瑕佷笂浼犵殑瀛樺偍鐩綍浣嶇疆銆佹暟鎹増鏈�佹暟鎹笓涓氥�佹暟鎹紙.xls銆�.xlsx銆乸df銆乴as绛夋牸寮忥級銆佸厓鏁版嵁绛夛紝瀹屾垚鍗曚釜鏂囦欢鏁版嵁涓婁紶锛�</h5>
+        <h5>&nbsp; &nbsp; &nbsp; &nbsp;鎵归噺涓婁紶涓�涓渶灏忕洰褰曟枃浠跺す涓嬬殑鍚勭被鏁版嵁锛岄�夋嫨闇�瑕佷笂浼犳暟鎹殑瀛樺偍鐩綍浣嶇疆銆佹暟鎹増鏈�佹暟鎹笓涓氥�佹暟鎹紙zip鏍煎紡锛夈�佸厓鏁版嵁绛夛紝瀹屾垚涓�涓枃浠跺す涓嬪悇绫绘暟鎹笂浼狅紝涓婁紶鍏ュ簱瀹屾垚鍚庯紝绯荤粺鑷姩瑙e帇zip鍖咃紝浠ip鍖呭唴鍘熷鏂囦欢瀛樺偍鏁版嵁銆�</h5>
+        <h5>&nbsp; &nbsp; &nbsp; &nbsp;鍗曟枃浠朵笂浼犱笉鏀寔澶氱骇鐩綍鏂囦欢澶逛互zip鍘嬬缉鍖呮柟寮忎笂浼犮��</h5>
+        <h3>
+          3銆佺壒瀹氭牸寮忓崟鏂囦欢涓婁紶瑕佹眰
+        </h3>
+        <h5>鈭�&nbsp; &nbsp;<span>DOM鏁版嵁涓婁紶锛�</span>鑷冲皯闇�鍖呭惈.tif銆�.tif.ovr鏂囦欢锛屼互zip鍖呭帇缂╃粺涓�涓婁紶銆�</h5>
+        <h5>鈭�&nbsp; &nbsp;<span>DEM鏁版嵁涓婁紶锛�</span>鑷冲皯闇�鍖呭惈.tif銆�.tif.ovr鏂囦欢锛屼互zip鍖呭帇缂╃粺涓�涓婁紶銆�</h5>
+        <h5>鈭�&nbsp; &nbsp;<span>OSGB鍊炬枩妯″瀷鏁版嵁涓婁紶锛�</span>闇�鍖呭惈Data鏂囦欢澶广�乵etadata.xml鏂囦欢锛屼互zip鍖呭帇缂╃粺涓�涓婁紶銆�</h5>
+        <h5>鈭�&nbsp; &nbsp;<span>Las銆丩az鐐逛簯鏁版嵁涓婁紶锛�</span>鍙崟鐙笂浼犳枃浠讹紝涔熷彲浠ip鍖呭帇缂╃粺涓�涓婁紶銆�</h5>
+        <h5>鈭�&nbsp; &nbsp;<span>CPT鐐逛簯鏁版嵁涓婁紶锛�</span>鍙崟鐙笂浼犳枃浠讹紝涔熷彲浠ip鍖呭帇缂╃粺涓�涓婁紶銆�</h5>
+        <h5>鈭�&nbsp; &nbsp;<span>MPT鍦烘櫙鏁版嵁涓婁紶锛�</span>闇�鍖呭惈.mIdx銆�.Strmi銆�.mpt鏂囦欢锛屼互zip鍖呭帇缂╃粺涓�涓婁紶銆�</h5>
+        <h5>鈭�&nbsp; &nbsp;<span>GDB鏍煎紡鐭㈤噺鏂囦欢涓婁紶锛�</span>闇�鍖呭惈gdb鍚勭被瀛愭枃浠讹紝浠ip鍖呭帇缂╃粺涓�涓婁紶銆�</h5>
+        <h5>鈭�&nbsp; &nbsp;<span>SHP鐭㈤噺鏂囦欢涓婁紶锛�</span>闇�鍖呭惈.shp銆�.shx銆�.dbf銆乸rj瀛愭枃浠讹紝浠ip鍖呭帇缂╃粺涓�涓婁紶銆�</h5>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -1462,6 +1537,7 @@
   dataUploadSelectVerByDirid,
   dataUpload_selectMetaById,
   selectdirTab,
+  dataUpload_insertKml
 } from "../../api/api";
 
 export default {
@@ -1578,6 +1654,8 @@
         coordinateId: null,
         path: null,
         verid: null,
+        tab: "",
+        medium: "",
       },
       cascader: {
         label: "name",
@@ -1601,6 +1679,67 @@
         {
           value: "娲炲簱涓撲笟",
           label: "娲炲簱涓撲笟",
+        },
+      ],
+      lineOptions: [
+        {
+          value: 'plpipelinef',
+          label: "鍙爺涓嚎",
+        },
+        {
+          value: 'plpipelineb',
+          label: "璁捐涓嚎",
+        },
+        {
+          value: 'plpipelined',
+          label: "鏂藉伐鍥句腑绾�",
+        },
+        {
+          value: 'plpipelinea',
+          label: "绔e伐鍥句腑绾�",
+        },
+      ],
+      mediumOptions: [
+        {
+          value: 'GS',
+          label: "澶╃劧姘�",
+        },
+        {
+          value: 'CO',
+          label: "鍘熸补",
+        },
+        {
+          value: 'RP',
+          label: "鎴愬搧娌�",
+        },
+        {
+          value: 'LN',
+          label: "娑插寲澶╃劧姘�",
+        },
+        {
+          value: 'SL',
+          label: "娑插寲鐭虫补姘�",
+        }, {
+          value: 'WA',
+          label: "鐭挎祮",
+        }, {
+          value: 'ST',
+          label: "钂告苯",
+        }, {
+          value: 'CD',
+          label: "浜屾哀鍖栫⒊",
+        }, {
+          value: 'HY',
+          label: "姘㈡皵",
+        }, {
+          value: 'QT',
+          label: "鍏朵粬",
+        }, {
+          value: '-1',
+          label: "鏈煡",
+        }, {
+          value: '0',
+          label: "鏈皟鏌�",
         },
       ],
       fileType: [],
@@ -1674,11 +1813,12 @@
       },
       warehouseDialog: false,
       wareData: [],
+      noteVisible: false,
     };
   },
 
   mounted() {
-
+    this.noteVisible = true;
     //鑾峰彇鍧愭爣绯�
     this.setCoordinateSystem();
     //鑾峰彇椤圭洰鍚嶇О
@@ -2090,8 +2230,8 @@
       for (var i = 0; i < val1.length; i++) {
         const stdTab = this.setSplitWare(val1[i].tab);
         for (var j = 0; j < val2.length; j++) {
-
-          if (val2[j].tab.indexOf(stdTab) > -1) {
+          var tabs = stdTab.toLowerCase();
+          if (val2[j].tab.indexOf(tabs) > -1) {
             std.push(val1[i].tab);
             val1[i].entity = val2[j].entity;
             val1[i].tabDesc = val2[j].tabDesc;
@@ -2181,72 +2321,120 @@
       this.getDataLoaderSelectTabs();
       this.dialogWarehousing = true;
     },
-    //鏁版嵁鍏ュ簱
-    async setFileWare() {
-      if (this.pathBak != null) {
-        //鏄惁鏈夎川妫�鏂规
-        if (this.formInline.uploadType == "v1") {
-          //鍗曟枃浠朵笂浼�
-          var std = [];
-          for (var i in this.tableData) {
-            if (this.tableData[i].name.indexOf(".zip") != -1) {
-              if (this.tableData[i].code != null) {
-                std.push(this.tableData[i].name);
-              }
-            }
-          }
-          if (std.length != 0) {
-            return this.$message.error(
-              std.toString() + ",鏈川妫�鎴栬川妫�澶辫触,涓嶈兘鍏ュ簱"
-            );
-          }
-        } else if (this.formInline.uploadType == "v2") {
-          //鏁翠綋椤圭洰涓婁紶
-
-          if (this.tableData.length != 2) {
-            return this.$message.error("璇蜂繚鐣欎竴涓獄ip鏁版嵁,涓�涓猈BS鏁版嵁杩涜鍏ュ簱");
-          }
-          var std = [];
-          for (var i in this.tableData) {
-            if (this.tableData[i].code != null) {
-              std.push(this.tableData[i].name);
-            }
-          }
-          if (std.length != 0) {
-            return this.$message.error(
-              std.toString() + ",鏈川妫�鎴栬川妫�澶辫触,涓嶈兘鍏ュ簱"
-            );
-          }
-        }
-      }
+    //kml鏂囦欢鍏ュ簱
+    async setKMlWare() {
       this.loading = true;
       var obj = {
         dirid: this.formInline.dirid,
         epsgCode: this.formInline.coordinateId,
         path: this.formInline.path,
         verid: this.formInline.verid,
+        entity: this.formInline.tab,
+        medium: this.formInline.medium,
       };
       this.loadText = "鏁版嵁鏄犲皠鏌ヨ涓�,璇风瓑寰�..."
-      //鏌ヨ鏄犲皠
       const data = await dataUpload_selectMappers(obj);
       if (data.code != 200) {
         return this.$message.error("鏁版嵁鏄犲皠澶辫触");
       }
-      this.loading = false;
-      this.loadText = " "
-      var std = [];
-      var result = data.result;
-      this.insertWareList = data.result;
-      for (var i in result) {
-        if (result[i].type == "shp" || result[i].type == "gdb") {
-          std.push(result[i]);
-        }
+
+      var std = data.result.filter((res) => {
+        res.entity = obj.entity
+        res.medium = obj.medium
+        return res;
+      })
+
+      this.loadText = "鏁版嵁鍏ュ簱涓�,璇风瓑寰�..."
+      const res = await dataUpload_insertKml(
+        JSON.stringify(std)
+      );
+      if (res.code != 200) {
+        this.$message.error("鏁版嵁鍏ュ簱澶辫触");
+        return;
       }
-      if (std.length != 0) {
-        this.tableWareOne = std;
-        this.showWareHousing();
+
+      this.$message({
+        message: "鏁版嵁鍏ュ簱鎴愬姛",
+        type: "success",
+      });
+      this.loading = false;
+      this.loadText = ""
+      if (res.result.length > 0) {
+        this.warehouseDialog = true;
+        this.wareData = res.result;
+      }
+
+      this.setInsrtWareTableClose();
+    },
+    //鏁版嵁鍏ュ簱
+    async setFileWare() {
+      if (this.formInline.uploadType == "v3") {
+        this.setKMlWare()
       } else {
-        this.setInsrtWareTable();
+        if (this.pathBak != null) {
+          //鏄惁鏈夎川妫�鏂规
+          if (this.formInline.uploadType == "v1") {
+            //鍗曟枃浠朵笂浼�
+            var std = [];
+            for (var i in this.tableData) {
+              if (this.tableData[i].name.indexOf(".zip") != -1) {
+                if (this.tableData[i].code != null) {
+                  std.push(this.tableData[i].name);
+                }
+              }
+            }
+            if (std.length != 0) {
+              return this.$message.error(
+                std.toString() + ",鏈川妫�鎴栬川妫�澶辫触,涓嶈兘鍏ュ簱"
+              );
+            }
+          } else if (this.formInline.uploadType == "v2") {
+            //鏁翠綋椤圭洰涓婁紶
+            if (this.tableData.length != 2) {
+              return this.$message.error("璇蜂繚鐣欎竴涓獄ip鏁版嵁,涓�涓猈BS鏁版嵁杩涜鍏ュ簱");
+            }
+            var std = [];
+            for (var i in this.tableData) {
+              if (this.tableData[i].code != null) {
+                std.push(this.tableData[i].name);
+              }
+            }
+            if (std.length != 0) {
+              return this.$message.error(
+                std.toString() + ",鏈川妫�鎴栬川妫�澶辫触,涓嶈兘鍏ュ簱"
+              );
+            }
+          }
+        }
+        this.loading = true;
+        var obj = {
+          dirid: this.formInline.dirid,
+          epsgCode: this.formInline.coordinateId,
+          path: this.formInline.path,
+          verid: this.formInline.verid,
+        };
+        this.loadText = "鏁版嵁鏄犲皠鏌ヨ涓�,璇风瓑寰�..."
+        //鏌ヨ鏄犲皠
+        const data = await dataUpload_selectMappers(obj);
+        if (data.code != 200) {
+          return this.$message.error("鏁版嵁鏄犲皠澶辫触");
+        }
+        this.loading = false;
+        this.loadText = " "
+        var std = [];
+        var result = data.result;
+        this.insertWareList = data.result;
+        for (var i in result) {
+          if (result[i].type == "shp" || result[i].type == "gdb") {
+            std.push(result[i]);
+          }
+        }
+        if (std.length != 0) {
+          this.tableWareOne = std;
+          this.showWareHousing();
+        } else {
+          this.setInsrtWareTable();
+        }
       }
     },
     //涓嬭浇鏃ュ織
@@ -2544,11 +2732,18 @@
     //娓呴櫎鎵�鏈塱nput File;
     clearFileSelect() {
       this.formInline.specialtyData = "璇烽�夋嫨鏁版嵁";
-      document.getElementById("selectDataFile").value = "";
+      if (document.getElementById("selectDataFile")) {
+        document.getElementById("selectDataFile").value = "";
+      }
       this.formInline.metaData = "璇烽�夋嫨鍏冩暟鎹�";
-      document.getElementById("metaDataFile").value = "";
+      if (document.getElementById("metaDataFile")) {
+        document.getElementById("metaDataFile").value = ""
+      }
       this.formInline.wbsData = "璇烽�夋嫨WBS鏁版嵁";
-      document.getElementById("wbsDataFile").value = "";
+
+      if (document.getElementById("wbsDataFile")) {
+        document.getElementById("wbsDataFile").value = "";
+      }
     },
     //鑾峰彇涓婁紶鏂囦欢鏁伴噺
     async getFileLength() {
@@ -2590,6 +2785,8 @@
         if (fs2.files.length == 0) {
           return this.$message.error("璇烽�夋嫨闇�瑕佷笂浼犵殑WBS鏁版嵁鏂囦欢");
         }
+      } else if (this.formInline.uploadType == "v3") {
+
       }
       for (var i = 0, c = fs1.files.length; i < c; i++) {
         formData.append(fs1.files[i].name, fs1.files[i]);
@@ -2975,6 +3172,8 @@
       this.formInline.entryId = null;
       this.formInline.selectFileType = "*.*";
       this.formInline.coordinateId = this.coordinateOption[0].epsgcode;
+      this.formInline.medium = "";
+      this.formInline.tab = "";
     },
     //閫夋嫨鏁版嵁
     setSelectFile() {
@@ -2995,8 +3194,16 @@
         this.formInline.dirid = this.entryOption[0].id;
         this.getselectVerByDirid();
         this.pathBak = this.entryOption[0].checks;
+      } else if (res == "v3") {
+        this.formInline.selectFileType = ".kml";
+        this.getSelectdirTab();
+        this.getselectVerByDirid();
+        this.formInline.specialtyId = "绾胯矾涓撲笟";
+        this.uploadFlag = true;
+        this.formInline.tab = this.lineOptions[0].value;
+        this.formInline.medium = this.mediumOptions[0].value
       } else {
-        this.getStartDirChecked(this.catalogOption);
+        this.getSelectdirTab();
         this.getselectVerByDirid();
         this.uploadFlag = true;
       }
@@ -3103,6 +3310,8 @@
     handleTabClick(tab, event) {
       if (tab.name == "second") {
         this.setStartWareTable();
+      } else {
+        this.noteVisible = true
       }
       this.calHeight();
     },
@@ -3147,7 +3356,23 @@
     z-index: 9999;
   }
 }
-
+.nodeBox {
+  h5 {
+    line-height: 26px;
+    font-size: 14px;
+    span {
+      font-weight: bolder;
+    }
+  }
+  h3 {
+    line-height: 40px;
+    font-size: 16px;
+    font-weight: bold;
+  }
+  h1 {
+    font-weight: bold;
+  }
+}
 .inquire {
   padding: 8px;
   //margin-top: 20px;

--
Gitblit v1.9.3