Commit 3774d66d authored by 罗剑's avatar 罗剑

fix: 提交台账列表身份认证组件开发

parent aaf9349f
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
......@@ -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} />
},
}
......
......@@ -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'}}>
{
......
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