From d1ed00750827aaa86e9e90bf8bbf8486bd547377 Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Mon, 20 Feb 2023 10:19:40 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
themes/FoldableTheme/widgets/HeaderController/Widget.js | 7 ++++++-
index.html | 2 +-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/index.html b/index.html
index a58dc03..5445b63 100644
--- a/index.html
+++ b/index.html
@@ -169,7 +169,7 @@
}
</style>
<div class="map3d-system ss" id="map3d" title="系统切换" onclick="map3dClick()"></div>
- <div class="map3d-2d ss" id="map2d" title="切换2D"></div>
+ <div class="map3d-2d ss" id="map2d" title="切换2D" onclick="javascript:window.location='http://localhost:63342/hsyj/index.html'"></div>
<div id="main-loading">
<div id="app-loading"></div>
diff --git a/themes/FoldableTheme/widgets/HeaderController/Widget.js b/themes/FoldableTheme/widgets/HeaderController/Widget.js
index 68840a8..23b8cf3 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('ComprehensiveSupervise')));
+ 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('FloodAnalysis')));
+ else
+ topic.subscribe('runWidgetByName', lang.hitch(this, this._runWidgetByName('ComprehensiveSupervise')));
},
_runWidgetByName: function (name) {
for (i = 0; i < this.appConfig.widgetPool.widgets.length; i++) {
--
Gitblit v1.9.3