From 0e8b41f6f2ffa21ca6394e20053b262d2dc1e1be Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期三, 20 三月 2024 14:00:38 +0800
Subject: [PATCH] #
---
zy-asrs-flow/src/pages/map/utils.js | 21 ++++++++++++++++++---
1 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/zy-asrs-flow/src/pages/map/utils.js b/zy-asrs-flow/src/pages/map/utils.js
index bf7a16f..b089a48 100644
--- a/zy-asrs-flow/src/pages/map/utils.js
+++ b/zy-asrs-flow/src/pages/map/utils.js
@@ -5,6 +5,7 @@
import { API_TIMEOUT } from '@/config/setting'
import agv from '/public/img/map/agv.svg'
import shelf from '/public/img/map/shelf.png'
+import point from '/public/img/map/point.svg'
let app = null;
let mapContainer = null;
@@ -308,6 +309,12 @@
label: intl.formatMessage({ id: 'map.sensor.type.agv', defaultMessage: '鏃犱汉灏忚溅' })
})
break;
+ case SENSOR_TYPE.POINT:
+ options.push({
+ value: value,
+ label: intl.formatMessage({ id: 'map.sensor.type.point', defaultMessage: '瀹氫綅鐐�' })
+ })
+ break;
default:
break;
}
@@ -329,6 +336,9 @@
case SENSOR_TYPE.AGV:
sprite = PIXI.Sprite.from(agv);
break;
+ case SENSOR_TYPE.POINT:
+ sprite = PIXI.Sprite.from(point);
+ break;
default:
break;
}
@@ -337,6 +347,9 @@
// data
sprite.data.uuid = item.uuid;
sprite.data.no = item.no;
+
+ // dynamical data
+ Object.assign(sprite.data, item.property);
// graph
sprite.position.set(item.positionX, item.positionY);
@@ -360,11 +373,13 @@
let mapItemList = [];
mapContainer?.children.forEach(child => {
if (child.data?.uuid) {
+ const { type, uuid, no, ...property } = child.data;
mapItemList.push({
// data
- type: child.data.type,
- uuid: child.data.uuid,
- no: child.data.no,
+ type: type,
+ uuid: uuid,
+ no: no,
+ property: property,
// graph
positionX: child.position.x,
--
Gitblit v1.9.1