feat(sj_1.2.0-beta1): JobBatch添加[执行时长]

This commit is contained in:
dhb52 2024-08-16 23:06:57 +08:00
parent 7a255da9fa
commit 509905e7b4
5 changed files with 18 additions and 0 deletions

View File

@ -830,6 +830,7 @@ const local: App.I18n.Schema = {
executorInfo: 'Executor Name',
executorType: 'Executor type',
executionAt: 'Start execution time',
duration: 'Execution duration (s)',
taskBatchStatus: 'Task Batch Status',
operationReason: 'Reason for operation',
form: {

View File

@ -837,6 +837,7 @@ const local: App.I18n.Schema = {
executorInfo: '执行器名称',
executorType: '执行器类型',
executionAt: '开始执行时间',
duration: '执行时长(秒)',
taskBatchStatus: '状态',
operationReason: '操作原因',
form: {

View File

@ -1113,6 +1113,8 @@ declare namespace Api {
taskBatchStatus: Common.TaskBatchStatus;
/** 开始执行时间 */
executionAt: string;
/** 执行时长(virtual) */
duration?: number;
/** 操作原因 */
operationReason: Common.OperationReason;
/** 执行器类型 */

View File

@ -1037,6 +1037,7 @@ declare namespace App {
executorInfo: string;
executorType: string;
executionAt: string;
duration: string;
taskBatchStatus: string;
operationReason: string;
form: {

View File

@ -2,6 +2,7 @@
import { NButton, NPopconfirm, NTag, NTooltip } from 'naive-ui';
import { useBoolean } from '@sa/hooks';
import { ref } from 'vue';
import dayjs from 'dayjs';
import {
fetchBatchDeleteJobBatch,
fetchDeleteJobBatch,
@ -123,6 +124,18 @@ const { columnChecks, columns, data, getData, loading, mobilePagination, searchP
align: 'center',
width: 120
},
{
key: 'duration',
title: $t('page.jobBatch.duration'),
align: 'center',
width: 120,
render: row => {
if (row.taskBatchStatus === 3) {
return Math.round(dayjs(row.updateDt).diff(dayjs(row.executionAt)) / 1000);
}
return null;
}
},
{
key: 'taskBatchStatus',
title: $t('page.jobBatch.taskBatchStatus'),