From 3d573b5bf07d61696e8c04fe1c2c97ec4d0689e3 Mon Sep 17 00:00:00 2001 From: zhangyongtian <1181606322@qq.com> Date: Wed, 28 Aug 2024 17:42:31 +0800 Subject: [PATCH] 面包屑更改 --- gz-customerSystem/src/components/personCard/index.jsx | 46 +++++++++++++++++++++++++++++++++++----------- 1 files changed, 35 insertions(+), 11 deletions(-) diff --git a/gz-customerSystem/src/components/personCard/index.jsx b/gz-customerSystem/src/components/personCard/index.jsx index 987bdae..fb4cf52 100644 --- a/gz-customerSystem/src/components/personCard/index.jsx +++ b/gz-customerSystem/src/components/personCard/index.jsx @@ -18,41 +18,64 @@ * handleCheckParty, // 点击查看详情 * handleDeleteParty, // 删除当事人 */ -const PersonCard = ({ isCheck, data, handleCheckParty, handleDeleteParty, handleAdd }) => { - +const PersonCard = ({ isCheck, data, handleCheckParty, handleDeleteParty, handleAdd, handleEdit }) => { + let isAgent = false + let isAgentFor = false + const typeList = data.map(item => { + return item.partyType + })//获取有多少申请人和被申请人 + if (typeList.indexOf(0) != -1) { + isAgent = true + } + if (typeList.indexOf(1) != -1) { + isAgentFor = 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.partyType === 'applicant' ? 'blue' : 'orange'}`} - onClick={() => handleCheckParty({ type: x.partyType, editType: 'check', values: x })} + className={`public-personCard-card public-personCard-card-${(x.partyType === 0 || x.partyType === 2) ? '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' }} /> + <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 ellipsis={{ tooltip: x.perClassName }} className={`public-personCard-tag public-personCard-tag-${x.partyType === 'applicant' ? 'blue' : 'orange'}`}> + <Text onClick={() => { handleEdit(x) }} ellipsis={{ tooltip: x.perClassName }} className={`public-personCard-tag public-personCard-tag-${(x.partyType === 0 || x.partyType === 2) ? 'blue' : 'orange'}`}> {x.perClassName} </Text> </div> { - x.person && + (x.perClass === '09_01001-1' || !x.perClass) && <> <div>证件号码:{x.mobile}</div> <div>联系方式:{x.personNumber}</div> </> } - {x.company && + { + x.perClass === '09_01001-2' && <> <div>统一社会信用代码:{x.mobile}</div> <div>法定代表人:{x.companyName}</div> + </> + } + { + x.perClass === '09_01001-3' && + <> + <div>组织机构代码:{x.mobile}</div> + <div>机构代表人:{x.companyName}</div> </> } <Space style={{ display: 'flex', flexWrap: 'wrap' }}> @@ -68,9 +91,10 @@ <div className="dataSync-addBtn"> <Tooltip title={(<Space direction='vertical '> - <div className="dataSync-btnApply" style={{ backgroundColor: '#1A6FB8' }} onClick={() => {handleAdd(0)}}>申请方</div> - <div className="dataSync-btnApply" style={{ backgroundColor: '#FA8C16' }} onClick={() => {handleAdd(1)}}>被申请方</div> - <div className="dataSync-btnApply" style={{ backgroundColor: '#3491FA' }} onClick={() => {handleAdd(2)}}>代理人</div> + <div className="dataSync-btnApply" style={{ backgroundColor: '#1A6FB8' }} onClick={() => { handleAdd(0) }}>申请方当事人</div> + {isAgent && <div className="dataSync-btnApply" style={{ backgroundColor: '#3491FA' }} onClick={() => { handleAdd(2) }}>申请方代理人</div>} + <div className="dataSync-btnApply" style={{ backgroundColor: '#EF6C24' }} onClick={() => { handleAdd(1) }}>被申请方当事人</div> + {isAgentFor && <div className="dataSync-btnApply" style={{ backgroundColor: '#FA8C16' }} onClick={() => { handleAdd(3) }}>被申请方代理人</div>} </Space>)} placement={data.length !== 0 && data.length % 3 === 0 ? 'left' : "right"} color='#ffff' -- Gitblit v1.8.0