From 6f469bafb8add6aac7ffb39c4ac88fff019641ba Mon Sep 17 00:00:00 2001
From: wr1207 <wyun001@163.com>
Date: 星期三, 26 七月 2023 09:27:22 +0800
Subject: [PATCH] 检测总览页面
---
mobile/js/widget_search_view.js | 62 +++++++++++++++++++++++++------
1 files changed, 50 insertions(+), 12 deletions(-)
diff --git a/mobile/js/widget_search_view.js b/mobile/js/widget_search_view.js
index 5d6a323..5836a5e 100644
--- a/mobile/js/widget_search_view.js
+++ b/mobile/js/widget_search_view.js
@@ -1,9 +1,10 @@
'use script'; //寮�鍙戠幆澧冨缓璁紑鍚弗鏍兼ā寮�
-var current_selected_monitor_type = "1005";
-var current_selected_monitor_name = "閬撹矾璺";
+var current_selected_monitor_type = "1001";
+var current_selected_monitor_name = "鍥芥帶鐐�";
var current_selected_monitor_keyword;
var current_selected_monitor_qindex = "pm25";
+var current_selected_monitor_street = "";
var tableData;
@@ -23,11 +24,32 @@
//褰撳墠椤甸潰涓氬姟
function monitortype() {
//寮�濮嬫煡璇㈡暟鎹�
- current_selected_monitor_type = "1005";
- current_selected_monitor_name = "閬撹矾璺";
changeQindexSelection();
}
monitortype();
+
+
+$("#querySelect").change(function(){
+ //code...
+ current_selected_monitor_name=$("#querySelect").find("option:selected").text(); //鑾峰彇Select閫夋嫨鐨則ext
+ current_selected_monitor_type=$("#querySelect").val(); //鑾峰彇Select閫夋嫨鐨刅alue
+ // var checkIndex=$("#select_id ").get(0).selectedIndex; //鑾峰彇Select閫夋嫨鐨勭储寮曞��
+ // var maxIndex=$("#select_id option:last").attr("index"); //鑾峰彇Select鏈�澶х殑绱㈠紩鍊�
+ monitortype();
+
+}); //涓篠elect娣诲姞浜嬩欢锛屽綋閫夋嫨鍏朵腑涓�椤规椂瑙﹀彂
+
+regionSelect
+
+$("#regionSelect").change(function(){
+ //code...
+ current_selected_monitor_street=$("#regionSelect").val(); //鑾峰彇Select閫夋嫨鐨刅alue
+ // var checkIndex=$("#select_id ").get(0).selectedIndex; //鑾峰彇Select閫夋嫨鐨勭储寮曞��
+ // var maxIndex=$("#select_id option:last").attr("index"); //鑾峰彇Select鏈�澶х殑绱㈠紩鍊�
+ monitortype();
+ reloadData(1);
+}); //涓篠elect娣诲姞浜嬩欢锛屽綋閫夋嫨鍏朵腑涓�椤规椂瑙﹀彂
+
//鍔犺浇count
function loadCountByUserid() {
@@ -81,18 +103,25 @@
}
function reloadData(page) {
+ $("#pageID").append('');
+ $("#page").append('');
$("#searchInfo").empty();
- let datatime_, querytype_ ;
+ let datatime_, querytype_,endtime_ ;
if ($("#appDateHour")[0].style.display == 'none') {
- datatime_ = document.getElementById("appDate").value;
+ datatime_ = document.getElementById("appDate").value + ' 00:00:00';
querytype_ = 'day';
} else {
datatime_ = document.getElementById("appDateHour").value;
querytype_ = 'hour';
}
var avgnam = 50; //姣忛〉鏄剧ず涓暟
- var backend_url = default_system_params.nodejs_url_predix + "dataapi/Bdata?bid=get_" + current_selected_monitor_type + "_list_keyword&datatype=" + querytype_ + "&datatime=" + datatime_
- + "&qindex=" + current_selected_monitor_qindex + "&keyword=" + current_selected_monitor_keyword + "&pageno="+page+"&pagesize="+avgnam;
+ var backend_url = default_system_params.nodejs_url_predix + "dataapi/Bdata?bid=mobile_get_" + current_selected_monitor_type + "_list_keyword&datatype=" + querytype_
+ + "&datatime=" + datatime_
+ + "&qindex=" + current_selected_monitor_qindex
+ + "&keyword=" + current_selected_monitor_keyword
+ + "&pageno="+page+"&pagesize="+avgnam
+ + "&userid="+localStorage.getItem('user_id_')
+ + "®ion="+current_selected_monitor_street;
$.ajax({
type: "GET",
url: backend_url,
@@ -100,15 +129,18 @@
success: function (data) {
tableData = data.data.result;
if (current_selected_monitor_keyword == null) {
- haoutil.msg("璇疯緭鍏ュ叧閿瓧锛侊紒锛�")
+ // haoutil.msg("璇疯緭鍏ュ叧閿瓧锛侊紒锛�")
+ alert('璇疯緭鍏ュ叧閿瓧锛侊紒锛�')
return;
}
if (tableData == null) {
- haoutil.msg("璇烽�夋嫨鏌ヨ绫诲埆锛侊紒锛�")
+ // haoutil.msg("璇烽�夋嫨鏌ヨ绫诲埆锛侊紒锛�")
+ alert('璇烽�夋嫨鏌ヨ绫诲埆锛侊紒锛�')
return;
}
if (tableData.length == 0) {
- haoutil.msg("鏃犳煡璇㈢粨鏋滐紝璇锋洿鎹㈡煡璇㈡潯浠讹紒")
+ // haoutil.msg("鏃犳煡璇㈢粨鏋滐紝璇锋洿鎹㈡煡璇㈡潯浠讹紒")
+ alert('鏃犳煡璇㈢粨鏋滐紝璇锋洿鎹㈡煡璇㈡潯浠讹紒');
return;
}
var newsTotalNum = data.data.counter.counter; //璁板綍鐨勬�绘潯鏁�
@@ -121,7 +153,13 @@
topObj[key] = "/";
}
}
- var content = "<tr _siteid='" + topObj.code + "' _lon='" + topObj.lon + "' _lat='" + topObj.lat + "' onmouseover='over(this)' onmouseout='out(this)' ><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>"
+ var content = "<tr _siteid='" + topObj.code + "' _lon='" + topObj.lon + "' _lat='" + topObj.lat
+ + "' onmouseover='over(this)' onmouseout='out(this)' ><td>" + j + "</td><td onclick='locateAndShowDetail(this)'>"
+ + topObj.region + "</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>"
$("#searchInfo").append(content);
}
$("#pageID").empty();
--
Gitblit v1.9.1