| | |
| | | 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, |
| | |
| | | }) |
| | | } |
| | | |
| | | export const getRouteList = async (zoneId, callback) => { |
| | | await request.post('/map/route/list', { |
| | | zoneId: zoneId, |
| | | }, { |
| | | headers: { 'Content-Type': 'application/x-www-form-urlencoded' } |
| | | }).then((res) => { |
| | | const { code, msg, data } = res.data; |
| | | if (code === 200) { |
| | | callback(data) |
| | | } else { |
| | | notify.error(msg); |
| | | } |
| | | }).catch((error) => { |
| | | notify.error(error.message); |
| | | console.error(error.message); |
| | | }) |
| | | } |
| | | |
| | | |
| | | export const handleControlAgv = async (param, callback) => { |
| | | await request.post('/handler/control/agv', param, { |