Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄庭坚
jinfa-platform
Commits
e444b13a
Commit
e444b13a
authored
Sep 04, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixbug
parent
18785ab4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
11 deletions
+10
-11
addMember.tsx
src/pages/member/memberImport/addMember.tsx
+8
-9
index.tsx
src/pages/member/memberImport/schema/index.tsx
+2
-2
No files found.
src/pages/member/memberImport/addMember.tsx
View file @
e444b13a
...
@@ -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
)
}
...
...
src/pages/member/memberImport/schema/index.tsx
View file @
e444b13a
...
@@ -228,7 +228,7 @@ export const initDetailSchema = (props: any) => {
...
@@ -228,7 +228,7 @@ export const initDetailSchema = (props: any) => {
title
:
'会员角色'
,
title
:
'会员角色'
,
enum
:
[],
enum
:
[],
'x-component-props'
:
{
'x-component-props'
:
{
placeholder
:
'请选择'
,
placeholder
:
'请选择'
,
},
},
},
},
levelId
:
{
levelId
:
{
...
@@ -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'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment