From 90963568d7f507417818f74d2131575f09eb1383 Mon Sep 17 00:00:00 2001
From: vincent <1341870251@qq.com>
Date: 星期三, 03 六月 2020 15:09:12 +0800
Subject: [PATCH] #

---
 src/main/webapp/views/crn.html      |   21 +++++++++++++++++++++
 src/main/webapp/views/console.html  |   11 +++++------
 src/main/webapp/static/css/crn.css  |   19 ++++++++++++++++++-
 src/main/webapp/static/js/common.js |    3 +++
 4 files changed, 47 insertions(+), 7 deletions(-)

diff --git a/src/main/webapp/static/css/crn.css b/src/main/webapp/static/css/crn.css
index c8fea39..76bfc20 100644
--- a/src/main/webapp/static/css/crn.css
+++ b/src/main/webapp/static/css/crn.css
@@ -107,6 +107,7 @@
 
 /* -------------------- 绗笁妯″潡 -------------------- */
 .crn-operation {
+    position: relative;
     margin-top: 10px;
     height: 25%;
     background-color: #fff;
@@ -207,6 +208,22 @@
     color: #fff;
 }
 
+/* 鎵嬪姩鎿嶄綔閬僵 */
+.crn-operation-shade {
+    position: absolute;
+    height: 100%;
+    width: 100%;
+    z-index: 1000;
+    cursor: pointer;
+    text-align: center;
+    padding: 80px 0;
+}
+.crn-operation-shade-span {
+    font-size: xx-large;
+    font-weight: bold;
+    color: red;
+}
+
 /* -------------------- 绗洓妯″潡 -------------------- */
 .crn-output-board {
     margin-top: 10px;
@@ -225,4 +242,4 @@
     overflow: auto;
     resize:none;
     color: #666;
-}
\ No newline at end of file
+}
diff --git a/src/main/webapp/static/js/common.js b/src/main/webapp/static/js/common.js
index fa66fe0..fdc899f 100644
--- a/src/main/webapp/static/js/common.js
+++ b/src/main/webapp/static/js/common.js
@@ -2,7 +2,10 @@
 // var baseUrl = "/wcs";
 // 娴嬭瘯
 var baseUrl = "";
+// 绯荤粺杩愯鐘舵��
+var systemRunning = true;
 
+// 璧嬪��
 function setVal(el, val) {
     if (el.text() !== val){
         el.html(val);
diff --git a/src/main/webapp/views/console.html b/src/main/webapp/views/console.html
index 6e7edc7..45548ef 100644
--- a/src/main/webapp/views/console.html
+++ b/src/main/webapp/views/console.html
@@ -619,7 +619,6 @@
 
 </body>
 <script>
-    var systemRunning = true;
     var crn1Position = 0;
     var crn2Position = 0;
     // 鍒濆鍖�
@@ -639,7 +638,7 @@
 
     // 绯荤粺杩愯寮�鍏�
     function systemSwitch() {
-        if (systemRunning){
+        if (top.systemRunning){
             layer.prompt({title: '璇疯緭鍏ュ彛浠わ紝骞跺仠姝� WCS 绯荤粺', formType: 1,   shadeClose: true}, function(pass, idx){
                 layer.close(idx);
                 doSwitch(0, pass); // 鍋滄wcs绯荤粺
@@ -670,11 +669,11 @@
                     if (res.data.status) {
                         $('#system-icon').attr("class", "system-icon-open");
                         $('#system-run-desc').html("绯荤粺杩愯涓�...");
-                        systemRunning = true;
+                        top.systemRunning = true;
                     } else {
                         $('#system-icon').attr("class", "system-icon-close");
                         $('#system-run-desc').html("绯荤粺宸插仠姝�!");
-                        systemRunning = false;
+                        top.systemRunning = false;
                     }
                 } else if (res.code === 403){
                     top.location.href = baseUrl+"/login";
@@ -697,11 +696,11 @@
                     if (res.data.status) {
                         $('#system-icon').attr("class", "system-icon-open");
                         $('#system-run-desc').html("绯荤粺杩愯涓�...");
-                        systemRunning = true;
+                        top.systemRunning = true;
                     } else {
                         $('#system-icon').attr("class", "system-icon-close");
                         $('#system-run-desc').html("绯荤粺宸插仠姝�!");
-                        systemRunning = false;
+                        top.systemRunning = false;
                     }
                 } else if (res.code === 403){
                     top.location.href = baseUrl+"/login";
diff --git a/src/main/webapp/views/crn.html b/src/main/webapp/views/crn.html
index 8a1ebca..e39cd89 100644
--- a/src/main/webapp/views/crn.html
+++ b/src/main/webapp/views/crn.html
@@ -81,6 +81,12 @@
 <!-- 鎵嬪姩鎿嶄綔 -->
 <div class="crn-operation">
 
+    <div class="crn-operation-shade">
+        <span class="crn-operation-shade-span">
+            WCS 绯荤粺杩愯涓紝璇峰仠姝㈠悗鎿嶄綔
+        </span>
+    </div>
+
     <!-- 璁惧浠诲姟閫夋嫨 -->
     <div class="task-select">
         <!-- 鍫嗗灈鏈洪�夋嫨 -->
@@ -177,6 +183,7 @@
         getCrnStateInfo();
         initCrnMsgTable();
         getCrnMsgInfo();
+        operatorBlockShow();
     });
     // 鏁版嵁鏇存柊
     setInterval(function () {
@@ -186,8 +193,22 @@
     },1000);
     setInterval(function () {
         getSiteOutput();
+        operatorBlockShow();
     },500);
 
+    // 鍒ゆ柇鎵嬪姩鎿嶄綔妯″潡鏄惁鍙敤
+    function operatorBlockShow() {
+        if (top.systemRunning) {
+            $('.crn-operation').css("opacity", "0.5");
+            $('.crn-operation-shade').show();
+            $('.crn-operation-shade-span').show();
+        }  else {
+            $('.crn-operation').css("opacity", "1");
+            $('.crn-operation-shade').hide();
+            $('.crn-operation-shade-span').hide();
+        }
+    }
+
     // 鑾峰彇鍫嗗灈鏈烘墽琛屼腑鐨勫懡浠�
     function getCommandLog() {
         $.ajax({

--
Gitblit v1.9.1