From 48731a6394fd43e305acdbdff7afa190998b3bc5 Mon Sep 17 00:00:00 2001 From: Kai Date: Mon, 28 Jun 2021 15:16:08 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E9=BB=9E=E6=93=8A=E5=9C=96=E7=89=87=20par?= =?UTF-8?q?t2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SolarPower/Helper/DatabaseHelper.cs | 5 +- SolarPower/Models/DBConfig.cs | 1 + SolarPower/Startup.cs | 1 + .../Views/Operation/OperationRecord.cshtml | 14 +++- SolarPower/Views/Shared/_Layout.cshtml | 10 +-- SolarPower/appsettings.Development.json | 1 + SolarPower/appsettings.json | 9 +-- SolarPower/wwwroot/js/image.zoom.js | 60 ++++++++++-------- SolarPower/wwwroot/js/site.js | 5 ++ .../8d06dfdd-b6b9-4e1f-95d3-bb99a7792c79.png | Bin 0 -> 12006 bytes .../8fd63a63-3a34-4e54-a65c-dd779b5b2b6f.png | Bin 0 -> 907 bytes 11 files changed, 64 insertions(+), 42 deletions(-) create mode 100644 SolarPower/wwwroot/upload/power_station/7/8d06dfdd-b6b9-4e1f-95d3-bb99a7792c79.png create mode 100644 SolarPower/wwwroot/upload/power_station/7/8fd63a63-3a34-4e54-a65c-dd779b5b2b6f.png diff --git a/SolarPower/Helper/DatabaseHelper.cs b/SolarPower/Helper/DatabaseHelper.cs index 123d5e4..7ce0dc2 100644 --- a/SolarPower/Helper/DatabaseHelper.cs +++ b/SolarPower/Helper/DatabaseHelper.cs @@ -32,12 +32,13 @@ namespace SolarPower.Helper EDFunction ed = new EDFunction(); var serverStr = ed.AESDecrypt(dbConfig.Server); + var portStr = ed.AESDecrypt(dbConfig.Port); var databaseStr = ed.AESDecrypt(dbConfig.Database); var rootStr = ed.AESDecrypt(dbConfig.Root); var passwordStr = ed.AESDecrypt(dbConfig.Password); - //var connStr = $"server={serverStr};database={databaseStr};user={rootStr};password={passwordStr};charset=utf8;"; - var connStr = @"server=210.61.91.43;port=10068;database=solar_power_test;user=idafenweb;password=P@ssw0rd;charset=utf8;"; + var connStr = $"server={serverStr};port={portStr};database={databaseStr};user={rootStr};password={passwordStr};charset=utf8;"; + //var connStr = @"server=210.61.91.43;port=10068;database=solar_power_test;user=idafenweb;password=P@ssw0rd;charset=utf8;"; this._connectionString = connStr; } diff --git a/SolarPower/Models/DBConfig.cs b/SolarPower/Models/DBConfig.cs index c3209cb..3378bcf 100644 --- a/SolarPower/Models/DBConfig.cs +++ b/SolarPower/Models/DBConfig.cs @@ -8,6 +8,7 @@ namespace SolarPower.Models public class DBConfig { public string Server { get; set; } + public string Port { get; set; } public string Database { get; set; } public string Root { get; set; } public string Password { get; set; } diff --git a/SolarPower/Startup.cs b/SolarPower/Startup.cs index 6c549c1..52301b1 100644 --- a/SolarPower/Startup.cs +++ b/SolarPower/Startup.cs @@ -34,6 +34,7 @@ namespace SolarPower Configuration = configuration; dBConfig.Server = Configuration.GetValue("DBConfig:Server"); + dBConfig.Port = Configuration.GetValue("DBConfig:Port"); dBConfig.Database = Configuration.GetValue("DBConfig:Database"); dBConfig.Root = Configuration.GetValue("DBConfig:Root"); dBConfig.Password = Configuration.GetValue("DBConfig:Password"); diff --git a/SolarPower/Views/Operation/OperationRecord.cshtml b/SolarPower/Views/Operation/OperationRecord.cshtml index ab7f743..bc36ff3 100644 --- a/SolarPower/Views/Operation/OperationRecord.cshtml +++ b/SolarPower/Views/Operation/OperationRecord.cshtml @@ -204,7 +204,7 @@

檔案上傳

-
+
@@ -387,7 +387,7 @@ 'targets': 7, 'searchable': false, 'orderable': false, - 'className': 'dt-body-center', + 'className': 'dt-body-center img-zoom-div', 'createdCell': function (td, cellData, rowData, row, col) { $(td).empty(); $(td).append('
'); @@ -601,6 +601,13 @@ OperationPlanTable.ajax.reload(); }) + //#endregion + + //#region 點擊圖片放大 + $('#operation_recode_table').on("click", "img.img-zoom", function () { + var _this = $(this);//將當前的pimg元素作為_this傳入函式 + imgShow("#img-zoom-outer-div", "#innerdiv", "#bigimg", _this); + }); //#endregion //#region 編輯表單內容 @@ -672,6 +679,7 @@ }); //#endregion + //#region 表單驗證 $("#recode-form").validate({ rules: { @@ -808,7 +816,7 @@ } else if (word_format.indexOf(split[split.length - 1].toLowerCase()) > -1) { str += ''; } else { - str += ''; + str += ''; } str += '
'; dom.append(str); diff --git a/SolarPower/Views/Shared/_Layout.cshtml b/SolarPower/Views/Shared/_Layout.cshtml index 43de41b..efcc7e8 100644 --- a/SolarPower/Views/Shared/_Layout.cshtml +++ b/SolarPower/Views/Shared/_Layout.cshtml @@ -31,7 +31,7 @@ - + @@ -1095,9 +1095,9 @@ -