fix(任务中心): bugFix
This commit is contained in:
parent
307f58d36f
commit
b5a8bd541f
|
@ -78,7 +78,7 @@ export function organizationTaskOrder(data: string[]) {
|
|||
|
||||
// 组织任务-批量停止任务
|
||||
export function organizationBatchStopTask(data: TaskCenterBatchParams) {
|
||||
return MSR.get({ url: organizationBatchStopTaskUrl, data });
|
||||
return MSR.post({ url: organizationBatchStopTaskUrl, data });
|
||||
}
|
||||
|
||||
// 组织任务-用例任务详情-停止任务
|
||||
|
|
|
@ -85,7 +85,7 @@ export function projectTaskOrder(data: string[]) {
|
|||
|
||||
// 项目任务-批量停止任务
|
||||
export function projectBatchStopTask(data: TaskCenterBatchParams) {
|
||||
return MSR.get({ url: projectBatchStopTaskUrl, data });
|
||||
return MSR.post({ url: projectBatchStopTaskUrl, data });
|
||||
}
|
||||
|
||||
// 项目任务-用例任务详情-停止任务
|
||||
|
|
|
@ -75,7 +75,7 @@ export function systemStopTask(id: string) {
|
|||
|
||||
// 系统任务-批量停止任务
|
||||
export function systemBatchStopTask(data: TaskCenterBatchParams) {
|
||||
return MSR.get({ url: systemBatchStopTaskUrl, data });
|
||||
return MSR.post({ url: systemBatchStopTaskUrl, data });
|
||||
}
|
||||
|
||||
// 系统任务-用例任务详情-停止任务
|
||||
|
|
|
@ -201,6 +201,7 @@ export default {
|
|||
'common.completed': 'Completed',
|
||||
'common.config': 'Config',
|
||||
'common.executionResult': 'Execution result',
|
||||
'common.executionResultCleaned': 'Execution results are cleaned',
|
||||
'common.expandAllSubModule': 'Expand all submodules',
|
||||
'common.collapseAllSubModule': 'Collapse all submodules',
|
||||
'common.selectedCount': '{count} data selected',
|
||||
|
|
|
@ -185,6 +185,7 @@ export default {
|
|||
'common.belongModule': '所属模块',
|
||||
'common.moreSetting': '更多设置',
|
||||
'common.executionResult': '执行结果',
|
||||
'common.executionResultCleaned': '执行结果被清理',
|
||||
'common.detail': '详情',
|
||||
'common.baseInfo': '基本信息',
|
||||
'common.remark': '备注',
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
</template>
|
||||
<template #operation="{ record, rowIndex }">
|
||||
<div v-if="record.historyDeleted">
|
||||
<a-tooltip :content="t('project.executionHistory.cleared')" position="top">
|
||||
<a-tooltip :content="t('common.executionResultCleaned')" position="top">
|
||||
<MsButton
|
||||
:disabled="
|
||||
record.historyDeleted ||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
</template>
|
||||
<template #operation="{ record }">
|
||||
<div v-if="record.historyDeleted">
|
||||
<a-tooltip :content="t('project.executionHistory.cleared')" position="top">
|
||||
<a-tooltip :content="t('common.executionResultCleaned')" position="top">
|
||||
<MsButton
|
||||
:disabled="
|
||||
record.historyDeleted ||
|
||||
|
|
|
@ -93,7 +93,6 @@
|
|||
import useAppStore from '@/store/modules/app';
|
||||
|
||||
import { TaskCenterTaskItem } from '@/models/taskCenter';
|
||||
import { ReportExecStatus } from '@/enums/apiEnum';
|
||||
import { ReportEnum, ReportStatus, TriggerModeLabel } from '@/enums/reportEnum';
|
||||
import { FilterSlotNameEnum } from '@/enums/tableFilterEnum';
|
||||
import { ExecuteTaskType } from '@/enums/taskCenter';
|
||||
|
@ -136,14 +135,6 @@
|
|||
});
|
||||
});
|
||||
|
||||
const ExecStatusList = computed(() => {
|
||||
return Object.values(ReportExecStatus).map((e) => {
|
||||
return {
|
||||
value: e,
|
||||
key: e,
|
||||
};
|
||||
});
|
||||
});
|
||||
const columns: MsTableColumn = [
|
||||
{
|
||||
title: 'report.name',
|
||||
|
@ -178,21 +169,6 @@
|
|||
showInTable: true,
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: 'report.status',
|
||||
dataIndex: 'execStatus',
|
||||
slotName: 'execStatus',
|
||||
filterConfig: {
|
||||
options: ExecStatusList.value,
|
||||
filterSlotName: FilterSlotNameEnum.API_TEST_CASE_API_REPORT_EXECUTE_RESULT,
|
||||
},
|
||||
sortable: {
|
||||
sortDirections: ['ascend', 'descend'],
|
||||
sorter: true,
|
||||
},
|
||||
showInTable: true,
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: 'report.trigger.mode',
|
||||
dataIndex: 'triggerMode',
|
||||
|
|
|
@ -109,7 +109,9 @@
|
|||
},
|
||||
{
|
||||
label: t('ms.taskCenter.executeEnvInfo'),
|
||||
value: `${res.environmentName} ${res.resourcePoolName} ${res.resourcePoolNode}`,
|
||||
value: `${res.environmentName || t('ms.taskCenter.defaultResourcePool')} ${res.resourcePoolName} ${
|
||||
res.resourcePoolNode
|
||||
}`,
|
||||
class: '!w-[calc(100%/3*2)]',
|
||||
},
|
||||
{
|
||||
|
|
|
@ -161,7 +161,7 @@
|
|||
|
||||
const columns: MsTableColumn = [
|
||||
{
|
||||
title: t('ms.taskCenter.taskID'),
|
||||
title: 'ms.taskCenter.taskID',
|
||||
dataIndex: 'num',
|
||||
width: 100,
|
||||
columnSelectorDisabled: true,
|
||||
|
@ -174,6 +174,7 @@
|
|||
showTooltip: true,
|
||||
width: 200,
|
||||
fixed: 'left',
|
||||
showDrag: true,
|
||||
},
|
||||
{
|
||||
title: 'ms.taskCenter.executeStatus',
|
||||
|
@ -191,6 +192,7 @@
|
|||
sortDirections: ['ascend', 'descend'],
|
||||
sorter: true,
|
||||
},
|
||||
showDrag: true,
|
||||
},
|
||||
{
|
||||
title: 'ms.taskCenter.executeMethod',
|
||||
|
@ -208,6 +210,7 @@
|
|||
sortDirections: ['ascend', 'descend'],
|
||||
sorter: true,
|
||||
},
|
||||
showDrag: true,
|
||||
},
|
||||
{
|
||||
title: 'ms.taskCenter.executeResult',
|
||||
|
@ -226,29 +229,34 @@
|
|||
sortDirections: ['ascend', 'descend'],
|
||||
sorter: true,
|
||||
},
|
||||
showDrag: true,
|
||||
},
|
||||
{
|
||||
title: 'ms.taskCenter.resourcePool',
|
||||
dataIndex: 'resourcePoolName',
|
||||
isStringTag: true,
|
||||
isTag: true,
|
||||
showDrag: true,
|
||||
},
|
||||
{
|
||||
title: 'ms.taskCenter.node',
|
||||
dataIndex: 'resourcePoolNode',
|
||||
slotName: 'resourcePoolNode',
|
||||
width: 180,
|
||||
showDrag: true,
|
||||
},
|
||||
{
|
||||
title: 'ms.taskCenter.queue',
|
||||
dataIndex: 'lineNum',
|
||||
width: 100,
|
||||
showDrag: true,
|
||||
},
|
||||
{
|
||||
title: 'ms.taskCenter.threadID',
|
||||
dataIndex: 'threadId',
|
||||
showTooltip: true,
|
||||
width: 190,
|
||||
showDrag: true,
|
||||
},
|
||||
{
|
||||
title: 'ms.taskCenter.startExecuteTime',
|
||||
|
@ -258,6 +266,7 @@
|
|||
sortDirections: ['ascend', 'descend'],
|
||||
sorter: true,
|
||||
},
|
||||
showDrag: true,
|
||||
},
|
||||
{
|
||||
title: 'ms.taskCenter.endExecuteTime',
|
||||
|
@ -267,12 +276,14 @@
|
|||
sortDirections: ['ascend', 'descend'],
|
||||
sorter: true,
|
||||
},
|
||||
showDrag: true,
|
||||
},
|
||||
{
|
||||
title: 'ms.taskCenter.operationUser',
|
||||
dataIndex: 'userName',
|
||||
width: 100,
|
||||
showTooltip: true,
|
||||
showDrag: true,
|
||||
},
|
||||
{
|
||||
title: 'common.operation',
|
||||
|
@ -328,6 +339,7 @@
|
|||
{
|
||||
label: 'common.stop',
|
||||
eventTag: 'stop',
|
||||
anyPermission: [getCurrentPermission('STOP')],
|
||||
},
|
||||
// {
|
||||
// label: 'ms.taskCenter.rerun',
|
||||
|
|
|
@ -241,7 +241,7 @@
|
|||
const batchModalParams = ref();
|
||||
const columns: MsTableColumn = [
|
||||
{
|
||||
title: 'ID',
|
||||
title: 'ms.taskCenter.taskID',
|
||||
dataIndex: 'num',
|
||||
slotName: 'num',
|
||||
width: 100,
|
||||
|
@ -254,6 +254,7 @@
|
|||
showTooltip: true,
|
||||
width: 200,
|
||||
fixed: 'left',
|
||||
showDrag: true,
|
||||
},
|
||||
{
|
||||
title: 'ms.taskCenter.executeStatus',
|
||||
|
@ -271,6 +272,7 @@
|
|||
sortDirections: ['ascend', 'descend'],
|
||||
sorter: true,
|
||||
},
|
||||
showDrag: true,
|
||||
},
|
||||
{
|
||||
title: 'ms.taskCenter.executeMethod',
|
||||
|
@ -288,6 +290,7 @@
|
|||
sortDirections: ['ascend', 'descend'],
|
||||
sorter: true,
|
||||
},
|
||||
showDrag: true,
|
||||
},
|
||||
{
|
||||
title: 'ms.taskCenter.executeResult',
|
||||
|
@ -306,17 +309,20 @@
|
|||
sortDirections: ['ascend', 'descend'],
|
||||
sorter: true,
|
||||
},
|
||||
showDrag: true,
|
||||
},
|
||||
{
|
||||
title: 'ms.taskCenter.caseCount',
|
||||
dataIndex: 'caseCount',
|
||||
width: 90,
|
||||
showDrag: true,
|
||||
},
|
||||
{
|
||||
title: 'ms.taskCenter.executeFinishedRate',
|
||||
dataIndex: 'executeRate',
|
||||
slotName: 'executeRate',
|
||||
width: 100,
|
||||
showDrag: true,
|
||||
},
|
||||
{
|
||||
title: 'ms.taskCenter.createTime',
|
||||
|
@ -326,6 +332,7 @@
|
|||
sortDirections: ['ascend', 'descend'],
|
||||
sorter: true,
|
||||
},
|
||||
showDrag: true,
|
||||
},
|
||||
{
|
||||
title: 'ms.taskCenter.startTime',
|
||||
|
@ -335,6 +342,7 @@
|
|||
sortDirections: ['ascend', 'descend'],
|
||||
sorter: true,
|
||||
},
|
||||
showDrag: true,
|
||||
},
|
||||
{
|
||||
title: 'ms.taskCenter.endTime',
|
||||
|
@ -344,12 +352,14 @@
|
|||
sortDirections: ['ascend', 'descend'],
|
||||
sorter: true,
|
||||
},
|
||||
showDrag: true,
|
||||
},
|
||||
{
|
||||
title: 'ms.taskCenter.operationUser',
|
||||
dataIndex: 'createUserName',
|
||||
width: 100,
|
||||
showTooltip: true,
|
||||
showDrag: true,
|
||||
},
|
||||
{
|
||||
title: 'common.operation',
|
||||
|
@ -420,6 +430,7 @@
|
|||
{
|
||||
label: 'common.stop',
|
||||
eventTag: 'stop',
|
||||
anyPermission: [getCurrentPermission('STOP')],
|
||||
},
|
||||
// {
|
||||
// label: 'ms.taskCenter.rerun',
|
||||
|
@ -428,6 +439,7 @@
|
|||
{
|
||||
label: 'common.delete',
|
||||
eventTag: 'delete',
|
||||
anyPermission: [getCurrentPermission('DELETE')],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
@ -704,7 +716,8 @@
|
|||
const reportBatchType = ref<ExecuteTaskType>(ExecuteTaskType.API_CASE);
|
||||
const reportBatchTaskId = ref('');
|
||||
function checkReport(record: TaskCenterTaskItem) {
|
||||
if (record.taskType.includes('BATCH')) {
|
||||
if (record.taskType.includes('BATCH') && record.integrated !== true) {
|
||||
// integrated 为 true 时,表示是集成报告,直接查看报告
|
||||
reportModuleType.value = record.taskType.includes('CASE')
|
||||
? ReportEnum.API_REPORT
|
||||
: ReportEnum.API_SCENARIO_REPORT;
|
||||
|
@ -718,7 +731,8 @@
|
|||
ExecuteTaskType.API_SCENARIO,
|
||||
ExecuteTaskType.TEST_PLAN_API_CASE,
|
||||
ExecuteTaskType.TEST_PLAN_API_SCENARIO,
|
||||
].includes(record.taskType)
|
||||
].includes(record.taskType) ||
|
||||
record.integrated === true
|
||||
) {
|
||||
showReportDetail(record);
|
||||
} else if ([ExecuteTaskType.TEST_PLAN_GROUP, ExecuteTaskType.TEST_PLAN].includes(record.taskType)) {
|
||||
|
|
|
@ -115,7 +115,9 @@
|
|||
},
|
||||
{
|
||||
label: t('ms.taskCenter.executeEnvInfo'),
|
||||
value: `${res.environmentName} ${res.poolName} ${res.resourcePoolNode}`,
|
||||
value: `${res.environmentName || t('ms.taskCenter.defaultResourcePool')} ${res.poolName} ${
|
||||
res.resourcePoolNode
|
||||
}`,
|
||||
class: '!w-[calc(100%/3*2)]',
|
||||
},
|
||||
{
|
||||
|
|
|
@ -72,7 +72,12 @@
|
|||
import MsCronSelect from '@/components/pure/ms-cron-select/index.vue';
|
||||
import MsIcon from '@/components/pure/ms-icon-font/index.vue';
|
||||
import MsBaseTable from '@/components/pure/ms-table/base-table.vue';
|
||||
import type { BatchActionParams, BatchActionQueryParams, MsTableColumn } from '@/components/pure/ms-table/type';
|
||||
import type {
|
||||
BatchActionConfig,
|
||||
BatchActionParams,
|
||||
BatchActionQueryParams,
|
||||
MsTableColumn,
|
||||
} from '@/components/pure/ms-table/type';
|
||||
import useTable from '@/components/pure/ms-table/useTable';
|
||||
import MsTag from '@/components/pure/ms-tag/ms-tag.vue';
|
||||
|
||||
|
@ -130,7 +135,7 @@
|
|||
const batchModalParams = ref();
|
||||
const columns: MsTableColumn = [
|
||||
{
|
||||
title: 'ID',
|
||||
title: 'ms.taskCenter.taskID',
|
||||
dataIndex: 'num',
|
||||
slotName: 'num',
|
||||
width: 100,
|
||||
|
@ -142,30 +147,35 @@
|
|||
showTooltip: true,
|
||||
width: 200,
|
||||
fixed: 'left',
|
||||
showDrag: true,
|
||||
},
|
||||
{
|
||||
title: 'common.status',
|
||||
dataIndex: 'status',
|
||||
slotName: 'status',
|
||||
width: 50,
|
||||
showDrag: true,
|
||||
},
|
||||
{
|
||||
title: 'ms.taskCenter.type',
|
||||
dataIndex: 'resourceType',
|
||||
slotName: 'resourceType',
|
||||
width: 120,
|
||||
showDrag: true,
|
||||
},
|
||||
{
|
||||
title: 'ms.taskCenter.runRule',
|
||||
slotName: 'runRule',
|
||||
dataIndex: 'value',
|
||||
width: 220,
|
||||
showDrag: true,
|
||||
},
|
||||
{
|
||||
title: 'ms.taskCenter.operationUser',
|
||||
dataIndex: 'createUserName',
|
||||
width: 150,
|
||||
showTooltip: true,
|
||||
showDrag: true,
|
||||
},
|
||||
{
|
||||
title: 'ms.taskCenter.operationTime',
|
||||
|
@ -175,6 +185,7 @@
|
|||
sortDirections: ['ascend', 'descend'],
|
||||
sorter: true,
|
||||
},
|
||||
showDrag: true,
|
||||
},
|
||||
{
|
||||
title: 'ms.taskCenter.lastFinishTime',
|
||||
|
@ -184,6 +195,7 @@
|
|||
sortDirections: ['ascend', 'descend'],
|
||||
sorter: true,
|
||||
},
|
||||
showDrag: true,
|
||||
},
|
||||
{
|
||||
title: 'ms.taskCenter.nextExecuteTime',
|
||||
|
@ -193,6 +205,7 @@
|
|||
sortDirections: ['ascend', 'descend'],
|
||||
sorter: true,
|
||||
},
|
||||
showDrag: true,
|
||||
},
|
||||
{
|
||||
title: 'common.operation',
|
||||
|
@ -230,15 +243,34 @@
|
|||
|
||||
await tableStore.initColumn(TableKeyEnum.TASK_CENTER_SYSTEM_TASK, columns, 'drawer');
|
||||
|
||||
const tableBatchActions = {
|
||||
function getCurrentPermission(action: 'DELETE' | 'EDIT') {
|
||||
return {
|
||||
system: {
|
||||
DELETE: 'SYSTEM_SCHEDULE_TASK_CENTER:READ+DELETE',
|
||||
EDIT: 'SYSTEM_SCHEDULE_TASK_CENTER:READ+UPDATE',
|
||||
},
|
||||
org: {
|
||||
DELETE: 'ORGANIZATION_SCHEDULE_TASK_CENTER:READ+DELETE',
|
||||
EDIT: 'ORGANIZATION_SCHEDULE_TASK_CENTER:READ+UPDATE',
|
||||
},
|
||||
project: {
|
||||
DELETE: 'PROJECT_SCHEDULE_TASK_CENTER:READ+DELETE',
|
||||
EDIT: 'PROJECT_SCHEDULE_TASK_CENTER:READ+UPDATE',
|
||||
},
|
||||
}[props.type][action];
|
||||
}
|
||||
|
||||
const tableBatchActions: BatchActionConfig = {
|
||||
baseAction: [
|
||||
{
|
||||
label: 'common.open',
|
||||
eventTag: 'open',
|
||||
anyPermission: [getCurrentPermission('EDIT')],
|
||||
},
|
||||
{
|
||||
label: 'common.close',
|
||||
eventTag: 'close',
|
||||
anyPermission: [getCurrentPermission('EDIT')],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
@ -270,23 +302,6 @@
|
|||
}
|
||||
);
|
||||
|
||||
function getCurrentPermission(action: 'DELETE' | 'EDIT') {
|
||||
return {
|
||||
system: {
|
||||
DELETE: 'SYSTEM_SCHEDULE_TASK_CENTER:READ+DELETE',
|
||||
EDIT: 'SYSTEM_SCHEDULE_TASK_CENTER:READ+UPDATE',
|
||||
},
|
||||
org: {
|
||||
DELETE: 'ORGANIZATION_SCHEDULE_TASK_CENTER:READ+DELETE',
|
||||
EDIT: 'ORGANIZATION_SCHEDULE_TASK_CENTER:READ+UPDATE',
|
||||
},
|
||||
project: {
|
||||
DELETE: 'PROJECT_SCHEDULE_TASK_CENTER:READ+DELETE',
|
||||
EDIT: 'PROJECT_SCHEDULE_TASK_CENTER:READ+UPDATE',
|
||||
},
|
||||
}[props.type][action];
|
||||
}
|
||||
|
||||
function searchTask() {
|
||||
setLoadListParams({ keyword: keyword.value });
|
||||
loadList();
|
||||
|
|
|
@ -25,6 +25,7 @@ export default {
|
|||
'ms.taskCenter.executeProgress': 'Execution Progress',
|
||||
'ms.taskCenter.taskID': 'Task ID',
|
||||
'ms.taskCenter.resourcePool': 'Resource Pool',
|
||||
'ms.taskCenter.defaultResourcePool': 'Default Resource Pool',
|
||||
'ms.taskCenter.node': 'Node',
|
||||
'ms.taskCenter.nodeErrorTip': 'Node has an exception, please check',
|
||||
'ms.taskCenter.queue': 'Queue',
|
||||
|
|
|
@ -25,6 +25,7 @@ export default {
|
|||
'ms.taskCenter.executeProgress': '执行进度',
|
||||
'ms.taskCenter.taskID': '任务 ID',
|
||||
'ms.taskCenter.resourcePool': '资源池',
|
||||
'ms.taskCenter.defaultResourcePool': '默认资源池',
|
||||
'ms.taskCenter.node': '节点',
|
||||
'ms.taskCenter.nodeErrorTip': '节点存在异常,请检查',
|
||||
'ms.taskCenter.queue': '排队',
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
</a-tooltip>
|
||||
</template>
|
||||
<template #operation="{ record }">
|
||||
<a-tooltip :content="t('project.executionHistory.cleared')" :disabled="!record.deleted">
|
||||
<a-tooltip :content="t('common.executionResultCleaned')" :disabled="!record.deleted">
|
||||
<MsButton
|
||||
:disabled="record.deleted || !hasAnyPermission(['PROJECT_TEST_PLAN_REPORT:READ'])"
|
||||
class="!mr-0"
|
||||
|
|
Loading…
Reference in New Issue