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/mp4.html | 1 + Terra.YaoGan.Web/Terra.YaoGan.Web/html/tooljs/menu.js | 39 +++++++++++++++++++++++++++++++++++---- Terra.YaoGan.Web/Terra.YaoGan.Web/checkbox.html | 4 ++-- Terra.YaoGan.Web/Terra.YaoGan.Web/img.html | 1 + 4 files changed, 39 insertions(+), 6 deletions(-) diff --git a/Terra.YaoGan.Web/Terra.YaoGan.Web/checkbox.html b/Terra.YaoGan.Web/Terra.YaoGan.Web/checkbox.html index d26cd5d..4d8235a 100644 --- a/Terra.YaoGan.Web/Terra.YaoGan.Web/checkbox.html +++ b/Terra.YaoGan.Web/Terra.YaoGan.Web/checkbox.html @@ -17,6 +17,7 @@ padding: 0; width: 100%; height: 100%; + overflow: hidden; } </style> <script> @@ -60,7 +61,6 @@ <option>2019骞�</option> <option>2015骞�</option> <option>2010骞�</option> - </select> - <object id="SGWorld" classid="CLSID:3a4f9199-65a8-11d5-85c1-0001023952c1"></object> + </select><object id="SGWorld" classid="CLSID:3a4f9199-65a8-11d5-85c1-0001023952c1"></object> </body> </html> \ No newline at end of file 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; diff --git a/Terra.YaoGan.Web/Terra.YaoGan.Web/img.html b/Terra.YaoGan.Web/Terra.YaoGan.Web/img.html index d2c3e55..36a3add 100644 --- a/Terra.YaoGan.Web/Terra.YaoGan.Web/img.html +++ b/Terra.YaoGan.Web/Terra.YaoGan.Web/img.html @@ -16,6 +16,7 @@ padding: 0; width: 100%; height: 100%; + overflow: hidden; } </style> <script> diff --git a/Terra.YaoGan.Web/Terra.YaoGan.Web/mp4.html b/Terra.YaoGan.Web/Terra.YaoGan.Web/mp4.html index d846a05..13b11b8 100644 --- a/Terra.YaoGan.Web/Terra.YaoGan.Web/mp4.html +++ b/Terra.YaoGan.Web/Terra.YaoGan.Web/mp4.html @@ -16,6 +16,7 @@ padding: 0; width: 100%; height: 100%; + overflow: hidden; } </style> <script> -- Gitblit v1.9.3