Commit e444b13a authored by XieZhiXiong's avatar XieZhiXiong

fixbug

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