功能变化: 前端菜单按钮跳转路由参数
parent
4b11e53f48
commit
de43b5945a
|
@ -72,8 +72,7 @@ export default {
|
||||||
createPermission (scope) {
|
createPermission (scope) {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: 'menuButton',
|
name: 'menuButton',
|
||||||
params: { id: scope.row.id },
|
query: { id: scope.row.id, name: scope.row.name }
|
||||||
query: { name: scope.row.name }
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 返回views目录下所有vue文件路径
|
// 返回views目录下所有vue文件路径
|
||||||
|
|
|
@ -43,7 +43,6 @@
|
||||||
import * as api from './api'
|
import * as api from './api'
|
||||||
import { crudOptions } from './crud'
|
import { crudOptions } from './crud'
|
||||||
import { d2CrudPlus } from 'd2-crud-plus'
|
import { d2CrudPlus } from 'd2-crud-plus'
|
||||||
import router from '@/router'
|
|
||||||
export default {
|
export default {
|
||||||
name: 'menuButton',
|
name: 'menuButton',
|
||||||
mixins: [d2CrudPlus.crud],
|
mixins: [d2CrudPlus.crud],
|
||||||
|
@ -55,11 +54,11 @@ export default {
|
||||||
return crudOptions(this)
|
return crudOptions(this)
|
||||||
},
|
},
|
||||||
pageRequest (query) {
|
pageRequest (query) {
|
||||||
const menuId = this.$route.params.id
|
const menuId = this.$route.query.id
|
||||||
return api.GetList({ ...query, menu: menuId })
|
return api.GetList({ ...query, menu: menuId })
|
||||||
},
|
},
|
||||||
addRequest (row) {
|
addRequest (row) {
|
||||||
const menuId = this.$route.params.id
|
const menuId = this.$route.query.id
|
||||||
return api.createObj(row, menuId)
|
return api.createObj(row, menuId)
|
||||||
},
|
},
|
||||||
updateRequest (row) {
|
updateRequest (row) {
|
||||||
|
|
Loading…
Reference in New Issue