|
|
@@ -123,7 +123,7 @@
|
|
|
@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
|
|
|
@@ -327,7 +327,7 @@
|
|
|
let checkStrictlyDialog = ref([]);
|
|
|
let checkStrictlyAgent = ref([]);
|
|
|
let formRef = ref();
|
|
|
- const formRefPaw = ref();
|
|
|
+
|
|
|
|
|
|
let menuTips = ref(['权限管理', '账号']);
|
|
|
type SizeProps = 'mini' | 'small' | 'medium' | 'large';
|
|
|
@@ -447,7 +447,16 @@
|
|
|
]);
|
|
|
|
|
|
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) => {
|
|
|
@@ -475,19 +484,27 @@
|
|
|
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 = () => {
|
|
|
@@ -524,7 +541,7 @@
|
|
|
//编辑
|
|
|
if (t == 2) {
|
|
|
visible.value = true;
|
|
|
- formRefPaw.value?.resetFields();
|
|
|
+ formRef.value?.resetFields();
|
|
|
save.value = '编辑';
|
|
|
editform.value.userId = record.userId;
|
|
|
editform.value.userName = record.userName;
|
|
|
@@ -612,7 +629,7 @@
|
|
|
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,
|