perf: 列表中支持下次执行时间显示

This commit is contained in:
xiaojunnuo
2026-02-15 14:19:16 +08:00
parent 66ac4716f2
commit a3cabd5f36
7 changed files with 55 additions and 5 deletions
@@ -9,7 +9,7 @@ export function getCronNextTimes(cron: string, count: number = 1) {
const interval = parser.parseExpression(cron);
for (let i = 0; i < count; i++) {
const next = interval.next().getTime();
nextTimes.push(dayjs(next).format("YYYY-MM-DD HH:mm:ss"));
nextTimes.push(dayjs(next).valueOf());
}
return nextTimes;
}
@@ -160,6 +160,7 @@ export default {
updateTime: "Update Time",
triggerType: "Trigger Type",
pipelineId: "Pipeline Id",
nextRunTime: "Next Run Time",
},
pi: {
@@ -167,6 +167,7 @@ export default {
updateTime: "更新时间",
triggerType: "触发类型",
pipelineId: "流水线Id",
nextRunTime: "下次运行时间",
},
pi: {
validTime: "流水线有效期",
@@ -352,6 +352,7 @@ export default function ({ crudExpose, context: { selectedRowKeys, openCertApply
column: {
align: "center",
width: 120,
show: false,
sorter: true,
},
form: {
@@ -464,6 +465,18 @@ export default function ({ crudExpose, context: { selectedRowKeys, openCertApply
align: "center",
},
},
nextRunTime: {
title: t("certd.fields.nextRunTime"),
type: "datetime",
form: {
show: false,
},
column: {
sorter: true,
width: 150,
align: "center",
},
},
disabled: {
title: t("certd.fields.enabled"),
type: "dict-switch",
@@ -885,6 +885,7 @@ export default defineComponent({
saveLoading.value = false;
}
};
const edit = () => {
pipeline.value = cloneDeep(currentPipeline.value);
currentHistory.value = null;