From c3d1c454b545fb3278065aa04021cbcd43d35b9b Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Mon, 15 Mar 2021 20:39:09 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E7=94=A8=E4=BE=8B=E8=AF=84?= =?UTF-8?q?=E5=AE=A1=E6=B7=BB=E5=8A=A0=E8=84=91=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/ext/ExtTestReviewCaseMapper.xml | 13 +- .../track/service/TestCaseNodeService.java | 13 +- .../common/components/MsModuleMinder.vue | 1 + .../common/components/MsTableHeader.vue | 2 +- .../components/track/case/TestCase.vue | 2 +- .../minder/TestCaseMinder.vue | 61 +-------- .../track/common/minder/TestReviewMinder.vue | 128 ++++++++++++++++++ .../track/common/minder/minderUtils.js | 59 ++++++++ .../review/components/TestCaseReviewList.vue | 8 +- .../view/components/TestReviewFunction.vue | 47 +++++-- .../components/TestReviewTestCaseList.vue | 8 +- 11 files changed, 250 insertions(+), 92 deletions(-) rename frontend/src/business/components/track/{case/components => common}/minder/TestCaseMinder.vue (65%) create mode 100644 frontend/src/business/components/track/common/minder/TestReviewMinder.vue create mode 100644 frontend/src/business/components/track/common/minder/minderUtils.js diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestReviewCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestReviewCaseMapper.xml index 00f773ad2b..a520d29d33 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestReviewCaseMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestReviewCaseMapper.xml @@ -97,10 +97,13 @@ - \ No newline at end of file + diff --git a/backend/src/main/java/io/metersphere/track/service/TestCaseNodeService.java b/backend/src/main/java/io/metersphere/track/service/TestCaseNodeService.java index 6322147321..ee74a265d0 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestCaseNodeService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestCaseNodeService.java @@ -212,11 +212,14 @@ public class TestCaseNodeService extends NodeTreeService { List caseIds = testCaseReviewTestCases.stream().map(TestCaseReviewTestCase::getCaseId).collect(Collectors.toList()); List nodeList = getReviewNodeDTO(id, caseIds); - TestCaseNodeDTO testCaseNodeDTO = new TestCaseNodeDTO(); - testCaseNodeDTO.setName(name); - testCaseNodeDTO.setLabel(name); - testCaseNodeDTO.setChildren(nodeList); - list.add(testCaseNodeDTO); + if (!CollectionUtils.isEmpty(nodeList)) { + TestCaseNodeDTO testCaseNodeDTO = new TestCaseNodeDTO(); + testCaseNodeDTO.setName(name); + testCaseNodeDTO.setLabel(name); + testCaseNodeDTO.setChildren(nodeList); + testCaseNodeDTO.setProjectId(id); + list.add(testCaseNodeDTO); + } }); return list; diff --git a/frontend/src/business/components/common/components/MsModuleMinder.vue b/frontend/src/business/components/common/components/MsModuleMinder.vue index 6b5975f838..d8ceb1aa5c 100644 --- a/frontend/src/business/components/common/components/MsModuleMinder.vue +++ b/frontend/src/business/components/common/components/MsModuleMinder.vue @@ -5,6 +5,7 @@ class="minder-container" :import-json="importJson" :height="700" + :progress-enable="false" @save="save" /> diff --git a/frontend/src/business/components/common/components/MsTableHeader.vue b/frontend/src/business/components/common/components/MsTableHeader.vue index 2a9918eae9..3cf7c5c6d3 100644 --- a/frontend/src/business/components/common/components/MsTableHeader.vue +++ b/frontend/src/business/components/common/components/MsTableHeader.vue @@ -1,6 +1,6 @@