Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xform
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
田翔
xform
Commits
3774d66d
Commit
3774d66d
authored
1 year ago
by
罗剑
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 提交台账列表身份认证组件开发
parent
aaf9349f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
67 additions
and
1 deletion
+67
-1
index.js
...e/Account/components/TablePack/components/IDCard/index.js
+62
-0
index.js
src/core/Account/components/TablePack/index.js
+4
-0
index.js
src/core/widgets/advanced/IDCard/index.js
+1
-1
No files found.
src/core/Account/components/TablePack/components/IDCard/index.js
0 → 100644
View file @
3774d66d
import
React
from
'react'
;
import
{
Space
,
Tag
}
from
'antd'
;
import
TagPack
from
'../../../../../components/TagPack'
;
import
{
Span
}
from
'slate'
;
const
IDCard
=
(
props
)
=>
{
const
{
value
,
sourceType
,
options
,
color
,
showField
}
=
props
;
const
boderColor
=
{
身份号码
:
"#8CC3F1"
,
姓名
:
"#86D7FE"
,
名族
:
"#7ECDB7"
,
住址
:
"#86EE77"
,
出生
:
"#97C0FB"
,
性别
:
"#F2B6ED"
,
失效日期
:
"#FDBBBB"
,
签发机关
:
"#F6D79F"
,
签发日期
:
"#F2B6ED"
};
const
backColor
=
{
身份号码
:
"#D9EBFF"
,
姓名
:
"#D6F1FE"
,
名族
:
"#D1F5EB"
,
住址
:
"#DEFED9"
,
出生
:
"#E1EDFE"
,
性别
:
"#FCE2FA"
,
失效日期
:
"#FCE7E7"
,
签发机关
:
"#FCF2E0"
,
签发日期
:
"#FCE2FA"
};
const
contColor
=
{
身份号码
:
"#1685FF"
,
姓名
:
"#0195D4"
,
名族
:
"#0A9C71"
,
住址
:
"#48BC2E"
,
出生
:
"#0765F3"
,
性别
:
"#DD3CC4"
,
失效日期
:
"#FF4C3E"
,
签发机关
:
"#F59E06"
,
签发日期
:
"#DD3CC4"
};
const
dataValue
=
value
?
JSON
.
parse
(
value
)
:
""
;
return
(
<
div
>
{
dataValue
!==
""
?
(
showField
.
map
((
v
,
i
)
=>
{
return
(
<
div
style
=
{{
marginBottom
:
'5px'
}}
>
<
Tag
key
=
{
v
}
style
=
{{
border
:
`1px solid
${
boderColor
[
v
]}
`
}}
color
=
{
backColor
[
v
]}
text
=
{
v
}
><
span
title
=
{
dataValue
[
v
]
||
"无"
}
style
=
{{
color
:
contColor
[
v
]}}
>
{
v
+
":"
+
(
dataValue
[
v
]
||
"无"
)}
<
/span></
Tag
>
<
/div
>
);
}))
:
(
<
Tag
key
=
{
"无"
}
style
=
{{
border
:
`1px solid #aaa`
}}
color
=
{
"#ccc"
}
text
=
{
"无"
}
>
{
"无"
}
<
/Tag>
)
}
<
/div
>
);
};
export
default
IDCard
;
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/core/Account/components/TablePack/index.js
View file @
3774d66d
...
...
@@ -10,6 +10,7 @@ import FileView from './components/FileView'
import
CoordView
from
'./components/CoordView'
import
SelectView
from
'./components/SelectView'
import
ValueEdit
from
'./components/ValueEdit'
import
IDCard
from
'./components/IDCard'
// import IconPack from '../../../components/IconPack'
import
{
isObject
,
isArray
,
getFieldInfo
}
from
'../../../../utils'
...
...
@@ -153,6 +154,9 @@ const TablePack = (props, ref) => {
if
([
'RadioButton'
,
'CheckBox'
].
includes
(
widget
))
{
return
<
SelectView
{...
props
}
/
>
}
if
(
widget
===
'IDCard'
){
return
<
IDCard
{...
props
}
/
>
}
return
<
Text
align
=
{
alignment
}
text
=
{
value
}
/
>
},
}
...
...
This diff is collapsed.
Click to expand it.
src/core/widgets/advanced/IDCard/index.js
View file @
3774d66d
...
...
@@ -297,7 +297,7 @@ const IDCard = (props) => {
<
Form
layout
=
"horizontal"
disabled
=
{
true
}
style
=
{{
maxWidth
:
'1200px'
,
marginTop
:
'10px'
}}
style
=
{{
maxWidth
:
'1200px'
}}
>
<
div
style
=
{{
display
:
'flex'
,
alignItems
:
'center'
,
width
:
'100%'
,
flexWrap
:
'wrap'
}}
>
{
...
...
This diff is collapsed.
Click to expand it.
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