部门管理、用户管理、字典管理

This commit is contained in:
2022-12-01 15:47:39 +08:00
parent 9b0d70ae33
commit 0f0baf7299
9 changed files with 69 additions and 7 deletions

View File

@@ -107,7 +107,7 @@
<template slot-scope="scope">
<el-switch
v-model="scope.row.enabled"
:disabled="scope.row.id === 1"
:disabled="scope.row.id === 1 || scope.row.id === 18"
active-color="#409EFF"
inactive-color="#F56C6C"
@change="changeEnabled(scope.row, scope.row.enabled,)"
@@ -130,7 +130,8 @@
<udOperation
:data="scope.row"
:permission="permission"
:disabled-dle="scope.row.id === 1"
:disabled-dle="scope.row.id === 1 || scope.row.id === 18"
:disabled-edit="scope.row.id === 1 || scope.row.id === 18"
msg="确定删除吗,如果存在下级节点则一并删除此操作不能撤销"
/>
</template>
@@ -284,6 +285,7 @@ export default {
}).then(() => {
crudDept.edit(data).then(res => {
this.crud.notify(this.dict.label.dept_status[val] + '成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
// this.crud.toQuery()
}).catch(err => {
data.enabled = !data.enabled
console.log(err.response.data.message)

View File

@@ -266,7 +266,12 @@ export default {
name: 'User',
components: { Treeselect, crudOperation, rrOperation, udOperation, pagination, DateRangePicker },
cruds() {
return CRUD({ title: '用户', url: 'api/users', crudMethod: { ...crudUser }})
return CRUD({
title: '用户',
url: 'api/users',
sort: ['deptId', 'nickName', 'username'],
crudMethod: { ...crudUser }
})
},
mixins: [presenter(), header(), form(defaultForm), crud()],
// 数据字典