From 5031dc90a8741344610c933225dbd68eadec6df8 Mon Sep 17 00:00:00 2001 From: dev01 Date: Thu, 17 Nov 2022 18:46:49 +0800 Subject: [PATCH] =?UTF-8?q?[Frontend]=20=E7=B3=BB=E7=B5=B1=E7=9B=A3?= =?UTF-8?q?=E6=8E=A7=E5=B9=B3=E9=9D=A2=E5=9C=96=E7=A8=8B=E5=BA=8F=E8=AA=BF?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Frontend/_sysMonFloor.html | 33 +++++++++++++++++---------------- FrontendWebApi/Models/Device.cs | 1 + 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/Frontend/_sysMonFloor.html b/Frontend/_sysMonFloor.html index 4876200..05356d6 100644 --- a/Frontend/_sysMonFloor.html +++ b/Frontend/_sysMonFloor.html @@ -155,7 +155,7 @@ Guid:${params.data.device_node_guid}` } else { - return `名稱:${params.data.device_full_name}
+ return `名稱:${params.data.full_name}
Guid:${params.data.device_guid}` } } @@ -406,7 +406,6 @@ // 重設平面圖設備資料 function resetData() { - debugger const scatter_symbol_convertData = function (data) { //正常、關閉排除CCVT(圓點) let res = [], temp = []; @@ -574,23 +573,24 @@ const scatter_icon_convertData = function (data) { //正常、關閉(icon) let res = [], temp = []; - debugger + data.forEach(function (item, index) { if (global_emergency_alarm_device_number != undefined && global_emergency_alarm_device_number != null) { if (global_emergency_alarm_device_number.findIndex(x => x.device_number == item.device_number) < 0 && item.device_system_category_layer3 != "C") { //如果有子節點,則只針對子節點操作 - if (item.device_nodes != undefined && item.device_nodes != null && item.device_nodes.length > 0) { - item.device_nodes.forEach(function (item_node, item_node_index) { + //if (item.device_nodes != undefined && item.device_nodes != null && item.device_nodes.length > 0) { + // item.device_nodes.forEach(function (item_node, item_node_index) { + let item_node = {}; //添加父節點相關資訊 item_node.device_system_category_layer3 = item.device_system_category_layer3; item_node.device_normal_color = item.device_normal_color; item_node.device_image_url = item.device_image_url; temp.push(item_node); - }); - } else { - temp.push(item) - } + // }); + //} else { + // temp.push(item) + //} } } }); @@ -689,17 +689,18 @@ && global_emergency_alarm_device_number != null) { if (global_emergency_alarm_device_number.findIndex(x => x.device_number == item.device_number) > -1 && item.device_system_category_layer3 != "C") { //如果有子節點,則只針對子節點操作 - if (item.device_nodes != undefined && item.device_nodes != null && item.device_nodes.length > 0) { - item.device_nodes.forEach(function (item_node, item_node_index) { + //if (item.device_nodes != undefined && item.device_nodes != null && item.device_nodes.length > 0) { + // item.device_nodes.forEach(function (item_node, item_node_index) { + let item_node = {}; //添加父節點相關資訊 item_node.device_system_category_layer3 = item.device_system_category_layer3; item_node.device_error_color = item.device_error_color; - item_node.device_image = item.device_image; + item_node.device_image_url = item.device_image_url; temp.push(item_node); - }); - } else { - temp.push(item) - } + // }); + //} else { + // temp.push(item) + //} } } }); diff --git a/FrontendWebApi/Models/Device.cs b/FrontendWebApi/Models/Device.cs index a7200ad..b0d3752 100644 --- a/FrontendWebApi/Models/Device.cs +++ b/FrontendWebApi/Models/Device.cs @@ -50,6 +50,7 @@ namespace FrontendWebApi.Models // } //} public string device_image { get; set; } + public string device_image_url { get; set; } public string device_normal_point_id { get; set; } public string device_normal_point_guid { get; set; } public string device_normal_point_col { get; set; }