fix(iot): 修复 IoT 场景联动最近触发时间不显示

- 对齐后端字段 lastTriggerTime
- 修复 web-antd、web-ele、web-antdv-next 的 API 类型、表格列和插槽读取
pull/361/MERGE
YunaiV 2026-06-07 14:55:30 +08:00
parent 413ec8c060
commit 21998d8044
9 changed files with 18 additions and 18 deletions

View File

@ -11,7 +11,7 @@ export namespace RuleSceneApi {
status?: number; status?: number;
triggers?: Trigger[]; triggers?: Trigger[];
actions?: Action[]; actions?: Action[];
lastTriggeredTime?: Date; lastTriggerTime?: Date;
createTime?: Date; createTime?: Date;
} }

View File

@ -69,10 +69,10 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
slots: { default: 'actionsCol' }, slots: { default: 'actionsCol' },
}, },
{ {
field: 'lastTriggeredTime', field: 'lastTriggerTime',
title: '最近触发', title: '最近触发',
width: 180, width: 180,
slots: { default: 'lastTriggeredTime' }, slots: { default: 'lastTriggerTime' },
}, },
{ {
field: 'createTime', field: 'createTime',

View File

@ -354,9 +354,9 @@ const [Grid, gridApi] = useVbenVxeGrid({
<Tag color="success" class="m-0">{{ getActionSummary(row) }}</Tag> <Tag color="success" class="m-0">{{ getActionSummary(row) }}</Tag>
</template> </template>
<!-- 最近触发列 --> <!-- 最近触发列 -->
<template #lastTriggeredTime="{ row }"> <template #lastTriggerTime="{ row }">
<span v-if="row.lastTriggeredTime"> <span v-if="row.lastTriggerTime">
{{ formatDateTime(row.lastTriggeredTime) }} {{ formatDateTime(row.lastTriggerTime) }}
</span> </span>
<span v-else class="text-muted-foreground">未触发</span> <span v-else class="text-muted-foreground">未触发</span>
</template> </template>

View File

@ -11,7 +11,7 @@ export namespace RuleSceneApi {
status?: number; status?: number;
triggers?: Trigger[]; triggers?: Trigger[];
actions?: Action[]; actions?: Action[];
lastTriggeredTime?: Date; lastTriggerTime?: Date;
createTime?: Date; createTime?: Date;
} }

View File

@ -69,10 +69,10 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
slots: { default: 'actionsCol' }, slots: { default: 'actionsCol' },
}, },
{ {
field: 'lastTriggeredTime', field: 'lastTriggerTime',
title: '最近触发', title: '最近触发',
width: 180, width: 180,
slots: { default: 'lastTriggeredTime' }, slots: { default: 'lastTriggerTime' },
}, },
{ {
field: 'createTime', field: 'createTime',

View File

@ -354,9 +354,9 @@ const [Grid, gridApi] = useVbenVxeGrid({
<Tag color="success" class="m-0">{{ getActionSummary(row) }}</Tag> <Tag color="success" class="m-0">{{ getActionSummary(row) }}</Tag>
</template> </template>
<!-- 最近触发列 --> <!-- 最近触发列 -->
<template #lastTriggeredTime="{ row }"> <template #lastTriggerTime="{ row }">
<span v-if="row.lastTriggeredTime"> <span v-if="row.lastTriggerTime">
{{ formatDateTime(row.lastTriggeredTime) }} {{ formatDateTime(row.lastTriggerTime) }}
</span> </span>
<span v-else class="text-muted-foreground">未触发</span> <span v-else class="text-muted-foreground">未触发</span>
</template> </template>

View File

@ -11,7 +11,7 @@ export namespace RuleSceneApi {
status?: number; status?: number;
triggers?: Trigger[]; triggers?: Trigger[];
actions?: Action[]; actions?: Action[];
lastTriggeredTime?: Date; lastTriggerTime?: Date;
createTime?: Date; createTime?: Date;
} }

View File

@ -69,10 +69,10 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
slots: { default: 'actionsCol' }, slots: { default: 'actionsCol' },
}, },
{ {
field: 'lastTriggeredTime', field: 'lastTriggerTime',
title: '最近触发', title: '最近触发',
width: 180, width: 180,
slots: { default: 'lastTriggeredTime' }, slots: { default: 'lastTriggerTime' },
}, },
{ {
field: 'createTime', field: 'createTime',

View File

@ -357,9 +357,9 @@ const [Grid, gridApi] = useVbenVxeGrid({
<ElTag type="success" class="m-0">{{ getActionSummary(row) }}</ElTag> <ElTag type="success" class="m-0">{{ getActionSummary(row) }}</ElTag>
</template> </template>
<!-- 最近触发列 --> <!-- 最近触发列 -->
<template #lastTriggeredTime="{ row }"> <template #lastTriggerTime="{ row }">
<span v-if="row.lastTriggeredTime"> <span v-if="row.lastTriggerTime">
{{ formatDateTime(row.lastTriggeredTime) }} {{ formatDateTime(row.lastTriggerTime) }}
</span> </span>
<span v-else class="text-muted-foreground">未触发</span> <span v-else class="text-muted-foreground">未触发</span>
</template> </template>