Browse Source

优化用户绑定部门

hubin 1 year ago
parent
commit
a53bcad7e2
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/views/setting/user/index.vue

+ 2 - 2
src/views/setting/user/index.vue

@@ -180,7 +180,7 @@ const formsDialog = [
 		options: []
 	},
 	{
-		prop: 'departments',
+		prop: 'departmentIds',
 		label: '所属部门',
 		itemType: 'select',
 		multiple: true,
@@ -409,7 +409,7 @@ const table_edit = async row => {
 	try {
 		const data = await user.userRoleIdsApi({ id: row.id })
 		isCreate.value = false
-		activeData.value = { ...row, status: row.status ? true : false, roleIds: data?.roleIds }
+		activeData.value = { ...row, status: row.status ? true : false, roleIds: data?.roleIds, departmentIds: data?.departmentIds }
 		visible.value = true
 	} catch (e) {
 		ElMessage.error(`获取用户所属角色失败~`)