| | |
| | | getDeviceDetail(singleUavHome.value.device_sn).then(res => { |
| | | const result = res.data.data |
| | | dockDetails.value = result |
| | | const storageObj = _.pick(result, ['latitude', 'longitude']) |
| | | setSingleUavAreaCode(storageObj) |
| | | const storageObj = _.pick(result, ['latitude', 'longitude']) || {} |
| | | store.commit('setSingleUavHome',{...singleUavHome.value, ...storageObj}) |
| | | initDroneEntity({ |
| | | lng: result.longitude, |
| | | lat: result.latitude, |
| | |
| | | workspaceId.value = result.workspace_id |
| | | }) |
| | | } |
| | | |
| | | // 设置单机巢得位置信息 |
| | | const setSingleUavAreaCode = (position) =>{ |
| | | store.commit('setSingleUavHome',{...singleUavHome.value, ...position}) |
| | | const params = { |
| | | output:'json', |
| | | location: position.longitude+','+position.latitude, |
| | | key:'6c3ea75b215f0c0efcbcfdf13273991b', |
| | | radius:'0', |
| | | extensions:'base', |
| | | } |
| | | // todo 2025年4月23号 后端提供接口然后对接 |
| | | // getAreaCodeApi(params).then(res => { |
| | | // console.log(res,66666666) |
| | | // }) |
| | | } |
| | | |
| | | |
| | | // 获取机巢统计数据 提供给左右侧组件使用 |
| | | const getMachineData = () => { |