From 67c35411df725fd8dfe6d776f9644f88c81e9f7c Mon Sep 17 00:00:00 2001 From: limin-fit2 Date: Wed, 23 Feb 2022 10:55:16 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=8A=9F=E8=83=BD=E7=94=A8=E4=BE=8B):?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B=E5=AF=BC=E5=85=A5=E5=A4=9A?= =?UTF-8?q?=E9=80=89=E4=B8=8B=E6=8B=89=E6=A1=86=E8=A7=A3=E6=9E=90=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1008163 --user=李敏 【测试跟踪】测试用例导入有console报错,多选下拉框没有值 https://www.tapd.cn/55049933/s/1108286 --- .../listener/TestCaseNoModelDataListener.java | 30 +++++++++++++++++-- .../track/plan/components/TestPlanList.vue | 2 +- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/backend/src/main/java/io/metersphere/excel/listener/TestCaseNoModelDataListener.java b/backend/src/main/java/io/metersphere/excel/listener/TestCaseNoModelDataListener.java index 71cd6feab3..ffa952518b 100644 --- a/backend/src/main/java/io/metersphere/excel/listener/TestCaseNoModelDataListener.java +++ b/backend/src/main/java/io/metersphere/excel/listener/TestCaseNoModelDataListener.java @@ -511,7 +511,6 @@ public class TestCaseNoModelDataListener extends AnalysisEventListener stringStream = Arrays.stream(values.split("[,;,;]")); //当标签值以中英文的逗号和分号分隔时才能正确解析 + List valueList = stringStream.map(multip -> multip = "\"" + multip + "\"") + .collect(Collectors.toList()); + String modifiedValues = StringUtils.join(valueList, ","); + modifiedValues = "[" + modifiedValues + "]"; + return modifiedValues; + } else { + return "[]"; + } + } + } + /** * @description: 获取注解里ExcelProperty的value */ diff --git a/frontend/src/business/components/track/plan/components/TestPlanList.vue b/frontend/src/business/components/track/plan/components/TestPlanList.vue index d4ba2dd21f..22bcf31a9c 100644 --- a/frontend/src/business/components/track/plan/components/TestPlanList.vue +++ b/frontend/src/business/components/track/plan/components/TestPlanList.vue @@ -9,7 +9,7 @@