From 5185279bbb5de67e2c67d04623e73955d6fe366e Mon Sep 17 00:00:00 2001
From: hdw <496960745@qq.com>
Date: 星期五, 26 十月 2018 13:16:38 +0800
Subject: [PATCH] 修改内容
---
gx_tieta/WebRoot/js/base.js | 4
gx_tieta/WebRoot/control.jsp | 148 ++++++++++++++++++++++++++++++++++++-
gx_tieta/WebRoot/image/mapDefault.gif | 0
gx_tieta/WebRoot/index.jsp | 11 ++
gx_tieta/WebRoot/pages/js/pages/siderbar.js | 2
gx_tieta/WebRoot/css/common.css | 36 +++++++++
gx_tieta/WebRoot/js/popup.js | 3
7 files changed, 197 insertions(+), 7 deletions(-)
diff --git a/gx_tieta/WebRoot/control.jsp b/gx_tieta/WebRoot/control.jsp
index 9099361..4875211 100644
--- a/gx_tieta/WebRoot/control.jsp
+++ b/gx_tieta/WebRoot/control.jsp
@@ -113,6 +113,12 @@
.w400 {
width: 400px;
}
+ .w500 {
+ width: 500px;
+ }
+ .mr250 {
+ margin-left: -250px;
+ }
</style>
</head>
@@ -127,6 +133,13 @@
<table>
<tr>
<td id="ele_content">
+ <div class="siderbar-tools">
+ <div class="siderbar-tools-right">
+ <i class="fa fa-file-text-o" title="鏈哄巻鍗�" id="siderbarToolsCard"></i>
+ <i class="fa fa-search" title="鏌ヨ鏈烘埧" id="siderbarToolsSearch"></i>
+ <i class="fa fa-outdent" title="鍏ㄩ儴鏀剁缉" id="siderbarToolsHide"></i>
+ </div>
+ </div>
<!--鐢垫睜缁勮彍鍗曟爮-->
<div id="lside">
@@ -802,6 +815,32 @@
</div>
</div>
+ <!-- 瀵艰埅瀹氫綅 -->
+ <div class="popup w500 mr250" id="localNav">
+ <div class="popup-title"><span>鏈烘埧鏌ヨ</span><a href="javascript:;" class="close">X</a></div>
+ <div class="popup-content">
+ <div class="popup-tbl">
+ <table>
+ <tbody>
+ <tr>
+ <th>鏈烘埧鍚嶇О</th>
+ </tr>
+ <tr>
+ <td>
+ <input name="popupHomeName" id="popupHomeName" type="text">
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+
+ <div class="popup-footer">
+ <input type="button" name="" id="localNav_en" class="status-change-btn" value="纭畾" > <!-- 纭畾 -->
+ <input type="button" name="" class="close" value="鍙栨秷" > <!-- 鍙栨秷 -->
+ </div>
+ </div>
+
<!-- 鏈�澶у唴闃诲崟浣� -->
<div class="confirm">
<div class="confirm-header"><span>鏈�澶у唴闃诲崟浣擄紙鍓�10锛�</span><a href="javascript:closeConfirm();" class="close">X</a></div>
@@ -905,6 +944,7 @@
var equip61850_popup = new Popup($('#equip61850'));
var BTS_popup = new Popup($('#bts'));
var equip4016_popup = new Popup($('#equip4016'));
+ var localNav = new Popup($('#localNav'));
// 鍏呮斁鐢靛脊鍑烘璁剧疆
$(function() {
// 鍒濆鍖朙D9鍏呮斁鐢靛脊鍑烘
@@ -927,12 +967,18 @@
equip4016_popup.hidePopup(); // 闅愯棌61850寮瑰嚭妗嗗拰閬僵灞�
});
+ // 鍒濆鍖杔ocalNav寮瑰嚭妗�
+ $('#localNav').find('.close').bind('click', function() {
+ localNav.hidePopup(); // 闅愯棌localNav寮瑰嚭妗嗗拰閬僵灞�
+ });
+
// 绐楀彛澶у皬鏀瑰彉
$(window).resize(function() {
LD9_popup.hidePopup(); // 闅愯棌LD9寮瑰嚭妗嗗拰閬僵灞�
equip61850_popup.hidePopup(); // 闅愯棌61850寮瑰嚭妗嗗拰閬僵灞�
BTS_popup.hidePopup(); // 闅愯棌bts寮瑰嚭妗嗗拰閬僵灞�
equip4016_popup.hidePopup(); // 闅愯棌4016寮瑰嚭妗嗗拰閬僵灞�
+ localNav.hidePopup();
});
});
//鍒濆鍖栨煴鐘跺浘
@@ -1452,7 +1498,7 @@
_str = GLOBAL.circleStatus.BTSCircle(batt, model, mygraph, updateEleCircle);
}
//console.log(mygraph);
- debugger;
+ //debugger;
if(model.code == 1) {
var nowTime = new Date().getTime(); //褰撳墠鏃堕棿
var record = new Date(model.data[0].record_datetime).getTime();
@@ -3884,6 +3930,14 @@
$('.confirm-mask').hide();
}
+ // 鏈烘埧瀹氫綅闈㈡澘鏁版嵁鏌ヨ
+ $(function() {
+
+
+ });
+
+
+
// siderbar妯″潡
$(function() {
var TreeView = GLOBAL.pages.TreeView;
@@ -3985,7 +4039,7 @@
var disX=(e||event).clientX+10; //寰楀埌榧犳爣鐐瑰嚮X鐨勪綅缃�
var disY=(e||event).clientY+10; //寰楀埌榧犳爣鐐瑰嚮Y鐨勪綅缃�
var scrollY=$(window).scrollTop(); //鑾峰彇娴忚鍣ㄦ粴鍔ㄧ殑楂樺害
- console.log(scrollY);
+ //console.log(scrollY);
var oRightMenu=document.getElementById("right_menu");
$(this).click();
@@ -3994,7 +4048,7 @@
$("#right_menu").show();
$("#right_menu .more_menu").hide();
$("#right_menu .angle").hide();
- console.log(disX+"***"+disY);
+ //console.log(disX+"***"+disY);
//浣胯彍鍗曡窡闅忛紶鏍囦綅缃�
oRightMenu.style.left= disX+'px';
oRightMenu.style.top= disY+scrollY+'px';
@@ -4009,6 +4063,47 @@
treeView.ele.find('li').removeClass('sider-menu-open');
});
+ // 宸ュ叿鏉℃暣浣撴牱寮�
+ $('.siderbar-tools').tooltip();
+
+ // 宸ュ叿鏉�-鏈哄巻鍗�
+ $('#siderbarToolsCard').click(function(){
+ var batt = getBatt();
+ var tmp = {
+ province: batt.StationName1,
+ city: batt.StationName2,
+ home: batt.StationName,
+ homeid: batt.StationId,
+ battid: batt.BattGroupId
+ };
+ findBattinfByBattGroupId(batt.BattGroupId);
+ // 鏍规嵁鏁版嵁瀹氫綅
+ localSideBar(treeView, treeView.container, tmp);
+ });
+
+ // 宸ュ叿鏉�-鍏ㄩ儴鏀剁缉
+ $('#siderbarToolsHide').click(function(){
+ treeView.ele.find('li').removeClass('sider-menu-open');
+ });
+
+ // 宸ュ叿鏉�-鏌ヨ
+ $('#siderbarToolsSearch').click(function(){
+ localNav.homeInfo = undefined;
+ $('#popupHomeName').val('');
+ localNav.showPopup();
+ });
+
+ // 鐐瑰嚮闈㈡澘鐨勭‘瀹氭寜閽�
+ $('#localNav_en').click(function() {
+ // 瀹氫綅
+ if(localNav.homeInfo) {
+ localNav.hidePopup();
+ localSideBar(treeView, treeView.container, localNav.homeInfo);
+ }else {
+
+ }
+ });
+
// 鐢垫睜鍏呮斁鐢垫暟鎹洃鎺�
var batt_list = $('#ele_content .batt-listen .batt-list');
batt_list.on('click', 'a', function(){
@@ -4022,10 +4117,55 @@
home: battInfo.home,
homeid: battInfo.note,
battid: battInfo.val
- }
+ };
localSideBar(treeView, treeView.container, tmp);
});
+
+ // 鏌ヨ鏈烘埧骞舵洿鏂皊ource
+ var homeSource = [];
+ findHome();
+
+ // 瀹氫箟鏈烘埧鏌ヨ淇℃伅
+ $( "#popupHomeName" ).autocomplete({
+ source: homeSource,
+ select: function(event, ui) {
+ localNav.homeInfo = ui.item; // 璁剧疆鏈烘埧淇℃伅鍐呭
+ }
+ });
+
+ // 鏌ヨ鏈烘埧
+ function findHome() {
+ var tmp = {
+ StationName1:'',
+ StationName2: ''
+ };
+
+ // 鏌ヨ灏嗕俊鎭�
+ $.post("BattInfAction!serchStationName3","json="+JSON.stringify(tmp),function(result){
+ var rs = JSON.parse(result.result);
+ if(rs.code==1){
+ homeSource = [];
+ var data = rs.data;
+ for(var i=0; i<data.length; i++) {
+ var _data = data[i];
+ var tmp = {
+ label: _data.StationName+'('+_data.StationId+')',
+ province: _data.StationName1,
+ city: _data.StationName2,
+ home: _data.StationName,
+ homeid: _data.StationId,
+ battid: undefined
+ };
+
+ // 娣诲姞鍒拌祫婧�
+ homeSource.push(tmp);
+ }
+ $( "#popupHomeName" ).autocomplete('option', 'source', homeSource);
+ }
+ });
+ }
+
});
</script>
<script type="text/javascript" src="js/Title.js"></script>
diff --git a/gx_tieta/WebRoot/css/common.css b/gx_tieta/WebRoot/css/common.css
index ca62ed6..545695c 100644
--- a/gx_tieta/WebRoot/css/common.css
+++ b/gx_tieta/WebRoot/css/common.css
@@ -73,6 +73,30 @@
display: none;
}
+/* siderbar tools */
+.siderbar-tools {
+ position: relative;
+ height: 30px;
+ background-color: #3c3f4a;
+}
+.siderbar-tools-right {
+ position: absolute;
+ top: 5px;
+ right: 8px;
+ font-size: 16px;
+}
+.siderbar-tools-right i {
+ margin-left: 8px;
+ color: #C5C6C9;
+}
+.siderbar-tools-right i:hover {
+ color: #FFFFFF;
+}
+.siderbar-tools-right i:active {
+ color: #FF0000;
+}
+
+
.tpl-tbl-opts-tbl {
margin-top: -20px;
margin-left: -15px;
@@ -96,4 +120,16 @@
.tpl-tbl-opts-header table td {
text-align: center;
border: 1px solid #ccc;
+}
+
+/* jquery ui style */
+body .ui-front {
+ z-index: 999999;
+}
+
+body .ui-autocomplete {
+ max-height: 300px;
+ overflow-y: auto;
+ /* 闃叉姘村钩婊氬姩鏉� */
+ overflow-x: hidden;
}
\ No newline at end of file
diff --git a/gx_tieta/WebRoot/image/mapDefault.gif b/gx_tieta/WebRoot/image/mapDefault.gif
new file mode 100644
index 0000000..cf782e5
--- /dev/null
+++ b/gx_tieta/WebRoot/image/mapDefault.gif
Binary files differ
diff --git a/gx_tieta/WebRoot/index.jsp b/gx_tieta/WebRoot/index.jsp
index 67e0988..02a2a44 100644
--- a/gx_tieta/WebRoot/index.jsp
+++ b/gx_tieta/WebRoot/index.jsp
@@ -370,6 +370,7 @@
var search;
var warnOpts;
//console.info(BMap);
+ var mapDefults = new Image().src = 'image/mapDefault.gif';
var mapImages = getMapImageUrl();
// 瀹氫箟鐪�-甯傝祫婧愬唴瀹�
var area = [
@@ -2203,7 +2204,7 @@
data: "json="+JSON.stringify(mapPages),
success: function(result) {
var data = JSON.parse(result.result);
- //console.log(data);
+ console.log(data);
for(var i=0; i<data.length; i++) {
var _data = data[i];
var _list = formatUpdateStation(_data);
@@ -2215,6 +2216,7 @@
}
}
+ console.log(updateStationData);
createMapDot(map, updateStationData);
// 鏇存柊鍒嗛〉淇℃伅
@@ -2865,6 +2867,7 @@
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;
return rs;
}
/* $(function(){
@@ -3143,6 +3146,9 @@
function getMapStateImg(imgs, cla) {
var rs = imgs.normal;
switch(cla) {
+ case 'item-normal':
+ rs = imgs.normal;
+ break
case 'item-warn': // 鍛婅
rs = imgs.warn;
break;
@@ -3164,6 +3170,9 @@
case 'item-pre_charge': // 61850棰勫厖鐢�
rs = imgs.precharge;
break;
+ default:
+ rs = imgs.defaults;
+ break;
}
return rs;
diff --git a/gx_tieta/WebRoot/js/base.js b/gx_tieta/WebRoot/js/base.js
index 8e63b62..1e6aa81 100644
--- a/gx_tieta/WebRoot/js/base.js
+++ b/gx_tieta/WebRoot/js/base.js
@@ -380,7 +380,7 @@
//data=eval("("+data+")");
data=data.result;
data=eval("("+data+")");
- console.info(data);
+ //console.info(data);
if(data.code==1){
if(data.data.length>0){
data=data.data[0];
@@ -390,7 +390,7 @@
document.getElementById("batt_group_id").innerHTML=data.BattGroupId; //鐢垫睜缁刬p
document.getElementById("BattGroupName").innerHTML=data.BattGroupName; //鐢垫睜缁勫悕绉�
- document.getElementById("BattGroupNum").innerHTML=data.BattGroupNum; //鐢垫睜缁勫簭鍙�
+ document.getElementById("BattGroupNum").innerHTML=data.GroupIndexInFBSDevice+1; //鐢垫睜缁勫簭鍙�
document.getElementById("BattProducer").innerHTML=data.BattProducer; //鐢垫睜鍝佺墝
document.getElementById("BattModel").innerHTML=data.BattModel; //鐢垫睜鍨嬪彿
document.getElementById("MonCapStd").innerHTML=data.MonCapStd; //鏍囩О瀹归噺
diff --git a/gx_tieta/WebRoot/js/popup.js b/gx_tieta/WebRoot/js/popup.js
index 05bc3c8..75df55c 100644
--- a/gx_tieta/WebRoot/js/popup.js
+++ b/gx_tieta/WebRoot/js/popup.js
@@ -12,6 +12,8 @@
$('.popup-mask').animate({height: winHt+"px"});
this.centerPopup();
this.popup.css('visibility', 'visible');
+
+ $('body').css('overflow-y', 'hidden');
//console.info('鏄剧ず鎵ц鎴愬姛锛侊紒锛�');
};
@@ -24,6 +26,7 @@
Popup.prototype.hidePopup = function() {
this.popup.css('top', -9999+'px');
+ $('body').css('overflow-y', 'auto');
$('.popup-mask').animate({height:0},function() {
$('.popup-mask').remove();
diff --git a/gx_tieta/WebRoot/pages/js/pages/siderbar.js b/gx_tieta/WebRoot/pages/js/pages/siderbar.js
index 6c6d979..9a2d311 100644
--- a/gx_tieta/WebRoot/pages/js/pages/siderbar.js
+++ b/gx_tieta/WebRoot/pages/js/pages/siderbar.js
@@ -568,6 +568,8 @@
}
treeView.treeView(container, formatData);
if(spread) {
+ location.hash="#"+homeInfo.StationName;
+ location.hash="";
treeView.spreadFolder('home', homeInfo.StationName, thirdSpread, true);
}
}
--
Gitblit v1.9.1