diff --git a/apps/web-antd/src/api/iot/alert/config/index.ts b/apps/web-antd/src/api/iot/alert/config/index.ts index ef4414f23..8281cf6c8 100644 --- a/apps/web-antd/src/api/iot/alert/config/index.ts +++ b/apps/web-antd/src/api/iot/alert/config/index.ts @@ -51,7 +51,9 @@ export function getAlertConfig(id: number) { /** 查询所有告警配置列表 */ export function getAlertConfigList() { - return requestClient.get('/iot/alert-config/list'); + return requestClient.get( + '/iot/alert-config/list', + ); } /** 新增告警配置 */ @@ -92,4 +94,3 @@ export function getSimpleAlertConfigList() { } export { AlertConfigApi }; - diff --git a/apps/web-antd/src/api/iot/alert/record/index.ts b/apps/web-antd/src/api/iot/alert/record/index.ts index 02e8768f1..7ca2b8df9 100644 --- a/apps/web-antd/src/api/iot/alert/record/index.ts +++ b/apps/web-antd/src/api/iot/alert/record/index.ts @@ -82,4 +82,3 @@ export function deleteAlertRecordList(ids: number[]) { } export { AlertRecordApi }; - diff --git a/apps/web-antd/src/api/iot/device/device/index.ts b/apps/web-antd/src/api/iot/device/device/index.ts index 26770f975..b45f3b42a 100644 --- a/apps/web-antd/src/api/iot/device/device/index.ts +++ b/apps/web-antd/src/api/iot/device/device/index.ts @@ -79,8 +79,8 @@ export namespace IotDeviceApi { /** IoT 设备状态枚举 */ export enum DeviceStateEnum { INACTIVE = 0, // 未激活 - ONLINE = 1, // 在线 OFFLINE = 2, // 离线 + ONLINE = 1, // 在线 } /** 查询设备分页 */ @@ -221,4 +221,3 @@ export type DeviceVO = IotDeviceApi.Device; export type IotDeviceAuthInfoVO = IotDeviceApi.DeviceAuthInfo; export type IotDevicePropertyDetailRespVO = IotDeviceApi.DevicePropertyDetail; export type IotDevicePropertyRespVO = IotDeviceApi.DeviceProperty; - diff --git a/apps/web-antd/src/api/iot/device/group/index.ts b/apps/web-antd/src/api/iot/device/group/index.ts index 0b7da965f..18cac3097 100644 --- a/apps/web-antd/src/api/iot/device/group/index.ts +++ b/apps/web-antd/src/api/iot/device/group/index.ts @@ -49,4 +49,3 @@ export function getSimpleDeviceGroupList() { '/iot/device-group/simple-list', ); } - diff --git a/apps/web-antd/src/api/iot/ota/task/index.ts b/apps/web-antd/src/api/iot/ota/task/index.ts index 7747b9f92..bd003caf8 100644 --- a/apps/web-antd/src/api/iot/ota/task/index.ts +++ b/apps/web-antd/src/api/iot/ota/task/index.ts @@ -98,4 +98,3 @@ export function resumeOtaTask(id: number) { } export { IoTOtaTaskApi }; - diff --git a/apps/web-antd/src/api/iot/ota/task/record/index.ts b/apps/web-antd/src/api/iot/ota/task/record/index.ts index d857a6aa9..8ab8b0b1e 100644 --- a/apps/web-antd/src/api/iot/ota/task/record/index.ts +++ b/apps/web-antd/src/api/iot/ota/task/record/index.ts @@ -101,4 +101,3 @@ export function getOtaTaskRecordStatusStatistics( } export { IoTOtaTaskRecordApi }; - diff --git a/apps/web-antd/src/api/iot/product/category/index.ts b/apps/web-antd/src/api/iot/product/category/index.ts index 66faa6083..72f04b6b3 100644 --- a/apps/web-antd/src/api/iot/product/category/index.ts +++ b/apps/web-antd/src/api/iot/product/category/index.ts @@ -55,4 +55,3 @@ export function getSimpleProductCategoryList() { '/iot/product-category/simple-list', ); } - diff --git a/apps/web-antd/src/api/iot/product/product/index.ts b/apps/web-antd/src/api/iot/product/product/index.ts index 586487ed9..6eeba04cd 100644 --- a/apps/web-antd/src/api/iot/product/product/index.ts +++ b/apps/web-antd/src/api/iot/product/product/index.ts @@ -30,15 +30,15 @@ export namespace IotProductApi { /** IOT 产品设备类型枚举类 */ export enum DeviceTypeEnum { DEVICE = 0, // 直连设备 - GATEWAY_SUB = 1, // 网关子设备 GATEWAY = 2, // 网关设备 + GATEWAY_SUB = 1, // 网关子设备 } /** IOT 产品定位类型枚举类 */ export enum LocationTypeEnum { IP = 1, // IP 定位 - MODULE = 2, // 设备定位 MANUAL = 3, // 手动定位 + MODULE = 2, // 设备定位 } /** IOT 数据格式(编解码器类型)枚举类 */ diff --git a/apps/web-antd/src/api/iot/rule/data/rule/index.ts b/apps/web-antd/src/api/iot/rule/data/rule/index.ts index a8120e6c3..55e50184a 100644 --- a/apps/web-antd/src/api/iot/rule/data/rule/index.ts +++ b/apps/web-antd/src/api/iot/rule/data/rule/index.ts @@ -81,4 +81,3 @@ export function updateDataRuleStatus(id: number, status: number) { status, }); } - diff --git a/apps/web-antd/src/api/iot/rule/data/sink/index.ts b/apps/web-antd/src/api/iot/rule/data/sink/index.ts index 9ec0307ee..59ffdbc3b 100644 --- a/apps/web-antd/src/api/iot/rule/data/sink/index.ts +++ b/apps/web-antd/src/api/iot/rule/data/sink/index.ts @@ -29,11 +29,11 @@ export interface DataSinkVO { /** IoT 数据目的类型枚举 */ export enum IotDataSinkTypeEnum { HTTP = 'HTTP', - MQTT = 'MQTT', KAFKA = 'KAFKA', + MQTT = 'MQTT', RABBITMQ = 'RABBITMQ', - ROCKETMQ = 'ROCKETMQ', REDIS_STREAM = 'REDIS_STREAM', + ROCKETMQ = 'ROCKETMQ', } /** HTTP 配置 */ @@ -148,4 +148,3 @@ export function updateDataSinkStatus(id: number, status: number) { } export { DataSinkApi }; - diff --git a/apps/web-antd/src/api/iot/rule/scene/index.ts b/apps/web-antd/src/api/iot/rule/scene/index.ts index 36f968066..3746a4622 100644 --- a/apps/web-antd/src/api/iot/rule/scene/index.ts +++ b/apps/web-antd/src/api/iot/rule/scene/index.ts @@ -156,8 +156,7 @@ export function getSimpleRuleSceneList() { // 别名导出(兼容旧代码) export { - getSceneRulePage as getRuleScenePage, deleteSceneRule as deleteRuleScene, + getSceneRulePage as getRuleScenePage, updateSceneRuleStatus as updateRuleSceneStatus, }; - diff --git a/apps/web-antd/src/api/iot/thingmodel/index.ts b/apps/web-antd/src/api/iot/thingmodel/index.ts index eac8bea39..e4bb75767 100644 --- a/apps/web-antd/src/api/iot/thingmodel/index.ts +++ b/apps/web-antd/src/api/iot/thingmodel/index.ts @@ -115,10 +115,10 @@ export interface ThingModelFormRules { /** 验证布尔型名称 */ export const validateBoolName = (_rule: any, value: any, callback: any) => { - if (!value) { - callback(new Error('枚举描述不能为空')); - } else { + if (value) { callback(); + } else { + callback(new Error('枚举描述不能为空')); } }; diff --git a/apps/web-antd/src/views/iot/alert/config/index.vue b/apps/web-antd/src/views/iot/alert/config/index.vue index bae250661..9e47eaf1f 100644 --- a/apps/web-antd/src/views/iot/alert/config/index.vue +++ b/apps/web-antd/src/views/iot/alert/config/index.vue @@ -10,8 +10,8 @@ import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table'; import { deleteAlertConfig, getAlertConfigPage } from '#/api/iot/alert/config'; import { $t } from '#/locales'; -import { useGridColumns, useGridFormSchema } from './data'; import AlertConfigForm from '../modules/AlertConfigForm.vue'; +import { useGridColumns, useGridFormSchema } from './data'; defineOptions({ name: 'IoTAlertConfig' }); diff --git a/apps/web-antd/src/views/iot/alert/modules/AlertConfigForm.vue b/apps/web-antd/src/views/iot/alert/modules/AlertConfigForm.vue index af90da10a..76172f8f5 100644 --- a/apps/web-antd/src/views/iot/alert/modules/AlertConfigForm.vue +++ b/apps/web-antd/src/views/iot/alert/modules/AlertConfigForm.vue @@ -49,7 +49,9 @@ const [Modal, modalApi] = useVbenModal({ // 提交表单 const data = (await formApi.getValues()) as AlertConfigApi.AlertConfig; try { - await (formData.value?.id ? updateAlertConfig(data) : createAlertConfig(data)); + await (formData.value?.id + ? updateAlertConfig(data) + : createAlertConfig(data)); // 关闭并提示 await modalApi.close(); emit('success'); diff --git a/apps/web-antd/src/views/iot/alert/record/index.vue b/apps/web-antd/src/views/iot/alert/record/index.vue index 0cdb9b513..316053da3 100644 --- a/apps/web-antd/src/views/iot/alert/record/index.vue +++ b/apps/web-antd/src/views/iot/alert/record/index.vue @@ -1,14 +1,14 @@ + - - diff --git a/apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailConfig.vue b/apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailConfig.vue index 167380ffb..ca73d8473 100644 --- a/apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailConfig.vue +++ b/apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailConfig.vue @@ -1,4 +1,118 @@ + + - - diff --git a/apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsHeader.vue b/apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsHeader.vue index 2465707ea..b2859a058 100644 --- a/apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsHeader.vue +++ b/apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsHeader.vue @@ -1,4 +1,55 @@ + - diff --git a/apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsInfo.vue b/apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsInfo.vue index 3d758332b..118f56650 100644 --- a/apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsInfo.vue +++ b/apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsInfo.vue @@ -1,4 +1,64 @@ + - diff --git a/apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsMessage.vue b/apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsMessage.vue index 86e55975d..e870b4d3d 100644 --- a/apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsMessage.vue +++ b/apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsMessage.vue @@ -1,10 +1,178 @@ + +