diff --git a/src/api/iot/ota/firmware/index.ts b/src/api/iot/ota/firmware/index.ts index ad61e973..97e6d059 100644 --- a/src/api/iot/ota/firmware/index.ts +++ b/src/api/iot/ota/firmware/index.ts @@ -7,6 +7,7 @@ export interface IoTOtaFirmware { description?: string // 固件描述 version?: string // 版本号 productId?: number // 产品编号 + productName?: string // 产品名称 fileUrl?: string // 固件文件 URL fileSize?: number // 固件文件大小 fileDigestAlgorithm?: string // 固件文件签名算法 diff --git a/src/utils/dict.ts b/src/utils/dict.ts index aa717693..cc14074f 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -241,5 +241,7 @@ export enum DICT_TYPE { IOT_RULE_SCENE_TRIGGER_TYPE_ENUM = 'iot_rule_scene_trigger_type_enum', // IoT 场景流转的触发类型枚举 IOT_RULE_SCENE_ACTION_TYPE_ENUM = 'iot_rule_scene_action_type_enum', // IoT 规则场景的触发类型枚举 IOT_ALERT_LEVEL = 'iot_alert_level', // IoT 告警级别 - IOT_ALERT_RECEIVE_TYPE = 'iot_alert_receive_type' // IoT 告警接收类型 + IOT_ALERT_RECEIVE_TYPE = 'iot_alert_receive_type', // IoT 告警接收类型 + IOT_OTA_TASK_DEVICE_SCOPE = 'iot_ota_task_device_scope', // IoT OTA任务设备范围 + IOT_OTA_TASK_STATUS = 'iot_ota_task_status' // IoT OTA任务状态 } diff --git a/src/views/iot/ota/firmware/detail/index.vue b/src/views/iot/ota/firmware/detail/index.vue index 661a47ec..0c0cc9d3 100644 --- a/src/views/iot/ota/firmware/detail/index.vue +++ b/src/views/iot/ota/firmware/detail/index.vue @@ -1,303 +1,124 @@ - - diff --git a/src/views/iot/ota/task/OtaTaskForm.vue b/src/views/iot/ota/task/OtaTaskForm.vue new file mode 100644 index 00000000..79cd3b69 --- /dev/null +++ b/src/views/iot/ota/task/OtaTaskForm.vue @@ -0,0 +1,111 @@ + + + diff --git a/src/views/iot/ota/task/OtaTaskList.vue b/src/views/iot/ota/task/OtaTaskList.vue new file mode 100644 index 00000000..cdc1ad7c --- /dev/null +++ b/src/views/iot/ota/task/OtaTaskList.vue @@ -0,0 +1,162 @@ + + + diff --git a/src/views/iot/utils/constants.ts b/src/views/iot/utils/constants.ts index 50d60049..08af1767 100644 --- a/src/views/iot/utils/constants.ts +++ b/src/views/iot/utils/constants.ts @@ -147,3 +147,67 @@ export const getDataTypeOptionsLabel = (value: string) => { const dataType = getDataTypeOptions().find((option) => option.value === value) return dataType && `${dataType.value}(${dataType.label})` } + +// IoT OTA 任务设备范围枚举 +export const IoTOtaTaskDeviceScopeEnum = { + ALL: { + label: '全部设备', + value: 1 + }, + SPECIFIC: { + label: '指定设备', + value: 2 + } +} as const + +// IoT OTA 任务状态枚举 +export const IoTOtaTaskStatusEnum = { + PENDING: { + label: '待执行', + value: 1 + }, + IN_PROGRESS: { + label: '执行中', + value: 2 + }, + COMPLETED: { + label: '已完成', + value: 3 + }, + CANCELLED: { + label: '已取消', + value: 4 + }, + FAILED: { + label: '执行失败', + value: 5 + } +} as const + +// IoT OTA 升级记录状态枚举 +export const IoTOtaTaskRecordStatusEnum = { + PENDING: { + label: '待推送', + value: 1 + }, + PUSHED: { + label: '已推送', + value: 2 + }, + IN_PROGRESS: { + label: '正在升级', + value: 3 + }, + SUCCESS: { + label: '升级成功', + value: 4 + }, + FAILED: { + label: '升级失败', + value: 5 + }, + CANCELLED: { + label: '升级取消', + value: 6 + } +} as const