From d3a74dc68ddca2907938143cbface534cde5f255 Mon Sep 17 00:00:00 2001 From: RubyLiu Date: Fri, 22 Dec 2023 18:29:50 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E8=A7=A3=E5=86=B3=E7=8E=AF=E5=A2=83=E9=85=8D=E7=BD=AE=E6=8A=A5?= =?UTF-8?q?=E9=94=99&=E6=9B=B4=E6=94=B9scope=E5=90=8E=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../environment/ApiEnvironmentConfig.vue | 242 +++++++++++------- .../environment/EnvironmentCommonConfig.vue | 92 ++++--- .../commons/ApiScenarioVariables.vue | 35 ++- 3 files changed, 238 insertions(+), 131 deletions(-) diff --git a/framework/sdk-parent/frontend/src/components/environment/ApiEnvironmentConfig.vue b/framework/sdk-parent/frontend/src/components/environment/ApiEnvironmentConfig.vue index 7200126dba..45b63bb32d 100644 --- a/framework/sdk-parent/frontend/src/components/environment/ApiEnvironmentConfig.vue +++ b/framework/sdk-parent/frontend/src/components/environment/ApiEnvironmentConfig.vue @@ -1,17 +1,41 @@ diff --git a/framework/sdk-parent/frontend/src/components/environment/EnvironmentCommonConfig.vue b/framework/sdk-parent/frontend/src/components/environment/EnvironmentCommonConfig.vue index d105795cbd..2c306bba3f 100644 --- a/framework/sdk-parent/frontend/src/components/environment/EnvironmentCommonConfig.vue +++ b/framework/sdk-parent/frontend/src/components/environment/EnvironmentCommonConfig.vue @@ -1,49 +1,79 @@ diff --git a/framework/sdk-parent/frontend/src/components/environment/commons/ApiScenarioVariables.vue b/framework/sdk-parent/frontend/src/components/environment/commons/ApiScenarioVariables.vue index 9177a6ee2d..da5a073908 100644 --- a/framework/sdk-parent/frontend/src/components/environment/commons/ApiScenarioVariables.vue +++ b/framework/sdk-parent/frontend/src/components/environment/commons/ApiScenarioVariables.vue @@ -85,7 +85,7 @@ v-model="scope.row.scope" :placeholder="$t('commons.please_select')" size="mini" - @change="changeType($event, scope.row)" + @change="changeScope($event, scope.row)" > { + if (item.id === row.id) { + item.scope = value; + } + }); + this.changeType(row.type, row); + }, changeType(value, data) { - data.value = ""; - if ( - !data.delimiter || + data.value = '' + const notDelimiters = !data.delimiter || (!data.files && data.files.length === 0) || !data.quotedData + if ( + notDelimiters ) { data.delimiter = ","; data.files = []; data.quotedData = "false"; } - if (!data.scope || data.scope == "ui") { - data.type = "STRING"; - } this.items.forEach((item) => { if (item.id === data.id) { - item.scope = value; - item.type = data.type; + item.type = value; item.value = data.value; + if(notDelimiters) { + item.delimiter = data.delimiter; + item.files = data.files; + item.quotedData = data.quotedData; + } } }); },