| | |
| | | import DeviceLogUploadRecordDrawer from '/@/components/devices/device-log/DeviceLogUploadRecordDrawer.vue' |
| | | import DeviceHmsDrawer from '/@/components/devices/device-hms/DeviceHmsDrawer.vue' |
| | | import { message, notification } from 'ant-design-vue' |
| | | |
| | | import { useMyStore } from '/@/store' |
| | | interface DeviceData { |
| | | device: Device[] |
| | | } |
| | | |
| | | const store = useMyStore() |
| | | const loading = ref(false) |
| | | const deleteTip = ref<boolean>(false) |
| | | const deleteSn = ref<string>() |
| | |
| | | } |
| | | type Pagination = TableState['pagination'] |
| | | |
| | | const workspaceId: string = localStorage.getItem(ELocalStorageKey.WorkspaceId) || '' |
| | | const workspaceId = computed(() => store.state.common.projectId) |
| | | const editableData: UnwrapRef<Record<string, Device>> = reactive({}) |
| | | const current = ref([EDeviceTypeName.Aircraft]) |
| | | |
| | |
| | | selectedDevice, |
| | | onDeviceUpgrade, |
| | | onUpgradeDeviceOk |
| | | } = useDeviceFirmwareUpgrade(workspaceId) |
| | | } = useDeviceFirmwareUpgrade(workspaceId.value) |
| | | |
| | | function onDeviceUpgradeWs (payload: DeviceCmdExecuteInfo) { |
| | | updateDevicesByWs(data.device, payload) |
| | |
| | | if (!closeLoading) { |
| | | loading.value = true |
| | | } |
| | | getBindingDevices(workspaceId, getPaginationBody(), domain).then(res => { |
| | | getBindingDevices(workspaceId.value, getPaginationBody(), domain).then(res => { |
| | | if (res.code !== 0) { |
| | | loading.value = false |
| | | return |
| | |
| | | // 保存 |
| | | function save (record: Device) { |
| | | delete editableData[record.device_sn] |
| | | updateDevice({ nickname: record.nickname }, workspaceId, record.device_sn) |
| | | updateDevice({ nickname: record.nickname }, workspaceId.value, record.device_sn) |
| | | } |
| | | |
| | | // 删除 |