From a4093814b51bba7eae9530cfa076f6242df3f5f8 Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期一, 17 二月 2025 14:59:43 +0800
Subject: [PATCH] #移库任务
---
zy-asrs-flow/src/pages/map/components/device.jsx | 31 +++++--------------------------
1 files changed, 5 insertions(+), 26 deletions(-)
diff --git a/zy-asrs-flow/src/pages/map/components/device.jsx b/zy-asrs-flow/src/pages/map/components/device.jsx
index e1ac85f..53b09da 100644
--- a/zy-asrs-flow/src/pages/map/components/device.jsx
+++ b/zy-asrs-flow/src/pages/map/components/device.jsx
@@ -38,6 +38,7 @@
import shuttle from '/public/img/map/shuttle.svg'
import agv from '/public/img/map/agv.svg'
import shelf from '/public/img/map/shelf.png'
+import conveyor from '/public/img/map/conveyor.png'
import point from '/public/img/map/point.svg'
const Device = (props) => {
@@ -50,29 +51,7 @@
const onDragStart = (e, type) => {
setDragging(true);
setDragSpriteType(type);
-
- let image = new window.Image();
- switch (type) {
- case Utils.SENSOR_TYPE.SHUTTLE:
- image.src = shuttle;
- break;
- case Utils.SENSOR_TYPE.AGV:
- image.src = agv;
- break;
- case Utils.SENSOR_TYPE.SHELF:
- image.src = shuttle;
- break;
- case Utils.SENSOR_TYPE.POINT:
- image.src = point;
- break;
- default:
- break;
- }
- image.width = 300;
- image.height = 300;
- const texture = PIXI.Texture.from(image);
- const sprite = new PIXI.Sprite(texture);
- // const sprite = PIXI.Sprite.from(e.target);
+ const sprite = Utils.generateSprite(type);
setDragSprite(sprite);
};
@@ -163,14 +142,14 @@
</Col>
<Col className={styles.mapCol} span={8} >
<Image
- src={shelf}
+ src={conveyor}
width='35px'
preview={false}
draggable="true"
- onDragStart={(e) => onDragStart(e, Utils.SENSOR_TYPE.SHELF)}
+ onDragStart={(e) => onDragStart(e, Utils.SENSOR_TYPE.CONVEYOR)}
/>
<div className={styles.title}>
- <FormattedMessage id='map.sensor.type.shelf' defaultMessage='璐ф灦' />
+ <FormattedMessage id='map.sensor.type.conveyor' defaultMessage='杈撻�佺嚎' />
</div>
</Col>
<Col className={styles.mapCol} span={8} >
--
Gitblit v1.9.1