diff --git a/src/constants/business.ts b/src/constants/business.ts index 5ea1bf7..d811474 100644 --- a/src/constants/business.ts +++ b/src/constants/business.ts @@ -90,10 +90,10 @@ export const groupConfigYesOrNoRecord: Record = { - 0: 'page.retryTask.retryStatusType.retrying', - 1: 'page.retryTask.retryStatusType.finished', - 2: 'page.retryTask.retryStatusType.maxRetry', - 3: 'page.retryTask.retryStatusType.paused' + 0: 'page.retry.retryStatusType.retrying', + 1: 'page.retry.retryStatusType.finished', + 2: 'page.retry.retryStatusType.maxRetry', + 3: 'page.retry.retryStatusType.paused' }; export const retryStatusTypeOptions = transformRecordToNumberOption(retryStatusTypeRecord); @@ -108,8 +108,8 @@ export const retryTaskStatusTypeRecord: Record = { - 1: 'page.retryTask.taskTypeDict.retry', - 2: 'page.retryTask.taskTypeDict.callback' + 1: 'page.retry.taskTypeDict.retry', + 2: 'page.retry.taskTypeDict.callback' }; export const retryTaskTypeOptions = transformRecordToNumberOption(retryTaskTypeRecord); @@ -273,6 +273,21 @@ export const operationReasonRecord: Record = { + 0: 'common.retryOperationReason.items.none', + 1: 'common.retryOperationReason.items.taskExecutionTimeout', + 2: 'common.retryOperationReason.items.notClient', + 3: 'common.retryOperationReason.items.closed', + 4: 'common.retryOperationReason.items.discard', + 5: 'common.retryOperationReason.items.overlay', + 6: 'common.retryOperationReason.items.taskExecutionError', + 7: 'common.retryOperationReason.items.mannerStop', + 8: 'common.retryOperationReason.items.noRunningRetry', + 9: 'common.retryOperationReason.items.sceneClosed', + 10: 'common.retryOperationReason.items.retryFail' +}; +export const retryOperationReasonOptions = transformRecordToNumberOption(retryOperationReasonRecord); + export const jobOperationReasonEnum: Workflow.JobTagType = { 0: { name: operationReasonRecord[0], diff --git a/src/locales/langs/en-us.ts b/src/locales/langs/en-us.ts index 007dba3..310b7a0 100644 --- a/src/locales/langs/en-us.ts +++ b/src/locales/langs/en-us.ts @@ -220,6 +220,25 @@ const local: App.I18n.Schema = { workflowDecisionFailed: 'Workflow decision failed' } }, + retryOperationReason: { + label: 'Job Operation Reason', + form: 'Please enter job operation reason', + items: { + none: 'None', + taskExecutionTimeout: 'Task execution timeout', + notClient: 'No client', + closed: 'Job closed', + discard: 'Job discard', + overlay: 'Job overlapped', + notExecutionTask: 'No execution task', + taskExecutionError: 'Execution error', + mannerStop: 'Manual stop', + noRunningRetry: 'No running retry', + sceneClosed: 'Scene closed', + retryFail: 'Retry failed', + clientTriggerRetryStop: 'Client trigger stop' + } + }, updateDt: 'Updated Time', createDt: 'Created Time', today: 'Today', @@ -652,10 +671,9 @@ const local: App.I18n.Schema = { createDt: 'Please enter createDt' } }, - retryTask: { - title: 'RetryTask List', - detail: 'RetryTask Detail', - uniqueId: 'UniqueId', + retry: { + title: 'Retry List', + detail: 'Retry Detail', groupName: 'Group name', sceneName: 'Scene name', idempotentId: 'Idempotent ID', @@ -689,9 +707,9 @@ const local: App.I18n.Schema = { callback: 'Callback data' }, generateIdempotentId: 'Generate by client', - addRetryTask: 'Add Retry task', - editRetryTask: 'Add Retry task', - batchAddRetryTask: 'Batch add retry task' + addRetry: 'Add Retry task', + editRetry: 'Add Retry task', + batchAddRetry: 'Batch add retry task' }, retryScene: { title: 'Scene List', @@ -741,10 +759,9 @@ const local: App.I18n.Schema = { random: 'Random delay' } }, - retryLog: { - title: 'RetryLog List', - detail: 'Retry Log Detail', - UniqueId: 'UniqueId', + retryTask: { + title: 'Retry Task List', + detail: 'Retry Task Detail', groupName: 'Group name', sceneName: 'Scene name', retryStatus: 'Retry status', @@ -752,16 +769,15 @@ const local: App.I18n.Schema = { idempotentId: 'Idempotent ID', bizNo: 'Business Number', createDt: 'Creation time', - + operationReason: 'Operation reason', form: { groupName: 'Please enter Group name', idempotentId: 'Please enter Idempotent ID', sceneName: 'Please enter Scene name', - bizNo: 'Please enter Business Number', - UniqueId: 'Please enter UniqueId' + bizNo: 'Please enter Business Number' }, - addRetryLog: 'Add Retry log', - editRetryLog: 'Add Retry log' + addRetryTask: 'Add Retry Task', + editRetryTask: 'Add Retry Task' }, workflowBatch: { title: 'Workflow Batch List', diff --git a/src/locales/langs/zh-cn.ts b/src/locales/langs/zh-cn.ts index 6eec867..6c5c5b5 100644 --- a/src/locales/langs/zh-cn.ts +++ b/src/locales/langs/zh-cn.ts @@ -220,6 +220,25 @@ const local: App.I18n.Schema = { workflowDecisionFailed: '判定未通过' } }, + retryOperationReason: { + label: '操作原因', + form: '请选择执行状态', + items: { + none: '无', + taskExecutionTimeout: '任务执行超时', + notClient: '无客户端节点', + closed: '任务已关闭', + discard: '任务丢弃', + overlay: '任务被覆盖', + notExecutionTask: '无可执行任务项', + taskExecutionError: '任务执行期间发生非预期异常', + mannerStop: '手动停止', + noRunningRetry: '当前重试非运行中', + sceneClosed: '当前场景已关闭', + retryFail: '重试失败', + clientTriggerRetryStop: '客户端触发任务停止' + } + }, updateDt: '更新时间', createDt: '创建时间', today: '今天', @@ -660,10 +679,9 @@ const local: App.I18n.Schema = { createDt: '请输入创建时间' } }, - retryTask: { - title: '重试任务列表', - detail: '重试任务详情', - uniqueId: 'UniqueId', + retry: { + title: '重试列表', + detail: '重试详情', groupName: '组名称', sceneName: '场景名称', idempotentId: '幂等ID', @@ -671,9 +689,9 @@ const local: App.I18n.Schema = { executorName: '执行器名称', argsStr: '方法参数', nextTriggerAt: '下次触发时间', - retryCount: '重试次数', - retryStatus: '重试状态', - taskType: '任务类型', + retryCount: '次数', + retryStatus: '状态', + taskType: '类型', form: { retryStatus: '请输入重试状态', bizNo: '请输入业务编号', @@ -697,9 +715,9 @@ const local: App.I18n.Schema = { callback: '回调数据' }, generateIdempotentId: '通过客户端生成', - addRetryTask: '新增重试任务', - editRetryTask: '编辑重试任务', - batchAddRetryTask: '批量新增重试任务' + addRetry: '新增重试', + editRetry: '编辑重试', + batchAddRetry: '批量新增' }, retryScene: { title: '场景列表', @@ -749,26 +767,25 @@ const local: App.I18n.Schema = { random: '随机等待' } }, - retryLog: { - title: '重试日志列表', - detail: '重试日志详情', - UniqueId: 'UniqueId', + retryTask: { + title: '重试任务列表', + detail: '重试详情', groupName: '组名称', sceneName: '场景名称', - retryStatus: '重试状态', - taskType: '任务类型', - idempotentId: '幂等id', + retryStatus: '状态', + taskType: '类型', + idempotentId: '幂等ID', bizNo: '业务编号', createDt: '创建时间', + operationReason: '操作原因', form: { groupName: '请输入组名称', idempotentId: '请输入幂等id', sceneName: '请输入场景名称', - bizNo: '请输入业务编号', - UniqueId: '请输入UniqueId' + bizNo: '请输入业务编号' }, - addRetryLog: '新增重试日志', - editRetryLog: '编辑重试日志' + addRetryTask: '新增重试任务', + editRetryTask: '编辑重试任务' }, workflow: { title: '工作流列表', diff --git a/src/typings/api.d.ts b/src/typings/api.d.ts index d2fba7d..c6f1cc1 100644 --- a/src/typings/api.d.ts +++ b/src/typings/api.d.ts @@ -114,6 +114,9 @@ declare namespace Api { * 13、节点关闭跳过执行 14、判定未通过 */ type OperationReason = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14; + + /** 1、任务执行超时 2、无客户端节点 3、JOB已关闭 4、任务丢弃 5、任务被覆盖 6、无可执行任务项 7、任务执行期间发生非预期异常 8、手动停止 8、当前重试非运行中 9、当前场景已关闭 10、重试失败 */ + type RetryOperationReason = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10; } /** diff --git a/src/typings/app.d.ts b/src/typings/app.d.ts index 9b0f228..c61a167 100644 --- a/src/typings/app.d.ts +++ b/src/typings/app.d.ts @@ -501,6 +501,25 @@ declare namespace App { workflowDecisionFailed: string; }; }; + retryOperationReason: { + label: string; + form: string; + items: { + none: string; + taskExecutionTimeout: string; + notClient: string; + closed: string; + discard: string; + overlay: string; + notExecutionTask: string; + taskExecutionError: string; + mannerStop: string; + noRunningRetry: string; + sceneClosed: string; + retryFail: string; + clientTriggerRetryStop: string; + }; + }; updateDt: string; createDt: string; today: string; @@ -860,10 +879,9 @@ declare namespace App { createDt: string; }; }; - retryTask: { + retry: { title: string; detail: string; - uniqueId: string; groupName: string; sceneName: string; idempotentId: string; @@ -897,9 +915,9 @@ declare namespace App { callback: string; }; generateIdempotentId: string; - addRetryTask: string; - editRetryTask: string; - batchAddRetryTask: string; + addRetry: string; + editRetry: string; + batchAddRetry: string; }; retryScene: { title: string; @@ -949,10 +967,9 @@ declare namespace App { random: string; }; }; - retryLog: { + retryTask: { title: string; detail: string; - UniqueId: string; groupName: string; sceneName: string; retryStatus: string; @@ -960,15 +977,15 @@ declare namespace App { idempotentId: string; bizNo: string; createDt: string; + operationReason: string; form: { groupName: string; idempotentId: string; sceneName: string; bizNo: string; - UniqueId: string; }; - addRetryLog: string; - editRetryLog: string; + addRetryTask: string; + editRetryTask: string; }; workflow: { title: string; diff --git a/src/views/_builtin/log/index.vue b/src/views/_builtin/log/index.vue index 9570e15..4373d38 100644 --- a/src/views/_builtin/log/index.vue +++ b/src/views/_builtin/log/index.vue @@ -33,7 +33,7 @@ const title = computed(() => { } if (type.value === 'retry') { - return `${$t('common.systemTaskType.retry') + $t('page.log.title')} ------ ${$t('page.retryLog.groupName')}: ${groupName}, ${$t('page.retryLog.UniqueId')}: ${uniqueId}`; + return `${$t('common.systemTaskType.retry') + $t('page.log.title')} ------ ${$t('page.retryTask.groupName')}: ${groupName}, ${$t('page.retryTask.title')}: ${uniqueId}`; } return $t('page.log.title'); diff --git a/src/views/retry/info/index.vue b/src/views/retry/info/index.vue index 4373453..aeb5baf 100644 --- a/src/views/retry/info/index.vue +++ b/src/views/retry/info/index.vue @@ -51,6 +51,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP title: $t('common.index'), align: 'center', width: 128, + fixed: 'left', render: row => { async function showDetailDrawer() { await loadRetryInfo(row); @@ -66,36 +67,36 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP }, { key: 'groupName', - title: $t('page.retryTask.groupName'), - align: 'left', + title: $t('page.retry.groupName'), + align: 'center', resizable: true, minWidth: 120, maxWidth: 250 }, { key: 'sceneName', - title: $t('page.retryTask.sceneName'), - align: 'left', + title: $t('page.retry.sceneName'), + align: 'center', minWidth: 120 }, { key: 'nextTriggerAt', - title: $t('page.retryTask.nextTriggerAt'), - align: 'left', + title: $t('page.retry.nextTriggerAt'), + align: 'center', resizable: true, - minWidth: 120, + minWidth: 80, maxWidth: 150 }, { key: 'retryCount', - title: $t('page.retryTask.retryCount'), + title: $t('page.retry.retryCount'), align: 'center', width: 80 }, { key: 'retryStatus', - title: $t('page.retryTask.retryStatus'), - align: 'left', + title: $t('page.retry.retryStatus'), + align: 'center', width: 120, render: row => { if (row.retryStatus === null) { @@ -108,8 +109,8 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP }, { key: 'taskType', - title: $t('page.retryTask.taskType'), - align: 'left', + title: $t('page.retry.taskType'), + align: 'center', width: 100, render: row => { if (row.taskType === null) { @@ -126,16 +127,15 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP }, { key: 'idempotentId', - title: $t('page.retryTask.idempotentId'), - align: 'left', + title: $t('page.retry.idempotentId'), + align: 'center', resizable: true, - minWidth: 150, - maxWidth: 300 + minWidth: 120 }, { key: 'bizNo', - title: $t('page.retryTask.bizNo'), - align: 'left', + title: $t('page.retry.bizNo'), + align: 'center', resizable: true, minWidth: 150, maxWidth: 300 @@ -317,7 +317,7 @@ onMounted(async () => {
{