/** * @license * SPDX-License-Identifier: Apache-2.0 */ import React from 'react'; import { AccountabilityCase } from '../types'; import { Check, AlertCircle, Clock, CheckCircle2 } from 'lucide-react'; interface TimelineProps { currentCase: AccountabilityCase; } export const STEPS_DEFINITION = [ { index: 1, name: '启动立案', desc: '成立问责调查组,录入案件基础信息' }, { index: 2, name: '调查核实', desc: '开展谈话、送达事实见面材料、核查申辩、形成调查报告' }, { index: 3, name: '合规审理', desc: '审理职责部门受理并出具合规审理意见书' }, { index: 4, name: '会议审议', desc: '问责委员会委员召开会议并线上表决与签名' }, { index: 5, name: '申诉窗口期', desc: '10个工作日内申诉确认或直接进入发文阶段' }, { index: 6, name: '提起申诉', desc: '被问责人提交申诉材料(有异议时触发)' }, { index: 7, name: '指派复查', desc: '指派审理组或协助调查组,出具复查意见' }, { index: 8, name: '按程序复议', desc: '重新提请委员会,做出复议决议' }, { index: 9, name: '发文归档', desc: '下发红头问责文件,抄送人力资源部归档' } ]; export default function CaseWorkflowTimeline({ currentCase }: TimelineProps) { const currentStep = currentCase.currentStep; // 判断哪些步骤被跳过或不需要 // 如果案件没有申诉(在步骤5时选择无异议,或者已直接跳到步骤9),那么 6, 7, 8 被视为 skipped const isSkippedStep = (stepIdx: number): boolean => { if (!currentCase.hasAppeal && [6, 7, 8].includes(stepIdx)) { // 已经完成申诉期,或者在申诉期之前,且未触发申诉 if (currentStep === 9 || currentStep === 5) { return true; } } return false; }; const getStepStatus = (stepIdx: number): 'completed' | 'active' | 'pending' | 'skipped' => { if (isSkippedStep(stepIdx)) return 'skipped'; if (currentStep > stepIdx) return 'completed'; if (currentStep === stepIdx) return 'active'; return 'pending'; }; // 期限计算说明 const limitText = currentCase.category === 'asset' ? '问题资产:启动后90天内需完成调查' : '非问题资产:发起后30个工作日内需完成调查'; return (
流程闭环可追溯,确保每个程序节点合规守信
{step.desc}
{/* 进度提示线 - 仅在非最后一步且大屏幕时显示 */} {step.index < 9 && (