From aeaa61c4f3a29ffc83f4960a79fd070e79915f85 Mon Sep 17 00:00:00 2001 From: baiqi Date: Sun, 18 Feb 2024 18:53:25 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=B0=83=E8=AF=95-=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/package.json | 2 +- .../src/api/modules/api-test/management.ts | 4 +- .../src/components/business/ms-menu/index.vue | 16 +- .../pure/ms-form-create/formCreate.vue | 31 +- frontend/src/config/pathMap.ts | 7 - frontend/src/models/apiTest/common.ts | 8 + .../api-test/components/condition/index.vue | 7 +- .../components/requestComposition/index.vue | 296 ++++++++++-------- frontend/src/views/api-test/debug/index.vue | 12 +- .../components/management/api/index.vue | 2 + 10 files changed, 230 insertions(+), 155 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index 423574bff2..48f8a4c81d 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -162,4 +162,4 @@ "rollup": "^2.79.1", "gifsicle": "5.2.0" } -} +} \ No newline at end of file diff --git a/frontend/src/api/modules/api-test/management.ts b/frontend/src/api/modules/api-test/management.ts index 3c71e16a1b..e4b0640fcd 100644 --- a/frontend/src/api/modules/api-test/management.ts +++ b/frontend/src/api/modules/api-test/management.ts @@ -1,7 +1,7 @@ import MSR from '@/api/http/index'; import { GetPluginOptionsUrl, GetPluginScriptUrl, GetProtocolListUrl } from '@/api/requrls/api-test/management'; -import { GetPluginOptionsParams, PluginOption, ProtocolItem } from '@/models/apiTest/common'; +import { GetPluginOptionsParams, PluginConfig, PluginOption, ProtocolItem } from '@/models/apiTest/common'; // 获取协议列表 export function getProtocolList(organizationId: string) { @@ -15,5 +15,5 @@ export function getPluginOptions(data: GetPluginOptionsParams) { // 获取插件配置 export function getPluginScript(pluginId: string) { - return MSR.get({ url: GetPluginScriptUrl, params: pluginId }); + return MSR.get({ url: GetPluginScriptUrl, params: pluginId }); } diff --git a/frontend/src/components/business/ms-menu/index.vue b/frontend/src/components/business/ms-menu/index.vue index 461cefba62..7f882b6b3a 100644 --- a/frontend/src/components/business/ms-menu/index.vue +++ b/frontend/src/components/business/ms-menu/index.vue @@ -390,12 +390,12 @@ // 渲染菜单项 const renderMenuItem = (element, icon) => element?.name === SettingRouteEnum.SETTING_ORGANIZATION ? ( - orgTrigger(element, menuSwitchOrgVisible, () => ( - goto(element)}> -
- {t(element?.meta?.locale || '')} + goto(element)}> +
+ {t(element?.meta?.locale || '')} + {orgTrigger(element, menuSwitchOrgVisible, () => (
{ if (xPack.value) { // 有xpack权限才显示 @@ -410,9 +410,9 @@ >
-
-
- )) + ))} +
+
) : ( goto(element)}> {t(element?.meta?.locale || '')} diff --git a/frontend/src/components/pure/ms-form-create/formCreate.vue b/frontend/src/components/pure/ms-form-create/formCreate.vue index 6d81dbf2c6..5154ab2b89 100644 --- a/frontend/src/components/pure/ms-form-create/formCreate.vue +++ b/frontend/src/components/pure/ms-form-create/formCreate.vue @@ -1,5 +1,12 @@ diff --git a/frontend/src/config/pathMap.ts b/frontend/src/config/pathMap.ts index 599487c4a9..04c7fb3dfd 100644 --- a/frontend/src/config/pathMap.ts +++ b/frontend/src/config/pathMap.ts @@ -108,13 +108,6 @@ export const pathMap: PathMapItem[] = [ permission: [], level: MENU_LEVEL[2], }, - { - key: 'CASE_MANAGEMENT_CASE_CREATE_SUCCESS', // 功能测试-功能用例创建成功页面 - locale: 'menu.caseManagement.featureCaseCreateSuccess', - route: RouteEnum.CASE_MANAGEMENT_CASE_CREATE_SUCCESS, - permission: [], - level: MENU_LEVEL[2], - }, { key: 'CASE_MANAGEMENT_CASE_RECYCLE', // 功能测试-功能用例-回收站 locale: 'menu.caseManagement.featureCaseRecycle', diff --git a/frontend/src/models/apiTest/common.ts b/frontend/src/models/apiTest/common.ts index 09b87c6928..273b302637 100644 --- a/frontend/src/models/apiTest/common.ts +++ b/frontend/src/models/apiTest/common.ts @@ -16,3 +16,11 @@ export interface ProtocolItem { polymorphicName: string; pluginId: string; } +// 插件配置 +export interface PluginConfig { + id: string; + name: string; + options: Record; + script: Record[]; + scriptType: string; +} diff --git a/frontend/src/views/api-test/components/condition/index.vue b/frontend/src/views/api-test/components/condition/index.vue index a1fef4f4d6..edd67f8f2d 100644 --- a/frontend/src/views/api-test/components/condition/index.vue +++ b/frontend/src/views/api-test/components/condition/index.vue @@ -1,6 +1,6 @@