| | |
| | | import { set } from "lodash"; |
| | | import { set } from 'lodash' |
| | | import { EDeviceTypeName } from '@/utils/staticData/enums' |
| | | |
| | | const home = { |
| | |
| | | }, |
| | | setDockOnfo: (state, info) => { |
| | | if (Object.keys(info.host).length === 0) return |
| | | |
| | | if (!state.deviceState.dockInfo[info.sn]) { |
| | | state.deviceState.dockInfo[info.sn] = {} |
| | | } |
| | | state.deviceState.currentSn = info.sn |
| | | state.deviceState.currentType = EDeviceTypeName.Dock |
| | | const dock = state.deviceState.dockInfo[info.sn] |
| | | if (info.host.mode_code !== undefined) { |
| | | dock.basic_osd = info.host |
| | | state.deviceState.drone_charge_state_new = |
| | | dock.basic_osd.drone_charge_state |
| | | return |
| | | } |
| | | if (info.host.sdr) { |
| | | dock.link_osd = info.host |
| | | return |
| | | } |
| | | if (info.host.job_number !== undefined) { |
| | | dock.work_osd = info.host |
| | | } |
| | | }, |
| | | }, |
| | | getters:{ |
| | | test(state) { |
| | | return state.singleUavHome.id.toString() + '65' |
| | | } |
| | | } |
| | | }; |
| | | |
| | | export default home; |
| | | if (!state.deviceState.dockInfo[info.sn]) { |
| | | state.deviceState.dockInfo[info.sn] = {} |
| | | } |
| | | state.deviceState.currentSn = info.sn |
| | | state.deviceState.currentType = EDeviceTypeName.Dock |
| | | const dock = state.deviceState.dockInfo[info.sn] |
| | | if (info.host.mode_code !== undefined) { |
| | | dock.basic_osd = info.host |
| | | state.deviceState.drone_charge_state_new = dock.basic_osd.drone_charge_state |
| | | return |
| | | } |
| | | if (info.host.sdr) { |
| | | dock.link_osd = info.host |
| | | return |
| | | } |
| | | if (info.host.job_number !== undefined) { |
| | | dock.work_osd = info.host |
| | | } |
| | | }, |
| | | }, |
| | | getters: { |
| | | test(state) { |
| | | return state.singleUavHome.id.toString() + '65' |
| | | }, |
| | | }, |
| | | } |
| | | |
| | | export default home |