From afc782bf0610a55eae2e27b7d4e0ecb4565451ea Mon Sep 17 00:00:00 2001
From: qinbo <qinbo@shsening.com>
Date: 星期二, 16 十一月 2021 20:19:12 +0800
Subject: [PATCH] bug fix
---
widgetsTS/widget_summary/view.js | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/widgetsTS/widget_summary/view.js b/widgetsTS/widget_summary/view.js
index 1bbd612..c2d262f 100644
--- a/widgetsTS/widget_summary/view.js
+++ b/widgetsTS/widget_summary/view.js
@@ -106,16 +106,13 @@
for (var i = 0; length = tmpTopListQueryResult.length, i < length; i++) {
var j = i + 1;
var topObj = tmpTopListQueryResult[i];
- if (topObj[current_selected_monitor_qindex] == null) {
- var _tr = "<tr _siteid='" + topObj.code + "' _lon='" + topObj.lon + "' _lat='" + topObj.lat + "' onmouseover='over(this)' onmouseout='out(this)' ><td><input type='checkbox' name='selectedItem' value='" + j + "' /></td><td>" + j + "</td><td onclick='locateAndShowDetail(this)'>" + topObj.code + "</td><td onclick='locateAndShowDetail(this)'>" + topObj.name + "</td><td><font color='" + getLayerPointColorByQindexandValue(current_selected_monitor_type, current_selected_monitor_qindex, topObj[current_selected_monitor_qindex]) + "'>" + "/" + "</font></td></tr>"
- $("#top10Tb").append(_tr);
- } else if (topObj.name == undefined) {
- var _tr = "<tr _siteid='" + topObj.code + "' _lon='" + topObj.lon + "' _lat='" + topObj.lat + "' onmouseover='over(this)' onmouseout='out(this)' ><td><input type='checkbox' name='selectedItem' value='" + j + "' /></td><td>" + j + "</td><td onclick='locateAndShowDetail(this)'>" + topObj.code + "</td><td onclick='locateAndShowDetail(this)'>" + "/" + "</td><td><font color='" + getLayerPointColorByQindexandValue(current_selected_monitor_type, current_selected_monitor_qindex, topObj[current_selected_monitor_qindex]) + "'>" + topObj[current_selected_monitor_qindex] + "</font></td></tr>"
- $("#top10Tb").append(_tr);
- } else {
+ for (var key in topObj) {
+ if (topObj[key] == null || topObj[key] == 'null' || topObj[key] == undefined || topObj[key] == 'undefined') {
+ topObj[key] = "/";
+ }
+ }
var _tr = "<tr _siteid='" + topObj.code + "' _lon='" + topObj.lon + "' _lat='" + topObj.lat + "' onmouseover='over(this)' onmouseout='out(this)' ><td><input type='checkbox' name='selectedItem' value='" + j + "' /></td><td>" + j + "</td><td onclick='locateAndShowDetail(this)'>" + topObj.code + "</td><td onclick='locateAndShowDetail(this)'>" + topObj.name + "</td><td><font color='" + getLayerPointColorByQindexandValue(current_selected_monitor_type, current_selected_monitor_qindex, topObj[current_selected_monitor_qindex]) + "'>" + topObj[current_selected_monitor_qindex] + "</font></td></tr>"
$("#top10Tb").append(_tr);
- }
}
} else {
haoutil.msg("鏌ヨ鏃犳暟鎹紝璇锋洿鎹㈡煡璇㈡潯浠讹紒");
--
Gitblit v1.9.1