jiangping
2025-05-27 3d6a8e384d31432a23f5a8c1a3135a58cbe617b5
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
107
108
109
110
111
112
113
114
115
116
<template   :append-to-body="true">
    <div class="box_item_list_row_l">
        <div class="desc_data_list_item" v-for="(item, index) in list" :key="index">
            <div class="desc_data_list_item_img" v-if="item.type === 0">
                <el-image
                    style="width: 100%; height: 100%;"
                    :src="item.fileurlFull"
                    :preview-teleported="true"
                    :append-to-body="true"
                    :preview-src-list="[item.fileurlFull]">
                </el-image>
            </div>
            <div class="desc_data_list_item_img" v-if="item.type === 1">
                <video controls :src="item.fileurlFull" />
            </div>
            <div class="desc_data_list_item_img" v-if="item.type === 2" @click="openFile(item.fileurlFull)">
                <i class="el-icon-folder-opened"></i>
            </div>
<!--            <div class="desc_data_list_item_info">-->
<!--                <span>{{ item.name }}</span>-->
<!--            </div>-->
        </div>
    </div>
</template>
 
<script>
    export default {
        name: "previewArea",
        props: {
            list: {
                type: Array,
      default: ()=> []
            }
        },
        methods: {
            openFile(url) {
                window.open(url)
    }
        }
    }
</script>
<style>
.el-image-viewer__wrapper{
   z-index: 9999 !important;
}
</style>
<style lang="scss" scoped>
 
.box_item_list_row_l {
        width: 100%;
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        .desc_data_list_item {
            width: 100px;
            height: 100px;
            cursor: pointer;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            position: relative;
            margin-bottom: 10px;
            margin-left: 10px;
            &:first-child {
                margin-left: 0 !important;
            }
            .desc_data_list_item_upload {
                flex: 1;
                height: 80px;
                display: flex;
                align-items: center;
                justify-content: center;
            }
            .desc_data_list_item_img {
                flex-shrink: 0;
                width: 100%;
                height: 100%;
                display: flex;
                align-items: center;
                justify-content: center;
                overflow: hidden;
                margin-right: 10px;
                .el-icon-folder-opened {
                    font-size: 40px;
                    color: #666666;
                }
                .el-icon-plus {
                    font-size: 26px;
                    color: #ffffff;
                }
                img {
                    width: 100%;
                }
                video {
                    width: 100%;
                }
            }
            .desc_data_list_item_info {
                width: 100%;
                display: flex;
                flex-direction: column;
                justify-content: space-between;
                word-break: break-all;
                span {
                    width: 100%;
                    white-space: nowrap;
                    overflow: hidden;
                    text-overflow: ellipsis;
                    font-size: 14px;
                    color: black;
                }
            }
        }
    }
</style>