[Frontend]系統監控 平面圖放大沒有呈現icon問題解決
This commit is contained in:
parent
5031dc90a8
commit
7db9a07af3
@ -149,7 +149,7 @@
|
||||
// animationDurationUpdate: 1500,
|
||||
tooltip: {
|
||||
formatter: function (params) {
|
||||
console.log("23",params)
|
||||
console.log("23", params)
|
||||
if (params.data.device_node_guid != undefined && params.data.device_node_guid != null && params.data.device_node_guid != "") {
|
||||
return `名稱:${params.data.device_node_full_name}<br>
|
||||
Guid:${params.data.device_node_guid}`
|
||||
@ -407,7 +407,7 @@
|
||||
// 重設平面圖設備資料
|
||||
function resetData() {
|
||||
|
||||
const scatter_symbol_convertData = function (data) { //正常、關閉排除CCVT(圓點)
|
||||
const scatter_symbol_convertData = function (data,zoom) { //正常、關閉排除CCVT(圓點)
|
||||
let res = [], temp = [];
|
||||
data.forEach(function (item, index) {
|
||||
if (global_emergency_alarm_device_number != undefined
|
||||
@ -529,7 +529,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
item.zoom = zoom;
|
||||
temp.push(item);
|
||||
}
|
||||
}
|
||||
@ -564,7 +564,10 @@
|
||||
if (item.selected) {
|
||||
obj.symbolSize = 60
|
||||
}
|
||||
|
||||
console.log(item.zoom)
|
||||
if (item.zoom > 8) {
|
||||
obj.symbolSize = 10
|
||||
}
|
||||
res.push(obj);
|
||||
});
|
||||
|
||||
@ -579,29 +582,29 @@
|
||||
&& 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) {
|
||||
let item_node = {};
|
||||
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_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;
|
||||
item_node.device_image = item.device_image;
|
||||
temp.push(item_node);
|
||||
// });
|
||||
//} else {
|
||||
// temp.push(item)
|
||||
//}
|
||||
});
|
||||
} else {
|
||||
temp.push(item)
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// let temp = data.filter(function (item, index) {
|
||||
// if (global_emergency_alarm_device_number != undefined && global_emergency_alarm_device_number != null) {
|
||||
// return global_emergency_alarm_device_number.findIndex(x => x.device_number == item.device_number) < 0 && item.device_system_category_layer3 != "C";
|
||||
// } else {
|
||||
// return [];
|
||||
// }
|
||||
// });
|
||||
temp = data.filter(function (item, index) {
|
||||
if (global_emergency_alarm_device_number != undefined && global_emergency_alarm_device_number != null) {
|
||||
return global_emergency_alarm_device_number.findIndex(x => x.device_number == item.device_number) < 0 && item.device_system_category_layer3 != "C";
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
});
|
||||
|
||||
temp.map(function (item) {
|
||||
|
||||
@ -613,7 +616,7 @@
|
||||
device_node_full_name: item.device_node_full_name ? item.device_node_full_name : null,
|
||||
device_system_category_layer3: item.device_system_category_layer3 ? item.device_system_category_layer3 : null,
|
||||
status: item.status,
|
||||
symbol: 'image://' + item.device_image_url,
|
||||
symbol: 'image://' + baseImgUrl + "/upload/device_icon/" + item.device_image,
|
||||
value: item.value,
|
||||
deviceItems: item.deviceItems,
|
||||
deviceURL: item.deviceURL
|
||||
@ -689,27 +692,27 @@
|
||||
&& 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) {
|
||||
let item_node = {};
|
||||
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_node.device_system_category_layer3 = item.device_system_category_layer3;
|
||||
item_node.device_error_color = item.device_error_color;
|
||||
item_node.device_image_url = item.device_image_url;
|
||||
item_node.device_image = item.device_image;
|
||||
temp.push(item_node);
|
||||
// });
|
||||
//} else {
|
||||
// temp.push(item)
|
||||
//}
|
||||
});
|
||||
} else {
|
||||
temp.push(item)
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// if (global_emergency_alarm_device_number != undefined && global_emergency_alarm_device_number != null) {
|
||||
// temp = data.filter(function (item, index) {
|
||||
// return 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 != undefined && global_emergency_alarm_device_number != null) {
|
||||
temp = data.filter(function (item, index) {
|
||||
return global_emergency_alarm_device_number.findIndex(x => x.device_number == item.device_number) > -1 && item.device_system_category_layer3 != "C";
|
||||
});
|
||||
}
|
||||
|
||||
temp.map(function (item) {
|
||||
|
||||
@ -721,7 +724,7 @@
|
||||
device_node_full_name: item.device_node_full_name ? item.device_node_full_name : null,
|
||||
device_system_category_layer3: item.device_system_category_layer3 ? item.device_system_category_layer3 : null,
|
||||
status: item.status,
|
||||
symbol: 'image://' + item.device_image_url,
|
||||
symbol: 'image://' + baseImgUrl + "/upload/device_icon/" + item.device_image,
|
||||
value: item.value,
|
||||
deviceItems: item.deviceItems,
|
||||
deviceURL: item.deviceURL
|
||||
@ -789,7 +792,9 @@
|
||||
floChart.setOption({
|
||||
series: [{
|
||||
symbolOffset: [10, 10],
|
||||
data: scatter_symbol_convertData(currentData) //正常、關閉(圓點)
|
||||
|
||||
data: scatter_symbol_convertData(currentData, zoom), //正常、關閉(圓點)
|
||||
|
||||
}, {
|
||||
data: scatter_icon_convertData(currentData) //正常、關閉(icon)
|
||||
}, {
|
||||
|
Loading…
Reference in New Issue
Block a user