From 2a35d8deefb89c4b463fdbafe79f2c7bd294621d Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期四, 23 五月 2024 12:56:13 +0800
Subject: [PATCH] #

---
 src/main/webapp/views/realtimeWatch/console.html |  149 ++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 108 insertions(+), 41 deletions(-)

diff --git a/src/main/webapp/views/realtimeWatch/console.html b/src/main/webapp/views/realtimeWatch/console.html
index fe263a9..a320e8b 100644
--- a/src/main/webapp/views/realtimeWatch/console.html
+++ b/src/main/webapp/views/realtimeWatch/console.html
@@ -636,7 +636,7 @@
                             siteEl.html(sites[i].siteId);
                         }
                         // RGV浣嶇疆
-                        if(sites[i].siteId === '112' || sites[i].siteId === '212'){
+                        if(sites[i].siteId === '1' || sites[i].siteId === '2'|| sites[i].siteId === '3' || sites[i].siteId === '4'){
                             carAnimate(Number(sites[i].siteId), Number(sites[i].nearbySta));
                         }
                     }
@@ -763,54 +763,121 @@
     // 灏忚溅鍋忕Щ鍔ㄧ敾
     function carAnimate(id, target) {
         var targetTop = 0;
-        if (id === 112) {
+        var targetLeft = 1489;
+        console.log(id+" ....>>>"+target)
             switch (target) {
-                case 1:
-                    targetTop += 313;
-                    break;
-                case 2:
-                    targetTop += 313;
-                    break;
                 case 3:
-                    targetTop += 256;
+                    targetTop += 67;
                     break;
-                case 4:
-                    targetTop += 226;
+                case 9:
+                    targetTop += 92;
                     break;
-                case 5:
-                    targetTop += 168;
-                case 6:
-                    targetTop += 168;
+                case 14:
+                    targetTop += 115;
+                    break;
+                case 19:
+                    targetTop += 140;
+                    break;
+                case 26:
+                    targetTop += 160;
+                    break;
+                case 31:
+                    targetTop += 183;
+                    break;
+                case 37:
+                    targetTop += 208;
+                    break;
+                case 42:
+                    targetTop += 231;
+                    break;
+                case 49:
+                    targetTop += 252;
+                    break;
+                case 54:
+                    targetTop += 275;
+                    break;
+                case 60:
+                    targetTop += 300;
+                    break;
+                case 65:
+                    targetTop += 330;
+                    break;
+                case 72:
+                    targetTop += 366;
+                    break;
+                case 77:
+                    targetTop += 389;
+                    break;
+                case 83:
+                    targetTop += 414;
+                    break;
+                case 88:
+                    targetTop += 445;
+                    break;
+                case 95:
+                    targetTop += 480;
+                    break;
+                case 100:
+                    targetTop += 503;
+                    break;
+                case 107:
+                    targetTop += 528;
+                    break;
+                case 110:
+                    targetTop += 570;
+                    break;
+                case 118:
+                    targetTop += 594;
+                    break;
+                case 123:
+                    targetTop += 617;
+                    break;
+                case 130:
+                    targetTop += 642;
+                    break;
+                case 156:
+                    targetTop += 700;
+                    break;
+                case 161:
+                    targetTop += 712;
+                    break;
+                case 168:
+                    targetTop += 725;
+                    break;
+                case 186:
+                    targetTop += 770;
+                    break;
+                case 191:
+                    targetTop += 782;
+                    break;
+                case 197:
+                    targetTop += 795;
                     break;
                 default:
-                    return;
+                   break;
             }
-        } else if (id === 212) {
-            switch (target) {
-                case 1:
-                    targetTop += 313;
-                    break;
-                case 2:
-                    targetTop += 313;
-                    break;
-                case 3:
-                    targetTop += 256;
-                    break;
-                case 4:
-                    targetTop += 226;
-                    break;
-                case 5:
-                    targetTop += 168;
-                case 6:
-                    targetTop += 168;
-                    break;
-                default:
-                    return;
+            if (target === 200){
+                targetTop += 830;
+                targetLeft += 26;
             }
-        } else {
-            return;
-        }
-        $("#site-" + id).animate({top: targetTop + 'px'}, 1000);
+            if (target === 300){
+                targetTop += 41;
+                targetLeft += 26;
+            }
+            if (target > 0 && target<200 && targetTop === 0){
+                var location =  100 - (target/2);
+                var px = 830-41;
+                targetTop += 41 + (px - px* (location/100));
+            }
+            if (target > 200 && target<300){
+                targetLeft += 45;
+                 var location =  300 - target;
+                 var px = 830-41;
+                targetTop += 41 + px* (location/100);
+            }
+
+
+        $("#site-" + id).animate({top: targetTop + 'px',left:targetLeft+'px'}, 1000);
     }
 
     //涓嬪彂杈撻�佺嚎鍛戒护

--
Gitblit v1.9.1