diff --git a/src/views/modules/sys/user-add-or-update.vue b/src/views/modules/sys/user-add-or-update.vue index c71c168..180c061 100644 --- a/src/views/modules/sys/user-add-or-update.vue +++ b/src/views/modules/sys/user-add-or-update.vue @@ -35,6 +35,28 @@ :readonly="true" :placeholder="$t('user.deptName')"> + + + + + + + { }) }, // 获取角色列表 @@ -256,6 +283,7 @@ export default { roleIdList: [] } this.$refs.deptListTree.setCurrentKey(this.dataForm.deptId) + this.$refs.relationDeptListTree.setCurrentKey(this.dataForm.relationDeptId) // 角色配置, 区分是否为默认角色 for (var i = 0; i < res.data.roleIdList.length; i++) { if (this.roleList.filter(item => item.id === res.data.roleIdList[i])[0]) { @@ -272,6 +300,12 @@ export default { this.dataForm.deptName = data.name this.deptListVisible = false }, + // 关联部门树, 选中 + relationDeptListTreeCurrentChangeHandle (data, node) { + this.dataForm.relationDeptId = data.id + this.dataForm.relationDeptName = data.name + this.relationDeptListVisible = false + }, // 表单提交 dataFormSubmitHandle: debounce(function () { this.$refs['dataForm'].validate((valid) => {