Commit e444b13a authored by XieZhiXiong's avatar XieZhiXiong

fixbug

parent 18785ab4
...@@ -8,8 +8,6 @@ import { merge } from 'rxjs'; ...@@ -8,8 +8,6 @@ import { merge } from 'rxjs';
import { usePageStatus } from '@/hooks/usePageStatus'; import { usePageStatus } from '@/hooks/usePageStatus';
import ReutrnEle from '@/components/ReturnEle'; import ReutrnEle from '@/components/ReturnEle';
import NiceForm from '@/components/NiceForm'; import NiceForm from '@/components/NiceForm';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect'; import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect'; import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { useLinkageUtils } from '@/utils/formEffectUtils'; import { useLinkageUtils } from '@/utils/formEffectUtils';
...@@ -21,6 +19,7 @@ const formActions = createFormActions(); ...@@ -21,6 +19,7 @@ const formActions = createFormActions();
const { const {
onFieldValueChange$, onFieldValueChange$,
onFieldInputChange$, onFieldInputChange$,
onFormInit$,
} = FormEffectHooks; } = FormEffectHooks;
const addMember: React.FC<any> = props => { const addMember: React.FC<any> = props => {
...@@ -181,7 +180,6 @@ const addMember: React.FC<any> = props => { ...@@ -181,7 +180,6 @@ const addMember: React.FC<any> = props => {
// 手动触发改变的话重置角色、等级下拉框 // 手动触发改变的话重置角色、等级下拉框
onFieldInputChange$('memberTypeId').subscribe(() => { onFieldInputChange$('memberTypeId').subscribe(() => {
console.log('onFieldInputChange')
linkage.value('roleId', undefined); linkage.value('roleId', undefined);
linkage.enum('roleId', []); linkage.enum('roleId', []);
linkage.value('levelId', undefined); linkage.value('levelId', undefined);
...@@ -335,17 +333,18 @@ const addMember: React.FC<any> = props => { ...@@ -335,17 +333,18 @@ const addMember: React.FC<any> = props => {
actions={formActions} actions={formActions}
initialValues={memberInfo || {}} initialValues={memberInfo || {}}
effects={($, actions) => { effects={($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'name',
FORM_FILTER_PATH,
);
useAsyncInitSelect( useAsyncInitSelect(
['memberTypeId', 'countryCodeId'], ['memberTypeId', 'countryCodeId'],
getPageitemsBasic, getPageitemsBasic,
); );
onFormInit$().subscribe(() => {
actions.setFieldState('roleId', state => {
state.loading = true;
})
})
useAsyncLinkageEffect(); useAsyncLinkageEffect();
}} }}
schema={initDetailSchema(memberItems)} schema={initDetailSchema(memberItems)}
......
...@@ -357,7 +357,7 @@ export const initDetailSchema = (props: any) => { ...@@ -357,7 +357,7 @@ export const initDetailSchema = (props: any) => {
}, },
}; };
if (Object.keys(props).length > 0) { if (props) {
for (let [index, item] of props.entries()) { for (let [index, item] of props.entries()) {
tabSchema.properties[`tab-${index + 3}`] = { tabSchema.properties[`tab-${index + 3}`] = {
type: 'object', type: 'object',
......
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