wl
2022-10-27 6cde85d8030db64ae1e499178529ab8a9ec80fe1
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
<template>
    <div class="sovle-problem">
        <div class="sovle-header">
            <div class="sovle-limit">处理时限:{{dispatchInfo.disposeDate}}</div>
            <div class="sovle-limit">剩余时间:{{getRestTime(dispatchInfo.disposeDate)}}</div>
        </div>
        <div class="sovle-timeline">
            <el-timeline>
                <el-timeline-item :color="mycolor" v-for="item in list" :key="item.id">
                    <div class="title">
                        <div class="title-left">【{{item.name}}】处理人: {{item.disposeRecords && item.disposeRecords.length
                        != 0 ? item.disposeRecords[0].handlerText:''}}
                        </div>
                        <div class="title-right">{{item.disposeRecords.length !==0 ?
                        filterTime(item.disposeRecords[0].endTime):''}}
                        </div>
                    </div>
                    <div class="message">{{filterPerson(item.name)}} {{item.disposeRecords && item.disposeRecords.length !=0 ? item.disposeRecords[0].result:''}}</div>
                </el-timeline-item>
            </el-timeline>
        </div>
    </div>
</template> 
<script>
import helper from '@/utils/mydate'
import { computeTime } from '@/utils/helper'
export default {
    data() {
        return {
            mycolor: '#02a7f0',
            list: [],
            dispatchInfo: {},
        }
    },
    props: ['handlePassVo', 'baseCase'],
    created() {
        const { handlePassVo: mylist, baseCase } = this;
        console.log(baseCase, mylist);
        if (mylist) {
            this.list = mylist.workflowConfigSteps;
        }
        if (baseCase.dispatchInfo) {
            this.dispatchInfo = baseCase.dispatchInfo;
        }
    },
    methods: {
        // 获得意见
        filterPerson(name) {
            const { dispatchInfo } = this;
            if (name === '调度') {
                return '【派遣意见】' 
            } else if (name === '处理') {
                return '【处理结果】'
            }else if (name === '核查') {
                return '【核查结果】'
            }  else if (name === '结案') {
                return '【评定结果】'
            }
            return
        },
        // 处理时间
        filterTime(time) {
            if (time) {
                return helper(time)
            } else {
                return
            }
 
        },
        // 获得剩余时间
        getRestTime(limitTime) {
            if (limitTime) {
                return computeTime(limitTime)
            }
            return
        }
    }
}
</script>
<style lang="scss" scoped>
.sovle-problem {
    .sovle-header {
        padding: 0 200px;
        display: flex;
        line-height: 60px;
        justify-content: space-between;
    }
 
    .title {
        display: flex;
        justify-content: space-between;
        line-height: 40px;
        padding: 0 20px;
        color: #4b9bb7;
        font-size: 16px;
    }
 
    .message {
        padding: 20px;
        background-color: #070f22;
        color: #4b9bb7;
        line-height: 20px;
        font-size: 10px;
    }
}
</style>