| | |
| | | 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);
|
| | |
| | | </div>
|
| | | <div class="popup-list clearfix">
|
| | | <div class="fl w50precent">
|
| | | <span>地图停电图标:</span><img src="images/whyc/home_powercut.gif" class="img-powercut"><span>(建议30*30)</span><span class="red">*</span>
|
| | | </div>
|
| | | <div class="fl w50precent">
|
| | | <span>地图未安装图标:</span><img src="images/whyc/home_installed.gif" class="img-installed"><span>(建议30*30)</span><span class="red">*</span>
|
| | | </div>
|
| | | </div>
|
| | | <div class="popup-list clearfix">
|
| | | <div class="fl w50precent">
|
| | | <span>核容/停电/放电图标:</span><img src="images/none.jpg" class="img-nuclear"><span>(建议30*30)</span><span class="red">*</span>
|
| | | </div>
|
| | | <div class="fl w50precent">
|
| | |
| | | <input type="file" kk="behind" name="up_file" id="file_behind" accept="image/gif" onchange="xmTanUploadImg(this, $('.popup .img-behind'), 'behind')"/> <!-- 地图落后图标 -->
|
| | | <input type="file" kk="warn" name="up_file" id="file_warn" accept="image/gif" onchange="xmTanUploadImg(this, $('.popup .img-warn'), 'warn')"/> <!-- 地图告警图标 -->
|
| | | <input type="file" kk="timeout" name="up_file" id="file_timeout" accept="image/gif" onchange="xmTanUploadImg(this, $('.popup .img-timeout'), 'timeout')"/> <!-- 地图延时图标 -->
|
| | | <input type="file" kk="poff" name="up_file" id="file_powercut" accept="image/gif" onchange="xmTanUploadImg(this, $('.popup .img-powercut'), 'powercut')"/> <!-- 地图停电图标 -->
|
| | | <input type="file" kk="install" name="up_file" id="file_installed" accept="image/gif" onchange="xmTanUploadImg(this, $('.popup .img-installed'), 'installed')"/> <!-- 地图未安装图标 -->
|
| | | <!-- 61850设备 -->
|
| | | <input type="file" kk="nuclear" name="up_file" id="file_nuclear" accept="image/gif" onchange="xmTanUploadImg(this, $('.popup .img-nuclear'), 'nuclear')"/> <!-- 61850核容测试 -->
|
| | | <input type="file" kk="devalarm" name="up_file" id="file_devalarm" accept="image/gif" onchange="xmTanUploadImg(this, $('.popup .img-devalarm'), 'devalarm')"/> <!-- 61850告警测试 -->
|
| | |
| | | <input type="file" kk="behind" name="add_file" id="file_add_behind" accept="image/gif" onchange="addUploadImg(this, $('.popup .img-behind'))"/> <!-- 地图落后图标 -->
|
| | | <input type="file" kk="warn" name="add_file" id="file_add_warn" accept="image/gif" onchange="addUploadImg(this, $('.popup .img-warn'))"/> <!-- 地图告警图标 -->
|
| | | <input type="file" kk="timeout" name="add_file" id="file_add_timeout" accept="image/gif" onchange="addUploadImg(this, $('.popup .img-timeout'))"/> <!-- 地图延时图标 -->
|
| | | <input type="file" kk="poff" name="add_file" id="file_add_powercut" accept="image/gif" onchange="addUploadImg(this, $('.popup .img-powercut'))"/> <!-- 地图停电图标 -->
|
| | | <input type="file" kk="install" name="add_file" id="file_add_installed" accept="image/gif" onchange="addUploadImg(this, $('.popup .img-installed'))"/> <!-- 地图未安装图标 -->
|
| | | <!-- 61850设备 -->
|
| | | <input type="file" kk="nuclear" name="add_file" id="file_add_nuclear" accept="image/gif" onchange="addUploadImg(this, $('.popup .img-nuclear'))"/> <!-- 61850核容测试 -->
|
| | | <input type="file" kk="devalarm" name="add_file" id="file_add_devalarm" accept="image/gif" onchange="addUploadImg(this, $('.popup .img-devalarm'))"/> <!-- 61850告警测试 -->
|
| | |
| | | var arrTd = new Array(); // 表格内容
|
| | | var groupInfo = new Array(); // 班组信息
|
| | |
|
| | | arrTh = ['工作班组', '班组logo', '地图正常图标', '地图落后图标', '地图告警图标', '地图延时图标','核容测试图标','61850告警图标','预充电图标','在线浮充图标','', ''];
|
| | | arrTh = ['工作班组', '班组logo', '地图正常图标', '地图落后图标', '地图告警图标', '地图延时图标','地图停电图标', '地图未安装图标','核容测试图标','61850告警图标','预充电图标','在线浮充图标','', ''];
|
| | | arrTd = [
|
| | | '武汉源畅',
|
| | | '<img src="images/whyc/logo.png" class="logo">',
|
| | |
| | | $('#file_timeout').click();
|
| | | }else {
|
| | | $('#file_add_timeout').click();
|
| | | }
|
| | | });
|
| | | |
| | | // 点击弹出框停电
|
| | | $('.popup .img-powercut').click(function() {
|
| | | if(checkEnsureBtn()) {
|
| | | $('#file_powercut').click();
|
| | | }else {
|
| | | $('#file_add_powercut').click();
|
| | | }
|
| | | });
|
| | | |
| | | // 点击弹出框未安装
|
| | | $('.popup .img-installed').click(function() {
|
| | | if(checkEnsureBtn()) {
|
| | | $('#file_installed').click();
|
| | | }else {
|
| | | $('#file_add_installed').click();
|
| | | }
|
| | | });
|
| | |
|
| | |
| | | formData.append("file",$(this).get(0).files[0]);
|
| | | formData.append("filetype",$(this).attr('kk'));
|
| | | });
|
| | | |
| | | console.log(formData);
|
| | | loading.showLoading(); // 显示等待框
|
| | | $.ajax({
|
| | | type: "post",
|
| | |
| | | for(var i=0;i<model.data.length;i++){
|
| | | var root = model.data[i].Chart_file;
|
| | | arrTd.push(model.data[i].Chart_name); //工作班组
|
| | | arrTd.push('<img src="User_ChartAction!serchByInfo?json={Chart_file:'+root+',Chart_name:chart_logo}" class="logo">'); //机房名称
|
| | | arrTd.push('<img src="User_ChartAction!serchByInfo?json={Chart_file:'+root+',Chart_name:chart_normal}" class="map-img normal">'); //电池组名称
|
| | | arrTd.push('<img src="User_ChartAction!serchByInfo?json={Chart_file:'+root+',Chart_name:chart_behind}" class="map-img behind">'); //单体编号
|
| | | arrTd.push('<img src="User_ChartAction!serchByInfo?json={Chart_file:'+root+',Chart_name:chart_warn}" class="map-img warn">'); //单体实时电压
|
| | | arrTd.push('<img src="User_ChartAction!serchByInfo?json={Chart_file:'+root+',Chart_name:chart_timeout}" class="map-img timeout">'); //单体实际容量
|
| | | |
| | | arrTd.push('<img src="User_ChartAction!serchByInfo?json={Chart_file:'+root+',Chart_name:chart_logo}" class="logo">'); //
|
| | | arrTd.push('<img src="User_ChartAction!serchByInfo?json={Chart_file:'+root+',Chart_name:chart_normal}" class="map-img normal">'); //
|
| | | arrTd.push('<img src="User_ChartAction!serchByInfo?json={Chart_file:'+root+',Chart_name:chart_behind}" class="map-img behind">'); //
|
| | | arrTd.push('<img src="User_ChartAction!serchByInfo?json={Chart_file:'+root+',Chart_name:chart_warn}" class="map-img warn">'); //
|
| | | arrTd.push('<img src="User_ChartAction!serchByInfo?json={Chart_file:'+root+',Chart_name:chart_timeout}" class="map-img timeout">'); //
|
| | | arrTd.push('<img src="User_ChartAction!serchByInfo?json={Chart_file:'+root+',Chart_name:chart_poff}" class="map-img powercut">');
|
| | | arrTd.push('<img src="User_ChartAction!serchByInfo?json={Chart_file:'+root+',Chart_name:chart_install}" class="map-img installed">');
|
| | | // 61850设备状态
|
| | | arrTd.push('<img src="User_ChartAction!serchByInfo?json={Chart_file:'+root+',Chart_name:chart_nuclear_cap}" class="map-img nuclear">');
|
| | | arrTd.push('<img src="User_ChartAction!serchByInfo?json={Chart_file:'+root+',Chart_name:chart_dev_alarm}" class="map-img devalarm">');
|
| | |
| | | iconList.append('<div class="clear"></div>');
|
| | | iconExplain.append(iconList);
|
| | |
|
| | | |
| | | |
| | | // 机房延时
|
| | | var iconList = $('<div class="explain-list" style="padding: 4px 6px; border-bottom: 1px slid #ccc; display:block"></div>');
|
| | | var input = $('<input type="checkbox" data-img="item-timeout" checked="checked">');
|
| | | var icon = $('<img src="'+mapImages.timeout+'">');
|
| | | var span = $('<span>电池组放电延时机房</span>');
|
| | | iconList.append(input);
|
| | | iconList.append(span);
|
| | | iconList.append(icon);
|
| | | iconExplain.append(iconList);
|
| | | |
| | | // 停电机房
|
| | | var iconList = $('<div class="explain-list" style="padding: 4px 6px; border-bottom: 1px slid #ccc; display:block"></div>');
|
| | | var input = $('<input type="checkbox" data-img="item-poff" checked="checked">');
|
| | | var icon = $('<img src="'+mapImages.powercut+'">');
|
| | | var span = $('<span>机房停电</span>');
|
| | | iconList.append(input);
|
| | | iconList.append(span);
|
| | | iconList.append(icon);
|
| | |
| | | rs.devalarm = "User_ChartAction!serchByInfo?json={Chart_file:'"+user_logo+"',Chart_name:chart_dev_alarm}"; // 设备告警
|
| | | rs.precharge = "User_ChartAction!serchByInfo?json={Chart_file:'"+user_logo+"',Chart_name:chart_pre_charge}"; // 预充电
|
| | | rs.float = "User_ChartAction!serchByInfo?json={Chart_file:'"+user_logo+"',Chart_name:chart_online_charge}"; // 浮充
|
| | | rs.defaults = mapDefults;
|
| | | rs.powercut = "User_ChartAction!serchByInfo?json={Chart_file:'"+user_logo+"',Chart_name:chart_poff}";
|
| | | rs.defaults = "User_ChartAction!serchByInfo?json={Chart_file:'"+user_logo+"',Chart_name:chart_install}";
|
| | | return rs;
|
| | | }
|
| | | /* $(function(){
|
| | |
| | | case 'item-timeout': // 延时
|
| | | rs = imgs.timeout;
|
| | | break;
|
| | | case 'item-poff': // 停电
|
| | | rs = imgs.powercut;
|
| | | break;
|
| | | case 'item-dev_alarm': // 61850告警
|
| | | rs = imgs.devalarm;
|
| | | break;
|
| | |
| | | rs.behind = "User_ChartAction!serchByInfo?json={Chart_file:'"+cfile+"',Chart_name:chart_behind}"; // 落后图标
|
| | | rs.timeout = "User_ChartAction!serchByInfo?json={Chart_file:'"+cfile+"',Chart_name:chart_timeout}"; // 延时机房图标
|
| | | rs.warn = "User_ChartAction!serchByInfo?json={Chart_file:'"+cfile+"',Chart_name:chart_warn}"; // 告警机房图标
|
| | | rs.powercut = "User_ChartAction!serchByInfo?json={Chart_file:'"+cfile+"',Chart_name:chart_poff}"; // 停电机房图标
|
| | | rs.installed = "User_ChartAction!serchByInfo?json={Chart_file:'"+cfile+"',Chart_name:chart_install}"; // 未安装图标
|
| | | // 61850设备状态
|
| | | rs.nuclear = "User_ChartAction!serchByInfo?json={Chart_file:'"+cfile+"',Chart_name:chart_nuclear_cap}";
|
| | | rs.devalarm = "User_ChartAction!serchByInfo?json={Chart_file:'"+cfile+"',Chart_name:chart_dev_alarm}";
|
| | |
| | | $('.popup .img-behind').attr('src', imgList.behind);
|
| | | $('.popup .img-warn').attr('src', imgList.warn);
|
| | | $('.popup .img-timeout').attr('src', imgList.timeout);
|
| | | $('.popup .img-powercut').attr('src', imgList.powercut);
|
| | | $('.popup .img-installed').attr('src', imgList.installed);
|
| | |
|
| | | // 61850设备状态
|
| | | $('.popup .img-nuclear').attr('src', imgList.nuclear);
|
| | |
| | | $('.popup .img-behind').attr('src', 'images/none.jpg');
|
| | | $('.popup .img-warn').attr('src', 'images/none.jpg');
|
| | | $('.popup .img-timeout').attr('src', 'images/none.jpg');
|
| | | $('.popup .img-powercut').attr('src', 'images/none.jpg');
|
| | | $('.popup .img-installed').attr('src', 'images/none.jpg');
|
| | | |
| | | // 61850设备状态图标
|
| | | $('.popup .img-nuclear').attr('src', 'images/none.jpg');
|
| | | $('.popup .img-devalarm').attr('src', 'images/none.jpg');
|
| | |
| | | var _behind = $('#file_add_behind').val().length;
|
| | | var _warn = $('#file_add_warn').val().length;
|
| | | var _timeout = $('#file_add_timeout').val().length;
|
| | | |
| | | // 61850设备
|
| | | if(_chart_file&&_chart_name&&_logo&&_normal&&_behind&&_warn&&_timeout) {
|
| | | $('.popup .ensure-btn').addClass('add-btn').removeClass('disabled');
|
| | |
| | | var behind = $('.popup .img-behind').attr('src');
|
| | | var warn = $('.popup .img-warn').attr('src');
|
| | | var timeout = $('.popup .img-timeout').attr('src');
|
| | | var powercut = $('.popup .img-powercut').attr('src');
|
| | | var installed = $('.popup .img-installed').attr('src');
|
| | |
|
| | | // 61850设备
|
| | | var nuclear = $('.popup .img-nuclear').attr('src');
|
| | |
| | | // 地图延时图标
|
| | | if(pregImgSrc(timeout)) {
|
| | | rs.timeout = timeout;
|
| | | rs.count ++;
|
| | | }
|
| | | |
| | | // 地图停电图标
|
| | | if(pregImgSrc(powercut)) { |
| | | rs.powercut = powercut;
|
| | | rs.count ++;
|
| | | }
|
| | | |
| | | // 地图未安装图标
|
| | | if(pregImgSrc(installed)) { |
| | | rs.installed = installed;
|
| | | rs.count ++;
|
| | | }
|
| | |
|
| | |
| | | case 'warn':
|
| | | rs = "User_ChartAction!serchByInfo?json={Chart_file:'"+cfile+"',Chart_name:chart_warn}";
|
| | | break;
|
| | | case 'powercut':
|
| | | rs = "User_ChartAction!serchByInfo?json={Chart_file:'"+cfile+"',Chart_name:chart_poff}";
|
| | | break;
|
| | | case 'installed':
|
| | | rs = "User_ChartAction!serchByInfo?json={Chart_file:'"+cfile+"',Chart_name:chart_install}";
|
| | | break;
|
| | | // 61850设备状态
|
| | | case 'nuclear':
|
| | | rs = "User_ChartAction!serchByInfo?json={Chart_file:'"+cfile+"',Chart_name:chart_nuclear_cap}";
|