From 75b6cf67f6f67017d0c9a86b9e34bf7f71243a2f Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期二, 21 二月 2023 17:56:16 +0800
Subject: [PATCH] 1

---
 ExportMap/up.html          |    7 --
 ExportMap/ExportMap.csproj |    1 
 ExportMap/crds.html        |  121 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 122 insertions(+), 7 deletions(-)

diff --git a/ExportMap/ExportMap.csproj b/ExportMap/ExportMap.csproj
index d422a2a..7a05e83 100644
--- a/ExportMap/ExportMap.csproj
+++ b/ExportMap/ExportMap.csproj
@@ -103,6 +103,7 @@
   </ItemGroup>
   <ItemGroup>
     <Content Include="api.html" />
+    <Content Include="crds.html" />
     <Content Include="DLL\log4net4.dll" />
     <Content Include="DLL\Mono.Security.dll" />
     <Content Include="DLL\Npgsql.dll" />
diff --git a/ExportMap/crds.html b/ExportMap/crds.html
new file mode 100644
index 0000000..bc7f8ea
--- /dev/null
+++ b/ExportMap/crds.html
@@ -0,0 +1,121 @@
+锘�<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <title>CRDS鎺ュ彛娴嬭瘯</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <script src="js/jquery.1.12.4.js"></script>
+  <script src="js/rsa.min.js"></script>
+  <script>
+    var app = {
+      // 鍐呯綉
+      server: "http://127.0.0.1:12316/server/",
+      // 澶栫綉
+      //server: "http://103.85.165.99:8052/server/",
+      token: null,
+      userId: null,
+    };
+
+    $(function () {
+      getPublicKey();
+    });
+
+    // 鐧诲綍
+    function login() {
+      var uid = $.trim($("#userId").val());
+      var pwd = "Admin@1234_lf";
+      var data = {
+        "uid": encrypt.encrypt(uid),
+        "pwd": encrypt.encrypt(pwd)
+      };
+
+      ajax(app.server + "sign/login", "POST", JSON.stringify(data), "json", "application/json", function (rs) {
+        console.log(rs);
+
+        if (!rs || rs.code != 200) {
+          alert("鐧诲綍澶辫触锛�" + rs.msg);
+        } else {
+          app.token = rs.result.token;
+          $("#token").val(app.token);
+        }
+      });
+    }
+
+    // 鏌ヨ椤圭洰
+    function selectProject() {
+      $.get(app.server + "crds/selectProject" + "?token=" + app.token, function (rs) {
+        console.log(rs);
+      });
+    }
+
+    // 鏌ヨ椤圭洰鐩綍鏍�
+    function selectDirsForPrj() {
+      $.get(app.server + "crds/selectDirsForPrj" + "?token=" + app.token, function (rs) {
+        console.log(rs);
+      });
+    }
+
+    // 璇锋眰鎵撳寘
+    function uploadReqPackaging() {
+      //
+    }
+
+    // 鏌ヨ浠诲姟鐘舵��
+    function selectTaskStatus() {
+      //
+    }
+
+    // 涓嬭浇鏂囦欢
+    function downloadFile() {
+      //
+    }
+
+    // 鑾峰彇鍏挜
+    function getPublicKey() {
+      $.get(app.server + "sign/getPublicKey", function (rs) {
+        if (rs && rs.code == 200) {
+          window.encrypt = new JSEncrypt();
+          encrypt.setPublicKey(rs.result);
+        }
+      });
+    }
+
+    function ajax(url, type, data, dataType, contentType, fn) {
+      $.ajax({
+        url: url,
+        type: type,
+        data: data,
+        dataType: dataType || "json",
+        contentType: contentType || "application/json",
+        success: function (data) {
+          fn(data);
+        },
+        error: function (e) {
+          console.error(e);
+        }
+      });
+    }
+  </script>
+</head>
+<body>
+  CRDS鎺ュ彛瀵规帴锛�<br />
+  <br />
+
+  UserId锛�<input id="userId" value="admin" type="text" style="width: 50px;" />
+  Token锛�<input id="token" value="" type="text" style="width: 256px;" />
+  <input value="鐧诲綍" type="button" onclick="login();" />
+  <br />
+  <br />
+
+  <input value="鏌ヨ椤圭洰" type="button" onclick="selectProject();" />
+  <input value="鏌ヨ椤圭洰鐩綍鏍�" type="button" onclick="selectDirsForPrj();" />
+  <br />
+  <br />
+
+  鐩綍code锛�<input value="01" type="text" style="width: 50px;" />
+  <input value="璇锋眰鎵撳寘" type="button" onclick="uploadReqPackaging();" />
+  <input value="鏌ヨ浠诲姟鐘舵��" type="button" onclick="selectTaskStatus();" />
+  <input value="涓嬭浇鏂囦欢" type="button" onclick="downloadFile();" />
+  <hr />
+  <br />
+</body>
+</html>
diff --git a/ExportMap/up.html b/ExportMap/up.html
index fe78e21..0ef9c9e 100644
--- a/ExportMap/up.html
+++ b/ExportMap/up.html
@@ -428,13 +428,6 @@
     <input value="绠$嚎鍒嗘瀽缁撴灉涓嬭浇" type="button" onclick="downloadPipeAnalysis();" />
     <hr />
     <br />
-
-    CRDS瀵规帴锛�
-    Code锛�<input value="01" type="text" style="width: 50px;" />
-    <input value="璇锋眰" type="button" onclick="insertApply();" />
-    <input value="璇锋眰绠$嚎鍒嗘瀽" type="button" onclick="selectPipeAnalysis();" />
-    <hr />
-    <br />
   </form>
   <br />
   <br />

--
Gitblit v1.9.3