chore(测试计划): 性能测试列表隐藏状态只展示执行结果

This commit is contained in:
CaptainB 2023-04-11 12:00:27 +08:00 committed by 刘瑞斌
parent 11c850a766
commit 0e5f1a9238
2 changed files with 19 additions and 10 deletions

View File

@ -348,10 +348,10 @@ export default {
this.$success(this.$t('test_track.plan.load_case.exec'));
this.$message(this.$t('commons.run_message'));
this.$refs.taskCenter.open();
// 10ssocket
// 15ssocket
refreshTable = window.setTimeout(() => {
this.initTable();
}, 10 * 1000);
}, 15 * 1000);
},
search() {
this.currentPage = 1;
@ -539,12 +539,21 @@ export default {
try {
let obj = JSON.parse(e.data);
let {planCaseId, planCaseStatus, planCaseReportStatus, planCaseReportId} = obj;
let data = this.tableData.filter(d => d.id === planCaseId);
if (data.length > 0) {
data[0]['status'] = planCaseReportStatus;
data[0]['caseStatus'] = planCaseStatus;
data[0]['loadReportId'] = planCaseReportId;
this.tableData.forEach(d => {
if (d.id === planCaseId) {
d.status = planCaseReportStatus;
if (planCaseReportStatus === 'Completed') {
d.caseStatus = 'success';
} else if (planCaseReportStatus === 'Error') {
d.caseStatus = 'error';
} else {
d.caseStatus = planCaseStatus;
}
d.loadReportId = planCaseReportId;
}
});
} catch (ex) {
// nothing
}

View File

@ -62,8 +62,8 @@ const TRACK_HEADER = {
{id: 'projectName', key: '3', label: 'load_test.project_name'},
{id: 'userName', key: '4', label: 'load_test.user_name'},
{id: 'createTime', key: '5', label: 'commons.create_time'},
{id: 'status', key: '6', label: 'commons.status'},
// {id: 'caseStatus', key: '7', label: 'test_track.plan.load_case.execution_status'},
// {id: 'status', key: '6', label: 'commons.status'},
{id: 'caseStatus', key: '7', label: 'test_track.plan.load_case.execution_status'},
{id: 'loadReportId', key: '8', label: 'test_track.plan.load_case.report'},
],
//测试计划-场景用例