diff --git a/src/utils/getRobotInfo.js b/src/utils/getRobotInfo.js index a3caf0e..a8e727f 100644 --- a/src/utils/getRobotInfo.js +++ b/src/utils/getRobotInfo.js @@ -32,6 +32,9 @@ export const getRobotTokenFn = async () => { bfix: 1, } const res = await initLoginApi(loginParams) + robotData.setTokenInfo({ + deviceToken: res.data.token, + }) return res.data.token } @@ -58,6 +61,10 @@ export const getRobotDeviceListFn = async () => { const { data: res } = await getDeviceInfoApi() if (res?.data?.length > 0) { const deviceInfo = res.data[0] + robotData.setRobotInfo({ + devName: deviceInfo.devName, + puId: deviceInfo.puId, + }) return { devName: deviceInfo.devName, puId: deviceInfo.puId, @@ -102,6 +109,8 @@ export const getRobotMapInfoFn = async (puId) => { mapId: MapId, } + robotData.setMapInfo(mapInfo) + return mapInfo } } @@ -133,6 +142,8 @@ export const getRobotPointsInfoFn = async (puId) => { Robot_x: res?.data?.Robot_x, Robot_y: res?.data?.Robot_y, } + + robotData.setRobotPoints(pointsInfo) return pointsInfo } } diff --git a/src/views/home/components/right-one.vue b/src/views/home/components/right-one.vue index 86a03a5..7b083b0 100644 --- a/src/views/home/components/right-one.vue +++ b/src/views/home/components/right-one.vue @@ -470,6 +470,7 @@ const onHandlePartSend = async () => { }) if (res.code == 200) { message.success('δΈ‹ε‘ζˆεŠŸ') + selectList.value = [] getProjectPersonList() } else { message.error(res.message)