From 7dc0f27e6d92167fd1e826b29c2b14f64961d08e Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期四, 07 十一月 2024 09:56:45 +0800 Subject: [PATCH] # --- zy-acs-flow/src/map/http.js | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/zy-acs-flow/src/map/http.js b/zy-acs-flow/src/map/http.js index f78cfe5..35203c1 100644 --- a/zy-acs-flow/src/map/http.js +++ b/zy-acs-flow/src/map/http.js @@ -24,7 +24,10 @@ const { code, msg, data: { rcsStatus, common, point } } = res.data; if (code === 200) { setRcsStatus(rcsStatus); - const mapItemList = [...eval(common), ...eval(point)]; + const commonList = common ? eval(common) : []; + const pointList = point ? eval(point) : []; + const mapItemList = [...commonList, ...pointList]; + mapItemList.forEach(item => { if (item.type !== DEVICE_TYPE.AGV) { const sprite = Tool.generateSprite(item.type); @@ -75,7 +78,7 @@ mapContainer.children.forEach(child => { if (child.data?.uuid) { const { type, uuid, no, ...property } = child.data; - if (type !== DEVICE_TYPE.AGV && type !== DEVICE_TYPE.POINT) { + if (type !== DEVICE_TYPE.AGV && type !== DEVICE_TYPE.POINT && type !== DEVICE_TYPE.ROUTE) { sprites.push({ // graph positionX: child.position.x, -- Gitblit v1.9.1