| | |
| | | title: processItem.value, |
| | | } as StepItem; |
| | | }; |
| | | export const convertProcessToStep = (process: any[]) => { |
| | | export const convertProcessToStep = (process: any[],isHistory = false) => { |
| | | const stepList = (process ?? []).reduce((preVal, curVal) => { |
| | | if (curVal.mode === 'question') { |
| | | if (curVal.mode === 'question' ) { |
| | | if(isHistory) return preVal; |
| | | const last = preVal.at(-1); |
| | | if (!last.subStep) { |
| | | last.subStep = []; |
| | |
| | | createTime: answerTime, |
| | | isStopMsg: false, |
| | | stepGroup: (item?.answer?.reports ?? []).map((item) => ({ |
| | | value: convertProcessToStep(item?.exec_process), |
| | | value: convertProcessToStep(item?.exec_process,true), |
| | | isShow: false, |
| | | })), |
| | | |