From e9e534018fe087035e8fb004a2ca0aeca553c910 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 18 May 2026 20:35:07 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=88iot=EF=BC=89=EF=BC=9A=E4=BC=98?= =?UTF-8?q?=E5=8C=96=20alert=20=E7=9A=84=E4=BB=A3=E7=A0=81=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0=EF=BC=88=E7=BB=A7=E7=BB=AD=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/iot/alert/config/data.ts | 8 +-- .../src/views/iot/alert/config/index.vue | 4 +- .../iot/alert/{ => config}/modules/form.vue | 4 +- .../src/views/iot/alert/record/index.vue | 59 ------------------- 4 files changed, 5 insertions(+), 70 deletions(-) rename apps/web-antd/src/views/iot/alert/{ => config}/modules/form.vue (94%) diff --git a/apps/web-antd/src/views/iot/alert/config/data.ts b/apps/web-antd/src/views/iot/alert/config/data.ts index 87ae86c1b..6bd5d5f00 100644 --- a/apps/web-antd/src/views/iot/alert/config/data.ts +++ b/apps/web-antd/src/views/iot/alert/config/data.ts @@ -1,7 +1,7 @@ import type { VbenFormSchema } from '#/adapter/form'; import type { VxeTableGridOptions } from '#/adapter/vxe-table'; -import { DICT_TYPE } from '@vben/constants'; +import { CommonStatusEnum, DICT_TYPE } from '@vben/constants'; import { getDictOptions } from '@vben/hooks'; import { getSimpleRuleSceneList } from '#/api/iot/rule/scene'; @@ -9,7 +9,6 @@ import { getSimpleUserList } from '#/api/system/user'; import { getRangePickerDefaultProps } from '#/utils'; /** 新增/修改告警配置的表单 */ -// TODO @AI:两行=》1 行; export function useFormSchema(): VbenFormSchema[] { return [ { @@ -29,7 +28,6 @@ export function useFormSchema(): VbenFormSchema[] { }, rules: 'required', }, - // TODO @AI:vue + ep 貌似也要改成 teatarea! { fieldName: 'description', label: '配置描述', @@ -58,11 +56,9 @@ export function useFormSchema(): VbenFormSchema[] { buttonStyle: 'solid', optionType: 'button', }, - // TODO @AI:defaultValue 这种要枚举值哇? - defaultValue: 0, + defaultValue: CommonStatusEnum.ENABLE, rules: 'required', }, - // TODO @AI:可能 label 比较宽,需要拉长点。 { fieldName: 'sceneRuleIds', label: '关联场景联动规则', 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 6ba25d9c2..13d8802d3 100644 --- a/apps/web-antd/src/views/iot/alert/config/index.vue +++ b/apps/web-antd/src/views/iot/alert/config/index.vue @@ -12,7 +12,7 @@ import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table'; import { deleteAlertConfig, getAlertConfigPage } from '#/api/iot/alert/config'; import { $t } from '#/locales'; -import AlertConfigForm from '../modules/form.vue'; +import AlertConfigForm from './modules/form.vue'; import { useGridColumns, useGridFormSchema } from './data'; defineOptions({ name: 'IoTAlertConfig' }); @@ -102,8 +102,6 @@ const [Grid, gridApi] = useVbenVxeGrid({ ]" /> - -