refactor: 第一批低风险收敛——任务缓存服务泛型化 + 前端死代码清理与状态映射统一
This commit is contained in:
@@ -271,6 +271,7 @@ import { passGuard } from "@/shared/dispatch-guard-ui";
|
||||
import ZiniaoVersionSetting from "@/shared/components/ZiniaoVersionSetting.vue";
|
||||
import { useZiniaoVersion } from "@/shared/utils/ziniao-version";
|
||||
import { formatDateTime } from '@/shared/utils/datetime'
|
||||
import { RUNNING_UNTIL_DONE_STATUS_OPTIONS, taskStatusClass, taskStatusText } from '@/shared/utils/task-status-text'
|
||||
import { useHistoryPolling } from '@/shared/composables/useHistoryPolling'
|
||||
import { runBatchDelete } from '@/shared/utils/batch-delete'
|
||||
import { isRecordMissingError, parseTaskStartTimes, removeTaskStartTime, upsertTaskStartTime } from '@/shared/utils/task-queue-state.ts'
|
||||
@@ -658,17 +659,11 @@ function isTaskTerminal(status?: string) {
|
||||
}
|
||||
|
||||
function statusText(status?: string) {
|
||||
if (status === "SUCCESS" || status === "COMPLETED") return "已完成";
|
||||
if (status === "FAILED") return "失败";
|
||||
return "执行中";
|
||||
return taskStatusText(status, RUNNING_UNTIL_DONE_STATUS_OPTIONS);
|
||||
}
|
||||
|
||||
function statusClass(status?: string) {
|
||||
return status === "SUCCESS" || status === "COMPLETED"
|
||||
? "success"
|
||||
: status === "FAILED"
|
||||
? "failed"
|
||||
: "running";
|
||||
return taskStatusClass(status, RUNNING_UNTIL_DONE_STATUS_OPTIONS);
|
||||
}
|
||||
|
||||
function canDownload(item: WithdrawTaskGroupItem) {
|
||||
|
||||
Reference in New Issue
Block a user