| | |
| | | :rules="[{ required: true, message: '角色必选' }]" |
| | | > |
| | | <a-select |
| | | multiple |
| | | v-model="editform.role" |
| | | :options="roles" |
| | | :field-names="fieldNames" |
| | |
| | | let checkStrictlyAgent = ref([]); |
| | | let formRef = ref(); |
| | | |
| | | |
| | | let menuTips = ref(['权限管理', '账号']); |
| | | type SizeProps = 'mini' | 'small' | 'medium' | 'large'; |
| | | const account = ref(null); |
| | |
| | | loginName: '', |
| | | userName: '', |
| | | psw: '', |
| | | role: '', |
| | | role: [], |
| | | }); |
| | | |
| | | let size = ref<SizeProps>('medium'); |
| | |
| | | |
| | | const statusChange = async (value, record) => { |
| | | if (record?.dept) { |
| | | await Userstatus(record.userId, value).then((res) => { |
| | | }); |
| | | await Userstatus(record.userId, value).then((res) => {}); |
| | | } else { |
| | | record.status = "0"; |
| | | record.status = '0'; |
| | | Modal.warning({ |
| | | title: '提示', |
| | | content: '如想启用用户,需进行部门配置.' |
| | | content: '如想启用用户,需进行部门配置.', |
| | | }); |
| | | } |
| | | }; |
| | |
| | | ...editform.value, |
| | | } as unknown as User).then((res) => { |
| | | fetchData(); |
| | | uuu=res.data; |
| | | uuu = res.data; |
| | | }); |
| | | } else { |
| | | await UserAdd({ |
| | | ...editform.value, |
| | | } as unknown as User).then((res) => { |
| | | fetchData(); |
| | | uuu=res.data; |
| | | uuu = res.data; |
| | | }); |
| | | } |
| | | deptvisible.value = true; |
| | | checkedKeys.value = []; |
| | | expandKdys.value = []; |
| | | checkStrictly.value = []; |
| | | selectUser.value = uuu; |
| | | if (uuu.dept?false:true) { |
| | | deptvisible.value = true; |
| | | checkedKeys.value = []; |
| | | expandKdys.value = []; |
| | | checkStrictly.value = []; |
| | | selectUser.value = uuu; |
| | | } |
| | | } |
| | | }; |
| | | const editHandleOk = () => { |
| | |
| | | if (t == 2) { |
| | | visible.value = true; |
| | | formRef.value?.resetFields(); |
| | | editform.value.role=[]; |
| | | save.value = '编辑'; |
| | | editform.value.userId = record.userId; |
| | | editform.value.userName = record.userName; |
| | |
| | | editform.value.email = record.email; |
| | | editform.value.phoneNumber = record.phoneNumber; |
| | | if (record.roles?.length > 0) { |
| | | editform.value.role = record.roles[0].roleId; |
| | | //遍历record.roles |
| | | record.roles.forEach((val) => { |
| | | editform.value.role.push(val.roleId); |
| | | }) |
| | | } |
| | | } |
| | | //删除 |