hdw
2018-11-01 1fffdc21f49f3cec4c913892cc370557b8399716
机房停电查询区/县
1个文件已修改
95 ■■■■ 已修改文件
gx_tieta/WebRoot/powercut.jsp 95 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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,6 +437,48 @@
                    }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();
                }
            });
@@ -440,20 +486,30 @@
        
        //当维护区的值变换时更新市
        $('#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"
                },