diff --git a/backend/src/main/java/io/metersphere/excel/listener/TestCaseDataListener.java b/backend/src/main/java/io/metersphere/excel/listener/TestCaseDataListener.java index 1dff285527..6ec7448a8f 100644 --- a/backend/src/main/java/io/metersphere/excel/listener/TestCaseDataListener.java +++ b/backend/src/main/java/io/metersphere/excel/listener/TestCaseDataListener.java @@ -144,12 +144,12 @@ public class TestCaseDataListener extends EasyExcelListener { String[] stepRes = new String[1]; if (data.getStepDesc() != null) { - stepDesc = data.getStepDesc().split("\n"); + stepDesc = data.getStepDesc().split("\r\n"); } else { stepDesc[0] = ""; } if (data.getStepResult() != null) { - stepRes = data.getStepResult().split("\n"); + stepRes = data.getStepResult().split("\r\n"); } else { stepRes[0] = ""; } diff --git a/backend/src/main/java/io/metersphere/track/service/TestCaseService.java b/backend/src/main/java/io/metersphere/track/service/TestCaseService.java index 36579a7de3..808fda0cc8 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestCaseService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestCaseService.java @@ -520,8 +520,8 @@ public class TestCaseService { for (int j = 0; j < jsonArray.size(); j++) { int num = j + 1; - step.append(num + "." + jsonArray.getJSONObject(j).getString("desc") + "\n"); - result.append(num + "." + jsonArray.getJSONObject(j).getString("result") + "\n"); + step.append(num + "." + jsonArray.getJSONObject(j).getString("desc") + "\r\n"); + result.append(num + "." + jsonArray.getJSONObject(j).getString("result") + "\r\n"); } data.setStepDesc(step.toString()); diff --git a/frontend/src/business/components/track/case/TestCase.vue b/frontend/src/business/components/track/case/TestCase.vue index f3bae0ef40..5dd3b0690f 100644 --- a/frontend/src/business/components/track/case/TestCase.vue +++ b/frontend/src/business/components/track/case/TestCase.vue @@ -8,6 +8,7 @@ @setTreeNodes="setTreeNodes" @exportTestCase="exportTestCase" @saveAsEdit="editTestCase" + @refreshAll="refreshAll" :type="'edit'" ref="nodeTree" /> diff --git a/frontend/src/business/components/track/common/TestCaseNodeTree.vue b/frontend/src/business/components/track/common/TestCaseNodeTree.vue index ed31d2c7df..11f3a7f1b1 100644 --- a/frontend/src/business/components/track/common/TestCaseNodeTree.vue +++ b/frontend/src/business/components/track/common/TestCaseNodeTree.vue @@ -101,7 +101,7 @@ export default { this.$emit("refreshTable"); }, refreshAll() { - this.selectRows.clear(); + // this.selectRows.clear(); this.$emit('refreshAll'); }, handleCommand(e) {