“dzb”
2022-10-08 ce87e7746d6399c5a38a7f4fe10447d911b06051
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<template>
    <div class="my-process">
        <div class="my-pro-header">
            <div class="pro-step" v-for="(item,index) in list" :key="item.name">
                <div class="pro-step-top">
                    <div
                        :class="['circle',active === index+1 ? 'in-process' : active > index ? 'finish' : 'wait' ]">
                    </div>
                    <div :class="['line',active > index ? 'finish-line' :'']"
                        v-if="index<list.length-1 ? true:false"></div>
                </div>
                <div
                    :class="['pro-step-name',active === index+1 ? 'in-process' : active > index ? 'finish' : 'wait' ]">
                    {{item.name}}</div>
            </div>
        </div>
        <div class="my-pro-main">
            <div class="pro-step-ver" v-for="(item,index) in list" :key="item.title">
                <div
                    :class="['pro-step-name',active === index+1 ? 'in-process' : active > index ? 'finish' : 'wait' ]">
                    {{item.name}}</div>
                <div class="pro-step-top">
                    <div
                        :class="['circle',active === index+1 ? 'in-process' : active > index ? 'finish' : 'wait' ]">
                    </div>
                    <div :class="['line',active > index ? 'finish-line' :'']"
                        v-if="index<list.length-1 ? true:false"></div>
                </div>
                <div class="desc">
                    <div class="desc-title">环节用时:{{item.disposeRecords[0].linkTime}}</div>
                    <div class="desc-content" v-if="active > index">
                        <div class="desc-content-message">1111111</div>
                        <div class="desc-content-endtime">{{item.disposeRecords[0].endTime}}</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>
<script>
export default {
    data() {
        return {
            active: 0,
            list: [
                {
                    title: '上报',
                    status: 'success',
                },
                {
                    title: '立案',
                    status: 'process',
                },
                {
                    title: '派遣',
                    status: 'process',
                },
                {
                    title: '处置',
                    status: 'process',
                },
                {
                    title: '核查',
                    status: 'process',
                },
                {
                    title: '结案',
                    status: 'process',
                }
            ]
        }
    },
    props:['handlePassVo'],
    created(){
        console.log('process');
        const {handlePassVo:{workflowConfigSteps:mylist}} = this;
        // console.log(this.handlePassVo.workflowConfigSteps[0].name); 
        console.log(mylist);
        mylist.forEach(item=>{
            if(item.disposeRecords[0].endTime != null){
                this.active ++;
            }
        })
        this.list =  mylist;
    }
}
</script>
<style lang="scss" scoped>
.my-process {
    padding-top: 50px;
    .my-pro-header {
        display: flex;
 
        .pro-step {
            flex: 1;
 
            .pro-step-top {
                display: flex;
                align-items: center;
 
                .line {
                    flex: 1;
                    height: 2px;
                }
            }
 
            .pro-step-name {
                line-height: 20px;
            }
        }
    }
 
    .my-pro-main {
        margin-top: 30px;
        margin-left: -50px;
        .pro-step-ver {
            display: flex;
            align-items: flex-start;
            .line {
                width: 2px;
                height: 100px;
            }
        }
        .pro-step-top{
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        .pro-step-name {
            width: 120px;
            line-height: 24px;
            margin-right: 10px;
            text-align: right;
        }
        .desc{
            flex: 1;
            line-height: 24px;
            margin-left: 10px;
            .desc-content-endtime{
                display: flex;
                justify-content: flex-end;
            }
        }
    }
 
    .circle {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        background-color: #fff;
    }
 
    .line {
        background-color: #c0c4cc;
    }
 
    .finish-line {
        background-color: #4b9bb7;
    }
}
</style>