fix(接口管理): 修复用例批量执行会记录上一次的选择以及报告列表缺少排序功能和显示重跑状态问题

--bug=1038054 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001038054
--bug=1037909 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001037909
This commit is contained in:
guoyuqi 2024-03-29 15:47:35 +08:00 committed by Craftsman
parent fdebf29e7b
commit 46e3a37a77
8 changed files with 79 additions and 56 deletions

View File

@ -282,7 +282,7 @@ export enum ScenarioAddStepActionType {
export enum ExecuteStatusFilters {
PENDING = 'PENDING',
RUNNING = 'RUNNING',
RERUNNING = 'RERUNNING',
// RERUNNING = 'RERUNNING',
ERROR = 'ERROR',
SUCCESS = 'SUCCESS',
FAKE_ERROR = 'FAKE_ERROR',

View File

@ -35,11 +35,11 @@ export const ReportStatus = {
label: 'report.inExecution',
color: '!text-[rgb(var(--link-6))]',
},
RERUNNING: {
icon: 'icon-icon_testing',
label: 'report.rerun',
color: '!text-[rgb(var(--link-6))]',
},
// RERUNNING: {
// icon: 'icon-icon_testing',
// label: 'report.rerun',
// color: '!text-[rgb(var(--link-6))]',
// },
PENDING: {
icon: 'icon-icon_wait',
label: 'report.queuing',
@ -69,11 +69,11 @@ export const ReportStatus = {
label: 'report.inExecution',
color: '!text-[rgb(var(--link-6))]',
},
RERUNNING: {
icon: 'icon-icon_testing',
label: 'report.rerun',
color: '!text-[rgb(var(--link-6))]',
},
// RERUNNING: {
// icon: 'icon-icon_testing',
// label: 'report.rerun',
// color: '!text-[rgb(var(--link-6))]',
// },
PENDING: {
icon: 'icon-icon_wait',
label: 'report.queuing',

View File

@ -173,6 +173,19 @@
showBatchExecute.value = false;
}
function resetBatchExecuteForm() {
batchExecuteForm.value = {
defaultEnv: 'true',
runMode: 'SERIAL',
integratedReport: 'false',
integratedReportName: '',
stopOnFailure: false,
poolId: '',
grouped: false,
environmentId: '',
};
}
function handleBatchExecuteCase() {
batchExecuteFormRef.value?.validate(async (errors) => {
const { batchParams } = props;
@ -201,11 +214,13 @@
});
Message.success(t('case.detail.execute.success'));
cancelBatchExecute();
resetBatchExecuteForm();
emit('finished');
} catch (error) {
// eslint-disable-next-line no-console
console.log(error);
} finally {
resetBatchExecuteForm();
batchExecuteLoading.value = false;
}
}

View File

@ -225,6 +225,10 @@
dataIndex: 'status',
slotName: 'status',
titleSlotName: 'statusFilter',
sortable: {
sortDirections: ['ascend', 'descend'],
sorter: true,
},
showInTable: true,
width: 200,
showDrag: true,
@ -234,6 +238,10 @@
dataIndex: 'triggerMode',
slotName: 'triggerMode',
showInTable: true,
sortable: {
sortDirections: ['ascend', 'descend'],
sorter: true,
},
width: 150,
showDrag: true,
titleSlotName: 'triggerModeFilter',

View File

@ -63,11 +63,11 @@
label: 'report.status.running',
color: '!text-[rgb(var(--link-6))]',
},
RERUNNING: {
icon: 'icon-icon_testing',
label: 'report.status.rerunning',
color: '!text-[rgb(var(--link-6))]',
},
// RERUNNING: {
// icon: 'icon-icon_testing',
// label: 'report.status.rerunning',
// color: '!text-[rgb(var(--link-6))]',
// },
PENDING: {
icon: 'icon-icon_block_filled',
label: 'report.status.pending',
@ -102,11 +102,11 @@
label: 'report.status.running',
color: '!text-[rgb(var(--link-6))]',
},
RERUNNING: {
icon: 'icon-icon_testing',
label: 'report.status.rerunning',
color: '!text-[rgb(var(--link-6))]',
},
// RERUNNING: {
// icon: 'icon-icon_testing',
// label: 'report.status.rerunning',
// color: '!text-[rgb(var(--link-6))]',
// },
PENDING: {
icon: 'icon-icon_wait',
label: 'report.status.pending',

View File

@ -27,11 +27,11 @@
color: 'rgb(var(--link-5))',
text: 'apiScenario.executeHistory.status.running',
},
[ExecuteStatusFilters.RERUNNING]: {
bgColor: 'rgb(var(--link-2))',
color: 'rgb(var(--link-6))',
text: 'apiScenario.executeHistory.status.rerunning',
},
// [ExecuteStatusFilters.RERUNNING]: {
// bgColor: 'rgb(var(--link-2))',
// color: 'rgb(var(--link-6))',
// text: 'apiScenario.executeHistory.status.rerunning',
// },
[ExecuteStatusFilters.ERROR]: {
bgColor: 'rgb(var(--danger-2))',
color: 'rgb(var(--danger-5))',

View File

@ -48,11 +48,11 @@
label: 'project.taskCenter.inExecution',
color: '!text-[rgb(var(--link-6))]',
},
RERUNNING: {
icon: 'icon-icon_testing',
label: 'project.taskCenter.rerun',
color: '!text-[rgb(var(--link-6))]',
},
// RERUNNING: {
// icon: 'icon-icon_testing',
// label: 'project.taskCenter.rerun',
// color: '!text-[rgb(var(--link-6))]',
// },
PENDING: {
icon: 'icon-icon_block_filled',
label: 'project.taskCenter.queuing',
@ -82,11 +82,11 @@
label: 'project.taskCenter.inExecution',
color: '!text-[rgb(var(--link-6))]',
},
RERUNNING: {
icon: 'icon-icon_testing',
label: 'project.taskCenter.rerun',
color: '!text-[rgb(var(--link-6))]',
},
// RERUNNING: {
// icon: 'icon-icon_testing',
// label: 'project.taskCenter.rerun',
// color: '!text-[rgb(var(--link-6))]',
// },
PENDING: {
icon: 'icon-icon_block_filled',
label: 'project.taskCenter.queuing',
@ -133,11 +133,11 @@
label: 'project.taskCenter.inExecution',
color: '!text-[rgb(var(--link-6))]',
},
RERUNNING: {
icon: 'icon-icon_testing',
label: 'project.taskCenter.rerun',
color: '!text-[rgb(var(--link-6))]',
},
// RERUNNING: {
// icon: 'icon-icon_testing',
// label: 'project.taskCenter.rerun',
// color: '!text-[rgb(var(--link-6))]',
// },
ERROR: {
icon: 'icon-icon_close_colorful',
label: 'project.taskCenter.failure',

View File

@ -24,11 +24,11 @@ export const TaskStatus = {
label: 'project.taskCenter.inExecution',
color: '!text-[rgb(var(--link-6))]',
},
RERUNNING: {
icon: 'icon-icon_testing',
label: 'project.taskCenter.rerun',
color: '!text-[rgb(var(--link-6))]',
},
// RERUNNING: {
// icon: 'icon-icon_testing',
// label: 'project.taskCenter.rerun',
// color: '!text-[rgb(var(--link-6))]',
// },
PENDING: {
icon: 'icon-icon_wait',
label: 'project.taskCenter.queuing',
@ -58,11 +58,11 @@ export const TaskStatus = {
label: 'project.taskCenter.inExecution',
color: '!text-[rgb(var(--link-6))]',
},
RERUNNING: {
icon: 'icon-icon_testing',
label: 'project.taskCenter.rerun',
color: '!text-[rgb(var(--link-6))]',
},
// RERUNNING: {
// icon: 'icon-icon_testing',
// label: 'project.taskCenter.rerun',
// color: '!text-[rgb(var(--link-6))]',
// },
PENDING: {
icon: 'icon-icon_wait',
label: 'project.taskCenter.queuing',
@ -109,11 +109,11 @@ export const TaskStatus = {
label: 'project.taskCenter.inExecution',
color: '!text-[rgb(var(--link-6))]',
},
RERUNNING: {
icon: 'icon-icon_testing',
label: 'project.taskCenter.rerun',
color: '!text-[rgb(var(--link-6))]',
},
// RERUNNING: {
// icon: 'icon-icon_testing',
// label: 'project.taskCenter.rerun',
// color: '!text-[rgb(var(--link-6))]',
// },
ERROR: {
icon: 'icon-icon_close_colorful',
label: 'project.taskCenter.failure',