hdw
2018-10-30 702466cfeeb2553182df8d92996b64fe8e9693be
历史实时增加县筛选
5个文件已修改
254 ■■■■ 已修改文件
gx_tieta/WebRoot/charge-test.jsp 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/control.jsp 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/css/common.css 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/index.jsp 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/pages/js/pages/siderbar.js 205 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/charge-test.jsp
@@ -3245,8 +3245,9 @@
            var batt = getBattinfById();
            var province = batt.StationName1;
            var city = batt.StationName2;
            var county = batt.StationName5;
            var home = batt.StationName;
            $(this).attr('href', 'control.jsp?province='+province+'&city='+city+'&home='+home);
            $(this).attr('href', 'control.jsp?province='+province+'&city='+city+'&county='+county+'&home='+home);
        });
    }); 
    
@@ -3563,6 +3564,7 @@
                                val:_data.BattGroupId,
                                province: _data.stationName1,
                                city: _data.stationName2,
                                county: _data.stationName5,
                                home: _data.stationName,
                                isCharge:0
                            });
@@ -3572,6 +3574,7 @@
                                val: _data.BattGroupId,
                                province: _data.stationName1,
                                city: _data.stationName2,
                                county: _data.stationName5,
                                home: _data.stationName,
                                isCharge:1
                            });
@@ -4608,6 +4611,7 @@
        var second = GLOBAL.pages.siderbar.second;    // 二级导航
        var third = GLOBAL.pages.siderbar.third;    // 三级导航
        var fourth = GLOBAL.pages.siderbar.fourth;    // 四级导航
        var fifth = GLOBAL.pages.siderbar.fifth;    // 五级导航
        var localSideBar = GLOBAL.pages.siderbar.localSideBar;    // 定位机房
        var treeView = new TreeView($('#lside'));
        $('#lside').width($('#ele_content').width());
@@ -4632,11 +4636,18 @@
            second(treeView, $(this).parent(), province);
        });
        
        // 市->机房
        // 市->区
        treeView.ele.on('click', '.city', function() {
            var city = $(this).data('attr');
            third(treeView, $(this).parent(), city);
        });
        // 区->机房
        treeView.ele.on('click', '.county', function() {
            var county = $(this).data('attr');
            fourth(treeView, $(this).parent(), county);
        });
        
        battinlist = [];
        // 机房->电池组
@@ -4645,10 +4656,11 @@
            var tmp = {
                StationName1: home.StationName1,
                StationName2: home.StationName2,
                StationName5: home.StationName5,
                StationName: home.StationName,
                StationId: home.StationId
            };
            fourth(treeView, $(this).parent(), tmp);
            fifth(treeView, $(this).parent(), tmp);
        });
        
        // 电池组
@@ -4695,6 +4707,7 @@
                province: battInfo.province,
                city: battInfo.city,
                home: battInfo.home,
                county: battInfo.county,
                homeid: battInfo.note,
                battid: battInfo.val
            };
@@ -4711,6 +4724,7 @@
                province: batt.StationName1,
                city: batt.StationName2,
                home: batt.StationName,
                county: batt.StationName5,
                homeid: batt.StationId,
                battid: batt.BattGroupId
            };
gx_tieta/WebRoot/control.jsp
@@ -2896,8 +2896,9 @@
                var batt = getBatt();
                var province = batt.StationName1;
                var city = batt.StationName2;
                var county = batt.StationName5;
                var home = batt.StationName;
                $(this).attr('href', 'charge-test.jsp?province='+province+'&city='+city+'&home='+home);
                $(this).attr('href', 'charge-test.jsp?province='+province+'&city='+city+'&county='+county+'&home='+home);
            });
        });
    
@@ -2932,6 +2933,7 @@
                                val:_data.BattGroupId,
                                province: _data.stationName1,
                                city: _data.stationName2,
                                county: _data.stationName5,
                                home: _data.stationName,
                                isCharge:0
                            });
@@ -2941,6 +2943,7 @@
                                val: _data.BattGroupId,
                                province: _data.stationName1,
                                city: _data.stationName2,
                                county: _data.stationName5,
                                home: _data.stationName,
                                isCharge:1
                            });
@@ -4111,6 +4114,7 @@
            var second = GLOBAL.pages.siderbar.second;    // 二级导航
            var third = GLOBAL.pages.siderbar.third;    // 三级导航
            var fourth = GLOBAL.pages.siderbar.fourth;    // 四级导航
            var fifth = GLOBAL.pages.siderbar.fifth;    // 五级导航
            var localSideBar = GLOBAL.pages.siderbar.localSideBar;    // 定位机房
            var treeView = new TreeView($('#lside'));
            $('#lside').width($('#ele_content').width());
@@ -4135,10 +4139,16 @@
                second(treeView, $(this).parent(), province);
            });
            
            // 市->机房
            // 市->县
            treeView.ele.on('click', '.city', function() {
                var city = $(this).data('attr');
                third(treeView, $(this).parent(), city);
            });
            // 县->机房
            treeView.ele.on('click', '.county', function() {
                var county = $(this).data('attr');
                fourth(treeView, $(this).parent(), county);
            });
            
            battinlist = [];
@@ -4148,10 +4158,11 @@
                var tmp = {
                    StationName1: home.StationName1,
                    StationName2: home.StationName2,
                    StationName5: home.StationName5,
                    StationName: home.StationName,
                    StationId: home.StationId
                };
                fourth(treeView, $(this).parent(), tmp);
                fifth(treeView, $(this).parent(), tmp);
            });
            
            // 电池组
@@ -4238,6 +4249,7 @@
                var tmp = {
                    province: batt.StationName1,
                    city: batt.StationName2,
                    county: batt.StationName5,
                    home: batt.StationName,
                    homeid: batt.StationId,
                    battid: batt.BattGroupId
@@ -4281,11 +4293,12 @@
                var tmp = {
                    province: battInfo.province,
                    city: battInfo.city,
                    county: battInfo.county,
                    home: battInfo.home,
                    homeid: battInfo.note,
                    battid: battInfo.val
                };
                //console.log(tmp);
                localSideBar(treeView, treeView.container, tmp);
            });
            
gx_tieta/WebRoot/css/common.css
@@ -51,6 +51,10 @@
.whyc-sider-menu>ul>li>ul>li>ul>li>ul>li>a>i.fa {
    margin-left: 2em;
}
/* end */
.whyc-sider-menu>ul>li>ul>li>ul>li>ul>li>ul>li>a>i.fa {
    margin-left: 2.5em;
}
.whyc-sider-menu i.fa {
    color:  #676863;
    font-size:  22px;
gx_tieta/WebRoot/index.jsp
@@ -136,8 +136,6 @@
                                        <td>
                                            <select name="mapIconStyleSel" id="mapIconStyleSel">
                                                <option>全部</option>
                                                <option>已安装</option>
                                                <option>未安装</option>
                                            </select>
                                        </td>
                                    </tr>
@@ -1734,9 +1732,7 @@
            }
        });
        
        magImgStyles.push('');
        // 根据当前内容更新地图图标
        // map.clearOverlays();
        searchStation();
    }
    
gx_tieta/WebRoot/pages/js/pages/siderbar.js
@@ -188,7 +188,7 @@
    _prop.activeFile = function(container, cla, id, callback) {
        var rsCla = '.sider-menu-file'+'.'+cla;
        var aFiles = container.find(rsCla);
        console.log(aFiles.length);
        //console.log(aFiles.length);
        // 没有获取到内容就返回false
        if(aFiles.length == 0) {
            return false;
@@ -218,6 +218,7 @@
    // 获取当前选中内容(省-市-机房-电池组)
    var province = getQueryString('province');    // 省
    var city = getQueryString('city');             // 市
    var county = getQueryString('county');        // 区/县
    var home = getQueryString('home');            // 机房
    
    //console.log(province);
@@ -304,8 +305,92 @@
    }
    
    
    // 生成 三级导航-机房
    // 生成 三级导航-区/县
    function third(treeView, container, data, spread) {
        // 已经存在
        if(container.find('ul').length !=0) {
            return;
        }
        treeView.addProgress(container);
        $.ajax({
            type: "post",
            url: "BattInfAction!serchStationName5",
            async:true,
            dataType:'json',
            data:"json = "+JSON.stringify(data),
            success: function(data){
                var rs = JSON.parse(data.result);
                treeView.delProgress(container);
                if(rs.code == 1) {
                    var _data= rs.data;
                    var formatData = [];
                    for(var i=0; i<_data.length;i++) {
                        var __data = _data[i];
                        var tmp = treeView.getFolder(__data.StationName5, 'county', __data.StationName5,__data);
                        formatData.push(tmp);
                    }
                    treeView.treeView(container, formatData);
                    if(spread) {
                        treeView.spreadFolder('county', county, thirdSpread, true);
                    }
                }else {
                }
            }
        });
    }
    // 将函数绑定到GLOBAL.pages.siderbar的命名空间下
    gl.pages.siderbar.third = third;
    // 展开三级导航
    function thirdSpread(treeView, container, data) {
        var tmp = {
            StationName1: data.StationName1,
            StationName2: data.StationName2,
            StationName5: data.StationName5,
        };
        fourth(treeView, container, tmp, true);
    }
    // 生成 三级导航-区/县
    function thirdFile(treeView, container, data) {
        // 已经存在
        if(container.find('ul').length !=0) {
            return;
        }
        treeView.addProgress(container);
        $.ajax({
            type: "post",
            url: "BattInfAction!serchStationName5",
            async:true,
            dataType:'json',
            data:"json = "+JSON.stringify(data),
            success: function(data){
                var rs = JSON.parse(data.result);
                treeView.delProgress(container);
                if(rs.code == 1) {
                    var _data= rs.data;
                    var formatData = [];
                    for(var i=0; i<_data.length;i++) {
                        var __data = _data[i];
                        var tmp = treeView.getFile(__data.StationName5, 'county', '',__data);
                        formatData.push(tmp);
                    }
                    treeView.treeView(container, formatData);
                }else {
                }
            }
        });
    }
    // 将函数绑定到GLOBAL.pages.siderbar的命名空间下
    gl.pages.siderbar.thirdFile = thirdFile;
    //生成四级导航-机房
    function fourth(treeView, container, data, spread) {
        // 已经存在
        if(container.find('ul').length !=0) {
            return;
@@ -330,7 +415,7 @@
                    }
                    treeView.treeView(container, formatData);
                    if(spread) {
                        treeView.spreadFolder('home', home, thirdSpread, true);
                        treeView.spreadFolder('home', home, fourthSpread, true);
                    }
                }else {
                    
@@ -340,57 +425,22 @@
    }
    
    // 将函数绑定到GLOBAL.pages.siderbar的命名空间下
    gl.pages.siderbar.third = third;
    gl.pages.siderbar.fourth = fourth;
    
    // 展开三级导航
    function thirdSpread(treeView, container, data) {
    // 展开四级导航
    function fourthSpread(treeView, container, data) {
        var tmp = {
            StationName1: data.StationName1,
            StationName2: data.StationName2,
            StationName5: data.StationName5,
            StationName: data.StationName,
            StationId: data.StationId
        };
        fourth(treeView, container, tmp, true);
        fifth(treeView, container, tmp, true);
    }
    
    // 生成 三级导航-机房
    function thirdFile(treeView, container, data) {
        // 已经存在
        if(container.find('ul').length !=0) {
            return;
        }
        treeView.addProgress(container);
        $.ajax({
            type: "post",
            url: "BattInfAction!serchStationName3",
            async:true,
            dataType:'json',
            data:"json = "+JSON.stringify(data),
            success: function(data){
                var rs = JSON.parse(data.result);
                treeView.delProgress(container);
                if(rs.code == 1) {
                    var _data= rs.data;
                    var formatData = [];
                    for(var i=0; i<_data.length;i++) {
                        var __data = _data[i];
                        var tmp = treeView.getFile(__data.StationName, 'home', '',__data);
                        formatData.push(tmp);
                    }
                    treeView.treeView(container, formatData);
                }else {
                }
            }
        });
    }
    // 将函数绑定到GLOBAL.pages.siderbar的命名空间下
    gl.pages.siderbar.thirdFile = thirdFile;
    // 生成 三级导航-电池组
    function fourth(treeView, container, data, active) {
    // 生成五级导航-电池组
    function fifth(treeView, container, data, active) {
        // 已经存在
        if(container.find('ul').length !=0) {
            return;
@@ -428,10 +478,8 @@
            }
        });
    }
    // 将函数绑定到GLOBAL.pages.siderbar的命名空间下
    gl.pages.siderbar.fourth = fourth;
    gl.pages.siderbar.fifth = fifth;
})(jQuery, window, document, GLOBAL);
@@ -457,6 +505,7 @@
        first(treeView, container);
        homeInfo.StationName1 = data.province;
        homeInfo.StationName2 = data.city;
        homeInfo.StationName5 = data.county;
        homeInfo.StationName = data.home;
        homeInfo.StationId = data.homeid;
        battId = data.battid;
@@ -540,13 +589,56 @@
    }
    
    
    // 生成 三级导航-机房
    // 生成 三级导航-区/县
    function third(treeView, container, data, spread) {
        // 已经存在
        if(container.find('ul').length !=0) {
            location.hash="#"+homeInfo.StationName5;
            location.hash="";
            treeView.spreadFolder('county', homeInfo.StationName5, thirdSpread, true);
            return;
        }
        treeView.addProgress(container);
        $.ajax({
            type: "post",
            url: "BattInfAction!serchStationName5",
            async:true,
            dataType:'json',
            data:"json = "+JSON.stringify(data),
            success: function(data){
                var rs = JSON.parse(data.result);
                treeView.delProgress(container);
                if(rs.code == 1) {
                    var _data= rs.data;
                    var formatData = [];
                    for(var i=0; i<_data.length;i++) {
                        var __data = _data[i];
                        var tmp = treeView.getFolder(__data.StationName5, 'county', __data.StationName5, __data);
                        formatData.push(tmp);
                    }
                    treeView.treeView(container, formatData);
                    if(spread) {
                        location.hash="#"+homeInfo.StationName5;
                        location.hash="";
                        treeView.spreadFolder('county', homeInfo.StationName5, thirdSpread, true);
                    }
                }
            }
        });
    }
    // 展开三级导航
    function thirdSpread(treeView, container, data) {
        fourth(treeView, container, homeInfo, true);
    }
    // 生成 四级导航-机房
    function fourth(treeView, container, data, spread) {
        // 已经存在
        if(container.find('ul').length !=0) {
            location.hash="#"+homeInfo.StationName;
            location.hash="";
            treeView.spreadFolder('home', homeInfo.StationName, thirdSpread, true);
            treeView.spreadFolder('home', homeInfo.StationName, fourthSpread, true);
            return;
        }
        treeView.addProgress(container);
@@ -571,20 +663,23 @@
                    if(spread) {
                        location.hash="#"+homeInfo.StationName;
                        location.hash="";
                        treeView.spreadFolder('home', homeInfo.StationName, thirdSpread, true);
                        treeView.spreadFolder('home', homeInfo.StationName, fourthSpread, true);
                    }
                }
            }
        });
    }
    
    // 展开三级导航
    function thirdSpread(treeView, container, data) {
        fourth(treeView, container, homeInfo, true);
    function fourthSpread(treeView, container, data) {
        fifth(treeView, container, homeInfo, true);
    }
    
    // 生成 三级导航-电池组
    function fourth(treeView, container, data, active) {
    // 生成 五级导航-电池组
    function fifth(treeView, container, data, active) {
        // 已经存在
        if(container.find('ul').length !=0) {
            container.addClass('sider-menu-open');