From 27fb65ba5c31fbbad4c17166a72901d8db80ae03 Mon Sep 17 00:00:00 2001 From: dminyi <1301963064@qq.com> Date: Wed, 04 Sep 2024 19:18:56 +0800 Subject: [PATCH] 联调办理反馈接口 --- gz-customerSystem/src/views/register/visit/index.jsx | 37 ++++++++++++++++++++++++++++++++----- 1 files changed, 32 insertions(+), 5 deletions(-) diff --git a/gz-customerSystem/src/views/register/visit/index.jsx b/gz-customerSystem/src/views/register/visit/index.jsx index e56cdc3..c32fc7c 100644 --- a/gz-customerSystem/src/views/register/visit/index.jsx +++ b/gz-customerSystem/src/views/register/visit/index.jsx @@ -2,7 +2,7 @@ * @Author: dminyi 1301963064@qq.com * @Date: 2024-08-09 09:59:43 * @LastEditors: dminyi 1301963064@qq.com - * @LastEditTime: 2024-08-31 16:52:26 + * @LastEditTime: 2024-09-04 10:20:40 * @FilePath: \gzDyh\gz-customerSystem\src\views\basicInformation\organization\index.jsx * @Description: 来访登记 */ @@ -13,9 +13,10 @@ import "@arco-themes/react-gzzz/css/arco.css"; import '../index.less'; import { Space } from 'antd'; -import { Button, Steps, Tabs, Message } from '@arco-design/web-react'; +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; @@ -31,17 +32,43 @@ return $$.ax.request({ url: `caseInfo/caseRegister`, type: 'post', service: 'mediate', data }); } +function getDetailData(id) { + return $$.ax.request({ url: `/casedraftInfo/getCasedraftInfo?id=${id}`, type: 'get', service: 'mediate' }); +} -const Organization = () => { + +const Organization = (props) => { const formRef = useRef(); + const routeData = useParams(); const [isReview, setIsReview] = useState(false);//预览页面控制 const [current, setCurrent] = useState(1); const [id, setId] = useState(); useEffect(() => { - getAppId() + if (routeData.id) { + getDeatil(routeData.id) + setId(routeData.id) + } else { + getAppId() + } + }, []) + + //编辑 + const getDeatil = async (id) => { + const res = await getDetailData(id) + if (res.type) { + console.log(res); + const { agentList, personList, ...rest } = res.data + formRef.current.setFieldsValue({ + ...rest, + fakeData: agentList.concat(personList), + myCaseType: [rest.caseTypeFirst, rest.caseType], + myQuesAddress: rest.queRoad ? [rest.queProv, rest.queCity, rest.queArea, rest.queRoad] : undefined + }) + } + } //获取id const getAppId = async () => { @@ -159,7 +186,7 @@ <Step title='结案归档' disabled /> </Steps> </div> - <Preview style={{ display: isReview ? '' : 'none' }} /> + <Preview style={{ display: isReview ? '' : 'none' }} data={formRef?.current?.getFields()} /> <VisitorRegister formRef={formRef} style={{ display: isReview ? 'none' : '' }} mainId={id} /> <div className="dataSync-excel"> <Space size="large" style={{ margin: '4px 14px' }}> -- Gitblit v1.8.0