From c50243e35cc9779c371d74e7326ea9d7dad8e6e1 Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Mon, 27 May 2024 19:16:51 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):=20?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E5=88=97=E8=A1=A8=E6=8E=92=E5=BA=8F=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=1041266 --user=宋昌昌 【测试计划】跨页批量归档计划-计划顺序变了 https://www.tapd.cn/55049933/s/1521745 --- .../io/metersphere/plan/service/TestPlanManagementService.java | 3 ++- frontend/src/views/test-plan/testPlan/components/planTable.vue | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanManagementService.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanManagementService.java index d90892a8f1..5a30295a91 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanManagementService.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanManagementService.java @@ -18,6 +18,7 @@ import io.metersphere.sdk.util.Translator; import io.metersphere.system.utils.PageUtils; import io.metersphere.system.utils.Pager; import jakarta.annotation.Resource; +import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -61,7 +62,7 @@ public class TestPlanManagementService { */ public Pager> page(TestPlanTableRequest request) { Page page = PageHelper.startPage(request.getCurrent(), request.getPageSize(), - StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "t.update_time desc"); + MapUtils.isEmpty(request.getSort()) ? "t.num desc" : request.getSortString()); return PageUtils.setPageInfo(page, this.getTableList(request)); } diff --git a/frontend/src/views/test-plan/testPlan/components/planTable.vue b/frontend/src/views/test-plan/testPlan/components/planTable.vue index 5824ef2572..e9280a1183 100644 --- a/frontend/src/views/test-plan/testPlan/components/planTable.vue +++ b/frontend/src/views/test-plan/testPlan/components/planTable.vue @@ -429,6 +429,7 @@ { title: 'testPlan.testPlanIndex.createTime', slotName: 'createTime', + dataIndex: 'createTime', showInTable: true, sortable: { sortDirections: ['ascend', 'descend'],