| | |
| | | @ok="editHandleOk" |
| | | width="48%" |
| | | > |
| | | <a-form ref="formRefPaw" :model="editform" auto-label-width> |
| | | <a-form ref="formRef" :model="editform" auto-label-width> |
| | | <a-row :gutter="20"> |
| | | <a-col :span="10"> |
| | | <a-form-item |
| | |
| | | let checkStrictlyDialog = ref([]); |
| | | let checkStrictlyAgent = ref([]); |
| | | let formRef = ref(); |
| | | const formRefPaw = ref(); |
| | | |
| | | |
| | | let menuTips = ref(['权限管理', '账号']); |
| | | type SizeProps = 'mini' | 'small' | 'medium' | 'large'; |
| | |
| | | ]); |
| | | |
| | | const statusChange = async (value, record) => { |
| | | await Userstatus(record.userId, value).then((res) => {}); |
| | | if (record?.dept) { |
| | | await Userstatus(record.userId, value).then((res) => { |
| | | }); |
| | | } else { |
| | | record.status = "0"; |
| | | Modal.warning({ |
| | | title: '提示', |
| | | content: '如想启用用户,需进行部门配置.' |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | const handleCancel = (type) => { |
| | |
| | | if (err) { |
| | | visible.value = true; |
| | | } else { |
| | | let uuu; |
| | | if (editform.value.userId.length > 0) { |
| | | await UserEdit({ |
| | | ...editform.value, |
| | | } as unknown as User).then((res) => { |
| | | fetchData(); |
| | | uuu=res.data; |
| | | }); |
| | | } else { |
| | | await UserAdd({ |
| | | ...editform.value, |
| | | } as unknown as User).then((res) => { |
| | | fetchData(); |
| | | uuu=res.data; |
| | | }); |
| | | } |
| | | deptvisible.value = true; |
| | | checkedKeys.value = []; |
| | | expandKdys.value = []; |
| | | checkStrictly.value = []; |
| | | selectUser.value = uuu; |
| | | } |
| | | }; |
| | | const editHandleOk = () => { |
| | |
| | | //编辑 |
| | | if (t == 2) { |
| | | visible.value = true; |
| | | formRefPaw.value?.resetFields(); |
| | | formRef.value?.resetFields(); |
| | | save.value = '编辑'; |
| | | editform.value.userId = record.userId; |
| | | editform.value.userName = record.userName; |
| | |
| | | checkStrictly.value = []; |
| | | selectUser.value = record; |
| | | expandKdys.value.push('0'); |
| | | if (record.dept) { |
| | | if (record?.dept) { |
| | | record.dept.forEach((val) => { |
| | | checkStrictly.value.push({ |
| | | deptId: val.deptId, |