From 0b0b0ed98d5e0ecfeecb878f1fe444eb760c7aed Mon Sep 17 00:00:00 2001
From: LiJun <LiJun@192.168.10.18>
Date: 星期四, 01 十一月 2018 11:35:02 +0800
Subject: [PATCH] Merge branch 'dev_lxw' of https://whyclj@gitlab.com/whyclxw1/gx_tieta.git into dev_lxw
---
gx_tieta/WebRoot/powercut.jsp | 97 +++++++++++++++++++++++++++++++++++++++---------
1 files changed, 78 insertions(+), 19 deletions(-)
diff --git a/gx_tieta/WebRoot/powercut.jsp b/gx_tieta/WebRoot/powercut.jsp
index 66445d1..1cbed81 100644
--- a/gx_tieta/WebRoot/powercut.jsp
+++ b/gx_tieta/WebRoot/powercut.jsp
@@ -21,7 +21,6 @@
<link rel="stylesheet" type="text/css" href="css/loading.css">
<link rel="stylesheet" href="css/nocontent.css">
<link href="src/css/layui.css" type="text/css" rel="stylesheet">
-
<style type="text/css">
body {
overflow-x: hidden !important;
@@ -84,25 +83,23 @@
<tr class="fWeight">
<td>鐪�</td> <!-- 鐪� -->
<td>甯�</td> <!-- 甯� -->
+ <td>鍖�/鍘�</td> <!-- 鍖�/鍘� -->
<td><s:text name="Computer_name"/></td> <!-- 鏈烘埧鍚嶇О -->
<td>鏈烘埧鍋滅數绫诲瀷</td>
<td colspan="2"><s:text name="Power_cut"/><s:text name="Time"/></td> <!-- 鍋滅數鏃堕棿 -->
</tr>
<tr>
<td>
- <select id="station_name1" name="stationname1">
-
- </select>
+ <select id="station_name1" name="stationname1"></select>
</td>
<td>
- <select id="city" name="stationname2">
-
- </select>
+ <select id="city" name="stationname2"></select>
</td>
<td>
- <select id="station_name" name="stationname">
-
- </select>
+ <select id="county" name="stationname5"></select>
+ </td>
+ <td>
+ <select id="station_name" name="stationname"></select>
</td>
<td>
<select id="power_state" name="power_state">
@@ -166,6 +163,7 @@
<script type="text/javascript" src="js/loading.js"></script>
<script type="text/javascript" src="js/nocontent.js"></script>
<script type="text/javascript" src="js/createTab.js"></script>
+ <script type="text/javascript" src="src/layui.all.js"></script>
<script type="text/javascript">
var Page={
pageCurr:1,
@@ -326,7 +324,7 @@
formjson = jsontemp;
}
- loading.showLoading();
+ var load = layer.load(1);
var temp = createSearchParam();
//console.info(temp);
arrTd = new Array();
@@ -339,7 +337,7 @@
success: function(data){
data = eval("("+data+")");
var model = eval("("+data.result+")");
- //console.info(model);
+ console.info(model);
if(model.code==1){
for(var i = 0 ;i<model.data.length;i++){
arrTd.push(model.data[i].StationName1); //缁存姢鍖�
@@ -366,7 +364,7 @@
$('#total').text(Page.pageAll);
createAllTbl(tblHd, tblBd, arrTh, arrTd, tblStatus);
- loading.hideLoading();
+ layer.close(load);
},
error:function(){
@@ -377,7 +375,9 @@
}
// 鐪�-甯�-鏈烘埧-鐢垫睜缁�
+ var filterLoad;
$(document).ready(function(){
+ filterLoad = layer.load();
//椤甸潰鍔犺浇鏃舵煡璇㈢淮鎶ゅ尯涓殑鏋㈢航绫诲瀷
$.post("User_battgroup_baojigroup_battgroupAction!serchStationName1InGroup",null,function(data){
data=data.result;
@@ -405,10 +405,14 @@
});
// 鏍规嵁缁存姢鍖虹殑鍐呭鏌ヨ甯�
- function findCity() {
+ function findCity(isLoad) {
var data = {
StationName1: $("#station_name1").val()
};
+ // 鏄惁娣诲姞绛夊緟
+ if(isLoad) {
+ filterLoad = layer.load();
+ }
// 璇锋眰鑾峰彇褰撳墠鐪佷笅鐨勫競
$.ajax({
type: "post",
@@ -433,27 +437,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){
@@ -477,6 +533,8 @@
}else{
$("#station_name").text('').html('<option>鏆傛棤鍙祴鏈烘埧绔欑偣</option>');
}
+
+ layer.close(filterLoad);
});
}
@@ -489,6 +547,7 @@
StationName:$('#station_name').val(),
StationName1:$('#station_name1').val(),
StationName2:$('#city').val(),
+ StationName5:$('#county').val(),
BattProductDate:$('#starttime').val()+" 00:00:00",
BattProductDate1:$('#endtime').val()+" 23:59:59"
},
--
Gitblit v1.9.1