fix(性能测试): 修复接口转性能测试多次点击保存并执行提示项目文件已存在问题
--bug=1025740 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001025740
This commit is contained in:
parent
3aea862c96
commit
bac4be00f4
|
@ -505,10 +505,18 @@ export default {
|
||||||
let formData = this.getSaveOption();
|
let formData = this.getSaveOption();
|
||||||
this.loading = saveTest(this.test, formData).then(({ data }) => {
|
this.loading = saveTest(this.test, formData).then(({ data }) => {
|
||||||
this.test.id = data.data.id;
|
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"));
|
this.$success(this.$t("commons.save_success"));
|
||||||
runTest(this.test).then((response) => {
|
runTest(this.test).then((response) => {
|
||||||
let reportId = response.data;
|
let reportId = response.data;
|
||||||
this.$router.push({ path: "/performance/report/view/" + reportId });
|
this.$router.push({path: "/performance/report/view/" + reportId});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue