fix(测试计划): 修复测试计划偶发会一直发送报告内容请求的问题

--bug=1025636 --user=宋天阳 【测试跟踪】测试计划-UI用例执行结束后-前端还一直在发送报告请求
https://www.tapd.cn/55049933/s/1364929
This commit is contained in:
song-tianyang 2023-04-20 17:29:07 +08:00 committed by 建国
parent 37882175e4
commit 28e5bc9fdc
1 changed files with 5 additions and 1 deletions

View File

@ -158,6 +158,7 @@ export default {
failsTreeNodes: [],
totalTime: 0,
isRequestResult: false,
descFlag: false,
request: {},
isActive: false,
scenarioName: null,
@ -179,6 +180,7 @@ export default {
},
activated() {
this.isRequestResult = false;
this.descFlag = false;
},
props: {
reportId: String,
@ -558,7 +560,7 @@ export default {
this.report = data;
if (this.report.reportVersion && this.report.reportVersion > 1) {
this.report.status = data.status;
if (!this.isNotRunning) {
if ('RUNNING' === data.status && !this.descFlag) {
setTimeout(this.getReport, 2000);
} else {
if (data.content) {
@ -867,6 +869,7 @@ export default {
},
created() {
this.descFlag = false;
this.showCancel = this.showCancelButton;
this.getReport();
if (this.$EventBus) {
@ -874,6 +877,7 @@ export default {
}
},
destroyed() {
this.descFlag = true;
if (this.$EventBus) {
this.$EventBus.$off('projectChange', this.handleProjectChange);
}