hdw
2018-11-01 cc89ec1ed5410efa5ff971a5f2665451df398260
电池告警历史查询区/县添加
1个文件已修改
107 ■■■■ 已修改文件
gx_tieta/WebRoot/eleHistoryWarn.jsp 107 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/eleHistoryWarn.jsp
@@ -17,6 +17,7 @@
    <link rel="stylesheet" type="text/css" href="css/basic-layout.css"/>
    <link rel="stylesheet" href="css/sidebar.css" />
    <link rel="stylesheet" href="css/confirm.css" />
    <link href="src/css/layui.css" type="text/css" rel="stylesheet">
    <style type="text/css">
        .b8cfe5 {
            background-color: #b8cfe5 !important;
@@ -42,30 +43,26 @@
                                <tr>
                                    <th>省</th>                                                        <!-- 省 -->
                                    <th>市</th>                                                        <!-- 市 -->
                                    <th>区/县</th>                                                    <!-- 区/县 -->
                                    <th><s:text name="Computer_site"/></th>                                                            <!-- 机房站点 -->
                                    <th><s:text name="Battery"/></th>                                                                <!-- 蓄电池组 -->
                                    <th colspan="2" style="width: 30%;"><s:text name="Alarm"/><s:text name="Start_date"/></th>        <!-- 开始告警日期 -->
                                </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_name">
                                        </select>
                                        <select name="" id="county"></select>
                                    </td>
                                    <td>
                                        <select name="" id="battgroup_name">
                                        </select>
                                        <select name="" id="station_name"></select>
                                    </td>
                                    <td>
                                        <select name="" id="battgroup_name"></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>
@@ -147,6 +144,7 @@
    <script type="text/javascript" src="js/myConfirm.js"></script>    
    <script type="text/javascript" src="js/myinterval.js"></script>
    <script type="text/javascript" src="js/pageUtil.js"></script>
    <script type="text/javascript" src="src/layui.all.js"></script>
    <script type="text/javascript">
        var permits;
        <%    Object obj=session.getAttribute("permits");
@@ -315,7 +313,7 @@
        var formjson;
        //查询历史告警记录
        function searchHistalm(){        
            loading.showLoading();
            var load = layer.load(1);
            var json = JSON.stringify(createSearchForm());
            //console.info(json);
            $.post("Battalarm_data_historyAction!serchByInfo","json="+json,function(data){
@@ -380,9 +378,9 @@
                }
                $('#tbHead').text('');
                createFullTbl($('.tbl-header'), $('.tbl-body'), ArrWarnTh, ArrWarnTb);                
                loading.hideLoading();
                layer.close(load);
            }).error(function(){
                loading.hideLoading();
                layer.close(load);
                noContent.showNoContent("查询失败,请检查网络连接!");
            });
        }
@@ -393,7 +391,8 @@
                page:Page,
                binf:{
                    StationName1:$('#station_name1').val(),                                                    // 省
                    StationName2:$('#city').val(),                                                            // 市
                    StationName2:$('#city').val(),
                    StationName5:$('#county').val(),                                                            // 市
                    StationName:$('#station_name').val(),                                                    //机房名称
                    BattGroupId:$('#battgroup_name').val(),                                                    //电池组名称
                },
@@ -426,7 +425,9 @@
        }
        
        // 省-市-机房-电池组
        var filterLoad;
        $(document).ready(function(){
            filterLoad = layer.load();
            //页面加载时查询维护区中的枢纽类型
            $.post("User_battgroup_baojigroup_battgroupAction!serchStationName1InGroup",null,function(data){
                data=data.result;
@@ -454,10 +455,14 @@
        });
        
        // 根据维护区的内容查询市
        function findCity() {
        function findCity(isLoad) {
            var data = {
                StationName1: $("#station_name1").val()
            };
            // 是否添加等待
            if(isLoad) {
                filterLoad = layer.load();
            }
            // 请求获取当前省下的市
            $.ajax({     
                type: "post",                 
@@ -482,26 +487,74 @@
                    }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(){
            var tmp = {
                StationName1:$("#station_name1").val(),
                StationName2:$("#city").val()
                StationName2:$("#city").val(),
                StationName5:$("#county").val()
            };
            //var selectvalue=$("#station_name1 option:selected").val();
            //alert(selectvalue);
@@ -532,20 +585,24 @@
        
        // 根据机房名称查询电池组
        $('#station_name').change(function(){
            findserchByBattGroupNamebystationname();
            findserchByBattGroupNamebystationname(true);
        });
        
        //根据省,市和机房查询蓄电池组
        function findserchByBattGroupNamebystationname(){
        function findserchByBattGroupNamebystationname(isLoad){
            var stationid = $("#station_name").find('option:selected').attr('stationid')?$("#station_name").find('option:selected').attr('stationid'):'';
            // 构造查询条件
            var tmp = {
                StationName1:$("#station_name1").val(),
                StationName2:$("#city").val(),
                StationName5:$("#county").val(),
                StationName: $("#station_name").val(),
                StationId: stationid
            };
            // 是否添加等待
            if(isLoad) {
                filterLoad = layer.load();
            }
            //var station_name1=$("#station_name1 option:selected").val();
            //var station_name=$("#station_name option:selected").val();
            
@@ -578,6 +635,8 @@
                }else{
                    $("#battgroup_name").text('').html('<option>暂无可测蓄电池组</option>');
                }
                layer.close(filterLoad);
            });
        }