提交 0f86f4b0 作者: ZhangLingKun

功能:后台账号单位回显

上级 447d12db
...@@ -71,7 +71,10 @@ const AddEditModal: React.FC<propType> = (props) => { ...@@ -71,7 +71,10 @@ const AddEditModal: React.FC<propType> = (props) => {
if (!open) return; if (!open) return;
getCompanyList().then(); getCompanyList().then();
if (!data) return; if (!data) return;
form.setFieldsValue(data); form.setFieldsValue({
...data,
companyId: companyList.find((i) => i.label === data.companyName)?.value || 1,
});
// console.log('data --->', data); // console.log('data --->', data);
}, [open]); }, [open]);
return ( return (
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论