From eb65923fafe836f8fcd56d3efee4d0fd3a33ac5f Mon Sep 17 00:00:00 2001
From: dminyi <1301963064@qq.com>
Date: Tue, 10 Sep 2024 09:15:05 +0800
Subject: [PATCH] 工作台
---
gz-customerSystem/src/views/register/matterDetail/fileMessage.jsx | 203 ++++++++++++++++++++++++++++++--------------------
1 files changed, 121 insertions(+), 82 deletions(-)
diff --git a/gz-customerSystem/src/views/register/matterDetail/fileMessage.jsx b/gz-customerSystem/src/views/register/matterDetail/fileMessage.jsx
index a0bc307..13869c8 100644
--- a/gz-customerSystem/src/views/register/matterDetail/fileMessage.jsx
+++ b/gz-customerSystem/src/views/register/matterDetail/fileMessage.jsx
@@ -2,13 +2,17 @@
import NewPage from '@/components/NewPage';
import { Row, Col, Space } from 'antd';
import { Steps, Tabs, Typography, Rate, Button } from '@arco-design/web-react';
-import { apply } from '@/assets/images';
+import { apply,floating } from '@/assets/images';
import { result } from '@/assets/images/icon';
import * as $$ from '@/utils/utility';
-import { ApplyDialog, AgentDialog, Respondent } from '../visit/component/previewTable';
import TableView from '../../../components/TableView';
import { register, fold, down, empty, link } from '@/assets/images';
import ProgressStep from '@/components/ProgressStep/VisitStep';
+import { ApplyDialog, AgentDialog, Respondent, Company } from '../visit/component/previewTable';
+import HandleRecord from './HandleRecord';
+import { useParams } from 'react-router-dom';
+import ApplyInfo from './ApplyInfo'
+
const Step = Steps.Step;
const TabPane = Tabs.TabPane;
@@ -21,15 +25,27 @@
return $$.ax.request({ url: `caseEvaluate/getByCaseId?caseId=${caseId}`, type: 'get', service: 'mediate' });
}
+function getCaseInfoApi(id) {
+ return $$.ax.request({ url: 'caseInfo/getCaseInfo?id=' + id, type: 'get', service: 'mediate' });
+}
+
+function listFeedbackApi(id) {
+ return $$.ax.request({ url: `caseFeedback/listFeedback?id=` + id, type: 'get', service: 'mediate' });
+}
+
+function getListCaseFlow(data) {
+ return $$.ax.request({ url: `caseTask/listCaseFlow`, type: 'get', service: 'mediate', data });
+}
+
const FileMessage = (props) => {
-
+ const routeData = useParams();
const [tabsActive, setTabsActive] = useState('1');
const [current, setCurrent] = useState(7);
const [grade, setGrade] = useState(0);
+ const [caseInfo, setCaseInfo] = useState({})
const [TransactResult, setTransactResult] = useState({})
const [filesCheck, setFilesCheck] = useState(false);
- const [infoData, setInfoData] = useState({});
const [tabsList, setTabList] = useState([
{
img: result,
@@ -38,13 +54,19 @@
isNeedStep: true
},
{
+ img: floating,
+ label: '流转督办',
+ key: '2',
+ },
+ {
img: apply,
label: '申请记录',
- key: '2',
- isNeedStep: true,//加上这个就有进度条
+ key: '3',
},
])
const [selectedTab, setSelectedTab] = useState('1'); // 默认选中第一个 tab
+ const [list, setList] = useState([])
+ const [progressData, setProgressData] = useState({})
const tabs = [
@@ -120,59 +142,29 @@
console.log(res, 'resrs')
}
- const applyDialog = [
- {
- trueName: '李四',
- perClassName: '高级',
- phone: '13700137000',
- sex: '女',
- certiTypeName: '护照',
- certiNo: 'G12345678',
- nationName: '满',
- addr: '上海市浦东新区某公寓2号楼2单元202室',
- placeAddr: '上海市黄浦区某路3号',
- extreme: '否',
- workUnit: '上海某金融公司',
- person: '/path/to/anotherPerson.jpg', // 这应该是图片的实际路径
- link: '/path/to/anotherLink.png', // 这应该是链接图标的实际路径
+ const getCaseInfo = async () => {
+ const res = await getCaseInfoApi('24083010062110001')
+ if (res.type) {
+ setCaseInfo(res.data)
}
- // 可以根据需要添加更多的对象来模拟更多条目的数据
- ];
+ }
- const agentDialog = [
- {
- trueName: '王五',
- perClassName: '自然人',
- phone: '13600136000',
- sex: '男',
- certiTypeName: '身份证',
- certiNo: '110101199501012345',
- nationName: '汉',
- addr: '广州市天河区某大厦A座501室',
- placeAddr: '广州市越秀区某街4号',
- extreme: '否',
- workUnit: '广州某贸易公司',
- agentRelateName: '配偶',
- agentTypeName: '法定代理人',
- perTypeName: '成年人',
- person: '/path/to/person.jpg', // 应该是图片的实际路径
- link: '/path/to/link.png', // 应该是链接图标的实际路径
- },
- ];
+ const listFeedback = async (id) => {
+ const res = await listFeedbackApi(id)
+ if (res.type) {
+ let data = res.data.caseFeedbackList
+ setList(data)
+ }
+ }
- const respondent = [
- {
- orgaType: '广东好又多贸易有限公司',
- perClassName: '企业法人',
- phone: '020-12345678',
- address: '广州市天河区珠江新城花城大道66号',
- companyType: '有限责任公司',
- legalPerson: '江照月',
- creditCode: '914401011234567890',
- president: '广州市天河区珠江新城花城大道66号A座20层',
- link: '/path/to/link.png', // 应该是链接图标的实际路径
- },
- ];
+ const getData = async () => {
+ const res = await getListCaseFlow({
+ caseId: routeData.caseId
+ })
+ if (res.type) {
+ setProgressData(res.data)
+ }
+ }
const fakeColumns = [
{
@@ -350,9 +342,21 @@
useEffect(() => {
getByCaseId();
getTransactResult();
+ getCaseInfo();
+ listFeedback('24083010062110001');
+ getData()
}, [])
+ const applyData = caseInfo?.personList?.filter(item => item.perTypeName === "申请方当事人" && item.perClassName === "自然人");
+ const agentData = caseInfo?.personList?.filter(item => item.perTypeName === "申请方代理人");
+ const company = caseInfo?.personList?.filter(item => item.perTypeName === "申请方当事人" && item.perClassName === "非法人组织");
+ const respondentData = caseInfo?.personList?.filter(item => item.perTypeName === "申请方当事人" && item.perClassName === "法人");
+
+ const applyData1 = caseInfo?.personList?.filter(item => item.perTypeName === "被申请方当事人" && item.perClassName === "自然人");
+ const agentData1 = caseInfo?.personList?.filter(item => item.perTypeName === "被申请方代理人");
+ const company1 = caseInfo?.personList?.filter(item => item.perTypeName === "被申请方当事人" && item.perClassName === "非法人组织");
+ const respondentData1 = caseInfo?.personList?.filter(item => item.perTypeName === "被申请方当事人" && item.perClassName === "法人");
@@ -399,22 +403,52 @@
<div className='MediationInfo-subTitle' style={{ marginTop: '-9px' }}></div><h4>当事人信息</h4>
</Space>
</Col>
-
<div style={{ marginBottom: '8px' }}>申请方</div>
<div className="line-container" style={{ marginBottom: '20px' }}>
<div className="line left-line"></div>
<div className="line middle-line"></div>
<div className="line right-line"></div>
</div>
- <ApplyDialog applyDialog={applyDialog} />
- <AgentDialog agentDialog={agentDialog} />
+ {/* ApplyDialog 只有在 applyData 存在且不为空时才渲染 */}
+ {applyData && applyData.length > 0 ? (
+ <ApplyDialog applyDialog={applyData} />
+ ) : null}
+
+ {/* AgentDialog 只有在 agentData 存在且不为空时才渲染 */}
+ {agentData && agentData.length > 0 ? (
+ <AgentDialog agentDialog={agentData} />
+ ) : null}
+
+ {/* Respondent 只有在 respondentData 存在且不为空时才渲染 */}
+ {respondentData && respondentData.length > 0 ? (
+ <Respondent respondent={respondentData} />
+ ) : null}
+
+ {company && company.length > 0 ? (
+ <Company company={company} />
+ ) : null}
+
<div style={{ marginBottom: '8px' }}>被申请方</div>
<div className="line-container" style={{ marginBottom: '20px' }}>
<div className="line left-line"></div>
<div className="line middle-line"></div>
<div className="line right-line"></div>
</div>
- <Respondent respondent={respondent} />
+ {applyData1 && applyData1.length > 0 ? (
+ <ApplyDialog applyDialog={applyData1} />
+ ) : null}
+
+ {agentData1 && agentData1.length > 0 ? (
+ <AgentDialog agentDialog={agentData1} />
+ ) : null}
+
+ {respondentData1 && respondentData1.length > 0 ? (
+ <Respondent respondent={respondentData1} />
+ ) : null}
+
+ {company1 && company1.length > 0 ? (
+ <Company company={company1} />
+ ) : null}
<Col span={24} style={{ display: 'flex', alignItems: 'center', marginBottom: '4px' }}>
<Space size='small'>
<div className='MediationInfo-subTitle' style={{ marginTop: '-9px' }}></div><h5>纠纷基本情况</h5>
@@ -423,68 +457,68 @@
<Row gutter={[16, 16]}>
<Col span={8}>
<div><div className="title-text">事项状态</div></div>
- <div style={{ color: '#1A6FB8' }}>{infoData?.statusName || '-'}</div>
+ <div style={{ color: '#1A6FB8' }}>{caseInfo?.statusName || '-'}</div>
</Col>
<Col span={16}>
<div><div className="title-text">事项编号</div></div>
- <div>{infoData?.caseRef || '-'}</div>
+ <div>{caseInfo?.caseRef || '-'}</div>
</Col>
{/*事项等级分为三级,颜色需要做判断*/}
<Col span={8}>
<div className="title"><div className="title-text">事项等级</div></div>
- <div style={{ display: 'flex' }}><div style={{ backgroundColor: '#00B42A', marginRight: '4px', borderRadius: '4px' }}><div style={{ color: '#FFFFFF', padding: '0px 6px' }}>{infoData.caseLevel || '-'}</div></div>级</div>
+ <div style={{ display: 'flex' }}><div style={{ backgroundColor: '#00B42A', marginRight: '4px', borderRadius: '4px' }}><div style={{ color: '#FFFFFF', padding: '0px 6px' }}>{caseInfo?.caseLevel || '-'}</div></div>级</div>
</Col>
<Col span={8}>
<div><div className="title-text">来访时间</div></div>
- <div>{infoData.visitTime || '-'}</div>
+ <div>{caseInfo?.visitTime || '-'}</div>
</Col>
<Col span={8}>
<div ><div className="title-text">来访人数(人)</div></div>
- <div>{infoData.visitPeopleNum || '-'}</div>
+ <div>{caseInfo?.visitPeopleNum || '-'}</div>
</Col>
<Col span={8}>
<div ><div className="title-text">纠纷类型</div></div>
- <div>{infoData.caseType || '-'}</div>
+ <div>{caseInfo?.caseType || '-'}</div>
</Col>
<Col span={8}>
<div ><div className="title-text">纠纷发生时间</div></div>
- <div>{infoData.occurTime || '-'}</div>
+ <div>{caseInfo?.occurTime || '-'}</div>
</Col>
<Col span={8}>
<div ><div className="title-text">纠纷发生地点</div></div>
- <div>{infoData.addr || '-'}</div>
+ <div>{caseInfo?.addr || '-'}</div>
</Col>
<Col span={8}>
<div ><div className="title-text">问题属地</div></div>
- <div>{infoData.questionName || '-'}</div>
+ <div>{caseInfo?.questionName || '-'}</div>
</Col>
<Col span={8}>
<div ><div className="title-text">涉及人数(人)</div></div>
- <div>{infoData.peopleNum || '-'}</div>
+ <div>{caseInfo?.peopleNum || '-'}</div>
</Col>
<Col span={8}>
<div ><div className="title-text">涉及金额(元)</div></div>
- <div>{$$.thousands(infoData.amount) || '-'}</div>
+ <div>{$$.thousands(caseInfo?.amount) || '-'}</div>
</Col>
<Col span={8}>
<div ><div className="title-text">事项来源</div></div>
- <div>{infoData.canalName || '-'}</div>
+ <div>{caseInfo?.canalName || '-'}</div>
</Col>
<Col span={16}>
<div ><div className="title-text">来访形式</div></div>
- <div>{infoData.visitWayName || '-'}</div>
+ <div>{caseInfo?.visitWayName || '-'}</div>
</Col>
<Col span={24}>
<div className="title"><div className="title-text">事项概况</div></div>
- <div>{infoData.caseDes || '-'}</div>
+ <div>{caseInfo?.caseDes || '-'}</div>
</Col>
<Col span={24}>
<div className="title"><div className="title-text">事项申请</div></div>
- <div>{infoData.caseClaim || '-'}</div>
+ <div>{caseInfo?.caseClaim || '-'}</div>
</Col>
<Col span={16}>
<div className="title"><div className="title-text">是否重大矛盾纠纷</div></div>
- <div>{infoData.majorStatus === '0' ? '否' : '是'}</div>
+ <div>{caseInfo?.majorStatus === '0' ? '否' : '是'}</div>
</Col>
</Row>
<Col span={24} style={{ display: 'flex', alignItems: 'center', marginBottom: '16px', marginTop: '20px' }}>
@@ -548,7 +582,9 @@
<div className='gap'></div>
<Col span={24} style={{ marginTop: '12px' }}>
<div style={{ color: 'rgb(134, 144, 156)' }}>办理记录</div>
- <div>
+ <HandleRecord isReview={false} data={list} />
+
+ {/* <div>
{records.map(record => (
<div key={record.id} className='container-bottom-left-record'>
<div className='container-bottom-left-record-top'>
@@ -574,7 +610,7 @@
</div>
</div>
))}
- </div>
+ </div> */}
</Col>
<div className='gap'></div>
<div style={{ marginLeft: '-16px' }}>
@@ -668,14 +704,14 @@
<div className="title">
<div className="title-text">登记机构</div>
</div>
- <div>天河区棠下街道综治中心</div>
+ <div>{caseInfo?.inputUnitName || '-'}</div>
</Col>
<Col span={8}>
<div className="title">
<div className="title-text">登记人</div>
</div>
<div>
- 李晓明
+ {caseInfo.inputUserName}
<img src={register} alt='' style={{ width: '14px', height: '14px', marginLeft: '8px', marginTop: '4px' }} />
</div>
</Col>
@@ -683,7 +719,7 @@
<div className="title">
<div className="title-text">登记时间</div>
</div>
- <div>2024-7-8 10:00</div>
+ <div>{caseInfo?.visitTime || '-'}</div>
</Col>
</Row>
</div>
@@ -697,7 +733,10 @@
}
{
tabsActive === '2' &&
- <></>
+ <ProgressStep progressData={progressData} />
+ }
+ {tabsActive === '3' &&
+ <ApplyInfo />
}
</TabPane>
})}
--
Gitblit v1.8.0