From 59e496342e8352715ffd9e1ac954cfe8f43dee10 Mon Sep 17 00:00:00 2001
From: hdw <496960745@qq.com>
Date: 星期四, 01 十一月 2018 17:48:16 +0800
Subject: [PATCH] 添加停电和未安装图标
---
gx_tieta/WebRoot/index.jsp | 18 ++++++++
gx_tieta/WebRoot/js/groupmanage.js | 28 ++++++++++++++
gx_tieta/WebRoot/groupmanage.jsp | 47 +++++++++++++++++++----
gx_tieta/WebRoot/ele-match-group.jsp | 15 ++++---
4 files changed, 92 insertions(+), 16 deletions(-)
diff --git a/gx_tieta/WebRoot/ele-match-group.jsp b/gx_tieta/WebRoot/ele-match-group.jsp
index 2b7fd9a..c7cf372 100644
--- a/gx_tieta/WebRoot/ele-match-group.jsp
+++ b/gx_tieta/WebRoot/ele-match-group.jsp
@@ -111,12 +111,12 @@
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')) {
@@ -217,7 +217,7 @@
function searchData() {
var temp = getSearchParams(); // 鑾峰彇鏌ヨ鏉′欢
// 鏍规嵁鏌ヨ鏉′欢鏌ヨ鏈烘埧淇℃伅
- var loading = layer.load(0, {shade: [0.1,'#fff']}); //0浠h〃鍔犺浇鐨勯鏍硷紝鏀寔0-2
+ var loading = layer.load(1, {shade: [0.1,'#fff']}); //0浠h〃鍔犺浇鐨勯鏍硷紝鏀寔0-2
$.ajax({
type: 'post',
url: 'BattInfAction!serchMakeGroup',
@@ -297,6 +297,7 @@
// 绗﹀悎鏉′欢鍚敤鏋勯�犲璞�
var temp = {
StationName2: attr.StationName2,
+ StationName5: '',
BattProducer: 1
};
@@ -520,7 +521,7 @@
});
}
- // 鐢熸垚 涓夌骇瀵艰埅-鏈烘埧
+ // 鐢熸垚 涓夌骇瀵艰埅-鍖�/鍘�
function third(treeView, container, data) {
// 宸茬粡瀛樺湪
if(container.find('ul').length !=0) {
@@ -529,7 +530,7 @@
treeView.addProgress(container);
$.ajax({
type: "post",
- url: "BattInfAction!serchStationName3",
+ url: "BattInfAction!serchStationName5",
async:true,
dataType:'json',
data:"json = "+JSON.stringify(data),
@@ -541,8 +542,8 @@
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);
diff --git a/gx_tieta/WebRoot/groupmanage.jsp b/gx_tieta/WebRoot/groupmanage.jsp
index 5585093..c75e269 100644
--- a/gx_tieta/WebRoot/groupmanage.jsp
+++ b/gx_tieta/WebRoot/groupmanage.jsp
@@ -95,6 +95,14 @@
</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">
@@ -124,6 +132,8 @@
<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鍛婅娴嬭瘯 -->
@@ -137,6 +147,8 @@
<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鍛婅娴嬭瘯 -->
@@ -156,7 +168,7 @@
var arrTd = new Array(); // 琛ㄦ牸鍐呭
var groupInfo = new Array(); // 鐝粍淇℃伅
- arrTh = ['宸ヤ綔鐝粍', '鐝粍logo', '鍦板浘姝e父鍥炬爣', '鍦板浘钀藉悗鍥炬爣', '鍦板浘鍛婅鍥炬爣', '鍦板浘寤舵椂鍥炬爣','鏍稿娴嬭瘯鍥炬爣','61850鍛婅鍥炬爣','棰勫厖鐢靛浘鏍�','鍦ㄧ嚎娴厖鍥炬爣','', ''];
+ arrTh = ['宸ヤ綔鐝粍', '鐝粍logo', '鍦板浘姝e父鍥炬爣', '鍦板浘钀藉悗鍥炬爣', '鍦板浘鍛婅鍥炬爣', '鍦板浘寤舵椂鍥炬爣','鍦板浘鍋滅數鍥炬爣', '鍦板浘鏈畨瑁呭浘鏍�','鏍稿娴嬭瘯鍥炬爣','61850鍛婅鍥炬爣','棰勫厖鐢靛浘鏍�','鍦ㄧ嚎娴厖鍥炬爣','', ''];
arrTd = [
'姝︽眽婧愮晠',
'<img src="images/whyc/logo.png" class="logo">',
@@ -258,6 +270,24 @@
$('#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();
}
});
@@ -406,7 +436,7 @@
formData.append("file",$(this).get(0).files[0]);
formData.append("filetype",$(this).attr('kk'));
});
-
+ console.log(formData);
loading.showLoading(); // 鏄剧ず绛夊緟妗�
$.ajax({
type: "post",
@@ -510,12 +540,13 @@
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">');
diff --git a/gx_tieta/WebRoot/index.jsp b/gx_tieta/WebRoot/index.jsp
index 809ea01..0ec2bf7 100644
--- a/gx_tieta/WebRoot/index.jsp
+++ b/gx_tieta/WebRoot/index.jsp
@@ -1554,11 +1554,23 @@
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);
@@ -2979,7 +2991,8 @@
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(){
@@ -3270,6 +3283,9 @@
case 'item-timeout': // 寤舵椂
rs = imgs.timeout;
break;
+ case 'item-poff': // 鍋滅數
+ rs = imgs.powercut;
+ break;
case 'item-dev_alarm': // 61850鍛婅
rs = imgs.devalarm;
break;
diff --git a/gx_tieta/WebRoot/js/groupmanage.js b/gx_tieta/WebRoot/js/groupmanage.js
index 7132de4..e988ecd 100644
--- a/gx_tieta/WebRoot/js/groupmanage.js
+++ b/gx_tieta/WebRoot/js/groupmanage.js
@@ -15,6 +15,8 @@
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}";
@@ -39,6 +41,8 @@
$('.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);
@@ -65,6 +69,9 @@
$('.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');
@@ -137,6 +144,7 @@
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');
@@ -155,6 +163,8 @@
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');
@@ -188,6 +198,18 @@
// 鍦板浘寤舵椂鍥炬爣
if(pregImgSrc(timeout)) {
rs.timeout = timeout;
+ rs.count ++;
+ }
+
+ // 鍦板浘鍋滅數鍥炬爣
+ if(pregImgSrc(powercut)) {
+ rs.powercut = powercut;
+ rs.count ++;
+ }
+
+ // 鍦板浘鏈畨瑁呭浘鏍�
+ if(pregImgSrc(installed)) {
+ rs.installed = installed;
rs.count ++;
}
@@ -253,6 +275,12 @@
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}";
--
Gitblit v1.9.1