From a3d3b0ea3f49a482b8938ee5ad450d917ad509ec Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期五, 03 二月 2023 15:07:25 +0800
Subject: [PATCH] 1

---
 ExportMap/up.html |  172 +++++++-------------------------------------------------
 1 files changed, 23 insertions(+), 149 deletions(-)

diff --git a/ExportMap/up.html b/ExportMap/up.html
index d1c4137..e57d8b2 100644
--- a/ExportMap/up.html
+++ b/ExportMap/up.html
@@ -11,7 +11,7 @@
     var app = {};
     var path = "20230127";
     var url = "http://127.0.0.1:12316/server/";
-    var token = "87ce1d1e-3d83-4ffc-bf0d-312ecd823346";
+    var token = "b2d58c3c-9d98-4e7f-a9c5-7682cc83bc38";
 
     $(function () {
       $("#pathSpan").html(path);
@@ -215,152 +215,9 @@
         alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result);
       });
     }
-
-    // Shp鍏ュ簱
-    function insertShps() {
-      if (app.data == null) return;
-
-      var obj = {
-        metaEntity: {
-          depid: 1,
-          dirid: 10,
-          verid: 0,
-          //type: "file",
-          //cs: "CGCS 2000",
-          //scale: "1:1000",
-          //resolution: "0.5m",
-          gather: "2022-10-05 15:00:00",
-          descr: "娴嬭瘯Xls",
-        },
-        fileEntities: app.data,
-        tabEntities: [
-          {
-            "entity": "dlg25wboul",
-            "fileName": "test.shp.zip",
-            "subPath": "20221128010101_zip\\test.shp\\pgShp\\dlg_25w_boul.shp",
-            "tab": "dlg_25w_boul.shp",
-            "type": "shp"
-          },
-          {
-            "entity": "dlg25wresa",
-            "fileName": "test.shp.zip",
-            "subPath": "20221128010101_zip\\test.shp\\pgShp\\dlg_25w_resa.shp",
-            "tab": "dlg_25w_resa.shp",
-            "type": "shp"
-          },
-          {
-            "entity": "dlgagnp",
-            "fileName": "test.shp.zip",
-            "subPath": "20221128010101_zip\\test.shp\\pgShp\\dlg_agnp.shp",
-            "tab": "dlg_agnp.shp",
-            "type": "shp"
-          }]
-      };
-
-      ajax(getUrl("dataLoader/insertFiles"), "POST", JSON.stringify(obj), null, null, function (rs) {
-        console.log(rs);
-        app.data = null;
-        alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result);
-      });
-    }
-
-    // GDB鍏ュ簱
-    function insertGdb() {
-      if (app.data == null) return;
-
-      var obj = {
-        metaEntity: {
-          depid: 1,
-          dirid: 10,
-          verid: 0,
-          //type: "file",
-          //cs: "CGCS 2000",
-          //scale: "1:1000",
-          //resolution: "0.5m",
-          gather: "2022-10-05 15:00:00",
-          descr: "娴嬭瘯Xls",
-        },
-        fileEntities: app.data,
-        tabEntities: [
-          {
-            "entity": "dlg25wboul",
-            "fileName": "test.gdb.zip",
-            "subPath": "20221128010101_zip\\test.gdb\\pg.gdb",
-            "tab": "dlg_25w_boul",
-            "type": "gdb"
-          },
-          {
-            "entity": "dlg25wresa",
-            "fileName": "test.gdb.zip",
-            "subPath": "20221128010101_zip\\test.gdb\\pg.gdb",
-            "tab": "dlg_25w_resa",
-            "type": "gdb"
-          },
-          {
-            "entity": "dlgagnp",
-            "fileName": "test.gdb.zip",
-            "subPath": "20221128010101_zip\\test.gdb\\pg.gdb",
-            "tab": "dlg_agnp",
-            "type": "gdb"
-          }]
-      };
-
-      ajax(getUrl("dataLoader/insertFiles"), "POST", JSON.stringify(obj), null, null, function (rs) {
-        console.log(rs);
-        app.data = null;
-        alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result);
-      });
-    }
-
-    // MDB
-    function insertMdb() {
-      if (app.data == null) return;
-
-      var obj = {
-        metaEntity: {
-          depid: 1,
-          dirid: 10,
-          verid: 0,
-          //type: "file",
-          //cs: "CGCS 2000",
-          //scale: "1:1000",
-          //resolution: "0.5m",
-          gather: "2022-10-05 15:00:00",
-          descr: "娴嬭瘯Xls",
-        },
-        fileEntities: app.data,
-        tabEntities: [
-          {
-            "entity": "dlg25wboul",
-            "fileName": "test.mdb",
-            "subPath": "20221128010101\\test.mdb",
-            "tab": "dlg_25w_boul",
-            "type": "mdb"
-          },
-          {
-            "entity": "dlg25wresa",
-            "fileName": "test.mdb",
-            "subPath": "20221128010101\\test.mdb",
-            "tab": "dlg_25w_resa",
-            "type": "mdb"
-          }/*,
-          {
-            "entity": "dlgagnp",
-            "fileName": "test.mdb",
-            "subPath": "20221128010101\\test.mdb",
-            "tab": "dlg_agnp",
-            "type": "mdb"
-          }*/]
-      };
-
-      ajax(getUrl("dataLoader/insertFiles"), "POST", JSON.stringify(obj), null, null, function (rs) {
-        console.log(rs);
-        app.data = null;
-        alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result);
-      });
-    }
   </script>
   <script>
+    // 涓婁紶闄勪欢
     function uploadAttach() {
       var formData = new FormData();
       var fs = document.getElementById("file3");
@@ -495,6 +352,24 @@
       });
     }
 
+    // 澶氭枃浠跺叆搴�
+    function insertMultiFiles() {
+      if (!app.mappers) return;
+      ajax(getUrl("dataUpload/insertFiles"), "POST", JSON.stringify(app.mappers), null, null, function (rs) {
+        console.log(rs);
+        app.mappers = null;
+        alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result);
+      });
+    }
+
+    // 绌洪棿鏁版嵁鍏ュ簱
+    function insertDbFiles() {
+      ajax(getUrl("dataUpload/insertFiles"), "POST", JSON.stringify(dbFiles), null, null, function (rs) {
+        console.log(rs);
+        alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result);
+      });
+    }
+
     // 璇锋眰绠$嚎鍒嗘瀽
     function selectPipeAnalysis() {
       var data = {
@@ -541,12 +416,11 @@
     <input value="涓婁紶鏂囦欢" type="button" onclick="uploadFiles2();" />
     <input value="鏌ヨ鏂囦欢 *" type="button" onclick="selectFiles2();" />
     <input value="鍒犻櫎鏂囦欢" type="button" onclick="deleteFiles2();" />
-    <input value="璇诲彇鏄犲皠 *" type="button" onclick="readMappers();" />
     <input value="Xls鍏ュ簱" type="button" onclick="insertXls();" />
-    <input value="Shp鍏ュ簱" type="button" onclick="insertShps();" />
-    <input value="Gdb鍏ュ簱" type="button" onclick="insertGdb();" />
-    <input value="Mdb鍏ュ簱" type="button" onclick="insertMdb();" />
+    <input value="璇诲彇鏄犲皠 *" type="button" onclick="readMappers();" />
     <input value="缁煎悎鏁版嵁鍏ュ簱 *" type="button" onclick="insertAllFiles();" />
+    <input value="绌洪棿鏁版嵁鍏ュ簱 *" type="button" onclick="insertDbFiles();" />
+    <input value="澶氭枃浠跺叆搴� *" type="button" onclick="insertMultiFiles();" />
     <hr />
     <br />
 

--
Gitblit v1.9.3