From b42b6be06e1029a4c83c122b6a94c9210f26b9e0 Mon Sep 17 00:00:00 2001 From: zhangyongtian <1181606322@qq.com> Date: Wed, 11 Sep 2024 10:07:26 +0800 Subject: [PATCH] fix: 文件材料修复 --- gz-customerSystem/src/views/register/matterDetail/FileTable.jsx | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/gz-customerSystem/src/views/register/matterDetail/FileTable.jsx b/gz-customerSystem/src/views/register/matterDetail/FileTable.jsx index 981d034..aea5435 100644 --- a/gz-customerSystem/src/views/register/matterDetail/FileTable.jsx +++ b/gz-customerSystem/src/views/register/matterDetail/FileTable.jsx @@ -131,6 +131,7 @@ 下载 </Link> {!props.isReview && <Link onClick={() => { + console.log(record); setSourceType(record.ownerType) setUpLoadVisible(true) setFileInfoList(record.fileList) @@ -151,6 +152,7 @@ ] useEffect(() => { + console.log(props.fileInfoList); if (props.fileInfoList && props.fileInfoList.length != 0) { //证明材料 const applyFile = props.fileInfoList.find(item => item.ownerType == "22_00018-101") @@ -248,6 +250,7 @@ //根据sourceType生成组件 const formType = (type) => { + if (type === '22_00018-101') { //申请材料 return ( @@ -271,9 +274,10 @@ return item } }) + setFileMap({ ...fileMap, - '22_00018-101': newList + '22_00018-101': newList.filter(i => i.ownerType === '22_00018-101') }) }} /> @@ -307,7 +311,7 @@ }) setFileMap({ ...fileMap, - '22_00018-102': newList + '22_00018-102': newList.filter(i => i.ownerType === '22_00018-102') }) }} /> @@ -327,6 +331,7 @@ const res = await deleteFileByIdApi({ ids }) if (res.type) { $$.infoSuccess({ content: '删除成功!' }); + setTableData(tableData.filter(item => !ids.includes(item.ownerType))) } }, }); @@ -365,6 +370,7 @@ return ( <Col span={12} key={t}> <div + onClick={() => { x.value !== sourceType && setSourceType(x.value) }} className={`casePerfection-cardTab-tab ${x.value === sourceType && 'casePerfection-cardTab-tabActive'}`} > <img src={x.value === sourceType ? personIconType(x.value)?.[1] : personIconType(x.value)?.[0]} alt="" style={{ width: '40px', height: '40px' }} /> @@ -410,6 +416,6 @@ <NewFileCheck menuList={tableData} sourceType={sourceType} /> </div> </Modal> - </Fragment> + </Fragment > ) } -- Gitblit v1.8.0