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

---
 js/function.js                     |    4 ++--
 widgetsTS/dataTime/widget.js       |   12 +-----------
 js/changable_params.js             |    2 +-
 widgetsTS/widget_summary/view.html |   12 ++++++++++--
 widgetsTS/widget_summary/view.js   |   19 ++++++++++++++-----
 widgetsTS/widget_summary/widget.js |    8 +++++---
 6 files changed, 33 insertions(+), 24 deletions(-)

diff --git a/js/changable_params.js b/js/changable_params.js
index 854fa92..3f6ecfa 100644
--- a/js/changable_params.js
+++ b/js/changable_params.js
@@ -40,7 +40,7 @@
   , 100611: ['#00EE00', '#FF9F7F', '#FFD700', '#ff6600', '#ff0066', '#ff6666']
 }
 
-var default_system_params = { geoserver_url_predix: 'http://58.246.27.194:7011/', nodejs_url_predix: 'http://58.246.27.194:7012/', userid: 2, queryDataType: 'hour', weathercitycode: '101020100', wind360: 0, windSpeed: 10, is_single_taxi_replaying: false };
+var default_system_params = { geoserver_url_predix: 'http://58.246.27.194:7011/', nodejs_url_predix: 'http://58.246.27.194:7012/', userid: 2, queryDataType: 'hour', weathercitycode: '101020100', wind360: 0, windSpeed: 10, is_single_taxi_replaying: false,summary_topN_count :50};
 
 function bindPopupFunction(event) {
 
diff --git a/js/function.js b/js/function.js
index 043d20f..ad27a9d 100644
--- a/js/function.js
+++ b/js/function.js
@@ -47,11 +47,11 @@
 function getDefaultDateTimeGeo() {
   var date = new Date;
   date.setHours(date.getHours() - 2);
-  var year = date.getFullYear();//骞�
+  var year = date.getFullYear();//骞�   
   var month = date.getMonth();//鏈�
   var day = date.getDate();//鏃�
   var hours = date.getHours();//鏃�
-  return year +
+  return (year +"")+
     ((month + 1) > 9 ? (month + 1) : "0" + (month + 1)) +
     (day > 9 ? day : ("0" + day)) +
     (hours > 9 ? hours : ("0" + hours)) + "0000";
diff --git a/widgetsTS/dataTime/widget.js b/widgetsTS/dataTime/widget.js
index dcb3708..dbf573e 100644
--- a/widgetsTS/dataTime/widget.js
+++ b/widgetsTS/dataTime/widget.js
@@ -57,17 +57,7 @@
       this.defaultDate = getDefaultDateLocal();
       this.defaultDateTime = getDefaultDateTimeLocal();
 
-      // var queryDataTStartGeoday = this.defaultDate
-      // queryDataTStartGeoday = this.defaultDate.replace(/\:/g,"").replace(/-/g,"").replace(/\s+/g,"");
-      // mars3d.global_variables.queryDataTStartGeo = queryDataTStartGeoday
-      // reLoadLayers();
-
-      
-      // var queryDataTStartGeohour = this.defaultDateTime
-      // queryDataTStartGeohour = this.defaultDateTime.replace(/\:/g,"").replace(/-/g,"").replace(/\s+/g,"");
-      // mars3d.global_variables.queryDataTStartGeo = queryDataTStartGeohour
-      // console.log(mars3d.global_variables.queryDataTStartGeo)
-      reLoadLayers();
+    
     }
 
     //姣忎釜绐楀彛鍒涘缓瀹屾垚鍚庤皟鐢�
diff --git a/widgetsTS/widget_summary/view.html b/widgetsTS/widget_summary/view.html
index c2c52f2..34d2457 100644
--- a/widgetsTS/widget_summary/view.html
+++ b/widgetsTS/widget_summary/view.html
@@ -63,9 +63,17 @@
                 <a id="href6" class="color_white" href="#">
                     <img src="img/count6.png" class="layui-nav-img">
                     <span class="layui-badge" id="count6">0</span>
-                    <span class="padding_right_2_p" id="countName6">閬撹矾</span>
+                    <span class="padding_right_2_p" id="countName6">閬撹矾璺</span>
                 </a>
                 <input class="codeInput" type="hidden" id="countCode6">
+            </div>
+            <div class="cnt_right_div cnt_btn">
+                <a id="href7" class="color_white" href="#" _code="100500" _name="閬撹矾">
+                    <img src="img/count6.png" class="layui-nav-img">
+                    <span class="layui-badge" id="count7">8610</span>
+                    <span class="padding_right_2_p" id="countName7">閬撹矾</span>
+                </a>
+                <input class="codeInput" type="hidden" id="countCode7">
             </div>
         </div>
     </div>
@@ -74,7 +82,7 @@
     <div class="layui-row">
         <span class="layui-breadcrumb" lay-separator="|">
             <a href="#"></a>
-            <a href="#" style="color: white!important;">鐩戞祴Top30</a>
+            <a href="#" style="color: white!important;"><span id="topN_name">鐩戞祴Top50</span></a>
             <a href="#"></a>
         </span>
     </div>
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
diff --git a/widgetsTS/widget_summary/widget.js b/widgetsTS/widget_summary/widget.js
index 73d9576..e469e18 100644
--- a/widgetsTS/widget_summary/widget.js
+++ b/widgetsTS/widget_summary/widget.js
@@ -8,11 +8,11 @@
                 type: 'window',
                 url: 'view.html',
                 windowOptions: {
-                    width: 380,
+                    width: 434,
                     position: {
-                        top: 180,
+                        top: 170,
                         left: 5,
-                        bottom: 110
+                        bottom: 100
                     },
                 },
             }
@@ -51,6 +51,8 @@
         //姣忎釜绐楀彛鍒涘缓瀹屾垚鍚庤皟鐢�
         winCreateOK(opt, result) {
             this.winPage = result;
+
+            this.winPage.setTopNname(mars3d.global_variables.summary_topN_count);
         }
 
         //鎵撳紑婵�娲�

--
Gitblit v1.9.1