From c2c9f6faf819d7e284227d61962ba623a22865ec Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Wed, 01 Feb 2023 10:18:51 +0800
Subject: [PATCH] 水文水环境分析-洪水淹没页面
---
themes/FoldableTheme/widgets/HeaderController/Widget.js | 69 ++++++++++++++++++++++++++++++++--
1 files changed, 64 insertions(+), 5 deletions(-)
diff --git a/themes/FoldableTheme/widgets/HeaderController/Widget.js b/themes/FoldableTheme/widgets/HeaderController/Widget.js
index 39fb3b7..cc798dd 100644
--- a/themes/FoldableTheme/widgets/HeaderController/Widget.js
+++ b/themes/FoldableTheme/widgets/HeaderController/Widget.js
@@ -47,6 +47,7 @@
flag: false,
flags: false,
megflag: false,
+ floodAnalysisFlag:false,
postCreate: function () {
this.inherited(arguments);
@@ -736,7 +737,7 @@
} else {
iconUrl = iconConfig.icon;
}
- if (iconConfig.name == "AnalysisOfBarrierLake" || iconConfig.name == 'ThematicDynamicRiver' || iconConfig.name == "MapSection") {
+ if (iconConfig.name == "AnalysisOfBarrierLake" || iconConfig.name == 'ThematicDynamicRiver' || iconConfig.name == "MapSection" || iconConfig.name == "FloodAnalysis") {
node = null;
return;
} else {
@@ -759,7 +760,7 @@
'position': "absolute",
'top': "45px",
'left': "0px",
- 'height': '135px',
+ 'height': '180px',
'width': '126px',
'background': 'rgb(0,23,54)',
'z-index': '50'
@@ -770,6 +771,7 @@
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 +791,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;
@@ -812,6 +815,7 @@
}
that.flag = true;
that.megflag = true;
+ that.floodAnalysisFlag = true;
}
})
firstNode.config = iconNode[i];
@@ -820,7 +824,7 @@
this._createDropTriangle(firstNode);
}
}
-
+
if (iconNode[i].name == 'ThematicDynamicRiver') {
middleNode = html.create('li', {
'class': 'icon-node jimu-float-trailing openli',
@@ -862,6 +866,7 @@
}
that.flags = true;
that.megflag = true;
+ that.floodAnalysisFlag = true
}
})
middleNode.config = iconNode[i];
@@ -912,6 +917,7 @@
}
that.flag = true;
that.flags = true;
+ that.floodAnalysisFlag = true;
}
})
lastNode.config = iconNode[i];
@@ -920,6 +926,58 @@
this._createDropTriangle(lastNode);
}
}
+
+ if (iconNode[i].name == 'FloodAnalysis'){
+ finalNode = html.create('li', {
+ 'class': 'icon-node jimu-float-trailing openli',
+ title: iconNode[i].label,
+ settingId: iconNode[i].id,
+ 'data-widget-name': iconNode[i].name,
+ innerHTML: iconNode[i].label
+ }, optionLi[0]);
+ var self = this;
+ $(node).on('click', finalNode, function (event) {
+ if (event.target.innerText == "洪水淹没分析") {
+ $(event.target).parent().parent().stop().hide();
+ if (!finalNode.config.widgets || finalNode.config.widgets.length === 1 ||
+ finalNode.config.openType === 'openAll') {
+ //widget or group with 'openAll' open type
+ if (!that.floodAnalysisFlag) {
+ $(event.target).parent().parent().siblings().toggleClass('click-icon-node');
+ }
+ if (self.openedId && self.openedId === finalNode.config.id) {
+ self._switchNodeToClose(self.openedId);
+ return;
+ } else {
+ if (self.openedId) {
+ self._switchNodeToClose(self.openedId).then(lang.hitch(self, function () {
+ self._closeDropMenu();
+ self._switchNodeToOpen(finalNode.config.id);
+ }));
+ } else {
+ self._switchNodeToOpen(finalNode.config.id);
+ }
+ }
+ } else {
+ if (self.dropMenuNode) {
+ self._closeDropMenu();
+
+ } else {
+ self._openDropMenu(finalNode);
+ }
+ }
+ that.flag = true;
+ that.flags = true;
+ that.megflag = true;
+ }
+ })
+ finalNode.config = iconNode[i];
+ if (finalNode.config.widgets && finalNode.config.widgets.length > 1 &&
+ finalNode.config.openType === 'dropDown') {
+ this._createDropTriangle(finalNode);
+ }
+ }
+
}
$(node).mouseover(function () {
$(dropDownDisplay).stop().show();
@@ -1070,6 +1128,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 +1340,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 +1391,4 @@
}
});
return clazz;
- });
\ No newline at end of file
+ });
--
Gitblit v1.9.3