Commit 15d54f2b by sunhaiwei

修改无法添加用户的问题

parent d88d585d
...@@ -431,7 +431,7 @@ ...@@ -431,7 +431,7 @@
dataIndex: 'name', dataIndex: 'name',
}, },
]; ];
const certificateFormSchema: FormSchema[] = [ /*const certificateFormSchema: FormSchema[] = [
{ {
field: 'certificateCode', field: 'certificateCode',
label: '证书编号', label: '证书编号',
...@@ -450,7 +450,7 @@ ...@@ -450,7 +450,7 @@
placeholder: '请输入证书名称', placeholder: '请输入证书名称',
}, },
}, },
]; ];*/
const emit = defineEmits(['success', 'register']); const emit = defineEmits(['success', 'register']);
const { notification } = useMessage(); const { notification } = useMessage();
const isUpdate = ref(true); const isUpdate = ref(true);
...@@ -463,7 +463,7 @@ ...@@ -463,7 +463,7 @@
const roleDatasource = ref<any[]>([]); const roleDatasource = ref<any[]>([]);
const postDatasource = ref<any[]>([]); const postDatasource = ref<any[]>([]);
const orgDatasource = ref<any[]>([]); const orgDatasource = ref<any[]>([]);
const certificateDatasource = ref<any[]>([]); //const certificateDatasource = ref<any[]>([]);
const [ const [
registerForm1, registerForm1,
...@@ -500,7 +500,7 @@ ...@@ -500,7 +500,7 @@
}, },
}); });
const [ /*const [
registerForm3, registerForm3,
{ setFieldsValue: setFieldsValue3, resetFields: resetFields3, validate: validate3 }, { setFieldsValue: setFieldsValue3, resetFields: resetFields3, validate: validate3 },
] = useForm({ ] = useForm({
...@@ -513,7 +513,7 @@ ...@@ -513,7 +513,7 @@
actionColOptions: { actionColOptions: {
span: 23, span: 23,
}, },
}); });*/
const [registerTable1, { setTableData: setTableData1, setPagination: setPagination1 }] = useTable( const [registerTable1, { setTableData: setTableData1, setPagination: setPagination1 }] = useTable(
{ {
...@@ -572,7 +572,7 @@ ...@@ -572,7 +572,7 @@
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => { const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields1(); resetFields1();
resetFields2(); resetFields2();
resetFields3(); //resetFields3();
setModalProps({ confirmLoading: false, width: 800, fixedHeight: true, destroyOnClose: true }); setModalProps({ confirmLoading: false, width: 800, fixedHeight: true, destroyOnClose: true });
activeKey.value = '1'; activeKey.value = '1';
isUpdate.value = !!data?.isUpdate; isUpdate.value = !!data?.isUpdate;
...@@ -588,10 +588,10 @@ ...@@ -588,10 +588,10 @@
setFieldsValue2({ setFieldsValue2({
...record, ...record,
}); });
setFieldsValue3({ /*setFieldsValue3({
certificateCode: record.certificates?.[0]?.certificateCode || '', certificateCode: record.certificates?.[0]?.certificateCode || '',
certificateName: record.certificates?.[0]?.certificateName || '', certificateName: record.certificates?.[0]?.certificateName || '',
}); });*/
roleDatasource.value = record.roles || []; roleDatasource.value = record.roles || [];
postDatasource.value = record.posts || []; postDatasource.value = record.posts || [];
orgDatasource.value = record.chargeDepartments || []; orgDatasource.value = record.chargeDepartments || [];
...@@ -701,7 +701,7 @@ ...@@ -701,7 +701,7 @@
try { try {
const values = await validate1(); const values = await validate1();
const values2 = await validate2(); const values2 = await validate2();
const values3 = await validate3(); //const values3 = await validate3();
const roleIds = roleDatasource.value?.map((x) => x.id); const roleIds = roleDatasource.value?.map((x) => x.id);
const postIds = postDatasource.value?.map((x) => x.id); const postIds = postDatasource.value?.map((x) => x.id);
const chargeDepartmentIds = orgDatasource.value?.map((x) => x.id); const chargeDepartmentIds = orgDatasource.value?.map((x) => x.id);
...@@ -712,10 +712,7 @@ ...@@ -712,10 +712,7 @@
roleIds, roleIds,
postIds, postIds,
chargeDepartmentIds, chargeDepartmentIds,
certificates: values3.certificateCode || values3.certificateName ? [{ certificates: [],
certificateCode: values3.certificateCode || '',
certificateName: values3.certificateName || '',
}] : [],
}; };
setModalProps({ confirmLoading: true }); setModalProps({ confirmLoading: true });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment