From 955227562285dd86e4356fbfbe9d9250d65436a3 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期一, 16 一月 2023 19:09:22 +0800 Subject: [PATCH] 1 --- ExportMap/cs/ExportUtil.cs | 6 ++---- ExportMap/Controllers/ExportController.cs | 2 +- ExportMap/up.html | 2 +- ExportMap/export.html | 8 ++++---- ExportMap/lf.html | 2 +- 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/ExportMap/Controllers/ExportController.cs b/ExportMap/Controllers/ExportController.cs index 43dd131..711aec2 100644 --- a/ExportMap/Controllers/ExportController.cs +++ b/ExportMap/Controllers/ExportController.cs @@ -34,7 +34,7 @@ string imgPath = ExportUtil.Generate(args, ref err); if (string.IsNullOrEmpty(imgPath)) { - return ResponseMsg<string>.fail(err); + return ResponseMsg<string>.fail(null == err ? "鐢熸垚澶辫触" : err); } return ResponseMsg<string>.success("鎴愬姛", imgPath); diff --git a/ExportMap/cs/ExportUtil.cs b/ExportMap/cs/ExportUtil.cs index 6f096d8..81f594a 100644 --- a/ExportMap/cs/ExportUtil.cs +++ b/ExportMap/cs/ExportUtil.cs @@ -141,6 +141,7 @@ try { string cmdText = string.Format("python {0} -qgz {1} -qpt {2}", py, qgz, qpt); + LogOut.Info("cmd = " + cmdText); Process p = new Process(); p.StartInfo.FileName = "cmd.exe"; @@ -220,10 +221,7 @@ string imgPath = Path.Combine(DownloadFolder, args.imgPath); string templateFile = Path.Combine(SourcesPath, "Template.qpt"); string qptFile = Path.Combine(SourcesPath, args.qpt); - if (File.Exists(qptFile)) - { - File.Delete(qptFile); - } + LogOut.Info("imgPath = " + imgPath + ", tempFile = " + templateFile + ", qptFile = " + qptFile); string xml = File.ReadAllText(templateFile); xml = xml diff --git a/ExportMap/export.html b/ExportMap/export.html index 95fbd6f..01e2cf1 100644 --- a/ExportMap/export.html +++ b/ExportMap/export.html @@ -5,7 +5,7 @@ <title></title> <script src="js/jquery.1.12.4.js"></script> <script> - var token = "68af5891-25fe-471e-9883-ab387fe44f86"; + var token = "37da6489-9286-4cb6-9662-69d464238e9b"; function ajax(url, type, data, dataType, contentType, fn) { $.ajax({ @@ -34,7 +34,7 @@ scale: "1锛�5涓�", resolution: "5绫�", date: "2022.11.09", - layers: "闃�瀹�,绠¢亾涓績绾�,鐭㈤噺娉ㄨ,鐭㈤噺鍥�", + layers: "椤圭洰,绔欏満,绠¢亾涓績绾�,鐭㈤噺鍥�", rotation: 0, xmin: 103.394023, ymin: 30.690466, @@ -42,7 +42,7 @@ xmax: 112.534648 }; - ajax("Export/Start", "POST", JSON.stringify(data), null, null, function (rs) { + ajax("http://192.168.20.205/ExportMap/Export/Start", "POST", JSON.stringify(data), null, null, function (rs) { alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result); console.log(rs); }); @@ -58,7 +58,7 @@ scale: "1锛�20涓�", resolution: "20绫�", date: "2022.11.10", - layers: "绔欏満,绠¢亾涓績绾�,楂樺痉褰卞儚娉ㄨ,楂樺痉褰卞儚", + layers: "椤圭洰,绔欏満,绠¢亾涓績绾�,褰卞儚娉ㄨ,褰卞儚鍥�", rotation: 0, xmin: 103.394023, ymin: 30.690466, diff --git a/ExportMap/lf.html b/ExportMap/lf.html index 71c7cb9..8cfe080 100644 --- a/ExportMap/lf.html +++ b/ExportMap/lf.html @@ -320,7 +320,7 @@ </script> <script> var url = "http://127.0.0.1:12316/server/"; - var token = "?token=95ba04ee-321b-4bb0-86c7-51a06af212f0"; + var token = "?token=37da6489-9286-4cb6-9662-69d464238e9b"; // 椤圭洰,绔欏満,绠¢亾涓績绾�,鎴樼暐閫氶亾,鐭㈤噺鍥�,褰卞儚娉ㄨ,褰卞儚鍥� function exportMap1() { diff --git a/ExportMap/up.html b/ExportMap/up.html index 0d33c29..44a34e4 100644 --- a/ExportMap/up.html +++ b/ExportMap/up.html @@ -11,7 +11,7 @@ var app = {}; var path = "20230110010101"; var url = "http://127.0.0.1:12316/server/"; - var token = "bb079561-da66-4a68-9fbc-889f50707b82"; + var token = "37da6489-9286-4cb6-9662-69d464238e9b"; $(function () { $("#pathSpan").html(path); -- Gitblit v1.9.3