From 4590bfea932d6bbde4e54e7ddc96e8bba65efe4c Mon Sep 17 00:00:00 2001 From: dminyi <1301963064@qq.com> Date: Mon, 09 Sep 2024 10:07:59 +0800 Subject: [PATCH] Merge branch 'master' of http://120.79.193.119:9090/r/gzzfw/frontEnd/gzDyh into master --- /dev/null | 402 ------------------------------------ gz-customerSystem/src/styles/public.less | 13 + gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx | 7 gz-customerSystem/src/views/register/matterDetail/FileTable.jsx | 24 + gz-customerSystem/src/views/register/visit/preview.jsx | 2 gz-customerSystem/src/components/personCard/index.jsx | 2 gz-customerSystem/src/views/register/eventFlow/component/EventFlow.jsx | 31 ++ gz-customerSystem/src/api/appUrl.js | 2 gz-customerSystem/src/views/register/visit/index.jsx | 19 + gz-customerSystem/src/views/register/matterDetail/NewFileCheck.jsx | 99 +++++++++ gz-customerSystem/src/views/register/handleFeedback/component/CaseResult.jsx | 14 + 11 files changed, 184 insertions(+), 431 deletions(-) diff --git a/gz-customerSystem/src/api/appUrl.js b/gz-customerSystem/src/api/appUrl.js index 8a620f0..9338a21 100644 --- a/gz-customerSystem/src/api/appUrl.js +++ b/gz-customerSystem/src/api/appUrl.js @@ -2,7 +2,7 @@ * @Company: hugeInfo * @Author: ldh * @Date: 2022-02-16 11:25:57 - * @LastEditTime: 2024-09-07 16:35:00 + * @LastEditTime: 2024-09-09 10:07:53 * @LastEditors: dminyi 1301963064@qq.com * @Version: 1.0.0 * @Description: api地址 diff --git a/gz-customerSystem/src/components/personCard/index.jsx b/gz-customerSystem/src/components/personCard/index.jsx index 90394f2..5d3e0b2 100644 --- a/gz-customerSystem/src/components/personCard/index.jsx +++ b/gz-customerSystem/src/components/personCard/index.jsx @@ -32,7 +32,7 @@ } let isAgent = false let isAgentFor = false - const typeList = data.map(item => { + const typeList = data?.map(item => { return item.perType })//获取有多少申请人和被申请人 if (typeList.indexOf('15_020008-1') != -1) { diff --git a/gz-customerSystem/src/styles/public.less b/gz-customerSystem/src/styles/public.less index 03efcd4..e824b98 100644 --- a/gz-customerSystem/src/styles/public.less +++ b/gz-customerSystem/src/styles/public.less @@ -794,6 +794,19 @@ } } +//字节对话框 +.arco-modal-simple { + width: 400px; + + .arco-modal-header { + padding: 0; + } + + .arco-modal-header { + text-align: right; + } +} + //弹窗底部按钮 .dialogFooter { width: 100%; diff --git a/gz-customerSystem/src/views/filesCheck/newFileCheck.jsx b/gz-customerSystem/src/views/filesCheck/newFileCheck.jsx deleted file mode 100644 index 57454a7..0000000 --- a/gz-customerSystem/src/views/filesCheck/newFileCheck.jsx +++ /dev/null @@ -1,402 +0,0 @@ -/* - * @Company: hugeInfo - * @Author: ldh - * @Date: 2022-03-11 11:03:44 - * @LastEditTime: 2024-09-07 16:11:58 - * @LastEditors: dminyi 1301963064@qq.com - * @Version: 1.0.0 - * @Description: 大厅来访材料附件查看 - * 附件类型对照 - NULL("22_00017-0","未分类"), - AUDIO("22_00017-1", "音频"), - VIDEO("22_00017-2", "视频"), - IMAGE("22_00017-3", "图片"), - WORD("22_00017-4", "Word文档"), - EXCEL("22_00017-5", "Excel表格"), - PDF("22_00017-6", "PDF"), - TXT("22_00017-7", "txt文本"), - ZIP("22_00017--8", "压缩文件"), - POWERPOINT("22_00017-9", "PowerPoint"), - UNKNOWN("22_00017-99", "其它文件"); - */ -import React, { useState, useEffect, useRef } from 'react'; -import { Button, Menu, Tooltip, Row, Col, Form, Space } from 'antd'; -import { Select, DatePicker } from '@arco-design/web-react'; -import { useSearchParams } from 'react-router-dom'; -import { - CaretRightOutlined, - CaretDownOutlined, - FileOutlined, - FileImageOutlined, - FilePdfOutlined, - FileWordOutlined, - FileExcelOutlined, - RotateRightOutlined, - RotateLeftOutlined, - DownloadOutlined, - LeftOutlined, - RightOutlined, -} from '@ant-design/icons'; -import * as $$ from '../../utils/utility'; - - -const { SubMenu } = Menu; -const FormItem = Form.Item; -const Option = Select.Option; - -// 获取附件 -function getFileListDataApi(data) { - return $$.ax.request({ url: `fileInfo/listFileByCat`, type: 'get', service: 'sys', data }); -} - -const NewFileCheck = ({ caseId }) => { - let appUrl = $$.appUrl; - - const [searchParams] = useSearchParams(); - - const fileId = searchParams.get('fileId'); - - const [data, setData] = useState([]); - - const [openKeys, setOpenKeys] = useState([]); - - // files数组 - const [files, setFiles] = useState([{}]); - - // 当前点击的file的index - const [fileIndex, setFileIndex] = useState(0); - - const imgBgRef = useRef(); - - const imgRef = useRef(); - const formRef = useRef(); - - useEffect(() => { - getFileListData(); - }, []); - - // 图片旋转 - function handleRotateImg(type) { - if (!imgRef || !imgRef.current) { - return false; - } - let transform = imgRef.current.style.transform, - reg = /(-)?[0-9][0-9]*/g, - arr = transform.split('rotate'), - rotate = Number(transform.match(reg)[4] || 0), - num = 0; - if (type === 'right') { - num = rotate + 90; - } else { - num = rotate + -90; - } - imgRef.current.style.transform = `${arr[0]}rotate(${num}deg)`; - } - - // 监听图片滚动事件放大,缩小 - function imgScrollFunc(e) { - if (!imgRef || !imgRef.current) { - return false; - } - let transform = imgRef.current.style.transform, - reg = /\((.+?)\)/g, - scale3d = transform.match(reg)[0], - scale3dNum = scale3d.substring(1, 2); - let num = Number(scale3dNum); - if (e.wheelDelta) { - //判断浏览器IE,谷歌滑轮事件 - if (e.wheelDelta > 0) { - //当滑轮向上滚动时 - num = num + 1; - } - if (e.wheelDelta < 0) { - //当滑轮向下滚动时 - num = num - 1; - } - } else if (e.detail) { - //Firefox滑轮事件 - if (e.detail > 0) { - //当滑轮向上滚动时 - num = num + 1; - } - if (e.detail < 0) { - //当滑轮向下滚动时 - num = num - 1; - } - } - let res = `scale3d(${num < 1 ? 1 : num},${num < 1 ? 1 : num},1) rotate${transform.match(reg)[1]}`; - imgRef.current.style.transform = res; - } - - // 判断文件的icon - function iconType(fileType) { - let result = <FileOutlined />; - if (fileType === '22_00017-3') { - result = <FileImageOutlined />; - } - if (fileType === '22_00017-5') { - result = <FileExcelOutlined />; - } - if (fileType === '22_00017-4') { - result = <FileWordOutlined />; - } - if (fileType === '22_00017-6') { - result = <FilePdfOutlined />; - } - return result; - } - - // 切换下一个,上一个 - async function handleNext(type) { - global.setSpinning(true); - let index = fileIndex + (type === 'next' ? 1 : -1); - if (files[index]) { - setFileIndex(index); - } else { - global.setSpinning(false); - if (index < 0) { - setFileIndex(files.length - 1); - return; - } - setFileIndex(0); - } - } - - // 获取附件数据 - async function getFileListData() { - global.setSpinning(true); - const res = await getFileListDataApi(caseId || searchParams.get('caseId')); - global.setSpinning(false); - if (res.type) { - let resData = res.data || []; - let arr = []; - let filesArr = []; - let index = 0; - resData.forEach((x, t) => { - arr.push(x.ownerCatName); - filesArr = filesArr.concat(x.fileList || []); - }); - forEach: for (let i = 0; i < filesArr.length - 1; i++) { - if (filesArr[i].id === fileId) { - index = i; - break forEach; - } - } - setData({ data: resData, caseNo: res.data?.caseNo }); - setFileIndex(index); - setFiles(filesArr); - setOpenKeys(arr); - } - } - console.log(files,'filesfiles') - - - - // 监听鼠标滚动事件 - useEffect(() => { - if (imgRef.current) { - imgRef.current.onload = () => { - imgBgRef.current.onmousewheel = imgScrollFunc; - }; - } - }, [files]); - - // 切换文件加载 - useEffect(() => { - if (imgRef.current) { - imgRef.current.src = `${appUrl.fileUrl}${appUrl.fileShowUrl}${files[fileIndex]?.id}`; - imgRef.current.onload = () => { - global.setSpinning(false, 'only'); - }; - } else { - global.setSpinning(false, 'only'); - } - }, [appUrl.fileShowUrl, fileIndex, appUrl.baseUrl, files]); - - return ( - <> - <nav className="filesCheck-nav" style={{ borderRight: '1px solid transparent' }}> - <Form - ref={formRef} - layout='horizontal' - style={{ marginTop: '24px', marginBottom: '20px' }} - requiredSymbol={false} - scrollToFirstError={true} - initialValues={{ - level: '三级', - isSerious: '否', - }}//默认值 - > - <Row gutter={24} style={{ marginRight: '0px' }}> - <Col span={7}> - <FormItem label='材料类型:' field='level'> - <Select placeholder='Select city' allowClear> - {['一级', '二级', '三级', '四级'].map((option, index) => ( - <Option key={option} value={option}> - {option} - </Option> - ))} - </Select> - </FormItem> - </Col> - <Col span={7}> - <FormItem - label='上传时间:' - field='name' - onChange={(e) => console.log(e.target.value, 'vvv')} - > - <DatePicker.RangePicker - defaultValue={['2020-08-08', '2020-08-18']} - separator='~' - style={{ width: '100%' }} - /> - </FormItem> - </Col> - <Col span={7}> - <FormItem - label='上传人类型:' - field='name' - onChange={(e) => console.log(e.target.value, 'vvv')} - > - <Select placeholder='Select city' allowClear style={{ width: '100%' }}> - {['一级', '二级', '三级', '四级'].map((option, index) => ( - <Option key={option} value={option}> - {option} - </Option> - ))} - </Select> - </FormItem> - - </Col> - <Col span={3}> - <Space> - <Button size="middle " type='primary'>查询</Button> - <Button size="middle ">查询</Button> - </Space> - </Col> - - </Row> - - </Form> - <div style={{ display: 'flex' }}> - <div style={{ width: '200px' }}> - <Menu - // className="filesCheck-nav-menu" - style={{ width: '200px' }} - onOpenChange={(openKeys) => setOpenKeys(openKeys)} - mode="inline" - selectedKeys={[files[fileIndex]?.id]} - openKeys={openKeys} - > - {data.data?.map((x, t) => { - return ( - <SubMenu - key={x.ownerCatName} - expandIcon={openKeys.includes(x.ownerCatName) ? <CaretRightOutlined /> : <CaretDownOutlined />} - title={x.ownerCatName} - > - {x.fileList?.map((y, z) => { - return ( - <Menu.Item - onClick={async () => { - global.setSpinning(true); - for (let i = 0; i < files.length; i++) { - if (files[i].id === y.id) { - setFileIndex(i); - break; - } - } - }} - icon={iconType(y.cat)} - key={y.id} - > - {y.name} - </Menu.Item> - ); - })} - </SubMenu> - ); - })} - </Menu> - - </div> - <div style={{ flex: 1 }}> - {files[fileIndex] ? ( - <main className="filesCheck-main"> - {/* 头部操作区 */} - <div className="filesCheck-main-action"> - <div className="filesCheck-main-action-title"> - <h3>{files[fileIndex]?.name}</h3> - </div> - {files[fileIndex]?.cat === '22_00017-3' && ( - <> - <div className="filesCheck-main-action-item"> - <Tooltip title="左转"> - <RotateLeftOutlined onClick={() => handleRotateImg('left')} /> - </Tooltip> - </div> - <div className="filesCheck-main-action-item"> - <Tooltip title="右转"> - <RotateRightOutlined onClick={() => handleRotateImg('right')} /> - </Tooltip> - </div> - </> - )} - <div className="filesCheck-main-action-item"> - <Tooltip title="下载"> - <a href={`${appUrl.fileUrl}${appUrl.fileDownUrl}${files[fileIndex]?.id}`}> - <DownloadOutlined /> - </a> - </Tooltip> - </div> - </div> - {files[fileIndex]?.ownerCat === '22_00014_1' ? ( - <div className="filesCheck-main-imgBg" ref={imgBgRef}> - <img - ref={imgRef} - style={{ transform: 'scale3d(1,1,1) rotate(0deg)' }} - className="filesCheck-main-img" - src={`${appUrl.fileUrl}${appUrl.fileShowUrl}${files[fileIndex]?.id}`} - alt="图片加载中..." - /> - </div> - ) : ( - <div className="filesCheck-main-other"> - <div className="filesCheck-main-other-icon">{iconType(files[fileIndex]?.cat)}</div> - <div className="filesCheck-main-other-text"> - 您所查看的附件不支持预览,请下载查看{files[fileIndex]?.cat === '22_00017-6' ? '或跳转预览' : ''}。 - </div> - <div> - {files[fileIndex]?.cat === '22_00017-6' && ( - <Button - className="public-buttonMargin" - onClick={() => window.open(`${appUrl.fileUrl}${appUrl.fileShowUrl}${files[fileIndex]?.id}`)} - > - 跳转查看 - </Button> - )} - <a href={`${appUrl.fileUrl}${appUrl.fileDownUrl}${files[fileIndex]?.id}`}> - <Button type="primary">下载</Button> - </a> - </div> - </div> - )} - <div className="filesCheck-imgLeft" onClick={() => handleNext('back')}> - <LeftOutlined /> - </div> - <div className="filesCheck-imgRight" onClick={() => handleNext('next')}> - <RightOutlined /> - </div> - </main> - ) : ( - <div style={{ width: '100%', paddingTop: '20%' }}>{$$.MyEmpty()}</div> - )} - </div> - </div> - </nav> - {/*图片查看*/} - </> - ); -}; - -export default NewFileCheck; diff --git a/gz-customerSystem/src/views/register/eventFlow/component/EventFlow.jsx b/gz-customerSystem/src/views/register/eventFlow/component/EventFlow.jsx index 252ab71..0f4785b 100644 --- a/gz-customerSystem/src/views/register/eventFlow/component/EventFlow.jsx +++ b/gz-customerSystem/src/views/register/eventFlow/component/EventFlow.jsx @@ -15,7 +15,11 @@ const Step = Steps.Step; function getListCaseFlow(data) { - return $$.ax.request({ url: `caseTask/listCaseFlow`, type: 'get', service: 'mediate', data }); + return $$.ax.request({ url: `caseTask/listCaseFlow`, type: 'get', service: 'mediate', data }); +} + +function accept(data) { + return $$.ax.request({ url: `caseTask/accept`, type: 'post', service: 'mediate', data }); } export default function EventFlow(props) { @@ -23,7 +27,20 @@ { label: '受理', type: 'primary', - click: () => { }, + click: () => { + Modal.confirm({ + title: '受理确认', + content: '确认受理该事件?', + onOk: async () => { + const res = await accept({ + caseTaskId: props.caseTaskId + }) + if(res.type) { + $$.infoSuccess({ content: '受理成功!' }); + } + }, + }); + }, key: 'sl', }, { @@ -106,7 +123,7 @@ const res = await getListCaseFlow({ caseId: props.caseId }) - if(res.type) { + if (res.type) { setProgressData(res.data) } } @@ -130,7 +147,7 @@ ref={scrollRef} autoHide > - <MatterDetail caseId={props.caseId}/> + <MatterDetail caseId={props.caseId} /> <div className='dataSync-hasTabPage' style={{ marginTop: '-8px' }}> <Tabs defaultActiveTab='1' > <TabPane @@ -168,7 +185,7 @@ unmountOnExit={true} maskClosable={false} > - <BackModel caseId={props.caseId} onCancel={() => { setBackVisible(false) }}/> + <BackModel caseId={props.caseId} onCancel={() => { setBackVisible(false) }} /> </Modal> <Modal title='上报' @@ -179,7 +196,7 @@ unmountOnExit={true} maskClosable={false} > - <EscalationModel caseId={props.caseId} onCancel={() => { setEscalationVisible(false) }}/> + <EscalationModel caseId={props.caseId} onCancel={() => { setEscalationVisible(false) }} /> </Modal> <Modal title='交办' @@ -192,7 +209,7 @@ autoFocus={false} focusLock={false} > - <AssignedModel caseId={props.caseId} onCancel={() => { setAssignedVisible(false) }}/> + <AssignedModel caseId={props.caseId} onCancel={() => { setAssignedVisible(false) }} /> </Modal> <div className="dataSync-excel"> <Space size="large" style={{ margin: '4px 14px' }}> diff --git a/gz-customerSystem/src/views/register/handleFeedback/component/CaseResult.jsx b/gz-customerSystem/src/views/register/handleFeedback/component/CaseResult.jsx index 3462a50..e426f52 100644 --- a/gz-customerSystem/src/views/register/handleFeedback/component/CaseResult.jsx +++ b/gz-customerSystem/src/views/register/handleFeedback/component/CaseResult.jsx @@ -38,7 +38,6 @@ const [noHandleReason, setNoHandleReason] = useState(false); const [radioValue, setRadioValue] = useState(1); const [mode, setMode] = useState(false) - const [visibleType, setVisibleType] = useState(false) const tabs = [ { index: '1', label: '化解成功' }, @@ -117,14 +116,23 @@ }) if (res.type) { $$.infoSuccess({ content: '提交成功' }); - setVisibleType(false) + handleOnCancel() } } return ( <> - <Modal visible={visibleType || visible} onCancel={handleOnCancel} title='申请结案' centered footer={null} style={{ overflow: 'auto' }}> + <Modal + visible={visible} + onCancel={handleOnCancel} + title='申请结案' + centered + footer={null} + style={{ overflow: 'auto' }} + unmountOnExit={true} + maskClosable={false} + > <div className='caseResult-title'>化解结果</div> <div className='caseResult-tabs'> {tabs.map((tab) => ( diff --git a/gz-customerSystem/src/views/register/matterDetail/FileTable.jsx b/gz-customerSystem/src/views/register/matterDetail/FileTable.jsx index a5812c4..84e9d1e 100644 --- a/gz-customerSystem/src/views/register/matterDetail/FileTable.jsx +++ b/gz-customerSystem/src/views/register/matterDetail/FileTable.jsx @@ -1,8 +1,7 @@ import React, { Fragment, useEffect, useState, useRef } from 'react'; import * as $$ from '@/utils/utility'; import ArcoUpload from '@/components/ArcoUpload'; -import NewFileCheck from '../../filesCheck/newFileCheck'; -import { IconLink } from '@arco-design/web-react/icon'; +import NewFileCheck from './NewFileCheck'; import { Row, Col, Button } from 'antd'; import { Form, Modal } from '@arco-design/web-react'; import { @@ -114,6 +113,10 @@ { value: '22_00018-102', label: '证据材料' }, ] + useEffect(() => { + console.log(props.fileInfoList); + },[props.fileInfoList]) + const personIconType = (v) => { switch (v) { case '22_00018-101': @@ -134,7 +137,7 @@ const handleUpload = () => { const newList = tableData.map(item => { - if(item.ownerType == sourceType) { + if (item.ownerType == sourceType) { const data = fileMap[sourceType] return { ...item, @@ -164,7 +167,7 @@ label='' // editData={props.editData} handleDelFile={handleDelFile} - onFileListChange={(v) => { + onFileListChange={(v) => { setFileMap({ '22_00018-101': v }) @@ -188,7 +191,7 @@ label='' // editData={props.editData} handleDelFile={handleDelFile} - onFileListChange={(v) => { + onFileListChange={(v) => { setFileMap({ '22_00018-102': v }) @@ -257,7 +260,16 @@ </div> </Modal > - <Modal style={{ width: '1200px' }} visible={filesCheck} onCancel={() => setFilesCheck(false)} footer={null} title='查看事件材料' centered> + <Modal + style={{ width: '1200px' }} + visible={filesCheck} + onCancel={() => setFilesCheck(false)} + footer={null} + title='查看事件材料' + centered + unmountOnExit={true} + maskClosable={false} + > <div style={{ marginTop: '-16px' }}> <NewFileCheck /> </div> diff --git a/gz-customerSystem/src/views/register/matterDetail/NewFileCheck.jsx b/gz-customerSystem/src/views/register/matterDetail/NewFileCheck.jsx new file mode 100644 index 0000000..a65d6a0 --- /dev/null +++ b/gz-customerSystem/src/views/register/matterDetail/NewFileCheck.jsx @@ -0,0 +1,99 @@ +import React, { useState, useEffect, useRef } from 'react'; +import { Row, Col, Space } from 'antd'; +import { Select, DatePicker, Form, Button } from '@arco-design/web-react'; +import * as $$ from '@/utils/utility'; + +const FormItem = Form.Item; +const appUrl = $$.appUrl; + + +const NewFileCheck = (props) => { + const formRef = useRef() + + return ( + <nav className="filesCheck-nav" style={{ borderRight: '1px solid transparent' }}> + <Form + ref={formRef} + layout='horizontal' + style={{ marginTop: '24px', marginBottom: '20px' }} + scrollToFirstError={true} + initialValues={{ + }}//默认值 + > + <Row gutter={24} style={{ marginRight: '0px' }}> + <Col span={7}> + <FormItem label='材料类型:' field='type'> + <Select + placeholder='请选择' + allowClear + options={[ + { + label: '全部', + value: '', + }, + { + label: '申请材料', + value: '22_00018-101', + }, + { + label: '证据材料', + value: '22_00018-102', + }, + ]} + /> + </FormItem> + </Col> + <Col span={7}> + <FormItem + label='上传时间:' + field='time' + > + <DatePicker.RangePicker + separator='~' + style={{ width: '100%' }} + /> + </FormItem> + </Col> + <Col span={7}> + <FormItem + label='上传人类型:' + field='name' + onChange={(e) => console.log(e.target.value, 'vvv')} + > + <Select + allowClear + style={{ width: '100%' }} + options={[ + { + label: '工作人员', + value: 1 + }, + { + label: '当事人', + value: 2 + } + ]} + /> + </FormItem> + </Col> + <Col span={3}> + <Space> + <Button size="middle " type='primary'>查询</Button> + <Button size="middle ">查询</Button> + </Space> + </Col> + </Row> + + </Form> + <div style={{ display: 'flex' }}> + <div style={{ width: '200px' }}> + </div> + <div style={{ flex: 1 }}> + + </div> + </div> + </nav> + ); +}; + +export default NewFileCheck; diff --git a/gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx b/gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx index 82cf116..decb012 100644 --- a/gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx +++ b/gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx @@ -49,8 +49,7 @@ }, [fakeData]) useEffect(() => { - console.log(props.partyList); - setFakeData(props.partyList.map(item => { + setFakeData(props.partyList?.map(item => { const fileInfoList = item.fileInfoList let file = [];//身份证明材料、企业登记材料 let file1 = [];//法人、机构身份证明材料、代理人授权委托书 @@ -75,7 +74,7 @@ file, file1 } - })) + }) || []) }, [props.partyList]) //获取当前时间 @@ -391,7 +390,7 @@ <div className='MediationInfo-subTitle' style={{ marginTop: '-9px' }}></div><h4>事件材料</h4> </Space> </Col> - <FileTable mainId={props.mainId} /> + <FileTable mainId={props.mainId} fileInfoList={props.fileInfoList}/> <DocumentScanner visible={scanFile} diff --git a/gz-customerSystem/src/views/register/visit/index.jsx b/gz-customerSystem/src/views/register/visit/index.jsx index 7a0e312..74a56cc 100644 --- a/gz-customerSystem/src/views/register/visit/index.jsx +++ b/gz-customerSystem/src/views/register/visit/index.jsx @@ -41,11 +41,11 @@ const Organization = (props) => { const formRef = useRef(); const routeData = useParams(); - const navigate = useNavigate(); + const navigate = useNavigate(); const [isReview, setIsReview] = useState(false);//预览页面控制 const [current, setCurrent] = useState(1); const [id, setId] = useState(); - const [partyList, setPartyList] = useState([]);//当事人信息,用于子组件回显 + const [editData, setEditData] = useState({});//回显数据 useEffect(() => { if (routeData.id) { @@ -63,13 +63,14 @@ if (res.type) { const { agentList, personList, ...rest } = res.data const parList = agentList.concat(personList) - formRef.current.setFieldsValue({ + const obj = { ...rest, fakeData: parList, myCaseType: [rest.caseTypeFirst, rest.caseType], myQuesAddress: rest.queRoad ? [rest.queProv, rest.queCity, rest.queArea, rest.queRoad] : undefined - }) - setPartyList(parList) + } + formRef.current.setFieldsValue(obj) + setEditData(obj) } } @@ -191,7 +192,13 @@ </Steps> </div> <Preview style={{ display: isReview ? '' : 'none' }} data={formRef?.current?.getFields()} /> - <VisitorRegister formRef={formRef} style={{ display: isReview ? 'none' : '' }} mainId={id} partyList={partyList} /> + <VisitorRegister + formRef={formRef} + style={{ display: isReview ? 'none' : '' }} + mainId={id} + partyList={editData.fakeData} + fileInfoList={editData.fileInfoList} + /> <div className="dataSync-excel"> <Space size="large" style={{ margin: '4px 14px' }}> <Button type="primary" style={{ backgroundColor: '#1A6FB8' }} onClick={handleSave} >保存</Button> diff --git a/gz-customerSystem/src/views/register/visit/preview.jsx b/gz-customerSystem/src/views/register/visit/preview.jsx index 254c18a..2d2c797 100644 --- a/gz-customerSystem/src/views/register/visit/preview.jsx +++ b/gz-customerSystem/src/views/register/visit/preview.jsx @@ -12,7 +12,7 @@ import '../index.less'; import TableView from '../../../components/TableView'; import { Modal } from '@arco-design/web-react'; -import NewFileCheck from '../../filesCheck/newFileCheck'; +import NewFileCheck from '../matterDetail/NewFileCheck'; import * as $$ from '../../../utils/utility'; import { ApplyDialog, AgentDialog, Respondent, Company } from './component/previewTable' -- Gitblit v1.8.0