|
@@ -99,6 +99,10 @@ const StaffDrawer: React.FC<StaffModalProps> = ({
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ const watch = () => {
|
|
|
|
+ form.setValueByPath('institution', { widget: 'treeSelect' })
|
|
|
|
+ }
|
|
|
|
+
|
|
// const handleOnFinish = () => {
|
|
// const handleOnFinish = () => {
|
|
// ref.current?.validateFields().then(async values => {
|
|
// ref.current?.validateFields().then(async values => {
|
|
// try {
|
|
// try {
|
|
@@ -153,7 +157,13 @@ const StaffDrawer: React.FC<StaffModalProps> = ({
|
|
}}
|
|
}}
|
|
title={type === ModalType.ADD ? '新增账号' : '编辑账号'}>
|
|
title={type === ModalType.ADD ? '新增账号' : '编辑账号'}>
|
|
{schema && (
|
|
{schema && (
|
|
- <FormRender form={form} schema={JSON.parse(schema)} onFinish={onFinish} onMount={onMount} />
|
|
|
|
|
|
+ <FormRender
|
|
|
|
+ form={form}
|
|
|
|
+ schema={JSON.parse(schema)}
|
|
|
|
+ onFinish={onFinish}
|
|
|
|
+ onMount={onMount}
|
|
|
|
+ watch={watch}
|
|
|
|
+ />
|
|
)}
|
|
)}
|
|
<div>
|
|
<div>
|
|
<Button onClick={form.submit}>提交</Button>
|
|
<Button onClick={form.submit}>提交</Button>
|