From a14eed06347169ce05969069e506076a3440bccd Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期一, 24 八月 2020 16:42:18 +0800
Subject: [PATCH] #

---
 src/main/webapp/views/console.html  |   54 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
 src/main/resources/application.yml  |    2 +-
 src/main/webapp/static/image/bg.jpg |    0 
 3 files changed, 54 insertions(+), 2 deletions(-)

diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 1178607..682d88f 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -35,7 +35,7 @@
   enable: false
 
 # 涓嬩綅鏈洪厤缃�
-wcs-slave:
+#wcs-slave:
   # 鍫嗗灈鏈�
   crn[0]:
     id: 1
diff --git a/src/main/webapp/static/image/bg.jpg b/src/main/webapp/static/image/bg.jpg
new file mode 100644
index 0000000..55aaee4
--- /dev/null
+++ b/src/main/webapp/static/image/bg.jpg
Binary files differ
diff --git a/src/main/webapp/views/console.html b/src/main/webapp/views/console.html
index 0bbd568..4fa7e1f 100644
--- a/src/main/webapp/views/console.html
+++ b/src/main/webapp/views/console.html
@@ -89,8 +89,17 @@
 
     <!-- 鍙拌溅1 -->
 
+    <!-- 鍙拌溅杞ㄩ亾 -->
+    <div id="car-track-1" class="car-track" style="position: absolute; top: 122px; left: 100px; width: 100px; height: 200px; background: url(../static/image/bg.jpg);"></div>
 
-
+    <!-- 鍙拌溅瀹炰緥 -->
+    <div id="site-8" class="site car" style="
+        position: absolute;
+        top: 122px;
+        left: 100px;
+        width: 100px;
+        height: 40px;
+        line-height: 40px">8</div>
 
     <!-- 绗竴鍒楋紙瀹藉害 100px锛� -->
     <div class="site-row site-row-1">
@@ -646,5 +655,48 @@
         });
     });
 
+
+    // 灏忚溅鍋忕Щ鍔ㄧ敾
+    function carAnimate(id, target) {
+        var targetTop = 122;
+        if (id === 8) {
+            switch (target) {
+                case 1:
+                    targetTop += 160;
+                    break;
+                case 2:
+                    targetTop += 120;
+                    break;
+                case 3:
+                    targetTop += 80;
+                    break;
+                case 4:
+                    targetTop += 40;
+                    break;
+                case 7:
+                    targetTop += 0;
+                    break;
+                default:
+                    return;
+            }
+        } else {
+            return;
+        }
+        $("#site-" + id).animate({top: targetTop+'px'}, 1000);
+    }
+
+
+    // 鍙拌溅鐐瑰嚮浜嬩欢
+    $(document).on("click", ".car", function () {
+        var value = prompt('鐩爣绔欙細', "1");
+        if (value == null) {
+            alert('涓嶈兘涓虹┖锛�');
+        } else if (value === '') {
+            alert('涓嶈兘涓虹┖锛�');
+        } else {
+            carAnimate(8, Number(value));
+        }
+    })
+
 </script>
 </html>
\ No newline at end of file

--
Gitblit v1.9.1