From 2646dc94b49609efc6137871831a058e811bc1dd Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Mon, 10 Aug 2020 14:17:16 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):?= =?UTF-8?q?=20=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E4=B8=8B=E7=94=A8?= =?UTF-8?q?=E4=BE=8B=E6=8C=89=E7=85=A7ID=E5=AD=97=E6=AE=B5=E6=8E=92?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../base/mapper/ext/ExtTestPlanTestCaseMapper.xml | 9 ++++++++- .../track/plan/view/comonents/TestPlanTestCaseList.vue | 5 +++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml index b29d44d1c3..d40ee5c806 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml @@ -185,7 +185,14 @@ order by - test_plan_test_case.${order.name} ${order.type} + + + test_case.num ${order.type} + + + test_plan_test_case.${order.name} ${order.type} + + diff --git a/frontend/src/business/components/track/plan/view/comonents/TestPlanTestCaseList.vue b/frontend/src/business/components/track/plan/view/comonents/TestPlanTestCaseList.vue index ba84c3c3ba..25fa17cb0c 100644 --- a/frontend/src/business/components/track/plan/view/comonents/TestPlanTestCaseList.vue +++ b/frontend/src/business/components/track/plan/view/comonents/TestPlanTestCaseList.vue @@ -55,6 +55,7 @@ @@ -497,6 +498,10 @@ this.initTableData(); }, sort(column) { + // 每次只对一个字段排序 + if (this.condition.orders) { + this.condition.orders = []; + } _sort(column, this.condition); this.initTableData(); }, From f247807c3d16dd8a65f4b538dd23ac97674047ad Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Mon, 10 Aug 2020 14:26:51 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):?= =?UTF-8?q?=20=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E5=92=8C=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E7=94=A8=E4=BE=8B=E9=A1=B5=E9=9D=A2=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E6=A1=86=E5=8F=AF=E4=BB=A5=E6=A0=B9=E6=8D=AE=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E6=88=96=E8=80=85ID=E6=90=9C=E7=B4=A2=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml | 2 +- .../metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml index 1ae50558f5..fd4af9a938 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml @@ -154,7 +154,7 @@ - and test_case.name like CONCAT('%', #{request.name},'%') + and (test_case.name like CONCAT('%', #{request.name},'%') or test_case.num like CONCAT('%', #{request.name},'%')) and test_case.node_id in diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml index d40ee5c806..cc07abc4bf 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml @@ -126,7 +126,7 @@ - and test_case.name like CONCAT('%', #{request.name},'%') + and (test_case.name like CONCAT('%', #{request.name},'%') or test_case.num like CONCAT('%', #{request.name},'%')) and test_case.id = #{request.id}