#
Junjie
5 天以前 195b15baf2d6d7cfdb0d928586602f8760863e04
#
1个文件已修改
55 ■■■■■ 已修改文件
src/main/webapp/views/watch/console2.html 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/watch/console2.html
@@ -545,34 +545,6 @@
            locSts: this.map[x][y].locSts, row: this.map[x][y].row, bay: this.map[x][y].bay, lev: this.currentLev
          };
        },
        checkStaInListDiff(sta, list) {
          //检测站点是否在集合中有变动
          if (list.length == 0) {
            return false;//集合为空
          }
          let tmp = null;
          for (var i = 0; i < list.length; i++) {
            if (sta.siteId == list[i].siteId) {
              tmp = list[i];//找到相同站点
              break
            }
          }
          if (tmp == null) {
            return false;//没有找到相同站点
          }
          if (sta.siteStatus != tmp.siteStatus) {
            return false;//站点状态不相同
          }
          if (sta.workNo != tmp.workNo) {
            return false;//站点工作号不相同
          }
          return true;//无变化
        },
        webSocketOnOpen(e) {
          console.log("open");
        },
@@ -601,31 +573,6 @@
        sendWs(message) {
          if (ws.readyState == WebSocket.OPEN) {
            ws.send(message)
          }
        },
        colorRGB() {
          //随机颜色
          const r = Math.floor(Math.random() * 256);
          const g = Math.floor(Math.random() * 256);
          const b = Math.floor(Math.random() * 256);
          return `rgb(${r},${g},${b})`;
        },
        updateShuttleXY(item) {
          const shuttle = pixiShuttleMap.get(item.shuttleNo);
          if (shuttle.updateMoveStatus) {//动画执行完成才可继续执行动画
            shuttle.updateMoveStatus = false;//动画执行中
            // 计算两点之间的距离1
            const distance = Math.sqrt(Math.pow((item.wcsPoint.x * width) - shuttle.x, 2) + Math.pow((item.wcsPoint.y * height) - shuttle.y, 2));
            gsap.killTweensOf(shuttle); // 杀死所有针对".class"的动画
            gsap.to(shuttle, {
              x: (item.wcsPoint.y - 0) * width, // 目标位置
              y: (item.wcsPoint.x - 1) * height, // 目标位置
              duration: 0.2, // 动画持续时间(秒)
              ease: "power1.inOut", // 缓动类型
              onComplete: () => {
                shuttle.updateMoveStatus = true;//动画执行完成
              }
            });
          }
        },
        setSiteInfo(res) {
@@ -657,8 +604,6 @@
              }
            }
            console.log(status);
            if (status === "site-auto") {
              updateColor(sta, 0x78ff81);
            } else if (status === "site-auto-run" || status === "site-auto-run-id") {