From 3326977aa58fedbac88d3c009eac06c33020db0d Mon Sep 17 00:00:00 2001 From: zhangyongtian <1181606322@qq.com> Date: Sun, 08 Sep 2024 15:29:01 +0800 Subject: [PATCH] feat: 当事人文件回显 --- gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx | 34 ++++++++++++++++++++++++++++++++-- 1 files changed, 32 insertions(+), 2 deletions(-) diff --git a/gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx b/gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx index 40078ea..82cf116 100644 --- a/gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx +++ b/gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx @@ -48,6 +48,36 @@ } }, [fakeData]) + useEffect(() => { + console.log(props.partyList); + setFakeData(props.partyList.map(item => { + const fileInfoList = item.fileInfoList + let file = [];//身份证明材料、企业登记材料 + let file1 = [];//法人、机构身份证明材料、代理人授权委托书 + if (fileInfoList && fileInfoList.length != 0) { + fileInfoList.forEach(item => { + if (item.ownerType == '22_00018-202' || item.ownerType == '22_00018-203') { + file.push({ + name: item.fileList[0].trueName, + uid: item.fileList[0].id, + }) + } + if (item.ownerType == '22_00018-204' || item.ownerType == '22_00018-207') { + file1.push({ + name: item.fileList[0].trueName, + uid: item.fileList[0].id, + }) + } + }) + } + return { + ...item, + file, + file1 + } + })) + }, [props.partyList]) + //获取当前时间 const getFormattedDateTime = () => { let now = new Date(); @@ -85,7 +115,7 @@ //添加当事人 const handleAddParty = (value, isEdit) => { - console.log(value, isEdit); + console.log(value); if (isEdit) { //编辑 const newList = fakeData.map(item => { @@ -361,7 +391,7 @@ <div className='MediationInfo-subTitle' style={{ marginTop: '-9px' }}></div><h4>事件材料</h4> </Space> </Col> - <FileTable mainId={props.mainId}/> + <FileTable mainId={props.mainId} /> <DocumentScanner visible={scanFile} -- Gitblit v1.8.0