<template>
    <div class="time-line-wrap">
        <ul>
            <li v-for="(node,index) in TimeLineData" :key="index">
                <TimeLineItem :node="node" :isLast="index===TimeLineData.length-1"/>
            </li>
        </ul>
    </div>
</template>

<script>
import TimeLineItem from './timeLineItem.vue';
export default {
    components:{TimeLineItem},
    props:{
        TimeLineData:{
            type:Array
        }
    },
    data() {
        return {
            //时间线数据格式
            mockTimeLine:[
                {
                    nodeType:1,
                    nodeText:'发起人:',
                    approveList:[{
                        approverName:'张三',
                        approveTime:'2023-10-10 10:10:10'
                    }],
                    nodeStatus:'passed',//passed节点已通过,return节点已撤回，reject节点已驳回，future节点未进行到
                },{
                    nodeType:2,
                    nodeText:'审批人:', //需要拼接成 审批人:2人(会签)
                    nodeStatus:'process',//节点正在进行中
                    approveType:'会签',
                    approveList:[//参与审批的人员
                        {
                            approverName:'李四',
                            approveTime:'2023-10-10 10:15:10',
                            approveStatus:'已同意'
                        },{
                            approverName:'王五',
                            approveTime:'2023-10-10 10:22:00',
                            approveStatus:'已驳回',
                            approveReason:'就是驳回'
                        }
                    ]
                }
            ]
        };
    },
    methods: {

    },
};
</script>

<style scoped lang="scss">
</style>
