From 89c7f6e5bcc21b0e8f83a2bc6d680e2ffe431e6f Mon Sep 17 00:00:00 2001 From: vincentlu <t1341870251@gmail.com> Date: 星期一, 13 一月 2025 09:38:29 +0800 Subject: [PATCH] # --- zy-acs-flow/src/map/http.js | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/zy-acs-flow/src/map/http.js b/zy-acs-flow/src/map/http.js index b059e6c..88ab8dc 100644 --- a/zy-acs-flow/src/map/http.js +++ b/zy-acs-flow/src/map/http.js @@ -14,7 +14,7 @@ mapContainer = param; } -export const fetchMapData = (zoneId, setRcsStatus) => { +export const fetchMapData = (zoneId, setRcsStatus, setCurSprite) => { Tool.clearMapData(); return request.post('/map/data/fetch', { zoneId: zoneId @@ -49,14 +49,14 @@ // support switch (item.type) { case DEVICE_TYPE.POINT: - sprite.scale.set(0.85, 0.85); + sprite.scale.set(pointList.length < 2000 ? 1 : 1.6); break default: break } - // }, 50); mapContainer.addChild(sprite); + Tool.beInsight(sprite, setCurSprite); } } }) @@ -184,7 +184,7 @@ }) } -export const getRouteList = async (zoneId, callback) => { +export const getRouteList = async (zoneId, callback, errCallBack) => { await request.post('/map/route/list', { zoneId: zoneId, }, { @@ -195,10 +195,16 @@ callback(data) } else { notify.error(msg); + if (errCallBack) { + errCallBack(); + } } }).catch((error) => { notify.error(error.message); console.error(error.message); + if (errCallBack) { + errCallBack(); + } }) } -- Gitblit v1.9.1