<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>
|