From c25bde50c087f7814d88533b46772f94c3373c82 Mon Sep 17 00:00:00 2001 From: dminyi <1301963064@qq.com> Date: Wed, 11 Sep 2024 11:09:05 +0800 Subject: [PATCH] 修改 --- gz-customerSystem/src/views/register/matterDetail/index.jsx | 179 ++++++++++++----------------------------------------------- 1 files changed, 36 insertions(+), 143 deletions(-) diff --git a/gz-customerSystem/src/views/register/matterDetail/index.jsx b/gz-customerSystem/src/views/register/matterDetail/index.jsx index f1a6c20..e918634 100644 --- a/gz-customerSystem/src/views/register/matterDetail/index.jsx +++ b/gz-customerSystem/src/views/register/matterDetail/index.jsx @@ -1,138 +1,35 @@ import React, { useState, useEffect } from 'react'; import { Row, Col, Space, Button, Switch } from 'antd'; import PersonCard from '@/components/personCard'; -import TableView from '@/components/TableView'; import * as $$ from '@/utils/utility'; -import { Typography, Steps } from '@arco-design/web-react'; -import { question, register, Matter, transfer } from '@/assets/images' +import { Typography } from '@arco-design/web-react'; +import { question, register } from '@/assets/images'; +import FileTable from "./FileTable"; function getCaseInfoApi(id) { - return $$.ax.request({ url: 'caseInfo/getCaseInfo?id=' + id, type: 'get', service: 'mediate' }); -} - -function listIdTypeInfoApi(data) { - return $$.ax.request({ url: `fileInfo/listIdTypeInfo`, type: 'post', service: 'sys', data }); + return $$.ax.request({ url: '/caseInfo/getCaseInfo?id=' + id, type: 'get', service: 'mediate' }); } export default function MatterDetail(props) { const [fakeData, setFakeData] = useState([]);//当事人信息数据 - const [upload, setUpLoad] = useState(false); - const [filesCheck, setFilesCheck] = useState(false); const [infoData, setInfoData] = useState({}); - - const fakeColumns = [ - { - title: '序号', - dataIndex: 'caseNo', - key: 'caseNo', - width: 100, - render: (text, record, index) => <span>{index + 1}</span>, - }, - { - title: '材料类型', - dataIndex: 'ownerTypeName', - key: 'ownerTypeName', - width: 60, - - }, - { - title: '材料数量', - dataIndex: 'size', - key: 'size', - width: 180, - render: (text) => <span>{text}份</span>, - - }, - { - title: '材料名称', - dataIndex: 'fileNames', - key: 'fileNames', - width: 180, - - }, - { - title: '最新上传时间', - dataIndex: 'fileNames', - key: 'fileNames', - width: 180, - - }, - { - title: '操作', - dataIndex: 'perClassName', - key: 'perClassName', - width: 200, - render: (text) => ( - <div style={{ display: 'flex', color: '#1A6FB8', gap: '16px' }}> - <div onClick={() => setFilesCheck(true)}>查看</div> - <div>删除</div> - <div>下载</div> - <div onClick={() => setUpLoad(true)}>上传</div> - </div> - ) - }, - // 更多列配置... - ]; - - - const [fakeData1, setFakeData1] = useState([ - { - ownerTyp: "22_00018-101", - ownerTypeName: "申请材料", - size: '0', - ownerId: null, - ownerName: null, - perType: null, - agentStatus: null, - fileNames: "-", - fileList: [] - }, - { - ownerType: "22_00018-102", - ownerTypeName: "证据材料", - size: '0', - ownerId: null, - ownerName: null, - perType: null, - agentStatus: null, - fileNames: "-", - fileList: [] - }, - - ]); - - const listIdTypeInfo = async () => { - const res = await listIdTypeInfoApi({ - mainId: props.id, //事项ID - ownerIdList: [props.id], //具体所属编号 - typeList: [] - }) - if (res.type) { - let data = res.data?.[0]?.fileList - if (res.data.length > 0) { - setFakeData1(data) - } - } - } useEffect(() => { console.log(props); - getCaseInfo(props.id) - listIdTypeInfo() - }, [props.id]) + getCaseInfo(props.caseId) + }, [props.caseId]) //获取id const getCaseInfo = async (id) => { - const res = await getCaseInfoApi('24083010062110001') - + const res = await getCaseInfoApi(props.caseId) if (res.type) { let data = res.data const partyList = data.personList.concat(data.agentList) setInfoData({ ...data, - questionName: data.queProvName === null ? '-' : data.queProvName + '/' + data.queCityName + '/' + data.queAreaName + '/' + data.queRoadName + '/' + data.queVillageName, + questionName: data.queProvName === null ? '-' : data.queProvName + '/' + data.queCityName + '/' + data.queAreaName + '/' + data.queRoadName, caseType: data.caseTypeFirstName === null ? '-' : data.caseTypeFirstName + '/' + data.caseTypeName }) setFakeData(partyList.map(item => { @@ -262,38 +159,34 @@ <div className='MediationInfo-subTitle' style={{ marginTop: '-9px' }}></div><h5>事件材料</h5> </Space> </Col> - - <TableView - columns={fakeColumns} - dataSource={fakeData1} - size="small" - rowKey="id" - bordered={true} - style={{ marginBottom: '20px' }} - /> - <Col span={24} className='title'> - <Space size='small'> - <div className='MediationInfo-subTitle' style={{ marginTop: '-9px' }}></div><h5>登记信息</h5> - </Space> - </Col> - <Row gutter={[16, 16]}> - {/*事项等级分为三级,颜色需要做判断*/} - <Col span={8}> - <div className="title"><div className="title-text">登记机构</div><img src={question} alt="" style={{ width: '14px', height: '14px', marginTop: '4px', marginLeft: '4px' }} /></div> - <div>{infoData.inputUnitName || '-'}</div> - </Col> - <Col span={8}> - <div><div className="title-text">登记人</div></div> - <div style={{ display: 'flex' }}> - <div>{infoData.inputUserName || '-'}</div> - <img src={register} alt='' style={{ width: '14px', height: '14px', marginLeft: '8px', marginTop: '4px' }} /> - </div> - </Col> - <Col span={8}> - <div ><div className="title-text">登记时间</div></div> - <div>{infoData.createTime || '-'}</div> - </Col> - </Row> + <FileTable mainId={props.caseId} fileInfoList={infoData.fileInfoList} isReview={true} /> + {infoData?.canalName === '大厅来访' && + <> + <Col span={24} style={{ marginTop: '12px' }}> + <Space size='small'> + <div className='MediationInfo-subTitle' style={{ marginTop: '-9px' }}></div><h5>登记信息</h5> + </Space> + </Col> + <Row gutter={[16, 16]}> + {/*事项等级分为三级,颜色需要做判断*/} + <Col span={8}> + <div className="title"><div className="title-text">登记机构</div><img src={question} alt="" style={{ width: '14px', height: '14px', marginTop: '4px', marginLeft: '4px' }} /></div> + <div>{infoData.inputUnitName || '-'}</div> + </Col> + <Col span={8}> + <div><div className="title-text">登记人</div></div> + <div style={{ display: 'flex' }}> + <div>{infoData.inputUserName || '-'}</div> + <img src={register} alt='' style={{ width: '14px', height: '14px', marginLeft: '8px', marginTop: '4px' }} /> + </div> + </Col> + <Col span={8}> + <div ><div className="title-text">登记时间</div></div> + <div>{infoData.createTime || '-'}</div> + </Col> + </Row> + </> + } {/* {props.hasEditBtn && <Button type='primary' style={{ marginTop: '20px' }}>修改</Button>} */} </div> -- Gitblit v1.8.0