From 1373ca4e2cd04896254690e0bd24316067f1645d Mon Sep 17 00:00:00 2001 From: zhangyongtian <1181606322@qq.com> Date: Tue, 10 Sep 2024 15:46:35 +0800 Subject: [PATCH] feat: 结案归档 --- gz-customerSystem/src/views/register/visit/index.jsx | 26 +++++++++++++++++--------- 1 files changed, 17 insertions(+), 9 deletions(-) diff --git a/gz-customerSystem/src/views/register/visit/index.jsx b/gz-customerSystem/src/views/register/visit/index.jsx index 7a0e312..fba0412 100644 --- a/gz-customerSystem/src/views/register/visit/index.jsx +++ b/gz-customerSystem/src/views/register/visit/index.jsx @@ -8,7 +8,7 @@ */ import React, { useState, useRef, Fragment, useEffect } from "react"; -import { useSearchParams, useNavigate } from 'react-router-dom'; +import { useParams, useNavigate } from 'react-router-dom'; import NewPage from '@/components/NewPage'; import * as $$ from '@/utils/utility'; import "@arco-themes/react-gzzz/css/arco.css"; @@ -17,7 +17,6 @@ import { Button, Steps, Message } from '@arco-design/web-react'; import VisitorRegister from './component/visitorRegister'; import Preview from './preview'; -import { useParams } from 'react-router-dom'; const Step = Steps.Step; @@ -41,11 +40,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 +62,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) } } @@ -190,8 +190,16 @@ <Step title='结案归档' disabled /> </Steps> </div> - <Preview style={{ display: isReview ? '' : 'none' }} data={formRef?.current?.getFields()} /> - <VisitorRegister formRef={formRef} style={{ display: isReview ? 'none' : '' }} mainId={id} partyList={partyList} /> + <div style={{ backgroundColor: '#ffff', margin: '8px 8px 0px 16px', padding: '12px 18px 16px 16px', height: 'calc(100vh - 228px)', overflowY: 'scroll', display: isReview ? '' : 'none' }}> + <Preview style={{ display: isReview ? '' : 'none' }} data={formRef?.current?.getFields()} mainId={id} /> + </div> + <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> -- Gitblit v1.8.0