From bc518448a606c12874738781cc5202b74baea68c Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Sun, 26 Apr 2020 14:25:22 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../excel/listener/TestCaseDataListener.java | 8 +++-- .../track/case/components/TestCaseEdit.vue | 2 +- .../track/case/components/TestCaseImport.vue | 7 ++-- .../track/case/components/TestCaseList.vue | 36 +++++++++++++++++-- .../components/track/common/NodeEdit.vue | 27 ++++++++------ .../components/track/common/NodeTree.vue | 3 -- .../tableItems/planview/PriorityTableItem.vue | 4 +-- .../track/plan/components/TestPlanEdit.vue | 4 +-- .../view/comonents/TestPlanTestCaseList.vue | 4 ++- frontend/src/i18n/en-US.js | 1 + frontend/src/i18n/zh-CN.js | 1 + 11 files changed, 70 insertions(+), 27 deletions(-) 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 0922877aa6..6f37017e3d 100644 --- a/backend/src/main/java/io/metersphere/excel/listener/TestCaseDataListener.java +++ b/backend/src/main/java/io/metersphere/excel/listener/TestCaseDataListener.java @@ -91,14 +91,18 @@ public class TestCaseDataListener extends EasyExcelListener { JSONArray jsonArray = new JSONArray(); - String[] stepDesc = new String[0]; - String[] stepRes = new String[0]; + String[] stepDesc = new String[1]; + String[] stepRes = new String[1]; if (data.getStepDesc() != null) { stepDesc = data.getStepDesc().split("\n"); + } else { + stepDesc[0] = ""; } if (data.getStepResult() != null) { stepRes = data.getStepResult().split("\n"); + } else { + stepRes[0] = ""; } String pattern = "(^\\d+)(\\.)?"; diff --git a/frontend/src/business/components/track/case/components/TestCaseEdit.vue b/frontend/src/business/components/track/case/components/TestCaseEdit.vue index 7112654a8b..2b740a7ada 100644 --- a/frontend/src/business/components/track/case/components/TestCaseEdit.vue +++ b/frontend/src/business/components/track/case/components/TestCaseEdit.vue @@ -13,7 +13,7 @@ :label="$t('test_track.case.name')" :label-width="formLabelWidth" prop="name"> - + diff --git a/frontend/src/business/components/track/case/components/TestCaseImport.vue b/frontend/src/business/components/track/case/components/TestCaseImport.vue index c2e21574f6..d659c794a6 100644 --- a/frontend/src/business/components/track/case/components/TestCaseImport.vue +++ b/frontend/src/business/components/track/case/components/TestCaseImport.vue @@ -2,8 +2,6 @@
- - @@ -41,7 +39,6 @@ -
@@ -67,7 +64,6 @@ }, methods: { handlePreview(file) { - console.log("init"); this.init(); }, handleExceed(files, fileList) { @@ -109,6 +105,9 @@ init() { this.fileList = []; this.errList = []; + }, + open() { + this.dialogVisible = true; } } } diff --git a/frontend/src/business/components/track/case/components/TestCaseList.vue b/frontend/src/business/components/track/case/components/TestCaseList.vue index bd3c0cfa1e..8382a857f3 100644 --- a/frontend/src/business/components/track/case/components/TestCaseList.vue +++ b/frontend/src/business/components/track/case/components/TestCaseList.vue @@ -10,17 +10,25 @@ + + + 0) { + this.tableData.forEach(item => { + this.selectIds.add(item.id); + }); + } else { + this.selectIds.clear(); + } + }, + handleSelectionChange(selection, row) { + if(this.selectIds.has(row.id)){ + this.selectIds.delete(row.id); + } else { + this.selectIds.add(row.id); + } + }, + importTestCase() { + this.$refs.testCaseImport.open(); } } } diff --git a/frontend/src/business/components/track/common/NodeEdit.vue b/frontend/src/business/components/track/common/NodeEdit.vue index 54a69c2a6f..813a8bfb4a 100644 --- a/frontend/src/business/components/track/common/NodeEdit.vue +++ b/frontend/src/business/components/track/common/NodeEdit.vue @@ -1,17 +1,18 @@ diff --git a/frontend/src/business/components/track/common/tableItems/planview/PriorityTableItem.vue b/frontend/src/business/components/track/common/tableItems/planview/PriorityTableItem.vue index 9a97255e29..4b52fd3b88 100644 --- a/frontend/src/business/components/track/common/tableItems/planview/PriorityTableItem.vue +++ b/frontend/src/business/components/track/common/tableItems/planview/PriorityTableItem.vue @@ -1,8 +1,8 @@