From 38be704dd5027056e135a5613299163e861f89cf Mon Sep 17 00:00:00 2001
From: vincent <1341870251@qq.com>
Date: 星期二, 02 六月 2020 16:49:55 +0800
Subject: [PATCH] #

---
 src/main/webapp/views/console.html       |   20 +++++++++++++++++---
 src/main/webapp/static/css/console.css   |   12 +++++++++---
 src/main/webapp/static/image/start48.png |    0 
 3 files changed, 26 insertions(+), 6 deletions(-)

diff --git a/src/main/webapp/static/css/console.css b/src/main/webapp/static/css/console.css
index ab903a9..ee10065 100644
--- a/src/main/webapp/static/css/console.css
+++ b/src/main/webapp/static/css/console.css
@@ -36,17 +36,23 @@
     text-align: center;
     color: #2d6aff;
 }
-.system-icon {
+#system-icon {
     display: inline-block;
     width: 70%;
     height: 70%;
-    background-image: url("../image/stop48.png");
     background-repeat: no-repeat;
     background-size:100% 100%;
     background-position: top center;
     cursor: pointer;
 }
-.system-state span {
+.system-icon-open {
+    background-image: url("../image/stop48.png");
+}
+.system-icon-close {
+    background-image: url("../image/start48.png");
+}
+
+#system-run-desc {
     font-size: large;
     display: inline-block;
     padding-top: 10px;
diff --git a/src/main/webapp/static/image/start48.png b/src/main/webapp/static/image/start48.png
new file mode 100644
index 0000000..e3870f9
--- /dev/null
+++ b/src/main/webapp/static/image/start48.png
Binary files differ
diff --git a/src/main/webapp/views/console.html b/src/main/webapp/views/console.html
index 47fc13a..9e84dab 100644
--- a/src/main/webapp/views/console.html
+++ b/src/main/webapp/views/console.html
@@ -21,8 +21,8 @@
 <header>
     <!-- 绯荤粺杩愯鐘舵�� -->
     <div class="system-state">
-        <div class="system-icon"></div>
-        <span>绯荤粺杩愯涓�...</span>
+        <div id="system-icon" class="system-icon-open" onclick="systemSwitch()"></div>
+        <span id="system-run-desc">绯荤粺杩愯涓�...</span>
     </div>
 
     <!-- 淇℃伅灞曠ず -->
@@ -406,7 +406,7 @@
 </main>
 </body>
 <script>
-
+    var systemRunning = true;
     var crn1Position = 0;
     var crn2Position = 0;
     // 鍒濆鍖�
@@ -420,6 +420,20 @@
         getSitesInfo();
     }, 3000);
 
+    // 绯荤粺杩愯寮�鍏�
+    function systemSwitch() {
+        if (systemRunning){
+            $('#system-icon').attr("class", "system-icon-close");
+            $('#system-run-desc').html("绯荤粺宸插仠姝�!");
+            systemRunning = false;
+        } else {
+            $('#system-icon').attr("class", "system-icon-open");
+            $('#system-run-desc').html("绯荤粺杩愯涓�...");
+            systemRunning = true;
+        }
+
+    }
+
     // 杈撻�佽澶囧疄鏃舵暟鎹幏鍙�
     function getSitesInfo(){
         $.ajax({

--
Gitblit v1.9.1