From 72a46953e839100edabf83de89f08270ac8ef146 Mon Sep 17 00:00:00 2001 From: liuchuang <123456> Date: Wed, 29 Jul 2020 19:01:11 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=85=B3=E8=81=94=E9=83=A8=E9=97=A8=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=EF=BC=8C=E7=94=A8=E4=BA=8E=E5=B1=85=E6=B0=91=E7=AB=AF=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E5=B7=A5=E4=BD=9C=E7=AB=AF=E5=92=8C=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=AB=AF=E5=85=B3=E8=81=94=E8=B4=A6=E5=8F=B7=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/sys/user-add-or-update.vue | 34 ++++++++++++++++++++ 1 file changed, 34 insertions(+) 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) => {