From 5aa4a814ab8d4aa194a9683ebefaefdfc6d92c3a Mon Sep 17 00:00:00 2001
From: liuwh <964324856@qq.com>
Date: Tue, 17 Sep 2024 17:18:05 +0800
Subject: [PATCH] Merge branch 'master' of http://120.79.193.119:9090/r/gzzfw/frontEnd/gzDyh into master
---
gz-customerSystem/src/components/ProgressStep/VisitStep.jsx | 56 ++++++++++++++++++++++++++++++++++++++++++--------------
1 files changed, 42 insertions(+), 14 deletions(-)
diff --git a/gz-customerSystem/src/components/ProgressStep/VisitStep.jsx b/gz-customerSystem/src/components/ProgressStep/VisitStep.jsx
index 44d86ea..be73cf0 100644
--- a/gz-customerSystem/src/components/ProgressStep/VisitStep.jsx
+++ b/gz-customerSystem/src/components/ProgressStep/VisitStep.jsx
@@ -22,6 +22,8 @@
*/
const ProgressStep = ({ progressData, hasTab }) => {
const [proType, setProType] = useState('handleCaseFlowList')
+ const [assistType, setAssistType] = useState(progressData.assistCaseFlowList && progressData.assistCaseFlowList[0]?.unitId || '')
+ const [progressList, setProgressList] = useState([]);
const iconMap = {
1: ledger_7,//完成
2: ledger_12,//回退
@@ -40,6 +42,7 @@
useEffect(() => {
setProType('handleCaseFlowList')
+ setProgressList(progressData.handleCaseFlowList)
}, [progressData])
//详细结果的处理
@@ -66,20 +69,45 @@
return (
<Fragment>
{hasTab &&
- <div className='tabBtn'>
- {btnList.map((item, index) => {
- return <div
- className={`tabBtn-btn ${proType === item.value ? 'tabBtn-active' : ''}`}
- key={item.value}
- onClick={() => { setProType(item.value) }}
- style={{ marginRight: (index + 1) !== btnList.length ? '20px' : '0' }}
- >{item.label}</div>
- })}
-
- </div>
+ <>
+ <div className='tabBtn'>
+ {btnList.map((item, index) => {
+ return <div
+ className={`tabBtn-btn ${proType === item.value ? 'tabBtn-active' : ''}`}
+ key={item.value}
+ onClick={() => {
+ setProType(item.value)
+ if(item.value == 'handleCaseFlowList') {
+ setProgressList(progressData.handleCaseFlowList)
+ } else {
+ const findData = progressData.assistCaseFlowList?.find(res => res.unitId == assistType) || {}
+ setProgressList(findData.caseFlowList || [])
+ }
+ }}
+ style={{ marginRight: (index + 1) !== btnList.length ? '20px' : '0' }}
+ >{item.label}</div>
+ })}
+ </div>
+ {
+ proType == 'assistCaseFlowList' && <div className='tabBtn'>
+ {progressData.assistCaseFlowList?.map(item => {
+ return <div
+ key={item.unitId}
+ className={`tabBtn-unit ${assistType === item.unitId ? 'tabBtn-unitActive' : ''}`}
+ onClick={() => {
+ setAssistType(item.unitId)
+ setProgressList(item.caseFlowList)
+ }}
+ >
+ {item.unitName}
+ </div>
+ })}
+ </div>
+ }
+ </>
}
- {progressData[proType] && progressData[proType].length !== 0
- ? progressData[proType].map((x, t) => {
+ {progressList && progressList.length !== 0
+ ? progressList.map((x, t) => {
return (
<div key={t + 1}>
<div className="myStep-item">
@@ -88,7 +116,7 @@
<div className="myStep-item-title">{x.nodeShowName || '事件流转'}</div>
<img className='myStep-item-img' src={x.status === 1 ? ledger_8 : iconMap[x.taskType]} alt="" />
</div>
- {t === progressData[proType].length - 1 ? null : <div className='myStep-item-divider' />}
+ {t === progressList.length - 1 ? null : <div className='myStep-item-divider' />}
</div>
<div className="myStep-item-right">
{x.status === 1 ?
--
Gitblit v1.8.0