From 558043a024fccd7ebb86b6927ae12757922c24c8 Mon Sep 17 00:00:00 2001
From: zhangyongtian <1181606322@qq.com>
Date: Fri, 30 Aug 2024 14:57:34 +0800
Subject: [PATCH] feat:更改当事人组件
---
gz-customerSystem/src/views/register/visit/component/applyDialog.jsx | 2
gz-customerSystem/src/components/personCard/KeyVisits.jsx | 0
gz-customerSystem/src/components/personCard/DetailDialog.jsx | 2
gz-customerSystem/src/views/register/visit/component/MattersInfo.jsx | 8 -
gz-customerSystem/src/views/register/visit/component/agentDialog.jsx | 2
gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx | 28 ------
gz-customerSystem/src/components/personCard/index.jsx | 191 ++++++++++++++++++++++++++++-------------------
gz-customerSystem/src/views/register/visit/index.jsx | 7 +
8 files changed, 124 insertions(+), 116 deletions(-)
diff --git a/gz-customerSystem/src/views/register/visit/component/detailDialog.jsx b/gz-customerSystem/src/components/personCard/DetailDialog.jsx
similarity index 99%
rename from gz-customerSystem/src/views/register/visit/component/detailDialog.jsx
rename to gz-customerSystem/src/components/personCard/DetailDialog.jsx
index 7810b96..a62c172 100644
--- a/gz-customerSystem/src/views/register/visit/component/detailDialog.jsx
+++ b/gz-customerSystem/src/components/personCard/DetailDialog.jsx
@@ -1,5 +1,5 @@
import React, { useEffect, useState } from 'react'
-import KeyVisits from "./keyVisits";
+import KeyVisits from "./KeyVisits";
import { link } from '@/assets/images'
export default function DetailDialog(props) {
diff --git a/gz-customerSystem/src/views/register/visit/component/keyVisits.jsx b/gz-customerSystem/src/components/personCard/KeyVisits.jsx
similarity index 100%
rename from gz-customerSystem/src/views/register/visit/component/keyVisits.jsx
rename to gz-customerSystem/src/components/personCard/KeyVisits.jsx
diff --git a/gz-customerSystem/src/components/personCard/index.jsx b/gz-customerSystem/src/components/personCard/index.jsx
index dc1acb3..df5109e 100644
--- a/gz-customerSystem/src/components/personCard/index.jsx
+++ b/gz-customerSystem/src/components/personCard/index.jsx
@@ -6,20 +6,30 @@
* @FilePath: \gzDyh\gz-customerSystem\src\components\personCard\index.jsx
* @Description: 来访登记当事人卡片
*/
-import React from 'react';
+import React, { Fragment, useState } from 'react';
import PropTypes from 'prop-types';
import { Typography, Row, Col, Space, Tooltip } from 'antd';
+import { Modal } from '@arco-design/web-react';
import { del, add } from '../../assets/images';
-import * as $$ from '@/utils/utility';
+import DetailDialog from "./DetailDialog";
const { Link, Text } = Typography;
/**
* isCheck, // 是否无操作
* data, // 当事人数据
- * handleCheckParty, // 点击查看详情
* handleDeleteParty, // 删除当事人
*/
-const PersonCard = ({ isCheck, data, handleCheckParty, handleDeleteParty, handleAdd, handleEdit }) => {
+const PersonCard = ({ isCheck, data, handleDeleteParty, handleAdd, handleEdit }) => {
+ const [editData, setEditData] = useState(null);
+ const [detailVisabled, setDetailVisabled] = useState(false);//查看信息弹窗控制
+ const [dialogType, setDialogType] = useState(0);//添加当事人的类型
+
+ const peopleMap = {
+ '15_020008-1': '申请方',
+ '15_020008-2': '被申请方',
+ '24_00006-1': '申请方代理人',
+ '24_00006-2': '被申请方代理人'
+ }
let isAgent = false
let isAgentFor = false
const typeList = data.map(item => {
@@ -31,83 +41,110 @@
if (typeList.indexOf('15_020008-2') != -1) {
isAgentFor = true
}
+
+ const handleCheckParty = (value) => {
+ setDialogType(value.perType)
+ setEditData(value)
+ setDetailVisabled(true)
+ }
+
return (
- <Row gutter={[24, 16]}>
- {data.map((x, t) => (
- <Col span={7} key={t}>
- <div className="public-personCard" style={{ cursor: 'pointer' }}>
- <div
- className={`public-personCard-card public-personCard-card-${(x.perType === '15_020008-1' || x.perType === '24_00006-1') ? 'blue' : 'orange'}`}
- onClick={() => handleCheckParty(x)}
- >
- {x.trueName.substr(0, 1)}
- <div className="public-personCard-card-check">查看</div>
- <img
- src={del}
- alt=''
- style={{ width: '16px', height: '16px', position: 'absolute', top: '-8px', left: '56px' }}
- onClick={(event) => { handleDeleteParty(event, x) }}
- />
- </div>
- <div className="public-personCard-content">
- <div className="public-personCard-title">
- <Text style={{ maxWidth: '80%', paddingRight: '8px' }} ellipsis={{ tooltip: x.trueName }}>
- {x.trueName}
- </Text>
- <Text onClick={() => { handleEdit(x) }} ellipsis={{ tooltip: x.perTypeName }} className={`public-personCard-tag public-personCard-tag-${(x.perType === '15_020008-1' || x.perType === '24_00006-1') ? 'blue' : 'orange'}`}>
- {x.perTypeName}
- </Text>
+ <Fragment>
+ <Row gutter={[24, 16]}>
+ {data.map((x, t) => (
+ <Col span={7} key={t}>
+ <div className="public-personCard" style={{ cursor: 'pointer' }}>
+ <div
+ className={`public-personCard-card public-personCard-card-${(x.perType === '15_020008-1' || x.perType === '24_00006-1') ? 'blue' : 'orange'}`}
+ onClick={() => handleCheckParty(x)}
+ >
+ {x.trueName.substr(0, 1)}
+ <div className="public-personCard-card-check">查看</div>
+ {isCheck && <img
+ src={del}
+ alt=''
+ style={{ width: '16px', height: '16px', position: 'absolute', top: '-8px', left: '56px' }}
+ onClick={(event) => { handleDeleteParty(event, x) }}
+ />}
</div>
- {
- (x.perClass === '09_01001-1' || !x.perClass) &&
- <>
- <div>证件号码:{x.certiNo}</div>
- <div>联系方式:{x.mobile}</div>
- </>
- }
- {
- x.perClass === '09_01001-2' &&
- <>
- <div>统一社会信用代码:{x.orgaCode}</div>
- <div>法定代表人:{x.deputy}</div>
- </>
- }
- {
- x.perClass === '09_01001-3' &&
- <>
- <div>组织机构代码:{x.orgaCode}</div>
- <div>机构代表人:{x.deputy}</div>
- </>
- }
- <Space style={{ display: 'flex', flexWrap: 'wrap' }}>
- {x.remark?.map((item, index) => (
- <div key={index} style={{ lineHeight: '22px', padding: '0px 8px', backgroundColor: `${item.color}`, width: 'fit-content', borderRadius: '4px', marginTop: '4px', color: '#fff' }}>{item.label}</div>
- ))}
- </Space>
+ <div className="public-personCard-content">
+ <div className="public-personCard-title">
+ <Text style={{ maxWidth: '80%', paddingRight: '8px' }} ellipsis={{ tooltip: x.trueName }}>
+ {x.trueName}
+ </Text>
+ <Text onClick={() => { handleEdit(x) }} ellipsis={{ tooltip: x.perTypeName }} className={`public-personCard-tag public-personCard-tag-${(x.perType === '15_020008-1' || x.perType === '24_00006-1') ? 'blue' : 'orange'}`}>
+ {x.perTypeName}
+ </Text>
+ </div>
+ {
+ (x.perClass === '09_01001-1' || !x.perClass) &&
+ <>
+ <div>证件号码:{x.certiNo}</div>
+ <div>联系方式:{x.mobile}</div>
+ </>
+ }
+ {
+ x.perClass === '09_01001-2' &&
+ <>
+ <div>统一社会信用代码:{x.orgaCode}</div>
+ <div>法定代表人:{x.deputy}</div>
+ </>
+ }
+ {
+ x.perClass === '09_01001-3' &&
+ <>
+ <div>组织机构代码:{x.orgaCode}</div>
+ <div>机构代表人:{x.deputy}</div>
+ </>
+ }
+ <Space style={{ display: 'flex', flexWrap: 'wrap' }}>
+ {x.remark?.map((item, index) => (
+ <div key={index} style={{ lineHeight: '22px', padding: '0px 8px', backgroundColor: `${item.color}`, width: 'fit-content', borderRadius: '4px', marginTop: '4px', color: '#fff' }}>{item.label}</div>
+ ))}
+ </Space>
+ </div>
</div>
- </div>
- </Col>
- ))}
- <Col span={3}>
- <div className="dataSync-addBtn">
- <Tooltip
- title={(<Space direction='vertical '>
- <div className="dataSync-btnApply" style={{ backgroundColor: '#1A6FB8' }} onClick={() => { handleAdd('15_020008-1') }}>申请方当事人</div>
- {isAgent && <div className="dataSync-btnApply" style={{ backgroundColor: '#3491FA' }} onClick={() => { handleAdd('24_00006-1') }}>申请方代理人</div>}
- <div className="dataSync-btnApply" style={{ backgroundColor: '#EF6C24' }} onClick={() => { handleAdd('15_020008-2') }}>被申请方当事人</div>
- {isAgentFor && <div className="dataSync-btnApply" style={{ backgroundColor: '#FA8C16' }} onClick={() => { handleAdd('24_00006-2') }}>被申请方代理人</div>}
- </Space>)}
- placement={data.length !== 0 && data.length % 3 === 0 ? 'left' : "right"}
- color='#ffff'
- overlayStyle={{}}
- >
- <div style={{ backgroundColor: '#f2f3f5', borderRadius: '50%', width: '64px', height: '64px' }}>
- <img src={add} alt="添加" style={{ width: '32px', margin: '16px' }} />
+ </Col>
+ ))}
+ {isCheck &&
+ <Col span={3}>
+ <div className="dataSync-addBtn">
+ <Tooltip
+ title={(<Space direction='vertical '>
+ <div className="dataSync-btnApply" style={{ backgroundColor: '#1A6FB8' }} onClick={() => { handleAdd('15_020008-1') }}>申请方当事人</div>
+ {isAgent && <div className="dataSync-btnApply" style={{ backgroundColor: '#3491FA' }} onClick={() => { handleAdd('24_00006-1') }}>申请方代理人</div>}
+ <div className="dataSync-btnApply" style={{ backgroundColor: '#EF6C24' }} onClick={() => { handleAdd('15_020008-2') }}>被申请方当事人</div>
+ {isAgentFor && <div className="dataSync-btnApply" style={{ backgroundColor: '#FA8C16' }} onClick={() => { handleAdd('24_00006-2') }}>被申请方代理人</div>}
+ </Space>)}
+ placement={data.length !== 0 && data.length % 3 === 0 ? 'left' : "right"}
+ color='#ffff'
+ overlayStyle={{}}
+ >
+ <div style={{ backgroundColor: '#f2f3f5', borderRadius: '50%', width: '64px', height: '64px' }}>
+ <img src={add} alt="添加" style={{ width: '32px', margin: '16px' }} />
+ </div>
+ </Tooltip>
</div>
- </Tooltip>
- </div>
- </Col>
- </Row>
+ </Col>
+ }
+ </Row>
+ <Modal
+ title={'查看' + peopleMap[dialogType]}
+ visible={detailVisabled}
+ onOk={() => setDetailVisabled(false)}
+ onCancel={() => {
+ setDetailVisabled(false)
+ setEditData(null)
+ }}
+ autoFocus={false}
+ focusLock={true}
+ footer={null}
+ unmountOnExit={true}
+ maskClosable={false}
+ >
+ <DetailDialog editData={editData} />
+ </Modal>
+ </Fragment>
);
};
diff --git a/gz-customerSystem/src/views/register/visit/component/MattersInfo.jsx b/gz-customerSystem/src/views/register/visit/component/MattersInfo.jsx
index 4e346eb..418a908 100644
--- a/gz-customerSystem/src/views/register/visit/component/MattersInfo.jsx
+++ b/gz-customerSystem/src/views/register/visit/component/MattersInfo.jsx
@@ -182,12 +182,8 @@
</Col>
<div style={{ margin: '16px 0' }}>
<PersonCard
- isCheck={true}
- partyType={'applicant'} // 这里设定为申请人
+ isCheck={false}
data={fakeData}
- handleCheckParty={handleCheckParty}
- handleAdd={handleAdd}
- handleDeleteParty={handleDeleteParty}
/>
</div>
<Col span={24} style={{ display: 'flex', alignItems: 'center', marginBottom: '4px' }}>
@@ -305,7 +301,7 @@
</Typography.Paragraph>
}
{
- props.active === '3' && <Typography.Paragraph style={style}>
+ (props.active === '3' && props.current === 3) && <Typography.Paragraph style={style}>
<Handle />
</Typography.Paragraph>
}
diff --git a/gz-customerSystem/src/views/register/visit/component/agentDialog.jsx b/gz-customerSystem/src/views/register/visit/component/agentDialog.jsx
index 5d4197d..f9f8031 100644
--- a/gz-customerSystem/src/views/register/visit/component/agentDialog.jsx
+++ b/gz-customerSystem/src/views/register/visit/component/agentDialog.jsx
@@ -1,7 +1,7 @@
import React, { useState, useEffect, useRef, Fragment } from "react";
import { Row, Col, Space } from 'antd';
import { Form, Input, Button, Radio, Select, Checkbox, Upload } from '@arco-design/web-react';
-import KeyVisits from "./keyVisits";
+import KeyVisits from "@/components/personCard/KeyVisits";
import {
IconLink,
} from '@arco-design/web-react/icon';
diff --git a/gz-customerSystem/src/views/register/visit/component/applyDialog.jsx b/gz-customerSystem/src/views/register/visit/component/applyDialog.jsx
index f2cb86c..2fb2b3e 100644
--- a/gz-customerSystem/src/views/register/visit/component/applyDialog.jsx
+++ b/gz-customerSystem/src/views/register/visit/component/applyDialog.jsx
@@ -13,7 +13,7 @@
caseperfection_organize_active,
} from '@/assets/images/icon';
import { Form, Input, Button, Radio, Select, Modal, Cascader, Upload, Message } from '@arco-design/web-react';
-import KeyVisits from "./keyVisits";
+import KeyVisits from "@/components/personCard/KeyVisits";
import SelectUnitDialog from "./selectUnitDialog";
import {
IconLink,
diff --git a/gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx b/gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx
index 4954c9e..1e1a0c1 100644
--- a/gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx
+++ b/gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx
@@ -15,7 +15,6 @@
import '../../index.less';
import ApplyDialog from "./applyDialog";
import AgentDialog from "./agentDialog";
-import DetailDialog from "./detailDialog";
import NewFileCheck from '../../../filesCheck/newFileCheck';
import { IconLink } from '@arco-design/web-react/icon';
import MapView from './map'
@@ -32,7 +31,7 @@
const VisitorRegister = (props) => {
- const [dialogType, setDialogType] = useState(0);//添加当事人的类型
+ const [dialogType, setDialogType] = useState();//添加当事人的类型
const [addVisabled, setAddVisabled] = useState(false);//添加当事人弹窗控制
const [fakeData, setFakeData] = useState([]);//当事人信息数据
const [scanFile, setScanFile] = useState(false);
@@ -43,7 +42,6 @@
const [filesCheck, setFilesCheck] = useState(false);
const [fileView, setFileView] = useState();
const [fileTip, setFileTip] = useState('0');
- const [detailVisabled, setDetailVisabled] = useState(false);//查看信息弹窗控制
const [mapView, setMapView] = useState(false);
const [visible, setVisible] = useState(false);
const [apply, setApply] = useState(false);
@@ -299,13 +297,6 @@
}
}
- //查看
- const handleCheckParty = (value) => {
- setDialogType(value.perType)
- setEditData(value)
- setDetailVisabled(true)
- }
-
//获取当前时间
const getFormattedDateTime = () => {
let now = new Date();
@@ -378,7 +369,6 @@
<PersonCard
isCheck={true}
data={fakeData}
- handleCheckParty={handleCheckParty}
handleAdd={handleAdd}
handleDeleteParty={handleDeleteParty}
handleEdit={handleEdit}
@@ -760,22 +750,6 @@
dialogType={dialogType}
editData={editData}
/>
- </Modal>
- <Modal
- title={'查看' + peopleMap[dialogType]}
- visible={detailVisabled}
- onOk={() => setDetailVisabled(false)}
- onCancel={() => {
- setDetailVisabled(false)
- setEditData(null)
- }}
- autoFocus={false}
- focusLock={true}
- footer={null}
- unmountOnExit={true}
- maskClosable={false}
- >
- <DetailDialog editData={editData} />
</Modal>
<Modal
style={{ width: '1200px' }}
diff --git a/gz-customerSystem/src/views/register/visit/index.jsx b/gz-customerSystem/src/views/register/visit/index.jsx
index 869ad11..8a3be63 100644
--- a/gz-customerSystem/src/views/register/visit/index.jsx
+++ b/gz-customerSystem/src/views/register/visit/index.jsx
@@ -39,7 +39,7 @@
const formRef = useRef();
const [isReview, setIsReview] = useState(false);//预览页面控制
- const [current, setCurrent] = useState(1);
+ const [current, setCurrent] = useState(2);
const [tabsActive, setTabsActive] = useState('1');
const [tabsList, setTabList] = useState([
{
@@ -56,6 +56,7 @@
])
const breadcrumbDataMap = {
1: { breadcrumbData: [{ title: '工作台' }, { title: '来访登记' }], title: '来访登记' },
+ 2: { breadcrumbData: [{ title: '工作台' }, { title: '事件中心' }], title: '办理反馈' },
3: { breadcrumbData: [{ title: '工作台' }, { title: '事件中心' }], title: '办理反馈' }
}
@@ -192,7 +193,7 @@
</Fragment>
}
{
- current === 3 &&
+ (current === 2 || current === 3) &&
<Tabs defaultActiveTab='1' onChange={(v) => setTabsActive(v)}>
{tabsList?.map(item => {
return <TabPane
@@ -216,7 +217,7 @@
</Steps>
</div>
}
- <MattersInfo active={tabsActive} />
+ <MattersInfo active={tabsActive} current={current}/>
</TabPane>
})}
</Tabs>
--
Gitblit v1.8.0