From ff872a7a3edf0b6f7b2c558d2175a8ac4dc6136b Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Tue, 07 Feb 2023 16:26:35 +0800
Subject: [PATCH] 修改导航栏结构

---
 config.json                                             |   15 +------
 themes/FoldableTheme/widgets/HeaderController/Widget.js |   58 +----------------------------
 widgets/FloodAnalysis/nls/zh-cn/strings.js              |    2 
 widgets/FloodAnalysis/Widget.js                         |    6 ++
 config_offline.json                                     |   15 +------
 5 files changed, 12 insertions(+), 84 deletions(-)

diff --git a/config.json b/config.json
index 37b7c7e..8fb0927 100644
--- a/config.json
+++ b/config.json
@@ -604,8 +604,8 @@
         "uri": "widgets/HydrologicalRiskArea/Widget"
       },
       {
-        "name": "水生态健康评估",
-        "uri": "widgets/WaterAssessment/Widget"
+        "name": "洪水淹没风险",
+        "uri": "widgets/FloodAnalysis/Widget"
       },
       {
         "name": "水文分析",
@@ -636,17 +636,6 @@
       {
         "name": "剖面分析",
         "uri": "widgets/MapSection/Widget",
-        "position": {
-          "left": 20,
-          "top": 90,
-          "width": "440px",
-          "height": "320px",
-          "relativeTo": "map"
-        }
-      },
-      {
-        "name": "洪水淹没分析",
-        "uri": "widgets/FloodAnalysis/Widget",
         "position": {
           "left": 20,
           "top": 90,
diff --git a/config_offline.json b/config_offline.json
index 07f43c4..7cb88e2 100644
--- a/config_offline.json
+++ b/config_offline.json
@@ -604,8 +604,8 @@
         "uri": "widgets/HydrologicalRiskArea/Widget"
       },
       {
-        "name": "水生态健康评估",
-        "uri": "widgets/WaterAssessment/Widget"
+        "name": "洪水淹没风险",
+        "uri": "widgets/FloodAnalysis/Widget"
       },
       {
         "name": "水文分析",
@@ -647,17 +647,6 @@
       {
         "name": "剖面分析",
         "uri": "widgets/MapSection/Widget",
-        "position": {
-          "left": 20,
-          "top": 90,
-          "width": "440px",
-          "height": "320px",
-          "relativeTo": "map"
-        }
-      },
-      {
-        "name": "洪水淹没分析",
-        "uri": "widgets/FloodAnalysis/Widget",
         "position": {
           "left": 20,
           "top": 90,
diff --git a/themes/FoldableTheme/widgets/HeaderController/Widget.js b/themes/FoldableTheme/widgets/HeaderController/Widget.js
index 8294a2c..4ec9819 100644
--- a/themes/FoldableTheme/widgets/HeaderController/Widget.js
+++ b/themes/FoldableTheme/widgets/HeaderController/Widget.js
@@ -47,7 +47,6 @@
 			flag: false,
 			flags: false,
 			megflag: false,
-			floodAnalysisFlag:false,
 
 			postCreate: function () {
 				this.inherited(arguments);
@@ -737,7 +736,7 @@
 				} else {
 					iconUrl = iconConfig.icon;
 				}
-				if (iconConfig.name == "AnalysisOfBarrierLake" || iconConfig.name == 'ThematicDynamicRiver' || iconConfig.name == "MapSection" || iconConfig.name == "FloodAnalysis") {
+				if (iconConfig.name == "AnalysisOfBarrierLake" || iconConfig.name == 'ThematicDynamicRiver' || iconConfig.name == "MapSection") {
 					node = null;
 					return;
 				} else {
@@ -760,7 +759,7 @@
 							'position': "absolute",
 							'top': "45px",
 							'left': "0px",
-							'height': '135px',
+							'height': '90px',
 							'width': '126px',
 							'background': 'rgb(0,23,54)',
 							'z-index': '50'
@@ -815,7 +814,6 @@
 										}
 										that.flag = true;
 										that.megflag = true;
-										that.floodAnalysisFlag = true;
 									}
 								})
 								firstNode.config = iconNode[i];
@@ -866,7 +864,6 @@
 										}
 										that.flags = true;
 										that.megflag = true;
-										that.floodAnalysisFlag = true
 									}
 								})
 								middleNode.config = iconNode[i];
@@ -917,7 +914,6 @@
 										}
 										that.flag = true;
 										that.flags = true;
-										that.floodAnalysisFlag = true;
 									}
 								})
 								lastNode.config = iconNode[i];
@@ -927,56 +923,6 @@
 								}
 							}
 
-							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 () {
diff --git a/widgets/FloodAnalysis/Widget.js b/widgets/FloodAnalysis/Widget.js
index 5d2634e..7b042a4 100644
--- a/widgets/FloodAnalysis/Widget.js
+++ b/widgets/FloodAnalysis/Widget.js
@@ -8,6 +8,7 @@
         name: 'FloodAnalysis',
         //人员数据点位
         peoplePositionArray: [],
+        peoplePositionEntity:[],
         //绘制多边形的顶点经纬度
         polygonPositionArray: [],
         startup: function startup() {
@@ -494,7 +495,9 @@
             $('#dong_start').css('visibility', 'hidden')
             //隐藏详情框
             this.showDetail(false)
-
+            this.peoplePositionEntity.forEach(e=>{
+                this.map.entities.remove(e)
+            })
             this.map.scene.globe.baseColor = Cesium.Color.WHITE;
         },
 
@@ -568,6 +571,7 @@
                                 heightReference: Cesium.HeightReference.CLAMP_TO_GROUND
                             },
                         });
+                        self.peoplePositionEntity.push(temp)
                     }
                 }
             });
diff --git a/widgets/FloodAnalysis/nls/zh-cn/strings.js b/widgets/FloodAnalysis/nls/zh-cn/strings.js
index d7a4967..06e0acc 100644
--- a/widgets/FloodAnalysis/nls/zh-cn/strings.js
+++ b/widgets/FloodAnalysis/nls/zh-cn/strings.js
@@ -1,5 +1,5 @@
 define(
    ({
-    _widgetLabel: "洪水淹没分析"
+    _widgetLabel: "洪水淹没风险"
   })
 );

--
Gitblit v1.9.3