fix(接口测试): 解决创建新版本失败版本弹窗一直loading的问题

--user=郭雨琦
--bug=1012839
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001012839
This commit is contained in:
guoyuqi 2022-04-27 16:56:03 +08:00 committed by 刘瑞斌
parent f63acc306e
commit f468c6d75a
7 changed files with 30 additions and 1 deletions

View File

@ -1531,6 +1531,10 @@ export default {
this.$emit('refresh', this.currentScenario); this.$emit('refresh', this.currentScenario);
resolve(); resolve();
}); });
} else {
if (this.$refs.versionHistory) {
this.$refs.versionHistory.loading = false;
}
} }
}) })
} }

View File

@ -367,6 +367,9 @@ export default {
this.createNewVersionVisible = true; this.createNewVersionVisible = true;
} else { } else {
this.saveApi(); this.saveApi();
if (this.$refs.versionHistory) {
this.$refs.versionHistory.loading = false;
}
} }
}, },
del(row) { del(row) {

View File

@ -691,7 +691,6 @@ export default {
// //
this.httpForm.versionId = row.id; this.httpForm.versionId = row.id;
this.httpForm.versionName = row.name; this.httpForm.versionName = row.name;
this.$set(this.httpForm, 'newVersionRemark', !!this.httpForm.remark); this.$set(this.httpForm, 'newVersionRemark', !!this.httpForm.remark);
this.$set(this.httpForm, 'newVersionDeps', this.$refs.apiOtherInfo.relationshipCount > 0); this.$set(this.httpForm, 'newVersionDeps', this.$refs.apiOtherInfo.relationshipCount > 0);
this.$set(this.httpForm, 'newVersionCase', this.httpForm.caseTotal > 0); this.$set(this.httpForm, 'newVersionCase', this.httpForm.caseTotal > 0);
@ -704,6 +703,13 @@ export default {
this.createNewVersionVisible = true; this.createNewVersionVisible = true;
} else { } else {
this.saveApi(); this.saveApi();
if (this.$refs.versionHistory) {
this.$refs.versionHistory.loading = false;
}
}
},error => {
if (this.$refs.versionHistory) {
this.$refs.versionHistory.loading = false;
} }
}); });
}, },

View File

@ -372,6 +372,9 @@ export default {
this.createNewVersionVisible = true; this.createNewVersionVisible = true;
} else { } else {
this.saveApi(); this.saveApi();
if (this.$refs.versionHistory) {
this.$refs.versionHistory.loading = false;
}
} }
}, },
del(row) { del(row) {

View File

@ -502,6 +502,9 @@ export default {
this.createNewVersionVisible = true; this.createNewVersionVisible = true;
} else { } else {
this.saveApi(); this.saveApi();
if (this.$refs.versionHistory) {
this.$refs.versionHistory.loading = false;
}
} }
}); });
}, },

View File

@ -309,6 +309,9 @@ export default {
}, },
save(newVersion) { save(newVersion) {
if (!this.validTest()) { if (!this.validTest()) {
if (this.$refs.versionHistory) {
this.$refs.versionHistory.loading = false;
}
return; return;
} }
if (!this.test.versionId) { if (!this.test.versionId) {
@ -327,6 +330,10 @@ export default {
}); });
this.getVersionHistory(); this.getVersionHistory();
} }
}, error => {
if (this.$refs.versionHistory) {
this.$refs.versionHistory.loading = false;
}
}); });
}, },
saveAndRun() { saveAndRun() {

View File

@ -1011,6 +1011,9 @@ export default {
this.$refs.selectPropDialog.open(); this.$refs.selectPropDialog.open();
} else { } else {
this.saveCase(); this.saveCase();
if (this.$refs.versionHistory) {
this.$refs.versionHistory.loading = false;
}
} }
} else { } else {
this.$refs.versionHistory.loading = false; this.$refs.versionHistory.loading = false;