cltp.vue
1.32 KB
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
<template>
<div>
<template v-if="this.row.wclxxfclzp">
<el-link type="primary" @click="onClick">查看图片</el-link>
</template>
<template v-else>
<el-link type="primary" target="_blank">-</el-link>
</template>
<el-image-viewer v-if="isShowPics" :on-close="closeViewer" :url-list="srcList" />
</div>
</template>
<script>
import ElImageViewer from "element-ui/packages/image/src/image-viewer";
export default {
components: { ElImageViewer },
props: {
row: {
type: Object
},
column: {
type: Object
},
index: {
type: String
},
desc: {
type: String
}
},
data() {
return {
isShowPics: false,
srcList: []
};
},
created() {
},
methods: {
// 关闭查看器
closeViewer() {
this.isShowPics = false;
},
onClick() {
let this_ = this;
if (this.row.wclxxfclzp) {
JSON.parse(this.row.wclxxfclzp).forEach(d => {
this_.srcList.push(this_.$requestConfig.getImgUrl(d.response.fileId));
});
this.isShowPics = true;
}
}
}
};
</script>
<style scoped lang="scss">
::v-deep .el-dialog__header {
display: none;
}
.el-carousel__item:nth-child(2n) {
//background-color: #99a9bf;
}
.el-carousel__item:nth-child(2n+1) {
//background-color: #d3dce6;
}
</style>