From 01aa4fe633e17c7a90ede6da7494adf03104e89b Mon Sep 17 00:00:00 2001 From: teukkk Date: Mon, 27 May 2024 19:13:15 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):=20?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E7=94=A8=E4=BE=8B=E5=88=97=E8=A1=A8-?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=A7=E8=A1=8C=E7=BB=93=E6=9E=9C=E8=B0=83?= =?UTF-8?q?=E7=94=A8=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/modules/test-plan/testPlan.ts | 6 ------ frontend/src/api/requrls/test-plan/testPlan.ts | 2 -- frontend/src/components/business/ms-tree/index.vue | 2 +- frontend/src/models/testPlan/testPlan.ts | 4 ---- .../testPlan/detail/featureCase/components/caseTable.vue | 6 ++++-- 5 files changed, 5 insertions(+), 15 deletions(-) diff --git a/frontend/src/api/modules/test-plan/testPlan.ts b/frontend/src/api/modules/test-plan/testPlan.ts index 8b6facc1f4..69817ee692 100644 --- a/frontend/src/api/modules/test-plan/testPlan.ts +++ b/frontend/src/api/modules/test-plan/testPlan.ts @@ -16,7 +16,6 @@ import { deletePlanUrl, DeleteTestPlanModuleUrl, DisassociateCaseUrl, - EditCaseLastExecResultUrl, ExecuteHistoryUrl, followPlanUrl, GenerateReportUrl, @@ -54,7 +53,6 @@ import type { BatchFeatureCaseParams, BatchUpdateCaseExecutorParams, DisassociateCaseParams, - EditLastExecResultParams, ExecuteHistoryItem, ExecuteHistoryType, FollowPlanParams, @@ -196,10 +194,6 @@ export function getFeatureCaseModule(planId: string) { export function disassociateCase(data: DisassociateCaseParams) { return MSR.post({ url: DisassociateCaseUrl, data }); } -// 计划详情-功能用例列表-编辑执行结果 -export function editLastExecResult(data: EditLastExecResultParams) { - return MSR.post({ url: EditCaseLastExecResultUrl, data }); -} // 计划详情-功能用例列表-拖拽排序 export const sortFeatureCase = (data: SortFeatureCaseParams) => { return MSR.post({ url: SortFeatureCaseUrl, data }); diff --git a/frontend/src/api/requrls/test-plan/testPlan.ts b/frontend/src/api/requrls/test-plan/testPlan.ts index 4aaf8e86f0..bc798d3a8e 100644 --- a/frontend/src/api/requrls/test-plan/testPlan.ts +++ b/frontend/src/api/requrls/test-plan/testPlan.ts @@ -56,8 +56,6 @@ export const GetFeatureCaseModuleCountUrl = '/test-plan/functional/case/module/c export const GetFeatureCaseModuleUrl = '/test-plan/functional/case/tree'; // 计划详情-功能用例列表-拖拽排序 export const SortFeatureCaseUrl = '/test-plan/functional/case/sort'; -// 计划详情-功能用例列表-编辑执行结果 -export const EditCaseLastExecResultUrl = '/test-plan/functional/case/edit'; // 计划详情-功能用例-取消关联用例 export const DisassociateCaseUrl = '/test-plan/functional/case/disassociate'; // 计划详情-功能用例-批量取消关联用例 diff --git a/frontend/src/components/business/ms-tree/index.vue b/frontend/src/components/business/ms-tree/index.vue index 99baad53cc..fd483085e7 100644 --- a/frontend/src/components/business/ms-tree/index.vue +++ b/frontend/src/components/business/ms-tree/index.vue @@ -238,7 +238,7 @@ if (titleMatches || filteredChildren.length > 0) { result.push({ ...item, - expanded: titleMatches || filteredChildren.length > 0, + expanded: true, [props.fieldNames.children]: filteredChildren, }); } diff --git a/frontend/src/models/testPlan/testPlan.ts b/frontend/src/models/testPlan/testPlan.ts index 75226305a2..74d789273b 100644 --- a/frontend/src/models/testPlan/testPlan.ts +++ b/frontend/src/models/testPlan/testPlan.ts @@ -160,10 +160,6 @@ export interface DisassociateCaseParams { id: string; } -export interface EditLastExecResultParams extends DisassociateCaseParams { - lastExecResult: string; -} - export interface BatchFeatureCaseParams extends BatchActionQueryParams { testPlanId: string; moduleIds?: string[]; diff --git a/frontend/src/views/test-plan/testPlan/detail/featureCase/components/caseTable.vue b/frontend/src/views/test-plan/testPlan/detail/featureCase/components/caseTable.vue index cf68607e71..fa5ab1d136 100644 --- a/frontend/src/views/test-plan/testPlan/detail/featureCase/components/caseTable.vue +++ b/frontend/src/views/test-plan/testPlan/detail/featureCase/components/caseTable.vue @@ -186,9 +186,9 @@ batchExecuteCase, batchUpdateCaseExecutor, disassociateCase, - editLastExecResult, getPlanDetailFeatureCaseList, GetTestPlanUsers, + runFeatureCase, sortFeatureCase, } from '@/api/modules/test-plan/testPlan'; import { defaultExecuteForm } from '@/config/testPlan'; @@ -502,9 +502,11 @@ // 更新执行结果 async function handleEditLastExecResult(record: PlanDetailFeatureCaseItem) { try { - await editLastExecResult({ + await runFeatureCase({ id: record.id, + projectId: appStore.currentProjectId, testPlanId: props.planId, + caseId: record.caseId, lastExecResult: record.lastExecResult, }); Message.success(t('common.updateSuccess'));