From 457f4a4be58936a7cbdefe307aad539cee1eb62a Mon Sep 17 00:00:00 2001 From: zhangyongtian <1181606322@qq.com> Date: Tue, 27 Aug 2024 18:30:45 +0800 Subject: [PATCH] feat: 地图 --- gz-customerSystem/src/views/register/visit/component/applyDialog.jsx | 35 ++++++++++++++++++++++++++--------- 1 files changed, 26 insertions(+), 9 deletions(-) diff --git a/gz-customerSystem/src/views/register/visit/component/applyDialog.jsx b/gz-customerSystem/src/views/register/visit/component/applyDialog.jsx index 181b8e7..3d31adb 100644 --- a/gz-customerSystem/src/views/register/visit/component/applyDialog.jsx +++ b/gz-customerSystem/src/views/register/visit/component/applyDialog.jsx @@ -1,5 +1,5 @@ import React, { useState, useEffect, useRef, Fragment } from "react"; -import * as $$ from '../../../../utils/utility'; +import * as $$ from '@/utils/utility'; import { Row, Col, Space } from 'antd'; import { CheckOutlined, @@ -11,7 +11,7 @@ caseperfection_legal_active, caseperfection_organize, caseperfection_organize_active, -} from '../../../../assets/images/icon'; +} from '@/assets/images/icon'; import { Form, Input, Button, Radio, Select, Modal, Cascader, Upload, Message } from '@arco-design/web-react'; import KeyVisits from "./keyVisits"; import SelectUnitDialog from "./selectUnitDialog"; @@ -28,6 +28,15 @@ const formRef = useRef(); const [perClass, setPerClass] = useState('09_01001-1'); const [visible, setVisible] = useState(false); + + useEffect(() => { + if (props.editData) { + //编辑 + formRef.current.setFieldsValue({ + ...props.editData + }) + } + }, []) const personIconType = (v) => { @@ -271,12 +280,19 @@ if (formRef.current) { formRef.current.validate(undefined, (errors, values) => { if (!errors) { - props.handleAddParty({ - ...values, - partyType: props.dialogType, - perClass: perClass, - perClassName: props.dialogType === 0 ? '申请方当事人' : '被申请方当事人' - }) + if (props.editData) { + props.handleAddParty({ + ...props.editData, + ...values + }) + } else { + props.handleAddParty({ + ...values, + partyType: props.dialogType, + perClass: perClass, + perClassName: props.dialogType === 0 ? '申请方当事人' : '被申请方当事人' + }) + } props.onClose() } }); @@ -319,6 +335,7 @@ requiredSymbol={false} initialValues={{ }}//默认值 + scrollToFirstError > <Row gutter={[32, 0]} style={{ margin: '0 -10px' }}>{formType(perClass)}</Row> </Form> @@ -336,7 +353,7 @@ className="dialogPrimary" onClick={handleSave} > - 保存信息 + 保存 </Button> <Button className="dialogBack"> 重置 -- Gitblit v1.8.0