From d86c1f8ded5a5609e5bd3f7fb81a5251d47c47e5 Mon Sep 17 00:00:00 2001
From: qinbo <qinbo@shsening.com>
Date: 星期五, 05 十一月 2021 19:25:12 +0800
Subject: [PATCH] Merge branch 'master' of http://www.shsening.com:10000/r/template/shanghai

---
 widgetsTS/widget_summary/view.js |   19 ++++++++++++++-----
 1 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/widgetsTS/widget_summary/view.js b/widgetsTS/widget_summary/view.js
index 2c7ca14..534196e 100644
--- a/widgetsTS/widget_summary/view.js
+++ b/widgetsTS/widget_summary/view.js
@@ -46,7 +46,7 @@
             }
         },
         error: function (request, textStatus) {
-
+            haoutil.msg("绯荤粺鍚庡彴閿欒锛岃鑱旂郴绠$悊鍛樺鐞嗭紒");
         }
     });
 
@@ -76,7 +76,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=30";
+    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="+default_system_params.summary_topN_count;
     //鍔犲叆cntId
     $.ajax({
         type: 'get',
@@ -88,7 +88,7 @@
         success: function (data) {
             var tableData = data.data.result;
             //console.log(tableData);
-            if (tableData != null) {
+            if (tableData != null && tableData.length>0) {
                 for (var i = 0; length = tableData.length, i < length ; i++) {
                     var j = i + 1;
                     var topObj = tableData[i];
@@ -103,11 +103,13 @@
                         $("#top10Tb").append(_tr);
                     }
                 }      
+         }else{
+            haoutil.msg("鏌ヨ鏃犳暟鎹紝璇锋洿鎹㈡煡璇㈡潯浠讹紒");
          }
 
         },
         error: function (request, textStatus) {
-
+            haoutil.msg("绯荤粺鍚庡彴閿欒锛岃鑱旂郴绠$悊鍛樺鐞嗭紒");
         }
     });
 }
@@ -133,5 +135,12 @@
     if (lon && lon != 'undefined') {
         thisWidget.locateAndHighlight(lon, lat);
     }
-    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 });
+    if (current_selected_monitor_type !=100500){
+        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 });
+    }
+}
+
+function setTopNname(count){
+    $("#topN_name").html("Top"+count);
+
 }
\ No newline at end of file

--
Gitblit v1.9.1