kongdeqiang
2023-06-06 6f1282471e5fd213443ac1f6dabfd3ef8b08c5c3
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
<template>
    <div>
      <el-dialog
        title="图像证据"
        :close-on-click-modal="false"
        :visible.sync="visible"
        v-dialogDrag>
        <div class="previewDialog" v-for="(item,index) in pictureList" :key="index">
          <img
            style="width: 100%"
            :src="item.url"
            :preview="item.preview"
            :preview-text="item.title"
            alt="">
          <!--<div class="enlargeBox">
            <img
              :src="item.larg"
              alt="">
          </div>-->
        </div>
      </el-dialog>
    </div>
</template>
 
<script>
    export default {
        name: "pictureForm",
        data() {
            return {
                visible:false,
                pictureList: []
            }
        },
        methods: {
            init(data) {
 
                this.visible = true
                this.pictureList = data.map((item,index) => {
                    return {
                        url: '/ffzf/fileinfo/showImg/'+item,
                        title: item,
                        preview:'1',
                        //larg: require('@/assets/img/enlarge.png')
                    }
                })
                this.$previewRefresh();
                console.log(this.pictureList,'pictureList-----pictureList')
            }
        }
    }
</script>
 
<style lang="scss">
  .pswp{
    z-index: 9999;
  }
 
</style>
<style lang="scss" scoped>
  .previewDialog{
    position: relative;
    cursor: pointer;
    /*.enlargeBox{*/
    /*  position: absolute;*/
    /*  z-index: 99999;*/
    /*  left: 50%;*/
    /*  top: 50%;*/
    /*  background: rgba(0,0,0,0.5);*/
    /*  padding: 20px;*/
    /*  border-radius: 20px;*/
    /*  box-shadow:inset 0 0 2px 3px rgba(255,255,255,0.2), 0 0 8px rgba(255,255,255,0.6),0 0 20px rgba(255,255,255,0.3);*/
    /*}*/
  }
</style>