fix(表格全选): #1007128 修复表格100条/页数据时全选卡顿的问题

【【github#6710】在用例列表页面中,如果用例显示条数设置为100条/页,或50条/页时,点击全选选框,页面反应卡顿,响应时间较久】https://www.tapd.cn/55049933/bugtrace/bugs/view?bug_id=1155049933001007128
This commit is contained in:
song-tianyang 2021-11-15 14:11:21 +08:00 committed by song-tianyang
parent 2be5a2e749
commit e0883d30aa
2 changed files with 14 additions and 14 deletions

View File

@ -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<String, String> executePerformanceIdMap = new HashMap<>();
Map<String, String> 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();
}
});
}

View File

@ -35,7 +35,7 @@
:resizable="false" align="center">
<template v-slot:default="scope">
<!-- 选中记录后浮现的按钮提供对记录的批量操作 -->
<show-more-btn :has-showed="hasBatchTipShow" :is-show="scope.row.showMore" :buttons="batchOperators"
<show-more-btn :has-showed="!scope.row.showBatchTip" :is-show="scope.row.showMore" :buttons="batchOperators"
:size="selectDataCounts"/>
</template>
</el-table-column>
@ -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);
}
}