fix(测试计划): 测试计划详情-修改功能用例拖拽排序传参&去掉执行结果icon
This commit is contained in:
parent
4cb1df43c3
commit
5f0cea3148
|
@ -114,7 +114,6 @@ import type {
|
|||
PlanMinderNode,
|
||||
RunFeatureCaseParams,
|
||||
SortApiCaseParams,
|
||||
SortFeatureCaseParams,
|
||||
TestPlanBaseParams,
|
||||
TestPlanDetail,
|
||||
TestPlanItem,
|
||||
|
@ -248,7 +247,7 @@ export function disassociateCase(data: DisassociateCaseParams) {
|
|||
return MSR.post({ url: DisassociateCaseUrl, data });
|
||||
}
|
||||
// 计划详情-功能用例列表-拖拽排序
|
||||
export const sortFeatureCase = (data: SortFeatureCaseParams) => {
|
||||
export const sortFeatureCase = (data: SortApiCaseParams) => {
|
||||
return MSR.post({ url: SortFeatureCaseUrl, data });
|
||||
};
|
||||
// 计划详情-功能用例列表-批量取消关联用例
|
||||
|
|
|
@ -210,9 +210,6 @@ export interface BatchUpdateCaseExecutorParams extends BatchFeatureCaseParams {
|
|||
userId: string;
|
||||
}
|
||||
|
||||
export interface SortFeatureCaseParams extends DragSortParams {
|
||||
testPlanId: string;
|
||||
}
|
||||
export type RunModeType = 'SERIAL' | 'PARALLEL';
|
||||
export interface PassRateCountDetail {
|
||||
id: string;
|
||||
|
|
|
@ -83,6 +83,11 @@
|
|||
})
|
||||
);
|
||||
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
form.value = { targetCollectionId: '' };
|
||||
}
|
||||
|
||||
async function handleMove() {
|
||||
formRef.value?.validate(async (errors) => {
|
||||
if (!errors) {
|
||||
|
@ -92,6 +97,7 @@
|
|||
...props.params,
|
||||
...form.value,
|
||||
});
|
||||
handleCancel();
|
||||
Message.success(t('common.moveSuccess'));
|
||||
emit('loadList');
|
||||
} catch (error) {
|
||||
|
@ -103,9 +109,4 @@
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
form.value = { targetCollectionId: '' };
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -36,13 +36,11 @@
|
|||
<ExecuteResult :execute-result="filterContent.key" />
|
||||
</template>
|
||||
<template #lastExecResult="{ record }">
|
||||
<ExecuteResult :execute-result="record.lastExecResult" />
|
||||
<MsIcon
|
||||
v-show="record.lastExecResult !== LastExecuteResults.PENDING"
|
||||
v-permission="['PROJECT_TEST_PLAN:READ']"
|
||||
type="icon-icon_take-action_outlined"
|
||||
class="ml-[8px] cursor-pointer text-[rgb(var(--primary-5))]"
|
||||
size="16"
|
||||
<ExecuteResult
|
||||
:execute-result="record.lastExecResult"
|
||||
:class="[
|
||||
!record.lastExecReportId || record.lastExecResult === LastExecuteResults.PENDING ? '' : 'cursor-pointer',
|
||||
]"
|
||||
@click="showReport(record)"
|
||||
/>
|
||||
</template>
|
||||
|
@ -432,6 +430,7 @@
|
|||
const reportVisible = ref(false);
|
||||
const reportId = ref('');
|
||||
function showReport(record: PlanDetailApiCaseItem) {
|
||||
if (!record.lastExecReportId || record.lastExecResult === LastExecuteResults.PENDING) return;
|
||||
reportVisible.value = true;
|
||||
reportId.value = record.lastExecReportId;
|
||||
}
|
||||
|
|
|
@ -36,13 +36,11 @@
|
|||
<ExecuteResult :execute-result="filterContent.key" />
|
||||
</template>
|
||||
<template #lastExecResult="{ record }">
|
||||
<ExecuteResult :execute-result="record.lastExecResult" />
|
||||
<MsIcon
|
||||
v-show="record.lastExecResult !== LastExecuteResults.PENDING"
|
||||
v-permission="['PROJECT_TEST_PLAN:READ']"
|
||||
type="icon-icon_take-action_outlined"
|
||||
class="ml-[8px] cursor-pointer text-[rgb(var(--primary-5))]"
|
||||
size="16"
|
||||
<ExecuteResult
|
||||
:execute-result="record.lastExecResult"
|
||||
:class="[
|
||||
!record.lastExecReportId || record.lastExecResult === LastExecuteResults.PENDING ? '' : 'cursor-pointer',
|
||||
]"
|
||||
@click="showReport(record)"
|
||||
/>
|
||||
</template>
|
||||
|
@ -423,6 +421,7 @@
|
|||
const reportVisible = ref(false);
|
||||
const reportId = ref('');
|
||||
function showReport(record: PlanDetailApiScenarioItem) {
|
||||
if (!record.lastExecReportId || record.lastExecResult === LastExecuteResults.PENDING) return;
|
||||
reportVisible.value = true;
|
||||
reportId.value = record.lastExecReportId;
|
||||
}
|
||||
|
|
|
@ -468,7 +468,7 @@
|
|||
// 拖拽排序
|
||||
async function handleDragChange(params: DragSortParams) {
|
||||
try {
|
||||
await sortFeatureCase({ ...params, testPlanId: props.planId });
|
||||
await sortFeatureCase({ ...params, testCollectionId: collectionId.value });
|
||||
Message.success(t('caseManagement.featureCase.sortSuccess'));
|
||||
loadCaseList();
|
||||
} catch (error) {
|
||||
|
|
Loading…
Reference in New Issue