diff --git a/apps/web-antd/src/views/iot/rule/scene/data.ts b/apps/web-antd/src/views/iot/rule/scene/data.ts index fd948f9bf..b164629d5 100644 --- a/apps/web-antd/src/views/iot/rule/scene/data.ts +++ b/apps/web-antd/src/views/iot/rule/scene/data.ts @@ -89,49 +89,42 @@ export function useGridFormSchema(): VbenFormSchema[] { export function useGridColumns(): VxeTableGridOptions['columns'] { return [ { type: 'checkbox', width: 40 }, - { - field: 'id', - title: '规则编号', - minWidth: 80, - }, { field: 'name', title: '规则名称', - minWidth: 150, + minWidth: 180, + slots: { default: 'name' }, }, { - field: 'description', - title: '规则描述', - minWidth: 200, + field: 'triggers', + title: '触发条件', + minWidth: 260, + slots: { default: 'triggers' }, + }, + { + field: 'actions', + title: '执行动作', + minWidth: 220, + slots: { default: 'actionsCol' }, }, { field: 'status', title: '规则状态', - minWidth: 100, + width: 90, cellRender: { name: 'CellDict', props: { type: DICT_TYPE.COMMON_STATUS }, }, }, - { - field: 'actionCount', - title: '执行动作数', - minWidth: 100, - }, - { - field: 'executeCount', - title: '执行次数', - minWidth: 100, - }, { field: 'createTime', title: '创建时间', - minWidth: 180, + width: 160, formatter: 'formatDateTime', }, { title: '操作', - width: 240, + width: 200, fixed: 'right', slots: { default: 'actions' }, }, diff --git a/apps/web-antd/src/views/iot/rule/scene/form/configs/alert-config.vue b/apps/web-antd/src/views/iot/rule/scene/form/configs/alert-config.vue index 1edf04e92..5d829a6de 100644 --- a/apps/web-antd/src/views/iot/rule/scene/form/configs/alert-config.vue +++ b/apps/web-antd/src/views/iot/rule/scene/form/configs/alert-config.vue @@ -23,17 +23,13 @@ const localValue = useVModel(props, 'modelValue', emit); const loading = ref(false); // 加载状态 const alertConfigs = ref([]); // 告警配置列表 -/** - * 处理选择变化事件 - * @param value 选中的值 - */ +/** 处理选择变化事件 */ function handleChange(value?: any) { emit('update:modelValue', value); } -/** - * 加载告警配置列表 - */ +// TODO @AI:这个是不是 antd + vue 也使用这个接口?要不增加一个 simple-list 接口? +/** 加载告警配置列表 */ async function loadAlertConfigs() { loading.value = true; try { @@ -48,7 +44,7 @@ async function loadAlertConfigs() { } } -// 组件挂载时加载数据 +/** 初始化 **/ onMounted(() => { loadAlertConfigs(); }); @@ -58,7 +54,7 @@ onMounted(() => {