zx 3 years ago
parent 7f8432c868
commit bd1fe2ad7a

@ -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);

@ -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) {

Loading…
Cancel
Save