hdw
2018-11-01 0b2f4a97fab7d325fdf3e228bcab940f861954c7
机房状态统计查询区/县添加
1个文件已修改
96 ■■■■ 已修改文件
gx_tieta/WebRoot/batt-state-statistical.jsp 96 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/batt-state-statistical.jsp
@@ -43,6 +43,7 @@
                    <tr>
                        <th>省</th>                                                        <!-- 省 -->
                        <th>市</th>                                                        <!-- 市 -->
                        <th>区/县</th>                                                    <!-- 区/县 -->
                        <th><s:text name="Computer_site"/></th>                                                            <!-- 机房站点 -->
                        
                        <th colspan="2" style="width: 30%;">时间</th>        <!-- 开始告警日期 -->
@@ -50,21 +51,17 @@
                    </tr>
                    <tr>
                        <td>
                            <select name="" id="station_name1">
                            </select>
                            <select name="" id="station_name1"></select>
                        </td>
                        <td>
                            <select name="" id="city">
                            </select>
                            <select name="" id="city"></select>
                        </td>
                        <td>
                            <select name="" id="station_name3">
                            </select>
                            <select name="" id="county"></select>
                        </td>
                        <td>
                            <select name="" id="station_name3"></select>
                        </td>
                        <td><input type="text" id="startalm" readonly="readonly" name="bmd.adata.alm_start_time" value="2000-1-1" /></td>
                        <td><input type="text" id="endTalm" readonly="readonly" name="bmd.adata.alm_start_time1" /></td>
                        <td>
@@ -247,6 +244,7 @@
            function serachBattStatistical(){
                var temp = createSearchForm();
                var json = JSON.stringify(temp);
                var load = layer.load(1);
                $.ajax({
                    type:"post",
                    url:"Bts_station_eventAction!serchByCondition",
@@ -261,7 +259,7 @@
                         }else {
                             tOptions.data = [];
                         }
                         layer.close(load);
                         table.render(tOptions);
                    }
                })
@@ -272,7 +270,8 @@
                var stationid = $('#station_name3').find("option:selected").attr('Stationid');
                var temp={
                        StationName1:$('#station_name1').val(),                                                    // 省
                        StationName2:$('#city').val(),                                                            // 市
                        StationName2:$('#city').val(),
                        Stationname5:$('#county').val(),                                                            // 市
                        StationName3:$('#station_name3').val(),                                                    //机房名称
                        StationId: stationid?stationid:0,
                        BattInUseDate:$('#startalm').val()+" 00:00:00",
@@ -344,11 +343,9 @@
                return rs;
            }
            
        });
         // 省-市-机房-电池组
        $(document).ready(function(){
            //页面加载时查询维护区中的枢纽类型
            var filterLoad = layer.load();
            $.post("User_battgroup_baojigroup_battgroupAction!serchStationName1InGroup",null,function(data){
                data=data.result;
                data=eval("("+data+")");
@@ -372,12 +369,15 @@
                }
                findCity();        
            });
        });
        
        function findCity() {
            function findCity(isLoad) {
            var data = {
                StationName1: $("#station_name1").val()
            };
                // 是否添加等待
                if(isLoad) {
                    filterLoad = layer.load();
                }
            // 请求获取当前省下的市
            $.ajax({     
                type: "post",                 
@@ -402,25 +402,77 @@
                    }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();
        });
        //当维护区的值变换时更新机房站点
        $('#city').change(function(){
            findStationNamebyStationname1();
                findCounty();
            });
            //当区/县的值变换时更新机房站点
            $('#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){
@@ -444,9 +496,11 @@
                }else{
                    $("#station_name3").text('').html('<option>暂无可测机房站点</option>');
                }
                    layer.close(filterLoad);
            });
        }
        });
    </script>
  </body>
</html>