From 50e408e48d2a9764eef039eb789304bf48241d9e Mon Sep 17 00:00:00 2001 From: dev02 Date: Wed, 4 Jan 2023 09:13:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=AD=B7=E5=8F=B2=E8=B3=87?= =?UTF-8?q?=E6=96=99=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Backend/Controllers/SystemCategoryController.cs | 2 ++ Backend/Models/SystemCategory.cs | 1 + Backend/Views/NiagaraDataSynchronize/Index.cshtml | 1 + Backend/Views/SystemCategory/Index.cshtml | 11 +++++++++++ Backend/Views/SystemCategory/_SystemSub.cshtml | 7 +++++++ Frontend/_historyData.html | 4 ++-- Repository/Models/BackgroundServiceTask.cs | 2 ++ 7 files changed, 26 insertions(+), 2 deletions(-) diff --git a/Backend/Controllers/SystemCategoryController.cs b/Backend/Controllers/SystemCategoryController.cs index 1cdcb5a..2509b47 100644 --- a/Backend/Controllers/SystemCategoryController.cs +++ b/Backend/Controllers/SystemCategoryController.cs @@ -533,6 +533,7 @@ namespace Backend.Controllers { "@is_show_riserDiagram", device_Item.is_show_riserDiagram}, { "@is_controll", device_Item.is_controll}, { "@is_bool", device_Item.is_bool}, + { "@is_show_history", device_Item.is_show_history}, { "@created_by", myUserInfo.Userinfo_guid}, }; await backendRepository.AddOneByCustomTable(Device_itemDic, "device_item"); @@ -551,6 +552,7 @@ namespace Backend.Controllers { "@is_show_riserDiagram", device_Item.is_show_riserDiagram}, { "@is_controll", device_Item.is_controll}, { "@is_bool", device_Item.is_bool}, + { "@is_show_history", device_Item.is_show_history}, { "@updated_by", myUserInfo.Userinfo_guid}, { "@updated_at", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}, }; diff --git a/Backend/Models/SystemCategory.cs b/Backend/Models/SystemCategory.cs index c6b9151..d661db9 100644 --- a/Backend/Models/SystemCategory.cs +++ b/Backend/Models/SystemCategory.cs @@ -44,6 +44,7 @@ namespace Backend.Models public byte is_controll { get; set; } public byte is_bool { get; set; } public byte is_link { get; set; } + public int is_show_history { get; set; } } public class Checksame diff --git a/Backend/Views/NiagaraDataSynchronize/Index.cshtml b/Backend/Views/NiagaraDataSynchronize/Index.cshtml index 75ccf70..3262ed3 100644 --- a/Backend/Views/NiagaraDataSynchronize/Index.cshtml +++ b/Backend/Views/NiagaraDataSynchronize/Index.cshtml @@ -112,6 +112,7 @@ var data = rel.data; ds = data; + console.log(ds) if (data == null || data.length == 0) { this.data = []; document.getElementById('loadDataText').innerText = ""; diff --git a/Backend/Views/SystemCategory/Index.cshtml b/Backend/Views/SystemCategory/Index.cshtml index 58ff303..79814f0 100644 --- a/Backend/Views/SystemCategory/Index.cshtml +++ b/Backend/Views/SystemCategory/Index.cshtml @@ -352,6 +352,9 @@ { "data": "is_link" }, + { + "data": "is_show_history" + }, { "data": null, "defaultContent": ' ' @@ -409,6 +412,12 @@ } else { rel.is_link = "是" } + + if (rel.is_show_history == 0) { + rel.is_show_history= "否" + } else { + rel.is_show_history = "是" + } }); return data; @@ -657,6 +666,7 @@ is_show_riserDiagram: $('input[name="is_show_riserDiagram"]:checked').val(), is_controll: $('input[name="is_controll"]:checked').val(), is_bool: $('input[name="is_bool"]:checked').val(), + is_show_history: $('input[name="is_show_history"]:checked').val() } $.post(url, send_data, function (rel) { @@ -723,6 +733,7 @@ $("input[name='is_show_riserDiagram'][value='" + rel.data.is_show_riserDiagram + "']").prop("checked", true); $("input[name='is_controll'][value='" + rel.data.is_controll + "']").prop("checked", true); $("input[name='is_bool'][value='" + rel.data.is_bool + "']").prop("checked", true); + $("input[name='is_show_history'][value='" + rel.data.is_show_history + "']").prop("checked", true); $("#device-sub-modal").modal(); } diff --git a/Backend/Views/SystemCategory/_SystemSub.cshtml b/Backend/Views/SystemCategory/_SystemSub.cshtml index e676b3b..6b8d240 100644 --- a/Backend/Views/SystemCategory/_SystemSub.cshtml +++ b/Backend/Views/SystemCategory/_SystemSub.cshtml @@ -52,6 +52,7 @@ 是否加入 - 設備燈號中的點位選單 是否為布林值 是否與N4同步 + 是否顯示在歷史資料 功能 @@ -153,6 +154,12 @@ +
+
+ + +
+
diff --git a/Frontend/_historyData.html b/Frontend/_historyData.html index ff32cc7..599ffc4 100644 --- a/Frontend/_historyData.html +++ b/Frontend/_historyData.html @@ -189,9 +189,9 @@ i2 = (val2.device != null && i2 == null) ? index2 : null; strHtml += `
  • - + - ${val2.full_name} ${val2.sub_system_tag} + ${val2.full_name}