fix(系统设置): 修复系统设置资源池容量任务排队展示bug
This commit is contained in:
parent
a073813804
commit
c0133cc8f0
|
@ -24,6 +24,7 @@
|
|||
:preview-url="props.previewUrl"
|
||||
class="w-full"
|
||||
:limit-length="1000"
|
||||
:auto-height="false"
|
||||
placeholder="ms.comment.enterPlaceHolderTip"
|
||||
/>
|
||||
<a-textarea
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import { ExecuteStatusEnum } from '@/enums/taskCenter';
|
||||
// Node 类型资源信息
|
||||
export interface NodesListItem {
|
||||
ip: string;
|
||||
|
@ -70,7 +71,7 @@ export interface CapacityTaskItem {
|
|||
resourceId: string;
|
||||
resourceName: string;
|
||||
taskOrigin: string; // 任务来源(任务组下的任务id
|
||||
status: string; // 执行状态
|
||||
status: ExecuteStatusEnum; // 执行状态
|
||||
result: string; // 执行结果
|
||||
resourcePoolId: string;
|
||||
resourcePoolNode: string;
|
||||
|
@ -86,7 +87,7 @@ export interface CapacityTaskItem {
|
|||
userName: string;
|
||||
resourcePoolName: string;
|
||||
triggerMode: string;
|
||||
lineNum: number;
|
||||
lineNum: string;
|
||||
}
|
||||
|
||||
export interface CapacityDetailType {
|
||||
|
|
|
@ -67,6 +67,9 @@
|
|||
<template #triggerMode="{ record }">
|
||||
{{ t(executeMethodMap[record.triggerMode]) }}
|
||||
</template>
|
||||
<template #lineNum="{ record }">
|
||||
{{ getLineNum(record) }}
|
||||
</template>
|
||||
<template #[FilterSlotNameEnum.API_TEST_CASE_API_REPORT_STATUS]="{ filterContent }">
|
||||
<ExecutionStatus :module-type="ReportEnum.API_REPORT" :status="filterContent.value" />
|
||||
</template>
|
||||
|
@ -96,11 +99,17 @@
|
|||
import { useI18n } from '@/hooks/useI18n';
|
||||
import { useTableStore } from '@/store';
|
||||
|
||||
import type { CapacityDetailType, NodesListItem, ResourcePoolItem } from '@/models/setting/resourcePool';
|
||||
import type {
|
||||
CapacityDetailType,
|
||||
CapacityTaskItem,
|
||||
NodesListItem,
|
||||
ResourcePoolItem,
|
||||
} from '@/models/setting/resourcePool';
|
||||
import { ReportExecStatus } from '@/enums/apiEnum';
|
||||
import { ReportEnum, ReportStatus } from '@/enums/reportEnum';
|
||||
import { TableKeyEnum } from '@/enums/tableEnum';
|
||||
import { FilterSlotNameEnum } from '@/enums/tableFilterEnum';
|
||||
import { ExecuteStatusEnum } from '@/enums/taskCenter';
|
||||
|
||||
import { executeMethodMap } from '@/views/taskCenter/component/config';
|
||||
|
||||
|
@ -209,6 +218,7 @@
|
|||
},
|
||||
{
|
||||
title: 'ms.taskCenter.queue',
|
||||
slotName: 'lineNum',
|
||||
dataIndex: 'lineNum',
|
||||
width: 100,
|
||||
showDrag: true,
|
||||
|
@ -366,6 +376,19 @@
|
|||
}
|
||||
}
|
||||
|
||||
function getLineNum(record: CapacityTaskItem) {
|
||||
if (record.lineNum) {
|
||||
return record.lineNum;
|
||||
}
|
||||
if (
|
||||
[ExecuteStatusEnum.COMPLETED, ExecuteStatusEnum.STOPPED, ExecuteStatusEnum.RUNNING].includes(record.status) ||
|
||||
!record.resourcePoolNode
|
||||
) {
|
||||
return '-';
|
||||
}
|
||||
return t('ms.taskCenter.waitQueue');
|
||||
}
|
||||
|
||||
function changeNode() {
|
||||
searchList();
|
||||
initCapacityDetail();
|
||||
|
|
Loading…
Reference in New Issue