| | |
| | | <html>
|
| | | <head>
|
| | | <base href="<%=basePath%>">
|
| | | |
| | | <title><s:text name="Station_powercut_query"/></title> <!-- 机房停电查询 -->
|
| | | <meta charset="UTF-8">
|
| | | <meta name="viewport" content="width=device-width, initial-scale=1">
|
| | | <link href="css/basic.css" rel="stylesheet">
|
| | | <link rel="stylesheet" href="css/BrdwMaint.css">
|
| | | <link rel="stylesheet" type="text/css" href="css/loading.css">
|
| | | <link rel="stylesheet" href="css/nocontent.css">
|
| | | <meta http-equiv="pragma" content="no-cache">
|
| | | <meta http-equiv="cache-control" content="no-cache">
|
| | | <meta http-equiv="expires" content="0">
|
| | | <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
|
| | | <meta http-equiv="description" content="This is my page">
|
| | |
|
| | | <title><s:text name="Station_powercut_query"/></title> <!-- 机房停电查询 -->
|
| | | <link href="css/basic.css" rel="stylesheet">
|
| | | <link rel="stylesheet" href="css/BrdwMaint.css">
|
| | | <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;
|
| | |
| | | <!-- 维护区信息 -->
|
| | | <table>
|
| | | <tr class="fWeight">
|
| | | <td><s:text name="Maintenance_area"/></td> <!-- 维护区 -->
|
| | | <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="station_name" name="stationname">
|
| | | |
| | | </select>
|
| | | <select id="city" name="stationname2"></select>
|
| | | </td>
|
| | | <td>
|
| | | <select id="county" name="stationname5"></select>
|
| | | </td>
|
| | | <td>
|
| | | <select id="station_name" name="stationname"></select>
|
| | | </td>
|
| | | <td>
|
| | | <select id="power_state" name="power_state">
|
| | |
| | | <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,
|
| | |
| | | formjson = jsontemp;
|
| | | }
|
| | |
|
| | | loading.showLoading();
|
| | | var load = layer.load(1);
|
| | | var temp = createSearchParam();
|
| | | //console.info(temp);
|
| | | arrTd = new Array();
|
| | |
| | | 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); //维护区
|
| | |
| | | $('#total').text(Page.pageAll);
|
| | |
|
| | | createAllTbl(tblHd, tblBd, arrTh, arrTd, tblStatus);
|
| | | loading.hideLoading();
|
| | | layer.close(load);
|
| | | },
|
| | |
|
| | | error:function(){
|
| | |
| | | }
|
| | | });
|
| | | }
|
| | | |
| | | $(document).ready(function(){
|
| | | |
| | | // 省-市-机房-电池组
|
| | | var filterLoad;
|
| | | $(document).ready(function(){
|
| | | filterLoad = layer.load();
|
| | | //页面加载时查询维护区中的枢纽类型
|
| | | $.post("User_battgroup_baojigroup_battgroupAction!serchStationName1InGroup",null,function(data){
|
| | | data=data.result;
|
| | |
| | | }else{
|
| | | $("#station_name1").text('').html('<option>暂无管理的维护区</option>');
|
| | | }
|
| | | findStationNamebyStationname1(); |
| | | findCity(); |
| | | });
|
| | | });
|
| | | |
| | | // 根据维护区的内容查询市
|
| | | function findCity(isLoad) {
|
| | | var data = {
|
| | | StationName1: $("#station_name1").val()
|
| | | };
|
| | | // 是否添加等待
|
| | | if(isLoad) {
|
| | | filterLoad = layer.load();
|
| | | }
|
| | | // 请求获取当前省下的市
|
| | | $.ajax({ |
| | | type: "post", |
| | | url: "BattInfAction!serchStationName2", |
| | | async:true, |
| | | dataType:'json',
|
| | | data:"json = "+JSON.stringify(data), |
| | | success: function(data){
|
| | | var rs = JSON.parse(data.result);
|
| | | var $select = $("#city");
|
| | | if(rs.code == 1) {
|
| | | var _data= rs.data;
|
| | | // 根据数据构造生成下拉列表的数据
|
| | | var optsList = [];
|
| | | for(var i=0;i<_data.length;i++){
|
| | | var __data = _data[i];
|
| | | var tmp = getOptionsData(__data.StationName2, __data.StationName2, __data);
|
| | | optsList.push(tmp);
|
| | | }
|
| | | // 根据数据生成下拉列表
|
| | | createOptions($select, optsList, true);
|
| | | }else {
|
| | | $select.text('').html('<option>暂无可测市</option>');
|
| | | }
|
| | | 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(true);
|
| | | });
|
| | |
|
| | | //当维护区的值变换时更新机房站点
|
| | | $('#station_name1').change(function(){
|
| | | findStationNamebyStationname1();
|
| | | $('#city').change(function(){
|
| | | findCounty(true);
|
| | | });
|
| | |
|
| | | var isNewload = true; //判断是否首次进入页面
|
| | | //根据维护区查询站点
|
| | | function findStationNamebyStationname1(){
|
| | | var user = {
|
| | | UNote:$("#station_name1 option:selected").val()
|
| | | //当区/县的值变换时更新机房站点
|
| | | $('#county').change(function(){
|
| | | findStationNamebyStationname1(true);
|
| | | });
|
| | | |
| | | //根据省,市查询站点
|
| | | function findStationNamebyStationname1(isLoad){
|
| | | var tmp = {
|
| | | StationName1:$("#station_name1").val(),
|
| | | StationName2:$("#city").val(),
|
| | | StationName5:$("#county").val()
|
| | | };
|
| | | // 是否添加等待
|
| | | if(isLoad) {
|
| | | filterLoad = layer.load();
|
| | | }
|
| | | //var selectvalue=$("#station_name1 option:selected").val();
|
| | | //alert(selectvalue);
|
| | | $.post("User_battgroup_baojigroup_battgroupAction!serchStationByStationName1","json="+JSON.stringify(user),function(data){
|
| | | data=data.result;
|
| | | data=eval("("+data+")");
|
| | | //console.info(data);
|
| | | if(data.code==1 && data.data.length>0){
|
| | | $.post("BattInfAction!serchStationName3","json="+JSON.stringify(tmp),function(data){
|
| | | var rs = JSON.parse(data.result);
|
| | | if(rs.code==1){
|
| | | var _data = rs.data;
|
| | | var $select = $("#station_name");
|
| | | $select.text('');
|
| | | for(var i=0;i<=data.data.length;i++){
|
| | | var $option=$("<option></option>");
|
| | | if(i==0){
|
| | | $option.html("<s:text name='All'/>(<s:text name='Common'/>"+data.data.length+"<s:text name='Species'/>)"); |
| | | $option.attr("value", ""); |
| | | }else{
|
| | | $option.text(data.data[i-1].StationName);
|
| | | $option.attr("value",data.data[i-1].StationId); |
| | | } |
| | | $select.append($option);
|
| | | // 根据数据构造生成下拉列表的数据
|
| | | var optsList = [];
|
| | | for(var i=0;i<_data.length;i++){
|
| | | var __data = _data[i];
|
| | | var _attr = {
|
| | | StationId: __data.StationId
|
| | | };
|
| | | var tmp = getOptionsData(__data.StationName3, __data.StationName3, __data, _attr);
|
| | | optsList.push(tmp);
|
| | | }
|
| | | |
| | | // 根据数据生成下拉列表
|
| | | createOptions($select, optsList, true);
|
| | | }else{
|
| | | $("#station_name").text('').html('<option>暂无管理的机房站点</option>');
|
| | | $("#station_name").text('').html('<option>暂无可测机房站点</option>');
|
| | | }
|
| | | var power_state = (parseInt(getQueryString("power_state")));
|
| | | if(power_state >= 0 && isNewload){
|
| | | $('#power_state option[value = "'+power_state+'"]').attr('selected','selected');
|
| | | searchStationPowerCutRecord();
|
| | | isNewload = false;
|
| | | }
|
| | | |
| | | layer.close(filterLoad);
|
| | | });
|
| | | } |
| | | }
|
| | | |
| | |
|
| | | //构造查询条件
|
| | | function createSearchParam(){
|
| | |
| | | num:$('#power_state').val(),
|
| | | 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"
|
| | | },
|