[Frontend] 系統監控平面圖程序調整

This commit is contained in:
dev01 2022-11-17 18:46:49 +08:00
parent bd4976a267
commit 5031dc90a8
2 changed files with 18 additions and 16 deletions

View File

@ -155,7 +155,7 @@
Guid${params.data.device_node_guid}` Guid${params.data.device_node_guid}`
} }
else { else {
return `名稱:${params.data.device_full_name}<br> return `名稱:${params.data.full_name}<br>
Guid${params.data.device_guid}` Guid${params.data.device_guid}`
} }
} }
@ -406,7 +406,6 @@
// 重設平面圖設備資料 // 重設平面圖設備資料
function resetData() { function resetData() {
debugger
const scatter_symbol_convertData = function (data) { //正常、關閉排除CCVT(圓點) const scatter_symbol_convertData = function (data) { //正常、關閉排除CCVT(圓點)
let res = [], temp = []; let res = [], temp = [];
@ -574,23 +573,24 @@
const scatter_icon_convertData = function (data) { //正常、關閉(icon) const scatter_icon_convertData = function (data) { //正常、關閉(icon)
let res = [], temp = []; let res = [], temp = [];
debugger
data.forEach(function (item, index) { data.forEach(function (item, index) {
if (global_emergency_alarm_device_number != undefined if (global_emergency_alarm_device_number != undefined
&& global_emergency_alarm_device_number != null) { && 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 (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) { //if (item.device_nodes != undefined && item.device_nodes != null && item.device_nodes.length > 0) {
item.device_nodes.forEach(function (item_node, item_node_index) { // 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_system_category_layer3 = item.device_system_category_layer3;
item_node.device_normal_color = item.device_normal_color; item_node.device_normal_color = item.device_normal_color;
item_node.device_image_url = item.device_image_url; item_node.device_image_url = item.device_image_url;
temp.push(item_node); temp.push(item_node);
}); // });
} else { //} else {
temp.push(item) // temp.push(item)
} //}
} }
} }
}); });
@ -689,17 +689,18 @@
&& global_emergency_alarm_device_number != null) { && 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 (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) { //if (item.device_nodes != undefined && item.device_nodes != null && item.device_nodes.length > 0) {
item.device_nodes.forEach(function (item_node, item_node_index) { // 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_system_category_layer3 = item.device_system_category_layer3;
item_node.device_error_color = item.device_error_color; 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); temp.push(item_node);
}); // });
} else { //} else {
temp.push(item) // temp.push(item)
} //}
} }
} }
}); });

View File

@ -50,6 +50,7 @@ namespace FrontendWebApi.Models
// } // }
//} //}
public string device_image { get; set; } 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_id { get; set; }
public string device_normal_point_guid { get; set; } public string device_normal_point_guid { get; set; }
public string device_normal_point_col { get; set; } public string device_normal_point_col { get; set; }