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
875e074c
Commit
875e074c
authored
Jul 03, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复 区域选择器 没有回调的问题
parent
8476337b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
+14
-5
index.tsx
...pages/member/memberImport/components/MemberForm/index.tsx
+3
-2
utils.tsx
src/pages/member/utils.tsx
+11
-3
No files found.
src/pages/member/memberImport/components/MemberForm/index.tsx
View file @
875e074c
...
...
@@ -10,9 +10,9 @@ import NiceForm from '@/components/NiceForm';
import
{
useAsyncInitSelect
}
from
'@/formSchema/effects/useAsyncInitSelect'
;
import
{
useLinkageUtils
}
from
'@/utils/formEffectUtils'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
GetMemberAbilitySubGetResponse
,
GetMemberMainpageDetailGetResponse
}
from
'@/services/MemberV2Api'
;
import
{
initDetailSchema
}
from
'./schema'
;
import
{
getAuth
,
setAuth
}
from
'@/utils/auth'
;
import
{
initDetailSchema
}
from
'./schema'
;
import
AreaSelect
from
'../../../components/AreaSelect'
;
const
formActions
=
createFormActions
();
const
{
...
...
@@ -559,6 +559,7 @@ const MemberForm: React.FC<MemberFormProps> = ({
components=
{
{
RadioGroup
:
Radio
.
Group
,
CheckboxGroup
:
Checkbox
.
Group
,
AreaSelect
,
}
}
effects=
{
(
$
,
actions
)
=>
{
useAsyncInitSelect
(
...
...
src/pages/member/utils.tsx
View file @
875e074c
...
...
@@ -94,7 +94,7 @@ export function coverColFiltersItem(
}
};
type
FieldType
=
'string'
|
'long'
|
'upload'
|
'radio'
|
'select'
|
'checkbox'
|
'area'
;
export
type
FieldType
=
'string'
|
'long'
|
'upload'
|
'radio'
|
'select'
|
'checkbox'
|
'area'
;
// 字段校验规则枚举:0-无校验规则,1-邮箱规则,2-手机号码规则,3-身份证规则,4-电话号码规则
const
RULE_REG_MAP
=
{
...
...
@@ -154,7 +154,6 @@ const getFieldType = (field: ElementType) => {
'x-component'
:
'RadioGroup'
,
enum
:
field
.
fieldEnum
,
'x-component-props'
:
{
showDesc
:
false
,
disabled
:
!!
field
.
disabled
,
},
};
...
...
@@ -163,6 +162,9 @@ const getFieldType = (field: ElementType) => {
case
'select'
:
{
description
=
{
enum
:
field
.
fieldEnum
,
'x-component-props'
:
{
disabled
:
!!
field
.
disabled
,
},
};
break
;
}
...
...
@@ -170,12 +172,18 @@ const getFieldType = (field: ElementType) => {
description
=
{
'x-component'
:
'CheckboxGroup'
,
enum
:
field
.
fieldEnum
,
'x-component-props'
:
{
disabled
:
!!
field
.
disabled
,
},
};
break
;
}
case
'area'
:
{
description
=
{
'x-component'
:
'AreaSelect'
,
'x-component-props'
:
{
disabled
:
!!
field
.
disabled
,
},
};
break
;
}
...
...
@@ -206,7 +214,7 @@ export function renderFieldTypeContent(fieldType: FieldType, fieldValue: any): R
case
'upload'
:
node
=
(
<
PicWrap
pics=
{
[
fieldValue
.
fieldValue
]
}
pics=
{
[
fieldValue
]
}
/>
);
break
;
...
...
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