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