From 2c1c67790262a51d48a8273cdf13fffac804c3f9 Mon Sep 17 00:00:00 2001 From: dev02 Date: Thu, 1 Dec 2022 09:17:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E5=BB=A0=E5=95=86crud?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Frontend/_historyData.html | 2 +- Frontend/_operation.html | 137 +++++++++++++----- Frontend/index.html | 3 + Frontend/login.html | 3 - .../ApiControllers/HistoryController.cs | 2 +- .../ApiControllers/LoginController.cs | 4 +- .../ApiControllers/OperationController.cs | 2 +- .../wwwroot/excel/operation/廠商資料.xlsx | Bin 0 -> 4669 bytes 8 files changed, 111 insertions(+), 42 deletions(-) create mode 100644 FrontendWebApi/wwwroot/excel/operation/廠商資料.xlsx diff --git a/Frontend/_historyData.html b/Frontend/_historyData.html index 6734e0e..5630030 100644 --- a/Frontend/_historyData.html +++ b/Frontend/_historyData.html @@ -354,7 +354,7 @@ ytAjax = new YourTeam.Ajax(url, objSendData, function (rel) { if (rel.code == "0000") - location.href = baseApiUrl + "/api/df?fileName=" + rel.data + "&token=" + localStorage.getItem("JWT-Authorization"); + location.href = baseApiUrl + "/api/df?path=" + rel.data.split('/')[0] + "&fileName=" + rel.data.split('/')[1] + "&token=" + localStorage.getItem("JWT-Authorization"); }, null, "POST").send(); } \ No newline at end of file diff --git a/Frontend/_operation.html b/Frontend/_operation.html index 4100c62..21fc8fc 100644 --- a/Frontend/_operation.html +++ b/Frontend/_operation.html @@ -141,7 +141,7 @@ @@ -217,6 +217,25 @@ + + \ No newline at end of file diff --git a/Frontend/index.html b/Frontend/index.html index 8a2f3f1..08ab0e2 100644 --- a/Frontend/index.html +++ b/Frontend/index.html @@ -2586,6 +2586,9 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li "n4js/historybaja", "lib/statistics/flot/flot.bundle", "lib/statistics/peity/peity.bundle", + "lib/jquery-validation/dist/jquery.validate", + "lib/jquery-validation/dist/additional-methods.min", + "lib/jquery-validation/dist/localization/messages_zh_TW", ], loadedMasterPack); } /** diff --git a/Frontend/login.html b/Frontend/login.html index 5c98287..ab729ed 100644 --- a/Frontend/login.html +++ b/Frontend/login.html @@ -104,9 +104,6 @@ [ "lib/app.bundle", "lib/app.menu", - "lib/jquery-validation/dist/jquery.validate", - "lib/jquery-validation/dist/additional-methods.min", - "lib/jquery-validation/dist/localization/messages_zh_TW", /*"lib/notifications/sweetalert2/sweetalert2.bundle",*/ ], loadedMasterPack); } diff --git a/FrontendWebApi/ApiControllers/HistoryController.cs b/FrontendWebApi/ApiControllers/HistoryController.cs index 48d7b87..b085655 100644 --- a/FrontendWebApi/ApiControllers/HistoryController.cs +++ b/FrontendWebApi/ApiControllers/HistoryController.cs @@ -160,7 +160,7 @@ namespace FrontendWebApi.ApiControllers } apiResult.Code = "0000"; - apiResult.Data = fileName; + apiResult.Data = "history/" + fileName; } catch (Exception exception) { diff --git a/FrontendWebApi/ApiControllers/LoginController.cs b/FrontendWebApi/ApiControllers/LoginController.cs index 7891d66..5a449e5 100644 --- a/FrontendWebApi/ApiControllers/LoginController.cs +++ b/FrontendWebApi/ApiControllers/LoginController.cs @@ -139,7 +139,7 @@ namespace FrontendWebApi.ApiControllers [HttpGet] [Route("api/df")] - public ActionResult DownloadFile(string fileName, string token) + public ActionResult DownloadFile(string path, string fileName, string token) { var jwt = new JwtSecurityTokenHandler().ReadJwtToken(token); if (jwt == null) @@ -147,7 +147,7 @@ namespace FrontendWebApi.ApiControllers else if (fileName == null) return NotFound("找不到文件"); - var filePath = Path.Combine(Directory.GetCurrentDirectory(), "wwwroot", "excel", "history"); + var filePath = Path.Combine(Directory.GetCurrentDirectory(), "wwwroot", "excel", path); return File(System.IO.File.ReadAllBytes(Path.Combine(filePath, fileName)), "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", fileName); } } diff --git a/FrontendWebApi/ApiControllers/OperationController.cs b/FrontendWebApi/ApiControllers/OperationController.cs index 38732c7..fe64260 100644 --- a/FrontendWebApi/ApiControllers/OperationController.cs +++ b/FrontendWebApi/ApiControllers/OperationController.cs @@ -733,7 +733,7 @@ namespace FrontendWebApi.ApiControllers } apiResult.Code = "0000"; - apiResult.Data = fileName; + apiResult.Data = "operation/" + fileName; } catch(Exception ex) { diff --git a/FrontendWebApi/wwwroot/excel/operation/廠商資料.xlsx b/FrontendWebApi/wwwroot/excel/operation/廠商資料.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..d78cca2a2f84af34e64615213e97f05ee0e4095e GIT binary patch literal 4669 zcmZ`-cQ~7S*p6AdMyP6SF^i~CYE|q}dyAEr6@pN-Mr*VhdsCyaXKiYfXemXFQnk0* zHA<^3>Wg#ESEs)7CD)tZ_5N``*L&U1{oc?0L|2o55C{MONC0B-fkqM>@H?}(jA1eMI&2wHM5+s9 zrjX!z{_F@L*OMQC5kLG-Op!eD;g__=^>jVWM)YmKc9u>_R~yZydOkZGhlec3zs-y= zON@(6+Du(!z9qqYFH-=`*rTb~?IP6m0rH_>RPc34Ig;(O&)atGsv3=gOiPX3eTLl( zw>wOZJ6Z2mMRuMDN7Lq;6*8E0J3lbdI2P5jPSWR_6LauZr_hdkm1EgqxJ)Pg4$Gmr zoDFpx6zPvI7gE0tclff0*?w2H_S1iO_7K2gX3@t)0Xph3q?PB8H0|q40T2Lm|DdJ= zt9?ra4**Ca1OVu8)L1AY-MsAGysQoV-0e}8LcXquvc%h`6opmL`bE%QVj#&bumo5X z5ncj+%d28Kc`M5IdEC^UtGtaXUl}vRS|`w(bue>)P{xtO7=5X{dpUNH*c#mnW4pd{ zlX0Uk->J9<+2JeZZ>G`~na`rBNB72pPj7S%$iN=FqD~)g&@m~Nq_>v#H25VGMR`6| zR-1vg(bEUZf$U7=}LlhFj(kq2Tl zf_h8@z+qTnZ#dneqzm31g|tLvB6QxN&@L4BDOS+Gc8~lYT}4* ze3S%aSuaYKhMZzVjg4{x6i7|759BSs^KI0kQMY}&kLU+7j2&yIyyqw&+t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