Merge branch 'master' of http://120.79.193.119:9090/r/gzzfw/frontEnd/gzDyh into master
2 files added
4 files modified
| | |
| | | import knock from "./knock.png"; |
| | | import edit from "./edit.png"; |
| | | import applyRecord from "./applyRecord.png"; |
| | | import downO from "./downO.png"; |
| | | import up from "./up.png"; |
| | | import Audit from "./Audit.png" |
| | | |
| | | export { |
| | |
| | | knock, |
| | | edit, |
| | | applyRecord, |
| | | downO, |
| | | up, |
| | | Audit |
| | | }; |
| | |
| | | width: 12px; |
| | | margin-left: 4px; |
| | | } |
| | | |
| | | &-downUp { |
| | | width: 24px |
| | | } |
| | | } |
| | | |
| | | .dataSync { |
| | |
| | | } |
| | | } |
| | | |
| | | .auditView{ |
| | | .applyInfoClass { |
| | | width: 100%; |
| | | height: 82px; |
| | | background: #ffffff; |
| | | border-radius: 4px; |
| | | padding: 12px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: space-around; |
| | | margin-bottom: 16px; |
| | | position: relative; |
| | | |
| | | &-title { |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | &-txt { |
| | | font-size: 16px; |
| | | font-family: PingFang SC, PingFang SC-400; |
| | | font-weight: 400; |
| | | text-align: LEFT; |
| | | color: #1d2129; |
| | | line-height: 24px; |
| | | margin-right: 8px; |
| | | } |
| | | |
| | | &-tag { |
| | | &-1 { |
| | | height: 24px; |
| | | border: 1px solid #00b42a; |
| | | border-radius: 2px; |
| | | padding: 0 8px; |
| | | text-align: center; |
| | | color: #00b42a; |
| | | } |
| | | |
| | | &-2 { |
| | | height: 24px; |
| | | border: 1px solid #3491FA; |
| | | border-radius: 2px; |
| | | padding: 0 8px; |
| | | text-align: center; |
| | | color: #3491FA; |
| | | } |
| | | |
| | | &-3 { |
| | | height: 24px; |
| | | border: 1px solid #F53F3F; |
| | | border-radius: 2px; |
| | | padding: 0 8px; |
| | | text-align: center; |
| | | color: #F53F3F; |
| | | } |
| | | } |
| | | } |
| | | |
| | | &-img { |
| | | position: absolute; |
| | | right: 16px; |
| | | cursor: pointer; |
| | | top: 28px; |
| | | } |
| | | } |
| | | |
| | | .auditView { |
| | | background: #ffffff; |
| | | margin: 0px 16px 8px 16px; |
| | | padding: 12px 0px 12px 16px; |
| | | } |
| | | |
| | | .title{ |
| | | .title { |
| | | display: flex; |
| | | align-items: center; |
| | | margin-bottom: 4px; |
| | |
| | | import React from 'react' |
| | | import React, { Fragment, useState } from 'react'; |
| | | import { register, downO, up } from '@/assets/images'; |
| | | |
| | | export default function ApplyInfo(props) { |
| | | const [list, setList] = useState([ |
| | | { |
| | | appType: '上报申请', |
| | | time: '2024-7-12 10:00', |
| | | addr: '白云区新市街汇桥北社区委员会 ', |
| | | people: '李晓明', |
| | | status: 1, |
| | | statusName: '审核通过', |
| | | id: 1, |
| | | }, |
| | | { |
| | | appType: '上报申请', |
| | | time: '2024-7-12 10:00', |
| | | addr: '白云区新市街汇桥北社区委员会 ', |
| | | people: '李晓明', |
| | | status: 2, |
| | | statusName: '审核中', |
| | | id: 2, |
| | | }, |
| | | { |
| | | appType: '上报申请', |
| | | time: '2024-7-12 10:00', |
| | | addr: '白云区新市街汇桥北社区委员会 ', |
| | | people: '李晓明', |
| | | status: 3, |
| | | statusName: '审核不通过', |
| | | id: 3, |
| | | } |
| | | ]); |
| | | |
| | | const toggleView = (id) => { |
| | | setList(list.map(record => { |
| | | if (record.id === id) { |
| | | return { |
| | | ...record, |
| | | showView: !record.showView, |
| | | }; |
| | | } |
| | | return record; |
| | | })); |
| | | }; |
| | | |
| | | return ( |
| | | <div> |
| | | |
| | | <div style={{ margin: '0 16px' }}> |
| | | <div> |
| | | {list?.map(item => { |
| | | return <div className='applyInfoClass'> |
| | | <div className='applyInfoClass-img' onClick={() => { toggleView(item.id) }}> |
| | | <img src={item.showView ? up : downO} alt="" className="title-downUp" /> |
| | | </div> |
| | | <div className='applyInfoClass-title'> |
| | | <div className='applyInfoClass-title-txt'>{item.appType}</div> |
| | | <div className={`applyInfoClass-title-tag-${item.status}`} >{item.statusName}</div> |
| | | </div> |
| | | <div> |
| | | <span style={{ marginRight: '32px' }}> |
| | | <span style={{ color: '#86909C' }}>申请时间:</span><span>{item.time}</span> |
| | | </span> |
| | | <span style={{ marginRight: '8px' }}> |
| | | <span style={{ color: '#86909C' }}>申请人:</span><span>{item.addr}</span> |
| | | </span> |
| | | <span><span>{item.people}<img src={register} alt="" className="title-register" /></span></span> |
| | | </div> |
| | | </div> |
| | | })} |
| | | </div> |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | ...currentFile, |
| | | url: URL.createObjectURL(currentFile.originFile), |
| | | }); |
| | | setScanContent(fileView.response.data.ocrResult.wordsResult[0]) |
| | | |
| | | |
| | | }; |
| | | |
| | | const handleScaned = () => { |
| | | setScaned(true) |
| | | formRef.current.setFieldValue('scanContent', scanContent) |
| | | |
| | | const content = fileView.response.data.ocrResult.wordsResult.join('\n') |
| | | |
| | | setTimeout(() => { |
| | | console.log(formRef.current, content); |
| | | formRef.current.setFieldValue('scanContent', content) |
| | | }, 0) |
| | | setScanContent(content) |
| | | } |
| | | |
| | | const handleText = () => { |
| | |
| | | setScanFile(false); |
| | | setScanImage(false); |
| | | setScaned(false); |
| | | |
| | | } |
| | | |
| | | |
| | | console.log(fileView, 'fileView') |
| | | console.log(scanContent, 'scanContent') |
| | | |
| | | return ( |
| | | <> |
| | | <Modal style={{ width: '1200px' }} visible={visible} onCancel={onCancel} title='识别上传材料' centered footer={null}> |
| | | <Modal |
| | | style={{ width: '1200px' }} |
| | | visible={visible} |
| | | onCancel={onCancel} |
| | | title='识别上传材料' |
| | | centered |
| | | footer={null} |
| | | unmountOnExit={true} |
| | | maskClosable={false} |
| | | > |
| | | <Form |
| | | layout='vertical' |
| | | requiredSymbol={false} |
| | |
| | | </Form> |
| | | |
| | | </Modal> |
| | | <Modal style={{ width: '944px' }} visible={scanImage} onCancel={() => setScanImage(false)} footer={null} title='选择识别范围' centered> |
| | | <Modal |
| | | style={{ width: '944px' }} |
| | | visible={scanImage} |
| | | onCancel={() => setScanImage(false)} |
| | | footer={null} |
| | | title='选择识别范围' |
| | | centered |
| | | unmountOnExit={true} |
| | | maskClosable={false} |
| | | > |
| | | <img |
| | | src={fileView?.url} |
| | | alt="" |
| | |
| | | /> |
| | | <div><Button type="primary" onClick={() => handleScaned()} style={{ marginTop: '20px' }}>开始识别</Button></div> |
| | | </Modal> |
| | | <Modal style={{ width: '1200px' }} visible={scaned} onCancel={() => setScaned(false)} footer={null} title='识别上传材料' centered> |
| | | <Modal |
| | | style={{ width: '1200px' }} |
| | | visible={scaned} |
| | | onCancel={() => setScaned(false)} |
| | | footer={null} |
| | | title='识别上传材料' |
| | | centered |
| | | unmountOnExit={true} |
| | | maskClosable={false} |
| | | mountOnEnter={false} |
| | | > |
| | | <Form |
| | | ref={formRef} |
| | | layout='vertical' |
| | |
| | | wrapperStyle={{ width: '100%' }} |
| | | onChange={(v) => console.log(v, 'vvvvvv')} |
| | | /> |
| | | <div style={{ marginTop: '24px' }}><Button type="primary" onClick={() => { handleText() }}>使用文字</Button></div> |
| | | </FormItem> |
| | | |
| | | <div style={{ marginTop: '24px' }}><Button type="primary" onClick={() => { handleText() }}>使用文字</Button></div> |
| | | </Form> |
| | | </Modal> |
| | | |