功能变化: 前端菜单按钮跳转路由参数

treebeard
李强 2022-05-18 13:55:46 +08:00
parent 4b11e53f48
commit de43b5945a
2 changed files with 3 additions and 5 deletions

View File

@ -72,8 +72,7 @@ export default {
createPermission (scope) {
this.$router.push({
name: 'menuButton',
params: { id: scope.row.id },
query: { name: scope.row.name }
query: { id: scope.row.id, name: scope.row.name }
})
},
// viewsvue

View File

@ -43,7 +43,6 @@
import * as api from './api'
import { crudOptions } from './crud'
import { d2CrudPlus } from 'd2-crud-plus'
import router from '@/router'
export default {
name: 'menuButton',
mixins: [d2CrudPlus.crud],
@ -55,11 +54,11 @@ export default {
return crudOptions(this)
},
pageRequest (query) {
const menuId = this.$route.params.id
const menuId = this.$route.query.id
return api.GetList({ ...query, menu: menuId })
},
addRequest (row) {
const menuId = this.$route.params.id
const menuId = this.$route.query.id
return api.createObj(row, menuId)
},
updateRequest (row) {