修复保存后url

This commit is contained in:
huangdeliang
2021-03-13 18:30:07 +08:00
parent 51be6ba97a
commit cac31face0
2 changed files with 8 additions and 2 deletions

View File

@ -132,6 +132,7 @@ const actions = {
recipesId, recipesId,
reviewStatus, reviewStatus,
temId: payload.temId, temId: payload.temId,
name: payload.name,
planId: payload.planId, planId: payload.planId,
startNum: startNumDay, startNum: startNumDay,
endNum: endNumDay endNum: endNumDay

View File

@ -128,8 +128,12 @@ export default {
this.saveRecipes({ this.saveRecipes({
callback: (query) => { callback: (query) => {
// console.log(query); // console.log(query);
let path = "/recipes/build/" + query.name + "/" + query.planId;
if (this.$route.query.temId) {
path += "?temId=" + this.$route.query.temId;
}
this.$router.replace({ this.$router.replace({
path: "/recipes/build/" + query.name + "/" + query.planId, path,
}); });
}, },
}); });
@ -141,7 +145,8 @@ export default {
this.updateStateData({ recipesData: [] }); this.updateStateData({ recipesData: [] });
}, },
handleOnTemplateClick() { handleOnTemplateClick() {
this.$refs.templateRef.showDialog(); // this.$refs.templateRef.showDialog();
console.log(this.$route.query);
}, },
handleOnCopy(form) { handleOnCopy(form) {
this.loading = true; this.loading = true;