From 45db95a3b29c2f899703ac0ed033690cc184ba0b Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期三, 03 四月 2024 21:40:59 +0800
Subject: [PATCH] 1

---
 Terra.YaoGan.Web/Terra.YaoGan.Web/html/tooljs/menu.js |   39 +++++++++++++++++++++++++++++++++++----
 1 files changed, 35 insertions(+), 4 deletions(-)

diff --git a/Terra.YaoGan.Web/Terra.YaoGan.Web/html/tooljs/menu.js b/Terra.YaoGan.Web/Terra.YaoGan.Web/html/tooljs/menu.js
index 6e4824b..b9caf66 100644
--- a/Terra.YaoGan.Web/Terra.YaoGan.Web/html/tooljs/menu.js
+++ b/Terra.YaoGan.Web/Terra.YaoGan.Web/html/tooljs/menu.js
@@ -150,21 +150,52 @@
 }
 
 //鍙岀悆瀵规瘮
-var dd = true
+var dd = true, globe;
 
 function sqdb() {
-    globe = window.external.createMultScreen();
-    //globe.Open("http://118.213.95.34/SG/projects/init.434250");
-    globe.open(sqFly);
+    var title = "澶氭湡鏁版嵁";
+    if (!globe) {
+        globe = window.external.createMultScreen();
+        //globe.Open("http://118.213.95.34/SG/projects/init.434250");
+        globe.open(sqFly);
+    }
     var mode = window.external.setShowMode(7);
     if (mode) {
         sgworld.Application.Multiple3DWindows.SetAsLeader();
         sgworld.Application.Multiple3DWindows.LinkPosition(globe);
+
+        var width = 125, height = 25;
+        var left = 1920 / 2 - 20 - width - 20;
+
+        showHtmlBySG(sgworld, title, location.origin + "/checkbox.html", left, 200, width, height, false);
+        showHtmlBySG(globe, title, location.origin + "/checkbox.html", 20, 200, width, height, false);
     } else {
+        if (sgworld.Window.GetPopupByCaption(title) != null) {
+            sgworld.Window.RemovePopupByCaption(title);
+        }
+        if (globe.Window.GetPopupByCaption(title) != null) {
+            globe.Window.RemovePopupByCaption(title);
+        }
         sgworld.Application.Multiple3DWindows.UnlinkPosition();
     }
 }
 
+function showHtmlBySG(sg, title, url, left, top, width, height, showCaption) {
+    if (sg.Window.GetPopupByCaption(title) != null) {
+        sg.Window.RemovePopupByCaption(title);
+    }
+
+    var popup = sg.Creator.CreatePopupMessage(title, url, left, top, width, height);
+    popup.AllowResize = true;
+    popup.ShowCaption = true;
+    popup.AllowDrag = true;
+    popup.Width = width;
+    popup.Height = height;
+    popup.ShowCaption = showCaption;
+
+    sg.Window.ShowPopup(popup);
+}
+
 //涓夌淮鎴潰鍒嗘瀽
 var swjmfxStatus = true;
 

--
Gitblit v1.9.3