Your Name
2022-03-14 f5c7ecb8db935bc07169938869e3260b21fda13a
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
<template>
    <el-dialog title="审批" :visible.sync="reviewInfoDialog" :modal-append-to-body="false" :close-on-click-modal="false" width="50%">
        <div class="block">
            <el-timeline>
                <el-timeline-item
                    v-for="(activity, index) in activities"
                    :key="index"
                    :color="'#0bbd87'"
                    :size="activity.size"
                    :timestamp="activity.reviewat">
                    <div style="padding-bottom: 10px;font-weight: bolder">{{activity.level}}</div>
                    <el-card>
                        <el-row>
                            <el-col :span="2">
                                <div>签字:</div>
                            </el-col>
                            <el-col :span="22">
                                <img :src="activity.autograph" style="width:40px;height:40px;margin-left:10px;cursor:pointer" @click="showPic(activity.autograph)"></img>
                            </el-col>
                        </el-row>
                        <el-row>
                            <span>现场图:</span>
                            <img slot="reference" v-for="(item,index) in activity.pictures" :src="item.url" :key="index" style="width:40px;height:40px;margin-left:10px;cursor:pointer" @click="showPic()"></img>
                        </el-row>
 
                    </el-card>
                </el-timeline-item>
            </el-timeline>
        </div>
        <el-dialog :visible.sync="dialogVisible" :append-to-body="true">
            <img width="100%" :src="dialogImageUrl" alt="">
        </el-dialog>
    </el-dialog>
</template>
 
<script>
    export default {
        name: 'index',
        data(){
            return{
                reviewInfoDialog:false,
                dialogVisible:false,
                dialogImageUrl:'',
                activities: []
            }
        },
        methods:{
            openReviewInfo(value){
                this.reviewInfoDialog = true
                debugger
                this.activities = JSON.parse(JSON.stringify(value.taskReviews))
                for(let i in this.activities){
                    if(this.activities[i].pictures !== null && this.activities[i].pictures.length !== 0){
                        this.activities[i].pictures = this.activities[i].pictures.map( item =>{
                            return process.env.IMG_API + item
                        })
                    }
                    this.activities[i].autograph = process.env.IMG_API + this.activities[i].autograph
                }
 
 
            },
            showPic(value){
                this.dialogVisible = true
                this.dialogImageUrl = value
            },
        }
    }
</script>
 
<style scoped>
 
</style>