From e0883d30aaca44f9b34494c6e6456dda8727b5e9 Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Mon, 15 Nov 2021 14:11:21 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=A1=A8=E6=A0=BC=E5=85=A8=E9=80=89):=20#1?= =?UTF-8?q?007128=20=E4=BF=AE=E5=A4=8D=E8=A1=A8=E6=A0=BC100=E6=9D=A1/?= =?UTF-8?q?=E9=A1=B5=E6=95=B0=E6=8D=AE=E6=97=B6=E5=85=A8=E9=80=89=E5=8D=A1?= =?UTF-8?q?=E9=A1=BF=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【【github#6710】在用例列表页面中,如果用例显示条数设置为100条/页,或50条/页时,点击全选选框,页面反应卡顿,响应时间较久】https://www.tapd.cn/55049933/bugtrace/bugs/view?bug_id=1155049933001007128 --- .../metersphere/track/service/TestPlanService.java | 14 +++----------- .../components/common/components/table/MsTable.vue | 14 +++++++++++--- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/backend/src/main/java/io/metersphere/track/service/TestPlanService.java b/backend/src/main/java/io/metersphere/track/service/TestPlanService.java index 840900ba88..966c209881 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestPlanService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestPlanService.java @@ -1070,7 +1070,6 @@ public class TestPlanService { } catch (Exception e) { e.printStackTrace(); } - if (runModeConfig == null) { runModeConfig = new RunModeConfig(); runModeConfig.setMode("serial"); @@ -1082,7 +1081,6 @@ public class TestPlanService { runModeConfig.setEnvMap(new HashMap<>()); } } - //创建测试报告,然后返回的ID重新赋值为resourceID,作为后续的参数 TestPlanScheduleReportInfoDTO reportInfoDTO = testPlanReportService.genTestPlanReportBySchedule(projectID, testPlanID, userId, triggerMode); TestPlanReport testPlanReport = reportInfoDTO.getTestPlanReport(); @@ -1107,13 +1105,8 @@ public class TestPlanService { } } extTestPlanMapper.updateActualEndTimeIsNullById(testPlanID); - - - String planReportId = testPlanReport.getId(); - testPlanLog.info("ReportId[" + planReportId + "] created. TestPlanID:[" + testPlanID + "]. " + "API Run Config:【" + apiRunConfig + "】"); - //不同任务的执行ID Map executePerformanceIdMap = new HashMap<>(); Map executeApiCaseIdMap = new HashMap<>(); @@ -1185,18 +1178,17 @@ public class TestPlanService { } private void listenTaskExecuteStatus(String planReportId) { - executorService.submit(() -> { try { - Thread.sleep(30000); + //10s 查询一次状态 + Thread.sleep(10000); while (TestPlanReportExecuteCatch.getTestPlanExecuteInfo(planReportId) != null) { testPlanReportService.countReport(planReportId); - Thread.sleep(30000); + Thread.sleep(10000); } } catch (InterruptedException e) { e.printStackTrace(); } - }); } diff --git a/frontend/src/business/components/common/components/table/MsTable.vue b/frontend/src/business/components/common/components/table/MsTable.vue index 5252982767..8ade46a0f7 100644 --- a/frontend/src/business/components/common/components/table/MsTable.vue +++ b/frontend/src/business/components/common/components/table/MsTable.vue @@ -35,7 +35,7 @@ :resizable="false" align="center"> @@ -132,7 +132,7 @@ export default { selectRows: new Set(), selectIds: [], tableActive: true, - hasBatchTipShow: false, + // hasBatchTipShow: false, defaultSort: {} }; }, @@ -242,11 +242,18 @@ export default { this.doLayout(); this.checkTableRowIsSelect(); this.listenRowDrop(); + this.initData(); }); } } }, methods: { + initData(){ + //初始化数据是否显示提示块 + if(this.data.length > 0){ + this.data[0].showBatchTip = true; + } + }, // 批量操作提示, 第一次勾选提示, 之后不提示 // 先添加 batch-popper 样式, 全选后再移除样式, 只保留可见框内第一条数据的提示 removeBatchPopper() { @@ -267,7 +274,8 @@ export default { if (i == index) { elements[i].classList.remove('batch-popper'); setTimeout(() => { - this.hasBatchTipShow = true; + // this.hasBatchTipShow = true; + this.initData(); }, 1500); } }