From 8410662678ad065a8b270a9c9cbdfde8461f424d Mon Sep 17 00:00:00 2001
From: hdw <496960745@qq.com>
Date: 星期二, 11 十二月 2018 13:22:05 +0800
Subject: [PATCH] 自动获取最大设备id
---
gx_tieta/WebRoot/equipHistWarn1.jsp | 226 +++++++++++++++++++++++++++++++++++++++-----------------
1 files changed, 156 insertions(+), 70 deletions(-)
diff --git a/gx_tieta/WebRoot/equipHistWarn1.jsp b/gx_tieta/WebRoot/equipHistWarn1.jsp
index d1f260e..b17b982 100644
--- a/gx_tieta/WebRoot/equipHistWarn1.jsp
+++ b/gx_tieta/WebRoot/equipHistWarn1.jsp
@@ -20,57 +20,58 @@
<link rel="stylesheet" href="css/BrdwMaint.css">
<link rel="stylesheet" type="text/css" href="css/loading.css">
<link rel="stylesheet" href="css/nocontent.css">
- <style type="text/css">
- body {
- overflow-x: hidden !important;
- }
- #tbHead table{
- width: 100%;
- }
- #tbBrdw {
- overflow: auto;
- }
- #tbBrdw tbody tr:hover {
- background-color: #efefef;
- }
- #cardOption .con_table {
- overflow: auto;
- }
- #tbBrdw table {
- width: 100%;
- }
- #tbBrdw table tbody {
- color: #ff0000;
- }
- #tbBrdw table tbody tr.active {
+ <link href="src/css/layui.css" type="text/css" rel="stylesheet">
+ <style type="text/css">
+ body {
+ overflow-x: hidden !important;
+ }
+ #tbHead table{
+ width: 100%;
+ }
+ #tbBrdw {
+ overflow: auto;
+ }
+ #tbBrdw tbody tr:hover {
+ background-color: #efefef;
+ }
+ #cardOption .con_table {
+ overflow: auto;
+ }
+ #tbBrdw table {
+ width: 100%;
+ }
+ #tbBrdw table tbody {
+ color: #ff0000;
+ }
+ #tbBrdw table tbody tr.active {
- background-color: #a0b5fc !important;
- }
- #cardOption input[type="checkbox"] {
- vertical-align: middle;
- }
- #cardOption table thead input[type="checkbox"]{
- margin-left: 4px;
- }
- .filter {
- position: fixed;
- top: 50%;
- right: 2px;
- z-index: 999;
- border: 1px solid #dbdbdb;
- }
- .filter a {
- display: block;
- padding: 0 10px;
- height: 32px;
- line-height: 32px;
- text-decoration: none;
- }
- .filter a:hover {
- background-color: #2f97ff;
- color: #FFFFFF;
- }
- </style>
+ background-color: #a0b5fc !important;
+ }
+ #cardOption input[type="checkbox"] {
+ vertical-align: middle;
+ }
+ #cardOption table thead input[type="checkbox"]{
+ margin-left: 4px;
+ }
+ .filter {
+ position: fixed;
+ top: 50%;
+ right: 2px;
+ z-index: 999;
+ border: 1px solid #dbdbdb;
+ }
+ .filter a {
+ display: block;
+ padding: 0 10px;
+ height: 32px;
+ line-height: 32px;
+ text-decoration: none;
+ }
+ .filter a:hover {
+ background-color: #2f97ff;
+ color: #FFFFFF;
+ }
+ </style>
</head>
<body>
<!--澶撮儴鍐呭寮�濮�-->
@@ -91,21 +92,22 @@
<tr class="fWeight">
<td>鐪�</td> <!-- 鐪� -->
<td>甯�</td> <!-- 甯� -->
+ <td>鍖�/鍘�</td> <!-- 鍖�/鍘� -->
<td><s:text name="Computer_name"/></td> <!-- 鏈烘埧绔欑偣锛堟垨鏈烘埧璁惧锛� -->
<td colspan="2"><s:text name="Alarm_start_time"/></td> <!-- 鍛婅寮�濮嬫椂闂存 -->
</tr>
<tr>
<td>
- <select id="station_name1" name="station_name1">
- </select>
+ <select id="station_name1" name="station_name1"></select>
</td>
<td>
- <select id="city" name="station_name2">
- </select>
+ <select id="city" name="station_name2"></select>
</td>
<td>
- <select id="station_name" name="station_name">
- </select>
+ <select id="county" name="station_name5"></select>
+ </td>
+ <td>
+ <select id="station_name" name="station_name"></select>
</td>
<td style="width: 15%">
<input type="text" readonly="readonly" id="starttime" name="starttime" onclick="showCalendar(this)" value="2000-01-01">
@@ -163,6 +165,7 @@
<script type="text/javascript" src="js/nocontent.js"></script>
<script type="text/javascript" src="js/createTab.js"></script>
<script type="text/javascript" src="js/right-menu.js"></script>
+ <script type="text/javascript" src="src/layui.all.js"></script>
<script type="text/javascript">
var Page={
pageCurr:1,
@@ -376,7 +379,7 @@
// 鐢熸垚琛ㄦ牸鐨勫ご閮ㄥ拰琛ㄤ綋
function createAllTbl (header, body, arrTh, arrTd,arrTr,status) {
- console.info(status);
+ //console.info(status);
var newArrTh = new Array();
var newArrTd = new Array();
newArrTh = getArrTh(status, arrTh);
@@ -462,7 +465,7 @@
};
//鏌ヨ璁惧鍘嗗彶鍛婅璁板綍
function seachDevHisAlarm(){
- loading.showLoading();
+ var load = layer.load(1);
var temp = createSearchParam();
if(JSON.stringify(temp.binf) != JSON.stringify(formjson.binf)){
Page.pageCurr = 1;
@@ -519,17 +522,21 @@
}
//console.info(arrTd);
createAllTbl(tblHd, tblBd, arrTh, arrTd,num_list,tblStatus);
- loading.hideLoading();
+ layer.close(load);
},
error:function(){
- loading.hideLoading();
+ layer.close(load);
noContent.showNoContent("鏌ヨ澶辫触,璇锋鏌ョ綉缁滆繛鎺ワ紒");
}
});
}
+ var isNewLoad = true;
// 鐪�-甯�-鏈烘埧-鐢垫睜缁�
+ var filterLoad;
$(document).ready(function(){
+ filterLoad = layer.load();
+ var pre_province = getQueryString('province');
//椤甸潰鍔犺浇鏃舵煡璇㈢淮鎶ゅ尯涓殑鏋㈢航绫诲瀷
$.post("User_battgroup_baojigroup_battgroupAction!serchStationName1InGroup",null,function(data){
data=data.result;
@@ -545,7 +552,10 @@
$option.attr("value", "");
}else{
$option.text(data.data[i-1]);
- $option.attr("value",data.data[i-1]);
+ $option.attr("value",data.data[i-1]);
+ if(pre_province == data.data[i-1] && isNewLoad){
+ $option.attr("selected",true);
+ }
}
$select.append($option);
}
@@ -557,10 +567,15 @@
});
// 鏍规嵁缁存姢鍖虹殑鍐呭鏌ヨ甯�
- function findCity() {
+ function findCity(isLoad) {
var data = {
StationName1: $("#station_name1").val()
};
+ // 鏄惁娣诲姞绛夊緟
+ if(isLoad) {
+ filterLoad = layer.load();
+ }
+ var pre_city = getQueryString('city');
// 璇锋眰鑾峰彇褰撳墠鐪佷笅鐨勫競
$.ajax({
type: "post",
@@ -578,6 +593,9 @@
for(var i=0;i<_data.length;i++){
var __data = _data[i];
var tmp = getOptionsData(__data.StationName2, __data.StationName2, __data);
+ if(pre_city == __data.StationName2 && isNewLoad){
+ tmp = getOptionsData(__data.StationName2, __data.StationName2, __data,{},true);
+ }
optsList.push(tmp);
}
// 鏍规嵁鏁版嵁鐢熸垚涓嬫媺鍒楄〃
@@ -585,27 +603,84 @@
}else {
$select.text('').html('<option>鏆傛棤鍙祴甯�</option>');
}
- findStationNamebyStationname1();
+ findCounty();
}
});
}
+ // 鏌ヨ鍖�/鍘�
+ function findCounty(isLoad) {
+ var tmp = {
+ StationName1:$("#station_name1").val(),
+ StationName2:$("#city").val(),
+ };
+ // 鏄惁娣诲姞绛夊緟
+ if(isLoad) {
+ filterLoad = layer.load();
+ }
+ var pre_county = getQueryString('county');
+ // 鏌ヨ鍖哄幙
+ $.ajax({
+ type: 'post',
+ async: true,
+ url: "BattInfAction!serchStationName5",
+ data: "json="+JSON.stringify(tmp),
+ success:function(data) {
+ var rs = JSON.parse(data.result);
+ var $select = $("#county");
+ if(rs.code==1){
+ var _data = rs.data;
+ // 鏍规嵁鏁版嵁鏋勯�犵敓鎴愪笅鎷夊垪琛ㄧ殑鏁版嵁
+ var optsList = [];
+ for(var i=0;i<_data.length;i++){
+ var __data = _data[i];
+ var _attr = {
+ StationId: __data.StationId
+ };
+ var tmp = getOptionsData(__data.StationName5, __data.StationName5, __data, _attr);
+ if(pre_county == __data.StationName5 && isNewLoad){
+ tmp = getOptionsData(__data.StationName5, __data.StationName5, __data, _attr,{},true);
+ }
+ optsList.push(tmp);
+ }
+
+ // 鏍规嵁鏁版嵁鐢熸垚涓嬫媺鍒楄〃
+ createOptions($select, optsList, true);
+ }else{
+ $select.text('').html('<option>鏆傛棤鍙祴鏈烘埧绔欑偣</option>');
+ }
+ findStationNamebyStationname1();
+ }
+ });
+ }
+
//褰撶淮鎶ゅ尯鐨勫�煎彉鎹㈡椂鏇存柊甯�
$('#station_name1').change(function(){
- findCity();
+ findCity(true);
});
//褰撶淮鎶ゅ尯鐨勫�煎彉鎹㈡椂鏇存柊鏈烘埧绔欑偣
$('#city').change(function(){
- findStationNamebyStationname1();
+ findCounty(true);
+ });
+
+ //褰撳尯/鍘跨殑鍊煎彉鎹㈡椂鏇存柊鏈烘埧绔欑偣
+ $('#county').change(function(){
+ findStationNamebyStationname1(true);
});
//鏍规嵁鐪侊紝甯傛煡璇㈢珯鐐�
- function findStationNamebyStationname1(){
+ function findStationNamebyStationname1(isLoad){
var tmp = {
StationName1:$("#station_name1").val(),
- StationName2:$("#city").val()
+ StationName2:$("#city").val(),
+ StationName5:$("#county").val()
};
+ // 鏄惁娣诲姞绛夊緟
+ if(isLoad) {
+ filterLoad = layer.load();
+ }
+ var pre_home = getQueryString('home');
//var selectvalue=$("#station_name1 option:selected").val();
//alert(selectvalue);
$.post("BattInfAction!serchStationName3","json="+JSON.stringify(tmp),function(data){
@@ -621,6 +696,9 @@
StationId: __data.StationId
};
var tmp = getOptionsData(__data.StationName3, __data.StationName, __data, _attr);
+ if(pre_home == __data.StationName && isNewLoad){
+ tmp = getOptionsData(__data.StationName3, __data.StationName, __data, _attr,{},true);
+ }
optsList.push(tmp);
}
@@ -629,6 +707,8 @@
}else{
$("#station_name").text('').html('<option>鏆傛棤鍙祴鏈烘埧绔欑偣</option>');
}
+ isNewLoad = false;
+ layer.close(filterLoad);
seachDevHisAlarm();
});
}
@@ -642,8 +722,9 @@
function createSearchParam(){
var temp = {
binf:{
- StationName:$('#station_name').val(), //鏈烘埧鍚�
- StationName2:$('#city').val(), // 甯�
+ StationName:$('#station_name').val(), // 鏈烘埧鍚�
+ StationName5:$('#county').val(), // 鍖�/鍘�
+ StationName2:$('#city').val(), // 甯�
StationName1:$('#station_name1').val(), // 鐪�
BattProductDate:$('#starttime').val()+" 00:00:00",
BattProductDate1:$('#endtime').val()+" 23:59:59",
@@ -653,7 +734,7 @@
pageCurr:Page.pageCurr, //褰撳墠椤�
}
};
- console.log(temp);
+ //console.log(temp);
return temp;
}
@@ -678,6 +759,11 @@
case 618502:return "閫氳鍛婅";
case 618503:return "璁惧杩囨俯鍛婅";
case 618504:return "浜屾瀬绠1鍛婅";
+ case 119023:return "缁埅涓嶈冻鍛婅";
+ case 119024:return "鍩虹珯鍋滅數鍛婅";
+ case 119025:return "鍩虹珯鍙戠數鍛婅";
+ case 119026:return "鍩虹珯鎺夌珯鍛婅";
+ case 119027:return "鍩虹珯寮�闂ㄥ憡璀�";
}
}
return "閫氫俊鏁呴殰";
--
Gitblit v1.9.1