web
7 天以前 57a0e64f1617aabcad385b67cc6fc9fee8062a4b
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
<script setup>
import {getVideoList} from '@/api/screen/video.js'
import VideoPlayer from "@/components/VideoPlayer/VideoPlayer.vue";
import {ref, onMounted} from "vue";
 
const showList = ref([])
 
const getList = () => {
    getVideoList({pointId: '1904415927038406657'}).then(res => {
        showList.value = res.data
    })
}
 
onMounted(() => {
    getList()
})
</script>
 
<template>
    <div class="monitor">
        <div class="list">
            <div class="m-item" v-for="(x,i) in showList" :key="i">
                <div class="vbox">
                    <div class="name">{{x.name}}</div>
                    <VideoPlayer :item="x" auto-play />
                    <!--                <div class="btnlist">-->
                    <!--                    <el-button size="large">泵房水浸报警</el-button>-->
                    <!--                    <el-button size="large">控制柜闪灯报警</el-button>-->
                    <!--                </div>-->
                </div>
            </div>
        </div>
    </div>
</template>
 
<style scoped lang="scss">
.monitor{
    width: 100%;
    height: 100%;
    .list{
        height: 100%;
        padding: 0.5rem;
        display: flex;
        gap: 1rem;
        .m-item{
            width: 50%;
            height: 100%;
            background: #000;
            position: relative;
            display: flex;
            align-items: center;
            .vbox{
                width: 100%;
                height: 65%;
            }
            .name{
                position: absolute;
                right: 0;
                top: 0;
                z-index: 100;
                color: #fff;
                padding: 0.5rem 2rem;
                background: rgba(0, 0, 0, 0.5);
            }
            .btnlist{
                position: absolute;
                left: 0;
                bottom: 3rem;
                width: 100%;
                text-align: center;
                :deep(.el-button){
                    margin: 0 3rem;
                    background: red;
                    border-color: red;
                    color: #fff;
                    font-size: 1.5rem;
                }
            }
        }
    }
}
</style>