From d83e6e161a81cb877018393c21ce3999ed33a276 Mon Sep 17 00:00:00 2001
From: wangzhibo <wangzhibo@shsening.com>
Date: 星期一, 04 十月 2021 16:33:01 +0800
Subject: [PATCH] 总览窗口
---
widgetsTS/widget_summary/view.html | 1 +
widgetsTS/widget_summary/view.js | 10 +++++-----
widgetsTS/widget_summary/widget.js | 6 +-----
3 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/widgetsTS/widget_summary/view.html b/widgetsTS/widget_summary/view.html
index 251440e..88625da 100644
--- a/widgetsTS/widget_summary/view.html
+++ b/widgetsTS/widget_summary/view.html
@@ -6,6 +6,7 @@
<script type="text/javascript" src="../../lib/jquery/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="../../lib/layui/layui.js"></script>
<link href="./view.css" rel="stylesheet" type="text/css" />
+ <script type="text/javascript" src="../../js/changable_params.js"></script>
<script type="text/javascript" src="../../js/function_1001.js"></script>
</head>
diff --git a/widgetsTS/widget_summary/view.js b/widgetsTS/widget_summary/view.js
index 4efb4a4..9f4e870 100644
--- a/widgetsTS/widget_summary/view.js
+++ b/widgetsTS/widget_summary/view.js
@@ -75,6 +75,7 @@
}
function reloadData() {
+ $("#top10Tb").empty();
var backend_url = thisWidget.nodejs_url_predix + "dataapi/Bdata?bid=get_" + current_selected_monitor_type + "_list&datatype=" + thisWidget.datatype + "&datatime=" + thisWidget.datatime + "&qindex=" + current_selected_monitor_qindex + "&pageno=1&pagesize=10";
//鍔犲叆cntId
$.ajax({
@@ -87,12 +88,11 @@
success: function (data) {
var tableData = data.data.result;
//console.log(tableData);
- $("#top10Tb").empty();
if (tableData != null) {
for (var i = 0; i < tableData.length; i++) {
var j = i + 1;
var topObj = tableData[i];
- var _tr = "<tr _siteid='" + topObj.code + "' _lon='" + topObj.lon + "' _lat='" + topObj.lat + "' onclick='locateAndShowDetail(this)' onmouseover='over(this)' onmouseout='out(this)' ><td>" + j + "</td><td>" + topObj.code + "</td><td>" + 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>"
+ var _tr = "<tr _siteid='" + topObj.code + "' _lon='" + topObj.lon + "' _lat='" + topObj.lat + "' onclick='locateAndShowDetail(this)' onmouseover='over(this)' onmouseout='out(this)' ><td>" + j + "</td><td>" + topObj.code + "</td><td>" + 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);
}
@@ -123,8 +123,8 @@
var lon = $(obj).attr("_lon");
var lat = $(obj).attr("_lat");
- if (lon && lon !='undefined'){
- thisWidget.locateAndHighlight(lon,lat);
+ if (lon && lon != 'undefined') {
+ thisWidget.locateAndHighlight(lon, lat);
}
- thisWidget.showDetailedWindow({"layer":current_selected_monitor_type,"siteid":siteId});
+ thisWidget.showDetailedWindow({ "nodejs_url_predix": thisWidget.nodejs_url_predix, "datatype": thisWidget.datatype,"selected_qindex": current_selected_monitor_qindex,"datatime": thisWidget.datatime, "layerid": current_selected_monitor_type, "siteid": siteId });
}
\ No newline at end of file
diff --git a/widgetsTS/widget_summary/widget.js b/widgetsTS/widget_summary/widget.js
index df42557..f0311ba 100644
--- a/widgetsTS/widget_summary/widget.js
+++ b/widgetsTS/widget_summary/widget.js
@@ -3,7 +3,6 @@
(function (window, mars3d) {
//鍒涘缓widget绫伙紝闇�瑕佺户鎵緽aseWidget
class MyWidget extends mars3d.widget.BaseWidget {
- //寮圭獥閰嶇疆锛�2涓脊绐楃殑鎯呭舰
get view() {
return {
type: 'window',
@@ -43,14 +42,11 @@
} else {
mars3d.widget.activate({
uri: "widgetsTS/widget_detail/widget.js",
+ disableOther: false,
params: params
});
}
}
-
-
-
-
//姣忎釜绐楀彛鍒涘缓瀹屾垚鍚庤皟鐢�
winCreateOK(opt, result) {
--
Gitblit v1.9.1