From 4d8c6dd77427e8e581fda17b6b65ba86bfb7a815 Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Mon, 27 Feb 2023 14:30:01 +0800
Subject: [PATCH] 洪水淹没
---
themes/FoldableTheme/widgets/HeaderController/Widget.js | 47 +++++++++++++++++++++--------------------------
1 files changed, 21 insertions(+), 26 deletions(-)
diff --git a/themes/FoldableTheme/widgets/HeaderController/Widget.js b/themes/FoldableTheme/widgets/HeaderController/Widget.js
index 39fb3b7..102569e 100644
--- a/themes/FoldableTheme/widgets/HeaderController/Widget.js
+++ b/themes/FoldableTheme/widgets/HeaderController/Widget.js
@@ -97,7 +97,12 @@
this.resize();
setTimeout(lang.hitch(this, this.resize), 100);
//根据部件名称启动部件
- topic.subscribe('runWidgetByName', lang.hitch(this, this._runWidgetByName));
+ var reg = new RegExp("(^|&)"+ 'path' +"=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
+ var r = window.location.search.substr(1).match(reg); //匹配目标参数
+ if (r!=null) //如果有参数跳转洪水淹没分析部件
+ topic.subscribe('runWidgetByName', lang.hitch(this, this._runWidgetByName(unescape(r[2]))));
+ else
+ topic.subscribe('runWidgetByName', lang.hitch(this, this._runWidgetByName('FloodAnalysis')));
},
_runWidgetByName: function (name) {
for (i = 0; i < this.appConfig.widgetPool.widgets.length; i++) {
@@ -759,7 +764,7 @@
'position': "absolute",
'top': "45px",
'left': "0px",
- 'height': '135px',
+ 'height': '90px',
'width': '126px',
'background': 'rgb(0,23,54)',
'z-index': '50'
@@ -770,6 +775,8 @@
var firstNode = null;
var middleNode = null;
var lastNode = null;
+ var finalNode = null;
+
for (var i = 0; i < iconNode.length; i++) {
if (iconNode[i].name == 'AnalysisOfBarrierLake') {
firstNode = html.create('li', {
@@ -789,6 +796,7 @@
if (!that.flags) {
$(event.target).parent().parent().siblings().toggleClass('click-icon-node');
}
+ console.log(self.openedId,"8888")
if (self.openedId && self.openedId === firstNode.config.id) {
self._switchNodeToClose(self.openedId);
return;
@@ -820,7 +828,7 @@
this._createDropTriangle(firstNode);
}
}
-
+
if (iconNode[i].name == 'ThematicDynamicRiver') {
middleNode = html.create('li', {
'class': 'icon-node jimu-float-trailing openli',
@@ -920,6 +928,8 @@
this._createDropTriangle(lastNode);
}
}
+
+
}
$(node).mouseover(function () {
$(dropDownDisplay).stop().show();
@@ -970,28 +980,7 @@
}
-
-
-
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
// node = html.create('div', {
@@ -1063,6 +1052,11 @@
},
_onIconClick: function (node) {
+
+ if (node.innerHTML == '风险预警') {
+ window.open('http://192.168.0.207:8080/hsyj/index.html', '_self')
+ return
+ }
if (!node.config.widgets || node.config.widgets.length === 1 ||
node.config.openType === 'openAll') {
//widget or group with 'openAll' open type
@@ -1070,6 +1064,7 @@
this.flag = false;
this.flags = false;
this.megflag = false;
+ this.floodAnalysisFlag = false;
if (this.openedId && this.openedId === node.config.id) {
this._switchNodeToClose(this.openedId);
return;
@@ -1281,7 +1276,7 @@
for (i = this.headerIconCount; i < allIconConfigs.length; i++) {
// 做修改得地方
iconConfig = allIconConfigs[i];
- if (iconConfig.name == "AnalysisOfBarrierLake" || iconConfig.name == "ThematicDynamicRiver" || iconConfig.name == "MapSection") {
+ if (iconConfig.name == "AnalysisOfBarrierLake" || iconConfig.name == "ThematicDynamicRiver" || iconConfig.name == "MapSection" || iconConfig.name == "FloodAnalysis") {
continue;
} else {
moreItems.push(iconConfig);
@@ -1332,4 +1327,4 @@
}
});
return clazz;
- });
\ No newline at end of file
+ });
--
Gitblit v1.9.3