From 341ed433ea95b02bd031affe166acb4112ab90d3 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Tue, 23 Apr 2024 11:37:44 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):?= =?UTF-8?q?=20=E4=BC=98=E5=8C=96=E5=9C=BA=E6=99=AF=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E8=AF=B7=E6=B1=82=E8=BF=87=E6=BB=A4=E6=9C=AA?= =?UTF-8?q?=E5=BC=80=E5=90=AF=E6=8E=A5=E5=8F=A3=E6=A8=A1=E5=9D=97=E7=9A=84?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/modules/project-management/project.ts | 5 ++ .../common/importApiDrawer/index.vue | 2 +- .../common/importApiDrawer/projectSelect.vue | 68 +++++++++++++++++++ 3 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 frontend/src/views/api-test/scenario/components/common/importApiDrawer/projectSelect.vue diff --git a/frontend/src/api/modules/project-management/project.ts b/frontend/src/api/modules/project-management/project.ts index b95c93f6a3..d1b5b9163e 100644 --- a/frontend/src/api/modules/project-management/project.ts +++ b/frontend/src/api/modules/project-management/project.ts @@ -1,4 +1,5 @@ import MSR from '@/api/http/index'; +import { associatedProjectOptionsUrl } from '@/api/requrls/case-management/featureCase'; import { ProjectListUrl, ProjectSwitchUrl } from '@/api/requrls/project-management/project'; import type { ProjectListItem } from '@/models/setting/project'; @@ -14,3 +15,7 @@ export function switchProject(data: { projectId: string; userId: string }) { export function getProjectInfo(projectId: string) { return MSR.get({ url: `/project/get/${projectId}` }); } + +export function getProjectListByOrgAndModule(orgId: string, module: string) { + return MSR.get({ url: `${ProjectListUrl}/${orgId}/${module}` }); +} diff --git a/frontend/src/views/api-test/scenario/components/common/importApiDrawer/index.vue b/frontend/src/views/api-test/scenario/components/common/importApiDrawer/index.vue index 806180f582..f1cd196134 100644 --- a/frontend/src/views/api-test/scenario/components/common/importApiDrawer/index.vue +++ b/frontend/src/views/api-test/scenario/components/common/importApiDrawer/index.vue @@ -103,9 +103,9 @@ import MsButton from '@/components/pure/ms-button/index.vue'; import MsDrawer from '@/components/pure/ms-drawer/index.vue'; import { MsTableDataItem } from '@/components/pure/ms-table/type'; - import MsProjectSelect from '@/components/business/ms-project-select/index.vue'; import { MsTreeNodeData } from '@/components/business/ms-tree/types'; import moduleTree from './moduleTree.vue'; + import MsProjectSelect from './projectSelect.vue'; import apiTable from './table.vue'; import { getProtocolList } from '@/api/modules/api-test/common'; diff --git a/frontend/src/views/api-test/scenario/components/common/importApiDrawer/projectSelect.vue b/frontend/src/views/api-test/scenario/components/common/importApiDrawer/projectSelect.vue new file mode 100644 index 0000000000..b94292261b --- /dev/null +++ b/frontend/src/views/api-test/scenario/components/common/importApiDrawer/projectSelect.vue @@ -0,0 +1,68 @@ + + + + +