From 5e266613e6b76a192678d92334dac88c40d50e44 Mon Sep 17 00:00:00 2001 From: rubyliu Date: Wed, 28 Feb 2024 21:33:30 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86):?= =?UTF-8?q?=20=E7=8E=AF=E5=A2=83=E7=AE=A1=E7=90=86=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/models/projectManagement/environmental.ts | 11 +++++------ .../components/envParams/AssertTab.vue | 4 ++-- .../environmental/components/envParams/HostTab.vue | 13 +++++++------ .../environmental/components/envParams/HttpTab.vue | 11 +++++++---- .../environmental/components/envParams/PostTab.vue | 4 ++-- .../environmental/components/envParams/PreTab.vue | 4 ++-- .../project-management/environmental/index.vue | 2 +- 7 files changed, 26 insertions(+), 23 deletions(-) diff --git a/frontend/src/models/projectManagement/environmental.ts b/frontend/src/models/projectManagement/environmental.ts index 648d429dc9..685880b685 100644 --- a/frontend/src/models/projectManagement/environmental.ts +++ b/frontend/src/models/projectManagement/environmental.ts @@ -1,5 +1,3 @@ -import { key } from 'localforage'; - export interface EnvListItem { name: string; id: string; @@ -36,11 +34,12 @@ export interface EnvConfig { commmonVariables?: EnvConfigItem[]; httpConfig?: EnvConfigItem[]; dataSource?: DataSourceItem[]; - hostConfig?: EnvConfigItem[]; + hostConfig?: EnvConfigItem; authConfig?: EnvConfigItem; - preScript?: EnvConfigItem[]; - postScript?: EnvConfigItem[]; - assertions?: EnvConfigItem[]; + preProcessorConfig?: EnvConfigItem; + postProcessorConfig?: EnvConfigItem; + assertionConfig?: EnvConfigItem; + pluginConfigMap?: EnvConfigItem; } export interface EnvDetailItem { id?: string; diff --git a/frontend/src/views/project-management/environmental/components/envParams/AssertTab.vue b/frontend/src/views/project-management/environmental/components/envParams/AssertTab.vue index 9f987dbe5b..6cce79493c 100644 --- a/frontend/src/views/project-management/environmental/components/envParams/AssertTab.vue +++ b/frontend/src/views/project-management/environmental/components/envParams/AssertTab.vue @@ -11,9 +11,9 @@ const params = computed({ set: (value: any) => { - store.currentEnvDetailInfo.config.assertions = value; + store.currentEnvDetailInfo.config.assertionConfig = value; }, - get: () => store.currentEnvDetailInfo.config.assertions || [], + get: () => store.currentEnvDetailInfo.config.assertionConfig || [], }); diff --git a/frontend/src/views/project-management/environmental/components/envParams/HostTab.vue b/frontend/src/views/project-management/environmental/components/envParams/HostTab.vue index 998c9c741b..e16691b874 100644 --- a/frontend/src/views/project-management/environmental/components/envParams/HostTab.vue +++ b/frontend/src/views/project-management/environmental/components/envParams/HostTab.vue @@ -1,7 +1,7 @@ diff --git a/frontend/src/views/project-management/environmental/components/envParams/PreTab.vue b/frontend/src/views/project-management/environmental/components/envParams/PreTab.vue index 328fa276dd..9b2d7f6abf 100644 --- a/frontend/src/views/project-management/environmental/components/envParams/PreTab.vue +++ b/frontend/src/views/project-management/environmental/components/envParams/PreTab.vue @@ -12,9 +12,9 @@ // TODO:参数类型 const params = computed({ set: (value: any) => { - store.currentEnvDetailInfo.config.preScript = value; + store.currentEnvDetailInfo.config.preProcessorConfig = value; }, - get: () => store.currentEnvDetailInfo.config.preScript || [], + get: () => store.currentEnvDetailInfo.config.preProcessorConfig || {}, }); diff --git a/frontend/src/views/project-management/environmental/index.vue b/frontend/src/views/project-management/environmental/index.vue index 9cbb9bb779..a1c86aa25c 100644 --- a/frontend/src/views/project-management/environmental/index.vue +++ b/frontend/src/views/project-management/environmental/index.vue @@ -230,7 +230,7 @@ const envList = ref([]); // 环境列表 const evnGroupList = ref([]); // 环境组列表 - const showType = ref(EnvAuthScopeEnum.PROJECT_GROUP); // 展示类型 + const showType = ref(EnvAuthScopeEnum.PROJECT); // 展示类型 const activeKey = computed(() => store.currentId); // 当前选中的id