import type { StepProps } from 'antd'; import { Space, Steps, Tag } from 'antd'; import { useMemo } from 'react'; import { useIntl, useModel } from 'umi'; import UserLink from '../../UserInfo/link'; import style from '../index.less'; import StaffUser from './staffUser'; import UacStaffUser from './uacStaffUser'; export interface ApprovalStepsProps { record: Record[]; type: string; } const ApprovalSteps = (props: ApprovalStepsProps) => { const { record, type } = props; const { formatMessage } = useIntl(); const { initialState } = useModel('@@initialState'); const { currentUser } = initialState || {}; const items = useMemo(() => { const res: StepProps[] = record?.map((item) => { const { type: itemType, isCcNode } = item; const title = ( {type == 'bpm' ? ( {itemType == 'Start' ? ( ) : ( 2} row={item} /> )} ) : ( 2} row={item} /> )} ); return { title, description: isCcNode ? ( {formatMessage({ id: 'component.AduitPreview.steps.noticeNode' })} ) : undefined, }; }) ?? []; res.push({ title: ( {formatMessage({ id: 'base.aduitpreview.finish' })} ), }); return res; }, [currentUser, formatMessage, record, type]); return ( 3 ? style.step : style.stepHorizontal} current={items.length - 1} status={'wait'} progressDot items={items} direction={items.length > 3 ? 'vertical' : 'horizontal'} /> ); }; export default ApprovalSteps;