Commit d1bfa69c authored by 罗剑's avatar 罗剑

fix: 提交OCR身份认证

parent d1f6b8d3
......@@ -11,6 +11,7 @@ const url = (REACT_APP_ENV || 'dev') !== 'dev' ? `${YOURSELFER_SERVER}/${BASEURL
export const uploadFileUrl = `${BASEURL}/UploaderFiles`; // 上传文件链接
export const downloadFileUrl = `${BASEURL}/DownloadFiles`; // 下载/播放文件链接
export const uploadCardFileUrl = `${BASEURL}/CardOCRUpLoad`; // 上传文件链接
/** @End */
......
......@@ -2516,6 +2516,146 @@ const advancedWidgets = [
},
},
},
{
text: '身份证识别',
name: '身份证识别',
icon: <IconPack.FileUpload />,
schema: {
title: '身份证',
type: 'string',
widget: 'IDCard',
width: '100%',
preview: true,
},
setting: {
widget: {
title: '控件类型',
type: 'string',
widget: 'WidgetType',
displayType: 'row',
labelWidth: 80,
},
$id: {
title: '数据源',
type: 'string',
widget: 'FieldNames',
required: true,
},
title: {
title: '展示名称',
type: 'string',
required: true,
},
description: {
title: '字段说明',
type: 'string',
},
showField:{
title: '身份信息',
type: 'array',
widget:'CheckBoxGroup',
default: [],
},
// hiddenCondition: {
// title: '隐藏条件',
// type: 'string',
// description: '所有形态默认显示',
// widget: 'HiddenCondition'
// },
// options: {
// title: '',
// name: '选项',
// type: 'array',
// default: [{ value: '选项一' }],
// widget: 'SimpleList',
// dependencies: ['sourceType', 'color', 'isMultiple']
// },
// fileType: {
// title: '文件类型',
// type: 'string',
// widget: 'FileTypeSelect',
// enum: ['图片'],
// enumNames: ['图片'],
// default: '全部',
// },
durationTime: {
title: "{{formData.fileType+'最大时长'}}",
type: 'number',
description: '秒',
widget: 'slider',
default: 60,
min: 1,
max: 60,
hidden: "{{!['音频', '视频'].includes(formData.fileType)}}",
dependencies: ['fileType']
},
disabled: {
title: '只读',
type: 'boolean',
widget: 'checkbox',
default: false,
width: '50%',
},
required: {
title: '必填',
type: 'boolean',
widget: 'checkbox',
default: false,
width: '50%',
},
// preview: {
// title: '预览',
// type: 'boolean',
// widget: 'checkbox',
// default: true,
// width: '33%',
// },
// download: {
// title: '下载',
// type: 'boolean',
// widget: 'checkbox',
// default: true,
// width: '33%',
// },
photo: {
title: '允许从相册选取',
type: 'boolean',
widget: 'BooleanSwitch',
description: '仅支持移动端',
default: false,
hidden: "{{!['图片', '视频'].includes(formData.fileType)}}"
},
watermark: {
title: '水印',
type: 'boolean',
widget: 'BooleanSwitch',
description: '图片是否添加水印(仅支持移动端)',
default: false,
hidden: "{{!['图片'].includes(formData.fileType)}}"
},
groupStyle: {
title: '控件样式',
type: 'object',
properties: {}
},
width: {
title: '元素宽度',
type: 'string',
widget: 'percentSlider',
},
labelWidth: {
title: '标签宽度',
description: '默认值110',
default: 110,
type: 'number',
widget: 'slider',
max: 400,
props: {
hideNumber: true,
},
},
},
}
]
const settings = [
......
This diff is collapsed.
@import '~antd/es/style/themes/default.less';
@imgSrc: '../../../../assets/images/file';
.uploadBox,
.uploadBoxImg {
.iconImg {
width: 45px;
height: 45px;
margin: 0 auto;
&[type='通用'] {
background: url('@{imgSrc}/通用.png');
background-size: 100% 100%;
}
&[type='jpg'] {
background: url('@{imgSrc}/JPG.png');
background-size: 100% 100%;
}
&[type='png'] {
background: url('@{imgSrc}/PNG.png');
background-size: 100% 100%;
}
&[type="mp3"] {
background: url('@{imgSrc}/音乐.png');
background-size: 100% 100%;
}
&[type="mp4"] {
background: url('@{imgSrc}/视频.png');
background-size: 100% 100%;
}
&[type='docx'] {
background: url('@{imgSrc}/Word.png');
background-size: 100% 100%;
}
&[type='xlsx'],
&[type='xls'] {
background: url('@{imgSrc}/Excel.png');
background-size: 100% 100%;
}
&[type='PDF'] {
background: url('@{imgSrc}/PDF.png');
background-size: 100% 100%;
}
}
.@{ant-prefix}-form-item-label {
width: 100px;
text-align: left;
}
.ant-form-item{
margin-bottom: 12px;
}
}
.uploadBoxImg {
.@{ant-prefix}-upload-list-item-name {
display: none !important;
}
}
\ No newline at end of file
import RelationForm from './RelationForm'
import Signature from './Signature'
import IDCard from './IDCard'
const advanced = {
RelationForm,
Signature,
IDCard,
}
export default advanced
\ No newline at end of file
import React, { useEffect, useMemo, useState } from 'react';
import { Checkbox, Divider } from 'antd';
import styles from './index.less';
const plainOptions = ['身份号码','姓名', '名族', '住址','出生','性别', '失效日期', '签发机关','签发日期'];
const defaultCheckedList = ['姓名', '名族', '住址','身份号码','出生','性别', '失效日期', '签发机关','签发日期'];
const CheckboxGroup = Checkbox.Group;
const TableNames = (props) => {
const { value, schema ,onChange} = props;
const [checkedList, setCheckedList] = useState((value && value.length>0)
? value : defaultCheckedList);
const checkAll = plainOptions.length === checkedList.length;
const indeterminate = checkedList.length > 0 && checkedList.length < plainOptions.length;
const onChangeOne = (list) => {
setCheckedList(list);
onChange(list);
};
const onCheckAllChange = (e) => {
setCheckedList(e.target.checked ? plainOptions : []);
onChange(e.target.checked ? plainOptions : []);
};
return (
<div className={styles.CheckBoxGroup}>
<Checkbox indeterminate={indeterminate} onChange={onCheckAllChange} checked={checkAll}>
全选
</Checkbox>
<Divider />
<CheckboxGroup options={plainOptions} value={checkedList} onChange={onChangeOne} />
</div>
);
};
export default TableNames;
\ No newline at end of file
@import '~antd/es/style/themes/default.less';
.CheckBoxGroup {
width: 100%;
.ant-checkbox-group-item {
margin-right: 2px;
width: 90px;
}
}
\ No newline at end of file
import PercentSlider from './PercentSlider'
import ShowText from './ShowText'
import Formatting from './Formatting'
import DecimalDigits from './DecimalDigits'
import FileTypeSelect from './FileTypeSelect'
import ContentHTML from './ContentHTML'
import StyleHTML from './StyleHTML'
import RadioGroupW from './RadioGroupW'
import PercentSlider from './PercentSlider';
import ShowText from './ShowText';
import Formatting from './Formatting';
import DecimalDigits from './DecimalDigits';
import FileTypeSelect from './FileTypeSelect';
import ContentHTML from './ContentHTML';
import StyleHTML from './StyleHTML';
import RadioGroupW from './RadioGroupW';
import CheckBoxGroup from './CheckBoxGroup';
const groupStyle = {
PercentSlider,
......@@ -16,6 +17,7 @@ const groupStyle = {
ContentHTML,
StyleHTML,
RadioGroupW,
}
CheckBoxGroup,
};
export default groupStyle
\ No newline at end of file
export default groupStyle;
\ No newline at end of file
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