From bfe7789e780274a67454a6828849616774894be0 Mon Sep 17 00:00:00 2001 From: baiqi Date: Wed, 12 Jun 2024 18:44:55 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=84=91=E5=9B=BE):=20=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E8=A7=84=E5=88=92=E8=84=91=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/api/modules/api-test/management.ts | 10 +- .../src/api/modules/test-plan/testPlan.ts | 6 + .../src/api/requrls/api-test/management.ts | 3 +- .../src/api/requrls/test-plan/testPlan.ts | 2 + .../ms-minders/featureCaseMinder/index.vue | 181 ++--- .../ms-minders/testPlanMinder/index.vue | 628 +++++++++++++----- .../ms-minders/testPlanMinder/locale/zh-CN.ts | 7 + .../hooks/useMinderEventListener.ts | 9 + .../pure/ms-minder-editor/main/header.vue | 8 + .../pure/ms-minder-editor/main/mainEditor.vue | 146 ++-- .../ms-minder-editor/menu/nodeFloatMenu.vue | 76 ++- .../pure/ms-minder-editor/minderEditor.vue | 16 +- .../components/pure/ms-minder-editor/props.ts | 5 + frontend/src/enums/minderEnum.ts | 2 + frontend/src/enums/testPlanEnum.ts | 20 +- frontend/src/models/testPlan/testPlan.ts | 34 +- frontend/src/store/modules/app/index.ts | 4 + .../api-test/components/batchRunModal.vue | 3 +- .../scenario/components/batchRunModal.vue | 3 +- .../scenario/components/scenarioTable.vue | 3 +- .../views/test-plan/testPlan/detail/index.vue | 24 + 21 files changed, 792 insertions(+), 398 deletions(-) diff --git a/frontend/src/api/modules/api-test/management.ts b/frontend/src/api/modules/api-test/management.ts index 0991da2283..7f1da8228c 100644 --- a/frontend/src/api/modules/api-test/management.ts +++ b/frontend/src/api/modules/api-test/management.ts @@ -40,7 +40,6 @@ import { GetDefinitionDetailUrl, GetDefinitionScheduleUrl, GetDependencyUrl, - GetEnvListUrl, GetEnvModuleUrl, GetExecuteHistoryUrl, GetMockUrlUrl, @@ -48,13 +47,13 @@ import { GetModuleOnlyTreeUrl, GetModuleTreeUrl, GetPoolId, + GetPoolOptionUrl, GetTrashModuleCountUrl, GetTrashModuleTreeUrl, ImportDefinitionUrl, MockDetailUrl, MoveModuleUrl, OperationHistoryUrl, - PoolOption, RecoverCaseUrl, RecoverDefinitionUrl, RecoverOperationHistoryUrl, @@ -519,11 +518,6 @@ export function batchExecuteCase(data: ApiCaseBatchExecuteParams) { return MSR.post({ url: BatchExecuteCaseUrl, data }); } -// 获取接口测试-环境列表 -export function getEnvList(projectId: string) { - return MSR.get({ url: GetEnvListUrl, params: projectId }); -} - // 获取接口用例-执行历史 export function getApiCaseExecuteHistory(data: ApiCaseExecuteHistoryParams) { return MSR.post>({ url: GetExecuteHistoryUrl, data }); @@ -541,7 +535,7 @@ export function getApiCaseDependency(data: ApiCaseDependencyParams) { // 获取接口的资源池列表 export function getPoolOption(projectId: string) { - return MSR.get({ url: PoolOption + projectId }); + return MSR.get({ url: GetPoolOptionUrl, params: projectId }); } export function getPoolId(projectId: string) { diff --git a/frontend/src/api/modules/test-plan/testPlan.ts b/frontend/src/api/modules/test-plan/testPlan.ts index 67851740bb..be580918a2 100644 --- a/frontend/src/api/modules/test-plan/testPlan.ts +++ b/frontend/src/api/modules/test-plan/testPlan.ts @@ -29,6 +29,7 @@ import { DisassociateApiScenarioUrl, DisassociateCaseUrl, dragPlanOnGroupUrl, + EditPlanMinderUrl, ExecuteHistoryUrl, ExecutePlanUrl, followPlanUrl, @@ -103,6 +104,7 @@ import type { PlanDetailExecuteHistoryItem, PlanDetailFeatureCaseItem, PlanDetailFeatureCaseListQueryParams, + PlanMinderEditParams, PlanMinderNode, RunFeatureCaseParams, SortApiCaseParams, @@ -408,3 +410,7 @@ export function deleteScheduleTask(testPlanId: string) { export function getPlanMinder(testPlanId: string) { return MSR.get({ url: GetPlanMinderUrl, params: testPlanId }); } +// 更新测试规划脑图 +export function editPlanMinder(data: PlanMinderEditParams) { + return MSR.post({ url: EditPlanMinderUrl, data }); +} diff --git a/frontend/src/api/requrls/api-test/management.ts b/frontend/src/api/requrls/api-test/management.ts index 33abc31400..6011907133 100644 --- a/frontend/src/api/requrls/api-test/management.ts +++ b/frontend/src/api/requrls/api-test/management.ts @@ -77,7 +77,6 @@ export const TransferFileCaseUrl = '/api/case/transfer'; // 文件转存 export const TransferFileModuleOptionCaseUrl = '/api/case/transfer/options'; // 文件转存目录 export const UploadTempFileCaseUrl = '/api/case/upload/temp/file'; // 临时文件上传 export const GetCaseDetailUrl = '/api/case/get-detail'; // 获取接口用例详情 -export const GetEnvListUrl = '/api/test/env-list'; // 接口测试-环境列表 export const BatchExecuteCaseUrl = '/api/case/batch/run'; // 批量执行接口用例 export const ExecuteCaseUrl = '/api/case/run'; // 单独执行接口用例 export const GetExecuteHistoryUrl = '/api/case/execute/page'; // 获取用的执行历史 @@ -98,5 +97,5 @@ export const DeleteRecycleCaseUrl = '/api/case/delete'; // 接口用例彻底删 export const BatchDeleteRecycleCaseUrl = '/api/case/batch/delete'; // 接口用例批量彻底删除 export const AddCaseUrl = '/api/case/add'; // 添加用例 -export const PoolOption = '/api/test/pool-option/'; // 获取接口资源池 +export const GetPoolOptionUrl = '/api/test/pool-option'; // 获取接口资源池 export const GetPoolId = '/api/test/get-pool/'; // 获取项目应用设置的资源池id diff --git a/frontend/src/api/requrls/test-plan/testPlan.ts b/frontend/src/api/requrls/test-plan/testPlan.ts index 30ec306025..755781cb70 100644 --- a/frontend/src/api/requrls/test-plan/testPlan.ts +++ b/frontend/src/api/requrls/test-plan/testPlan.ts @@ -143,3 +143,5 @@ export const BatchMoveApiScenarioUrl = '/test-plan/api/scenario/batch/move'; // 测试规划脑图 export const GetPlanMinderUrl = '/test-plan/mind/data'; +// 修改测试规划脑图 +export const EditPlanMinderUrl = '/test-plan/mind/data/edit'; diff --git a/frontend/src/components/business/ms-minders/featureCaseMinder/index.vue b/frontend/src/components/business/ms-minders/featureCaseMinder/index.vue index 8d694337c9..b82b15bcbf 100644 --- a/frontend/src/components/business/ms-minders/featureCaseMinder/index.vue +++ b/frontend/src/components/business/ms-minders/featureCaseMinder/index.vue @@ -25,6 +25,7 @@ @action="handleAction" @before-exec-command="handleBeforeExecCommand" @save="handleMinderSave" + @float-menu-close="handleBaseInfoCancel" >