From bd1fe2ad7a3ad1b7f724fd23d61da544220cd196 Mon Sep 17 00:00:00 2001 From: zx <604444282@qq.com> Date: Mon, 11 Jul 2022 15:41:19 +0800 Subject: [PATCH] zx --- src/views/MatManage/_matEdit/index.vue | 8 ++++---- src/views/MatManage/_matList/index.vue | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/views/MatManage/_matEdit/index.vue b/src/views/MatManage/_matEdit/index.vue index 5ef348f..51c1804 100644 --- a/src/views/MatManage/_matEdit/index.vue +++ b/src/views/MatManage/_matEdit/index.vue @@ -98,8 +98,8 @@ export default defineComponent({ this.proxy.$post("/referenceGroup/list", {}).then(res => { this.groupData = res.data.records; }).catch(() => {}); - if(this.$route.params.id) { - this.proxy.$post("/reference/detail", {id: this.$route.params.id}).then(res => { + if(this.$route.query.id) { + this.proxy.$post("/reference/detail", {id: this.$route.query.id}).then(res => { this.form.groupId = res.data.groupId; this.form.type = res.data.type; this.form.title = res.data.title; @@ -112,8 +112,8 @@ export default defineComponent({ } }, confirm() { - if(this.$route.params.id) { - let obj = Object.assign(this.form, {id: this.$route.params.id}) + if(this.$route.query.id) { + let obj = Object.assign(this.form, {id: this.$route.query.id}) this.proxy.$post("/reference/upd", obj).then(res => { this.$message.success(res.data) this.$router.go(-1); diff --git a/src/views/MatManage/_matList/index.vue b/src/views/MatManage/_matList/index.vue index 9cb1b6b..f684423 100644 --- a/src/views/MatManage/_matList/index.vue +++ b/src/views/MatManage/_matList/index.vue @@ -163,7 +163,7 @@ export default defineComponent({ this.$router.push({ name: "MatUpload" }) }, goEdit(value) { - this.$router.push({ name: "MatEdit",params:{id:value}}) + this.$router.push({ name: "MatEdit",query:{id:value}}) }, //删除 singleDel(id) {