fix(性能测试): 修复接口转性能测试多次点击保存并执行提示项目文件已存在问题

--bug=1025740 --user=郭雨琦
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001025740
This commit is contained in:
guoyuqi 2023-04-27 15:57:20 +08:00 committed by 刘瑞斌
parent 3aea862c96
commit bac4be00f4
1 changed files with 9 additions and 1 deletions

View File

@ -505,10 +505,18 @@ export default {
let formData = this.getSaveOption();
this.loading = saveTest(this.test, formData).then(({ data }) => {
this.test.id = data.data.id;
if (this.$route.path.indexOf("/performance/test/edit/") < 0) {
this.$router.push({
path: "/performance/test/edit/" + data.data.id,
});
} else {
this.$refs.basicConfig.uploadList = [];
this.getTest(this.test.id);
}
this.$success(this.$t("commons.save_success"));
runTest(this.test).then((response) => {
let reportId = response.data;
this.$router.push({ path: "/performance/report/view/" + reportId });
this.$router.push({path: "/performance/report/view/" + reportId});
});
});
},