From 40bb6c2e69b9d2cb32434021e4fddfcabb009dc9 Mon Sep 17 00:00:00 2001 From: hdw <496960745@qq.com> Date: 星期四, 01 十一月 2018 14:49:35 +0800 Subject: [PATCH] 设备告警历史查询区/县添加 --- gx_tieta/WebRoot/equipHistWarn1.jsp | 197 ++++++++++++++++++++++++++++++++---------------- 1 files changed, 130 insertions(+), 67 deletions(-) diff --git a/gx_tieta/WebRoot/equipHistWarn1.jsp b/gx_tieta/WebRoot/equipHistWarn1.jsp index 27fe768..c632628 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, @@ -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,19 @@ } //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 filterLoad; $(document).ready(function(){ + filterLoad = layer.load(); //椤甸潰鍔犺浇鏃舵煡璇㈢淮鎶ゅ尯涓殑鏋㈢航绫诲瀷 $.post("User_battgroup_baojigroup_battgroupAction!serchStationName1InGroup",null,function(data){ data=data.result; @@ -557,10 +562,14 @@ }); // 鏍规嵁缁存姢鍖虹殑鍐呭鏌ヨ甯� - function findCity() { + function findCity(isLoad) { var data = { StationName1: $("#station_name1").val() }; + // 鏄惁娣诲姞绛夊緟 + if(isLoad) { + filterLoad = layer.load(); + } // 璇锋眰鑾峰彇褰撳墠鐪佷笅鐨勫競 $.ajax({ type: "post", @@ -585,27 +594,79 @@ }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(); + } + // 鏌ヨ鍖哄幙 + $.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); + 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 selectvalue=$("#station_name1 option:selected").val(); //alert(selectvalue); $.post("BattInfAction!serchStationName3","json="+JSON.stringify(tmp),function(data){ @@ -629,6 +690,7 @@ }else{ $("#station_name").text('').html('<option>鏆傛棤鍙祴鏈烘埧绔欑偣</option>'); } + layer.close(filterLoad); seachDevHisAlarm(); }); } @@ -642,8 +704,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", -- Gitblit v1.9.1