|
@ -174,7 +174,7 @@ |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-button size="mini" type="text" icon="el-icon-edit" @click="crud.toEdit(scope.row)">修改</el-button> |
|
|
<el-button size="mini" type="text" icon="el-icon-edit" @click="crud.toEdit(scope.row)">修改</el-button> |
|
|
<el-button size="mini" type="text" icon="el-icon-delete" @click="handdeleted(scope.row)">删除</el-button> |
|
|
<el-button size="mini" type="text" icon="el-icon-delete" @click="handdeleted(scope.row)">删除</el-button> |
|
|
<el-dropdown v-hasPermi="['system:user:resetPwd', 'system:user:edit']" size="mini"> |
|
|
<el-dropdown size="mini"> |
|
|
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button> |
|
|
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button> |
|
|
<el-dropdown-menu slot="dropdown"> |
|
|
<el-dropdown-menu slot="dropdown"> |
|
|
<el-dropdown-item icon="el-icon-refresh-right"><span @click="resetPassword(scope.row)">重置密码</span></el-dropdown-item> |
|
|
<el-dropdown-item icon="el-icon-refresh-right"><span @click="resetPassword(scope.row)">重置密码</span></el-dropdown-item> |
|
@ -661,7 +661,7 @@ export default { |
|
|
this.$nextTick(function() { |
|
|
this.$nextTick(function() { |
|
|
for (let j = 0; j < row.roles.length; j++) { |
|
|
for (let j = 0; j < row.roles.length; j++) { |
|
|
for (let i = 0; i < this.rolesDatas.length; i++) { |
|
|
for (let i = 0; i < this.rolesDatas.length; i++) { |
|
|
if (this.rolesDatas[i].roleId == row.roles[j].roleId) { |
|
|
if (this.rolesDatas[i].role_id == row.roles[j].role_id) { |
|
|
this.$refs.roleTable.toggleRowSelection(this.rolesDatas[i], true) |
|
|
this.$refs.roleTable.toggleRowSelection(this.rolesDatas[i], true) |
|
|
break |
|
|
break |
|
|
} |
|
|
} |
|
@ -680,11 +680,9 @@ export default { |
|
|
this.multipleSelection = [] |
|
|
this.multipleSelection = [] |
|
|
// 获取权限范围 |
|
|
// 获取权限范围 |
|
|
crudDataPermission.getDataScopeType().then(res => { |
|
|
crudDataPermission.getDataScopeType().then(res => { |
|
|
console.log('权限范围', res) |
|
|
|
|
|
this.dataDialog.dataScopeType = res |
|
|
this.dataDialog.dataScopeType = res |
|
|
// permissions |
|
|
// permissions |
|
|
crudDataPermission.getDataPermissionOption().then(res => { |
|
|
crudDataPermission.getDataPermissionOption().then(res => { |
|
|
console.log('数据权限', res) |
|
|
|
|
|
this.permissions = res |
|
|
this.permissions = res |
|
|
this.dataDialog.person_name = row.person_name |
|
|
this.dataDialog.person_name = row.person_name |
|
|
this.dataDialog.username = row.username |
|
|
this.dataDialog.username = row.username |
|
@ -693,7 +691,6 @@ export default { |
|
|
this.dataPerm = true |
|
|
this.dataPerm = true |
|
|
// 回显数据 |
|
|
// 回显数据 |
|
|
crudDataPermission.getDataShow(row.user_id).then(res => { |
|
|
crudDataPermission.getDataShow(row.user_id).then(res => { |
|
|
console.log('要回显的数据', res) |
|
|
|
|
|
this.$nextTick(function() { |
|
|
this.$nextTick(function() { |
|
|
for (var index = 0; index < res.length; index++) { |
|
|
for (var index = 0; index < res.length; index++) { |
|
|
for (var i = 0; i < this.dataDialog.dataScopeType.length; i++) { |
|
|
for (var i = 0; i < this.dataDialog.dataScopeType.length; i++) { |
|
@ -841,7 +838,6 @@ export default { |
|
|
}, |
|
|
}, |
|
|
checkChange(data, checked, indeterminate) { |
|
|
checkChange(data, checked, indeterminate) { |
|
|
const _this = this |
|
|
const _this = this |
|
|
// console.log(data, checked, indeterminate); |
|
|
|
|
|
// 选中全部子节点,父节点也默认选中,但是子节点再次取消勾选或者全部子节点取消勾选也不会影响父节点勾选状态 |
|
|
// 选中全部子节点,父节点也默认选中,但是子节点再次取消勾选或者全部子节点取消勾选也不会影响父节点勾选状态 |
|
|
const checkNode = _this.$refs.deptUser.getNode(data)// 获取当前节点 |
|
|
const checkNode = _this.$refs.deptUser.getNode(data)// 获取当前节点 |
|
|
// 勾选部分子节点,父节点变为半选状态 |
|
|
// 勾选部分子节点,父节点变为半选状态 |
|
|