From 8b6c03b3f14f1e140c2ab694f1e2a3bbc123d7f4 Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期六, 13 八月 2022 16:32:32 +0800 Subject: [PATCH] # --- src/main/webapp/views/console.html | 12 +++++++++--- src/main/webapp/static/css/render.css | 26 +++++++++++--------------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/src/main/webapp/static/css/render.css b/src/main/webapp/static/css/render.css index b705410..c90fc30 100644 --- a/src/main/webapp/static/css/render.css +++ b/src/main/webapp/static/css/render.css @@ -459,11 +459,11 @@ width: 291px; height: 365px; background-image: url(../images/Popup-yellow.png); - position: fixed; + position: absolute; color:white; - left: 50%; - top: 50%; - transform: translate(-50%,-50%); + /*left: 50%;*/ + /*top: 50%;*/ + /*transform: translate(-50%,-50%);*/ z-index: 101; } /* 杈撻�佽澶囧脊绐� */ @@ -471,11 +471,11 @@ width: 291px; height: 336px; background-image: url(../images/Popup-green.png); - position: fixed; + position: absolute; color:white; - left: 50%; - top: 50%; - transform: translate(-50%,-50%); + /*left: 50%;*/ + /*top: 50%;*/ + /*transform: translate(-50%,-50%);*/ z-index: 101; } #siteWindow-head { @@ -530,15 +530,11 @@ /*搴撲綅寮圭獥*/ #locWindow { width: 292px; - height: 170px; - background-color: rgba(0,0,0,0.7); + height: 175px; + background-color: rgba(0,0,0,0.85); border-radius: 20px; - /*background-image: url(../images/Popup-yellow.png);*/ - position: fixed; + position: absolute; color:white; - left: 50%; - top: 50%; - transform: translate(-50%,-50%); z-index: 101; } #locWindow-head { diff --git a/src/main/webapp/views/console.html b/src/main/webapp/views/console.html index 9beeef1..5c0f0e0 100644 --- a/src/main/webapp/views/console.html +++ b/src/main/webapp/views/console.html @@ -599,9 +599,11 @@ </script> <script type="text/javascript"> // 寮圭獥绔欑偣淇℃伅 - $('.site').on('click', function () { + $('.site').on('click', function (e) { var id = this.id.split("-")[1]; $("#siteWindow").attr("style", "display:block;");//鏄剧ずdiv + $("#siteWindow").css('left', e.pageX); + $("#siteWindow").css('top', e.pageY); $("#crnWindow").attr("style", "display:none;"); $("#locWindow").attr("style", "display:none;"); $(".detailed").empty(); @@ -630,9 +632,11 @@ }); // 鍫嗗灈鏈轰俊鎭� - $('.machine').on('click', function () { + $('.machine').on('click', function (e) { var id = this.id.split("-")[1]; $("#crnWindow").attr('style', 'display:block;'); + $("#crnWindow").css('left', e.pageX); + $("#crnWindow").css('top', e.pageY); $("#siteWindow").attr("style", "display:none;"); $("#locWindow").attr("style", "display:none;"); $('.detailed').empty(); @@ -661,7 +665,7 @@ }) // 鍫嗗灈鏈轰俊鎭� - $('.loc').on('click', function () { + $('.loc').on('click', function (e) { var id = this.id.split("-")[1]; $.ajax({ url: baseUrl + "/console/loc/detail", @@ -675,6 +679,8 @@ success: function (res) { if (res.code === 200) { $("#locWindow").attr('style', 'display:block;'); + $("#locWindow").css('left', e.pageX); + $("#locWindow").css('top', e.pageY); $("#siteWindow").attr("style", "display:none;"); $("#crnWindow").attr("style", "display:none;"); $('.detailed').empty(); -- Gitblit v1.9.1