hdw
2018-11-01 39c40f5501156a3f96a970f6b458c8b30e1cb538
机房状态查询区/县添加
1个文件已修改
203 ■■■■■ 已修改文件
gx_tieta/WebRoot/batt-state-manage.jsp 203 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/batt-state-manage.jsp
@@ -9,22 +9,21 @@
<html>
  <head>
    <base href="<%=basePath%>">
    <title><s:text name="Station_statequery"/></title>                <!-- 机房状态查询 -->
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <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_statequery"/></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" type="text/css" href="css/basic-layout.css"/>
    <link rel="stylesheet" href="css/nocontent.css">
    <link rel="stylesheet" href="alifont/iconfont.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">
    <link href="src/css/layui.css" type="text/css" rel="stylesheet">
    <style type="text/css">
         body {
           overflow-x: hidden !important;
@@ -91,24 +90,22 @@
                        <tr class="fWeight">
                            <td>省</td>                        <!-- 省 -->
                            <td>市</td>                        <!-- 市 -->
                            <td>区/县</td>                        <!-- 区/县 -->
                            <td><s:text name="Computer_name"/></td>                                    <!-- 机房名称 -->
                            
                        </tr>
                        <tr>
                            <td>
                                <select id="station_name1" name="stationname1">
                                </select>
                                <select id="station_name1" name="stationname1"></select>
                            </td>
                            <td>
                                <select id="city">
                                </select>
                                <select id="city"></select>
                            </td>
                            <td>
                                <select id="station_name3" name="stationname">
                                </select>
                                <select id="county"></select>
                            </td>
                            <td>
                                <select id="station_name3" name="stationname"></select>
                            </td>
                            
                            
@@ -171,6 +168,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" src="pages/js/common.js"></script>
        <script type="text/javascript">
        var Page={
@@ -245,10 +243,7 @@
            createAllTbl(tblHd, tblBd, arrTh, arrTd, tblStatus);
            $('#paging .search').click(function() {
                 searchstationstate();
                //noContent.showNoContent();            //显示查询失败框
                 searchstationstate(true);
            });
            // 点击表格选项显示表格选项弹出框
@@ -335,8 +330,10 @@
        
        
        
         // 省-市-机房-电池组
        // 省-市-机房-电池组
        var filterLoad;
        $(document).ready(function(){
            filterLoad = layer.load();
            //页面加载时查询省
            $.post("User_battgroup_baojigroup_battgroupAction!serchStationName1InGroup",null,function(data){
                data=data.result;
@@ -363,10 +360,14 @@
            });
        });
        
        function findCity() {
        function findCity(isLoad) {
            var data = {
                StationName1: $("#station_name1").val()
            };
            // 是否添加等待
            if(isLoad) {
                filterLoad = layer.load();
            }
            // 请求获取当前省下的市
            $.ajax({     
                type: "post",                 
@@ -391,25 +392,82 @@
                    }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);
        });
        // 当电池组的值变化时更新内容
        $('#station_name3').change(function() {
            searchstationstate(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){
@@ -421,13 +479,6 @@
                    var optsList = [];
                    //console.info(_data[0]);
                    for(var i=0;i<_data.length;i++){
                    /*    if(i==0){
                            $select.html("<s:text name='All'/>(<s:text name='Common'/>"+data.length+"<s:text name='Species'/>)");
                            $select.attr("value","");
                        }else{
                            $select.text(_data[i-1].StationName3);
                            $select.attr("value",_data[i-1].StationId);
                        }*/
                        var __data = _data[i];
                        var _attr = {
                            StationId: __data.StationId
@@ -441,8 +492,8 @@
                    $("#station_name3").text('').html('<option>暂无可测机房站点</option>');
                    
                }
                searchstationstate();
                layer.close(filterLoad);
                searchstationstate(true);
            });
        }
        
@@ -456,8 +507,9 @@
                    pageSize:$('#number').val(),
                    pageCurr:Page.pageCurr,
                },                                                
                StationName1:$('#station_name1').val(),                            //市
                StationName2:$('#city').val(),
                StationName1:$('#station_name1').val(),        // 省
                StationName2:$('#city').val(),                // 市
                StationName5:$('#county').val(),            // 区/县
                StationName3:$('#station_name3').val(),                
                StationId: stationid?stationid:0,
                BattGroupNum:battgroupid,
@@ -465,43 +517,49 @@
            //console.info(temp);
            return temp;
        }
            function batt_condition(){
                var POFF_ComError = 0;
                var XUHANG_ComError = 0;
                var FADIAN_ComError = 0;
                var DIAOZHAN = 0;
                var DOOROPEN_ComError = 0;
                var condition = 0;
                if($('#ALM_TYPE_BTS9100S_POFF_ComError').attr("checked")){
                    POFF_ComError = $('#ALM_TYPE_BTS9100S_POFF_ComError').val();
                    condition+=parseInt(POFF_ComError);
                }
                if($('#ALM_TYPE_BTS9100S_XUHANG_ComError').attr("checked")){
                    XUHANG_ComError = $('#ALM_TYPE_BTS9100S_XUHANG_ComError').val();
                    condition+=parseInt(XUHANG_ComError);
                }
                if($('#ALM_TYPE_BTS9100S_FADIAN_ComError').attr("checked")){
                    FADIAN_ComError = $('#ALM_TYPE_BTS9100S_FADIAN_ComError').val();
                    condition+=parseInt(FADIAN_ComError);
                }
                if($('#ALM_TYPE_BTS9100S_DIAOZHAN_ComError').attr("checked")){
                    DIAOZHAN = $('#ALM_TYPE_BTS9100S_DIAOZHAN_ComError').val();
                    condition+=parseInt(DIAOZHAN);
                }
                if($('#ALM_TYPE_BTS9100S_DOOROPEN_ComError').attr("checked")){
                    DOOROPEN_ComError =    $('#ALM_TYPE_BTS9100S_DOOROPEN_ComError').val();
                    condition+=parseInt(DOOROPEN_ComError);
                }
                //condition = POFF_ComError+XUHANG_ComError+DIAOZHAN+DOOROPEN_ComError+FADIAN_ComError;
                //console.info(condition);
                return condition;
        function batt_condition(){
            var POFF_ComError = 0;
            var XUHANG_ComError = 0;
            var FADIAN_ComError = 0;
            var DIAOZHAN = 0;
            var DOOROPEN_ComError = 0;
            var condition = 0;
            if($('#ALM_TYPE_BTS9100S_POFF_ComError').attr("checked")){
                POFF_ComError = $('#ALM_TYPE_BTS9100S_POFF_ComError').val();
                condition+=parseInt(POFF_ComError);
            }
            if($('#ALM_TYPE_BTS9100S_XUHANG_ComError').attr("checked")){
                XUHANG_ComError = $('#ALM_TYPE_BTS9100S_XUHANG_ComError').val();
                condition+=parseInt(XUHANG_ComError);
            }
            if($('#ALM_TYPE_BTS9100S_FADIAN_ComError').attr("checked")){
                FADIAN_ComError = $('#ALM_TYPE_BTS9100S_FADIAN_ComError').val();
                condition+=parseInt(FADIAN_ComError);
            }
            if($('#ALM_TYPE_BTS9100S_DIAOZHAN_ComError').attr("checked")){
                DIAOZHAN = $('#ALM_TYPE_BTS9100S_DIAOZHAN_ComError').val();
                condition+=parseInt(DIAOZHAN);
            }
            if($('#ALM_TYPE_BTS9100S_DOOROPEN_ComError').attr("checked")){
                DOOROPEN_ComError =    $('#ALM_TYPE_BTS9100S_DOOROPEN_ComError').val();
                condition+=parseInt(DOOROPEN_ComError);
            }
            //condition = POFF_ComError+XUHANG_ComError+DIAOZHAN+DOOROPEN_ComError+FADIAN_ComError;
            //console.info(condition);
            return condition;
        }
        var myTimeOut;
        //查询机房状态
        function searchstationstate(){
        function searchstationstate(isLoad){
            var temp = createSearchParam();
            arrTd = new Array();
            // 是否添加等待
            var load;
            if(isLoad) {
                load = layer.load(1);
            }
            $.ajax({
                type: "post",
                url: "Bts_station_stateAction_action_serchByCondition",
@@ -591,6 +649,7 @@
                        $('#total').text(Page.pageAll);
                        $('#current').text(Page.pageCurr+"/"+pageNum);
                    }
                    layer.close(load);
                    createAllTbl(tblHd, tblBd, arrTh, arrTd, tblStatus);
                    
                    window.clearTimeout(myTimeOut);