rev:基础数据维护

This commit is contained in:
zhangzhiqiang
2023-05-09 13:54:35 +08:00
parent e3031c5267
commit b974006173
64 changed files with 882 additions and 854 deletions

View File

@@ -131,12 +131,12 @@ import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
const defaultForm = { roleId: null, name: null, remark: null }
const defaultForm = { role_id: null, name: null, remark: null }
export default {
name: 'Role',
components: { pagination, crudOperation, rrOperation, udOperation, crudMenu },
cruds() {
return CRUD({ idField: 'roleId', title: '角色', url: 'api/sysRole', crudMethod: { ...crudRoles }})
return CRUD({ idField: 'role_id', title: '角色', url: 'api/sysRole', crudMethod: { ...crudRoles }})
},
mixins: [presenter(), header(), form(defaultForm), crud()],
data() {
@@ -203,7 +203,7 @@ export default {
// 清空菜单的选中
this.$refs.menu.setCheckedKeys([])
// 保存当前的角色id
this.currentId = val.roleId
this.currentId = val.role_id
// 初始化默认选中的key
this.menu_ids = []
val.menus.forEach(function(data) {
@@ -237,7 +237,7 @@ export default {
// 保存菜单
saveMenu() {
this.menuLoading = true
const role = { roleId: this.currentId, menus: [] }
const role = { role_id: this.currentId, menus: [] }
// 得到已选中的 key 值
this.menu_ids.forEach(function(menu_id) {
const menu = { menu_id: menu_id }