| | |
| | | <div class="side-bar" id="sideBar"></div>
|
| | | </div>
|
| | | </div>
|
| | | <div class="abs abs-right left360" id="inforCont">
|
| | | <div class="abs abs-left360" id="inforCont">
|
| | | <div class="tbl-container">
|
| | | <table class="" id="groupTbl" lay-filter="groupTbl"></table>
|
| | | </div>
|
| | |
| | | var treeView = new TreeView($('#sideBar'));
|
| | |
|
| | | // 设置左右缩放
|
| | | $('#resizeCont .side-bar-container').resizable({
|
| | | /* $('#resizeCont .side-bar-container').resizable({
|
| | | handles: 'e',
|
| | | maxWidth: 520,
|
| | | minWidth: 240,
|
| | |
| | | treeView.setContainer();
|
| | | $('#inforCont').css('left', ui.size.width+'px');
|
| | | }
|
| | | });
|
| | | }); */
|
| | |
|
| | | // 生成一级导航-省
|
| | | first(treeView, treeView.container);
|
| | |
| | | second(treeView, $(this).parent(), province);
|
| | | });
|
| | |
|
| | | // 市->机房
|
| | | // 市->区/县
|
| | | treeView.ele.on('click', '.city', function() {
|
| | | var city = $(this).data('attr');
|
| | | third(treeView, $(this).parent(), city);
|
| | | var radio = $(this).children('.treeview-txt').find('input');
|
| | | radio.prop('checked', true);
|
| | | third(treeView, $(this).parent(), city);
|
| | |
|
| | | // 未被选中
|
| | | if(!$(this).hasClass('acCity')) {
|
| | |
| | | function searchData() {
|
| | | var temp = getSearchParams(); // 获取查询条件
|
| | | // 根据查询条件查询机房信息
|
| | | var loading = layer.load(0, {shade: [0.1,'#fff']}); //0代表加载的风格,支持0-2
|
| | | var loading = layer.load(1, {shade: [0.1,'#fff']}); //0代表加载的风格,支持0-2
|
| | | $.ajax({
|
| | | type: 'post',
|
| | | url: 'BattInfAction!serchMakeGroup',
|
| | |
| | | // 符合条件启用构造对象
|
| | | var temp = {
|
| | | StationName2: attr.StationName2,
|
| | | StationName5: '',
|
| | | BattProducer: 1
|
| | | };
|
| | |
|
| | |
| | | });
|
| | | }
|
| | |
|
| | | // 生成 三级导航-机房
|
| | | // 生成 三级导航-区/县
|
| | | function third(treeView, container, data) {
|
| | | // 已经存在
|
| | | if(container.find('ul').length !=0) {
|
| | |
| | | treeView.addProgress(container);
|
| | | $.ajax({
|
| | | type: "post",
|
| | | url: "BattInfAction!serchStationName3", |
| | | url: "BattInfAction!serchStationName5", |
| | | async:true,
|
| | | dataType:'json',
|
| | | data:"json = "+JSON.stringify(data),
|
| | |
| | | var formatData = [];
|
| | | for(var i=0; i<_data.length;i++) {
|
| | | var __data = _data[i];
|
| | | var txt = '<input type="checkbox" checked="checked" disabled name="home">'+ __data.StationName;
|
| | | var tmp = treeView.getFile(txt, 'home', __data.StationId,__data);
|
| | | var txt = '<input type="checkbox" checked="checked" disabled name="county">'+ __data.StationName5;
|
| | | var tmp = treeView.getFile(txt, 'county', __data.StationName5,__data);
|
| | | formatData.push(tmp);
|
| | | }
|
| | | treeView.treeView(container, formatData);
|