|
@@ -155,6 +155,28 @@ const StaffDrawer: React.FC<StaffModalProps> = ({
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
+ const watch = {
|
|
|
+ institutionID: val => {
|
|
|
+ if (!defaultFormData?.institutionID) {
|
|
|
+ queryOrganizationalStructureList({
|
|
|
+ dataID: val,
|
|
|
+ structureType: '1'
|
|
|
+ }).then(organizationList => {
|
|
|
+ if (organizationList) {
|
|
|
+ form.setSchemaByPath('organizationalStructureID', {
|
|
|
+ type: 'string',
|
|
|
+ widget: 'treeSelect',
|
|
|
+ props: {
|
|
|
+ treeDefaultExpandAll: true,
|
|
|
+ treeData: organizationList.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
// const handleOnFinish = () => {
|
|
|
// ref.current?.validateFields().then(async values => {
|
|
|
// try {
|
|
@@ -203,6 +225,7 @@ const StaffDrawer: React.FC<StaffModalProps> = ({
|
|
|
onFinish={onFinish}
|
|
|
onMount={onMount}
|
|
|
widgets={{ site: SiteInput }}
|
|
|
+ watch={watch}
|
|
|
/>
|
|
|
)}
|
|
|
<div>
|