diff --git a/src/locales/langs/en-us.ts b/src/locales/langs/en-us.ts index 731e679..65f7608 100644 --- a/src/locales/langs/en-us.ts +++ b/src/locales/langs/en-us.ts @@ -740,6 +740,26 @@ const local: App.I18n.Schema = { random: '随机等待' } }, + retryLog: { + title: 'RetryLog List', + UniqueId: 'UniqueId', + groupName: 'Group name', + sceneName: 'Scene name', + retryStatus: 'Retry status', + taskType: 'Task type', + idempotentId: 'Idempotent ID', + bizNo: 'Business Number', + createDt: 'Creation time', + 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' + }, + addRetryLog: 'Add Retry log', + editRetryLog: 'Add Retry log' + }, workflowBatch: { title: 'Workflow Batch List', workflowName: 'Workflow name', diff --git a/src/locales/langs/zh-cn.ts b/src/locales/langs/zh-cn.ts index 51e91c1..743702a 100644 --- a/src/locales/langs/zh-cn.ts +++ b/src/locales/langs/zh-cn.ts @@ -736,6 +736,26 @@ const local: App.I18n.Schema = { random: '随机等待' } }, + retryLog: { + title: 'RetryLog 列表', + UniqueId: 'UniqueId', + groupName: '组名称', + sceneName: '场景名称', + retryStatus: '重试状态', + taskType: '任务类型', + idempotentId: '幂等id', + bizNo: '业务编号', + createDt: '创建时间', + form: { + groupName: '请输入组名称', + idempotentId: '请输入幂等id', + sceneName: '请输入场景名称', + bizNo: '请输入业务编号', + UniqueId: '请输入UniqueId' + }, + addRetryLog: '新增重试日志', + editRetryLog: '编辑重试日志' + }, workflow: { title: '工作流列表', workflowName: '工作流名称', diff --git a/src/service/api/retry.ts b/src/service/api/retry.ts index 159de3a..cb99a0e 100644 --- a/src/service/api/retry.ts +++ b/src/service/api/retry.ts @@ -43,3 +43,12 @@ export function fetchUpdateSceneStatus(id: number, status: number) { method: 'put' }); } + +/** update retry log list */ +export function fetchRetryLogPageList(params?: Api.RetryLog.RetryLogSearchParams) { + return request({ + url: '/retry-task-log/list', + method: 'put', + params + }); +} diff --git a/src/typings/api.d.ts b/src/typings/api.d.ts index d72ba06..fc6520b 100644 --- a/src/typings/api.d.ts +++ b/src/typings/api.d.ts @@ -822,6 +822,7 @@ declare namespace Api { * backend api module: "jobTask" */ namespace Job { + import EnableStatusNumber = Api.Common.EnableStatusNumber; type CommonSearchParams = Pick; /** Job */ @@ -839,7 +840,7 @@ declare namespace Api { /** 下次触发时间 */ nextTriggerAt: string; /** 状态 */ - jobStatus: string; + jobStatus: EnableStatusNumber; /** 路由策略 */ routeKey: string; /** 执行器类型 */ @@ -916,19 +917,60 @@ declare namespace Api { /** 执行时间 */ executionAt: string; /** 状态 */ - taskBatchStatus: string; + taskBatchStatus: Common.TaskBatchStatus; /** 操作原因 */ - operationReason: string; + operationReason: Common.OperationReason; /** 创建时间 */ createDt: string; }>; /** workflowBatch search params */ type WorkflowBatchSearchParams = CommonType.RecordNullable< - Pick & CommonSearchParams + Pick & + CommonSearchParams >; /** workflowBatch list */ type WorkflowBatchList = Common.PaginatingQueryRecord; } + + /** + * namespace RetryLog + * + * backend api module: "retryLog" + */ + namespace RetryLog { + import RetryStatusType = Api.RetryTask.RetryStatusType; + import TaskType = Api.RetryTask.TaskType; + type CommonSearchParams = Pick; + + /** retryLog */ + type RetryLog = Common.CommonRecord<{ + /** UniqueId */ + UniqueId: string; + /** 组名称 */ + groupName: string; + /** 场景名称 */ + sceneName: string; + /** 重试状态 */ + retryStatus: RetryStatusType; + /** 任务类型 */ + taskType: TaskType; + /** 幂等id */ + idempotentId: string; + /** 业务编号 */ + bizNo: string; + /** 创建时间 */ + createDt: string; + }>; + + /** retryLog search params */ + type RetryLogSearchParams = CommonType.RecordNullable< + Pick & + CommonSearchParams + >; + + /** retryLog list */ + type RetryLogList = Common.PaginatingQueryRecord; + } } diff --git a/src/typings/app.d.ts b/src/typings/app.d.ts index 31efad4..b311712 100644 --- a/src/typings/app.d.ts +++ b/src/typings/app.d.ts @@ -903,6 +903,26 @@ declare namespace App { random: string; }; }; + retryLog: { + title: string; + UniqueId: string; + groupName: string; + sceneName: string; + retryStatus: string; + taskType: string; + idempotentId: string; + bizNo: string; + createDt: string; + form: { + groupName: string; + idempotentId: string; + sceneName: string; + bizNo: string; + UniqueId: string; + }; + addRetryLog: string; + editRetryLog: string; + }; workflow: { title: string; workflowName: string; diff --git a/src/views/job/task/modules/job-task-operate-drawer.vue b/src/views/job/task/modules/job-task-operate-drawer.vue index e1474e4..986fcf4 100644 --- a/src/views/job/task/modules/job-task-operate-drawer.vue +++ b/src/views/job/task/modules/job-task-operate-drawer.vue @@ -3,6 +3,8 @@ import { computed, reactive, watch } from 'vue'; import { useFormRules, useNaiveForm } from '@/hooks/common/form'; import OperateDrawer from '@/components/common/operate-drawer.vue'; import { $t } from '@/locales'; +import { translateOptions } from '@/utils/common'; +import { enableStatusNumberOptions } from '@/constants/business'; // import { fetchAddJobTask, fetchEditJobTask } from '@/service/api'; defineOptions({ @@ -67,7 +69,7 @@ function createDefaultModel(): Model { jobName: '', argsStr: '', argsType: '', - jobStatus: '', + jobStatus: 0, routeKey: '', executorType: '', triggerType: '', @@ -171,7 +173,11 @@ watch(visible, () => { - + diff --git a/src/views/retry/log/index.vue b/src/views/retry/log/index.vue new file mode 100644 index 0000000..c9454ec --- /dev/null +++ b/src/views/retry/log/index.vue @@ -0,0 +1,174 @@ + + + + + diff --git a/src/views/retry/log/modules/retry-log-search.vue b/src/views/retry/log/modules/retry-log-search.vue new file mode 100644 index 0000000..0f39302 --- /dev/null +++ b/src/views/retry/log/modules/retry-log-search.vue @@ -0,0 +1,46 @@ + + + + + diff --git a/src/views/workflow/batch/modules/workflow-batch-search.vue b/src/views/workflow/batch/modules/workflow-batch-search.vue index d10480a..199a5e3 100644 --- a/src/views/workflow/batch/modules/workflow-batch-search.vue +++ b/src/views/workflow/batch/modules/workflow-batch-search.vue @@ -2,6 +2,7 @@ import { ref } from 'vue'; import { $t } from '@/locales'; import SelectGroup from '@/components/common/select-group.vue'; +import TaskBatchStatus from '@/components/common/task-batch-status.vue'; import { fetchGetWorkflowNameList } from '@/service/api'; @@ -56,7 +57,7 @@ async function groupNameUpdate(groupName: string) { path="taskBatchStatus" class="pr-24px" > - +