From 1c95a184f83f180414e0ec93dc6af8380ac20732 Mon Sep 17 00:00:00 2001
From: Junjie <DELL@qq.com>
Date: 星期二, 02 十二月 2025 13:51:47 +0800
Subject: [PATCH] #
---
src/main/webapp/views/watch/console2.html | 42 ++++++++++++++++++++++++++----------------
1 files changed, 26 insertions(+), 16 deletions(-)
diff --git a/src/main/webapp/views/watch/console2.html b/src/main/webapp/views/watch/console2.html
index dc5b25a..5657f1c 100644
--- a/src/main/webapp/views/watch/console2.html
+++ b/src/main/webapp/views/watch/console2.html
@@ -86,6 +86,7 @@
let pixiCrnMap = new Map();
let pixiShelfMap = new Map();
let pixiTrackMap = new Map();
+ let crnList = [];
let objectsContainer;
let objectsContainer2;
let graphicsShelf;
@@ -446,6 +447,26 @@
}
});
+ crnList.forEach((item) => {
+ let sprite = new PIXI.Sprite(graphicsCrn);
+ const deviceNo = getDeviceNo(item.value);
+ const taskNo = getTaskNo(item.value);
+ const style = new PIXI.TextStyle({ fontFamily: 'Arial', fontSize: 12, fill: '#ffffff', stroke: '#000000', strokeThickness: 2 });
+ const txt = taskNo > 0 ? (deviceNo + "(" + taskNo + ")") : String(deviceNo);
+ const text = new PIXI.Text(txt, style);
+ text.anchor.set(0.5);
+ text.position.set(sprite.width / 2, sprite.height / 2);
+ sprite.addChild(text);
+ sprite.textObj = text;
+ sprite.zIndex = 1;
+
+ sprite.position.set(item.posX, item.posY);
+ sprite.interactive = true; // 蹇呴』瑕佽缃墠鑳芥帴鏀朵簨浠�
+ sprite.buttonMode = true; // 璁╁厜鏍囧湪hover鏃跺彉涓烘墜鍨嬫寚閽�
+
+ pixiCrnMap.set(parseInt(deviceNo), sprite);
+ objectsContainer2.addChild(sprite);
+ })
//瑙嗚灞呬腑
@@ -834,22 +855,11 @@
pixiStaMap.set(parseInt(siteId), sprite);
}
} else if (item.type == 'crn') {
- if (getDeviceNo(value) == -1) {
- sprite = createTrackSprite(item.width, item.height);
- sprite.zIndex = 0;
- } else {
- sprite = new PIXI.Sprite(graphicsCrn);
- const deviceNo = getDeviceNo(value);
- const taskNo = getTaskNo(value);
- const style = new PIXI.TextStyle({ fontFamily: 'Arial', fontSize: 12, fill: '#ffffff', stroke: '#000000', strokeThickness: 2 });
- const txt = taskNo > 0 ? (deviceNo + "(" + taskNo + ")") : String(deviceNo);
- const text = new PIXI.Text(txt, style);
- text.anchor.set(0.5);
- text.position.set(sprite.width / 2, sprite.height / 2);
- sprite.addChild(text);
- sprite.textObj = text;
- pixiCrnMap.set(parseInt(deviceNo), sprite);
- sprite.zIndex = 1;
+ sprite = createTrackSprite(item.width, item.height);
+ sprite.zIndex = 0;
+
+ if(getDeviceNo(value) > 0){
+ crnList.push(item);
}
} else {
return null;
--
Gitblit v1.9.1