| | |
| | | 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);
|
| | | });
|
| | | });
|
| | |
|
| | |
| | | val:_data.BattGroupId,
|
| | | province: _data.stationName1,
|
| | | city: _data.stationName2,
|
| | | county: _data.stationName5,
|
| | | home: _data.stationName,
|
| | | isCharge:0
|
| | | });
|
| | |
| | | val: _data.BattGroupId,
|
| | | province: _data.stationName1,
|
| | | city: _data.stationName2,
|
| | | county: _data.stationName5,
|
| | | home: _data.stationName,
|
| | | isCharge:1
|
| | | });
|
| | |
| | | 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());
|
| | |
| | | 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 = [];
|
| | | // 机房->电池组
|
| | |
| | | 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);
|
| | | });
|
| | |
|
| | | // 电池组
|
| | |
| | | province: battInfo.province,
|
| | | city: battInfo.city,
|
| | | home: battInfo.home,
|
| | | county: battInfo.county,
|
| | | homeid: battInfo.note,
|
| | | battid: battInfo.val
|
| | | };
|
| | |
| | | province: batt.StationName1,
|
| | | city: batt.StationName2,
|
| | | home: batt.StationName,
|
| | | county: batt.StationName5,
|
| | | homeid: batt.StationId,
|
| | | battid: batt.BattGroupId
|
| | | };
|
| | |
| | | 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);
|
| | | });
|
| | | });
|
| | |
|
| | |
| | | val:_data.BattGroupId,
|
| | | province: _data.stationName1,
|
| | | city: _data.stationName2,
|
| | | county: _data.stationName5,
|
| | | home: _data.stationName,
|
| | | isCharge:0
|
| | | });
|
| | |
| | | val: _data.BattGroupId,
|
| | | province: _data.stationName1,
|
| | | city: _data.stationName2,
|
| | | county: _data.stationName5,
|
| | | home: _data.stationName,
|
| | | isCharge:1
|
| | | });
|
| | |
| | | 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());
|
| | |
| | | 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 = [];
|
| | |
| | | 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);
|
| | | });
|
| | |
|
| | | // 电池组
|
| | |
| | | var tmp = {
|
| | | province: batt.StationName1,
|
| | | city: batt.StationName2,
|
| | | county: batt.StationName5,
|
| | | home: batt.StationName,
|
| | | homeid: batt.StationId,
|
| | | battid: batt.BattGroupId
|
| | |
| | | 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);
|
| | | });
|
| | |
|
| | |
| | | .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;
|
| | |
| | | <td>
|
| | | <select name="mapIconStyleSel" id="mapIconStyleSel">
|
| | | <option>全部</option>
|
| | | <option>已安装</option>
|
| | | <option>未安装</option>
|
| | | </select>
|
| | | </td>
|
| | | </tr>
|
| | |
| | | }
|
| | | });
|
| | |
|
| | | magImgStyles.push('');
|
| | | // 根据当前内容更新地图图标
|
| | | // map.clearOverlays();
|
| | | searchStation();
|
| | | }
|
| | |
|
| | |
| | | _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;
|
| | |
| | | // 获取当前选中内容(省-市-机房-电池组)
|
| | | var province = getQueryString('province'); // 省
|
| | | var city = getQueryString('city'); // 市
|
| | | var county = getQueryString('county'); // 区/县
|
| | | var home = getQueryString('home'); // 机房
|
| | |
|
| | | //console.log(province);
|
| | |
| | | }
|
| | |
|
| | |
|
| | | // 生成 三级导航-机房
|
| | | // 生成 三级导航-区/县
|
| | | 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;
|
| | |
| | | }
|
| | | treeView.treeView(container, formatData);
|
| | | if(spread) {
|
| | | treeView.spreadFolder('home', home, thirdSpread, true);
|
| | | treeView.spreadFolder('home', home, fourthSpread, true);
|
| | | }
|
| | | }else {
|
| | |
|
| | |
| | | }
|
| | |
|
| | | // 将函数绑定到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;
|
| | |
| | | }
|
| | | });
|
| | | }
|
| | | |
| | | // 将函数绑定到GLOBAL.pages.siderbar的命名空间下
|
| | | gl.pages.siderbar.fourth = fourth;
|
| | | |
| | | gl.pages.siderbar.fifth = fifth;
|
| | | })(jQuery, window, document, GLOBAL);
|
| | |
|
| | |
|
| | |
| | | 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;
|
| | |
| | | }
|
| | |
|
| | |
|
| | | // 生成 三级导航-机房
|
| | | // 生成 三级导航-区/县
|
| | | 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);
|
| | |
| | | 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');
|