From 2b46fdbd63dd6243cc7b2b9a2636a26b45f08892 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Thu, 18 Aug 2022 15:01:45 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=8E=A5=E5=8F=A3=E5=AE=9A=E4=B9=89):?= =?UTF-8?q?=20=E5=9C=BA=E6=99=AF=E5=8F=98=E9=87=8F=E6=89=B9=E9=87=8F?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1015924 --user=王孝刚 【接口测试】github#16911,批量添加场景变量,列表添加后类型显示为常量 ,建议加个提示 https://www.tapd.cn/55049933/s/1226687 --- .../api/automation/scenario/variable/VariableList.vue | 2 +- .../api/definition/components/basis/BatchAddParameter.vue | 7 ++++++- frontend/src/i18n/en-US.js | 1 + frontend/src/i18n/zh-CN.js | 1 + frontend/src/i18n/zh-TW.js | 1 + 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/frontend/src/business/components/api/automation/scenario/variable/VariableList.vue b/frontend/src/business/components/api/automation/scenario/variable/VariableList.vue index 07084cd002..74b42858a7 100644 --- a/frontend/src/business/components/api/automation/scenario/variable/VariableList.vue +++ b/frontend/src/business/components/api/automation/scenario/variable/VariableList.vue @@ -295,7 +295,7 @@ export default { downloadFile('MS_' + variablesJson.length + '_Environments_variables.json', JSON.stringify(variablesJson)); }, batchAddParameter() { - this.$refs.batchAddParameter.open(); + this.$refs.batchAddParameter.open('scenario'); }, batchAddHeader() { this.$refs.batchAddHeader.open(); diff --git a/frontend/src/business/components/api/definition/components/basis/BatchAddParameter.vue b/frontend/src/business/components/api/definition/components/basis/BatchAddParameter.vue index 8698a8ab91..ea882027d5 100644 --- a/frontend/src/business/components/api/definition/components/basis/BatchAddParameter.vue +++ b/frontend/src/business/components/api/definition/components/basis/BatchAddParameter.vue @@ -6,6 +6,7 @@
+
{{ $t('commons.cancel') }} @@ -42,10 +43,14 @@ export default { return { dialogVisible: false, parameters: "", + isScenario: false } }, methods: { - open() { + open(data) { + if (data && data === 'scenario') { + this.isScenario = true; + } this.dialogVisible = true; listenGoBack(this.handleClose); }, diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js index 4412aa646e..b662eec77c 100644 --- a/frontend/src/i18n/en-US.js +++ b/frontend/src/i18n/en-US.js @@ -1199,6 +1199,7 @@ export default { please_select_case: "Please select case", fail_to_stop: "Fail to stop", batch_add_parameter: "Format: parameter name: parameter value
like:Accept-Encoding:utf-8
Note: The parameter names in batch addition are repeated, and the last data is the latest data by default", + bach_add_type_info: "Note: only constants can be added in batch", params_format_warning: "Incorrect data format at line {0}", create_performance_test_tips: 'This operation cannot be completed without permission to create performance tests', jar_config: { diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index a3233b0237..e32cb1f50a 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -1209,6 +1209,7 @@ export default { please_select_case: "请选择用例", fail_to_stop: "失败停止", batch_add_parameter: "格式:参数名:参数值
如:Accept-Encoding:utf-8
注:批量添加里的参数名重复,默认以最后一条数据为最新数据", + bach_add_type_info: "注:批量添加只能添加常量", params_format_warning: "第{0}行数据格式有误", create_performance_test_tips: '没有创建性能测试的权限,无法完成此操作', jar_config: { diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js index bc2c1f1dd4..8df0223c5d 100644 --- a/frontend/src/i18n/zh-TW.js +++ b/frontend/src/i18n/zh-TW.js @@ -1206,6 +1206,7 @@ export default { please_select_case: "請選擇用例", fail_to_stop: "失敗停止", batch_add_parameter: "格式:參數名:參數值
如:Accept-Encoding:utf-8
注:批量添加里的參數名重複,默認以最後一條數據為最新數據", + bach_add_type_info: "注:批量添加只能添加常數", params_format_warning: "第{0}行數據格式有誤", create_performance_test_tips: '沒有創建性能測試的權限,無法完成此操作', jar_config: {