web
8 天以前 2f0fa3545b539e8b6f952ea82a1ca2350c64a0e8
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
117
118
119
<script setup>
import EZUIKit from 'ezuikit-js';
 
const props = defineProps({
    data: {
        type: Object,
        default: {},
    }
})
 
const emit = defineEmits(['close'])
 
let ezKitEl = ''
let ezKitId = 'ezid'
 
const closeScreen = () => {
    ezKitEl.stop(); //停止播放视频
    emit('close')
}
 
onMounted(() => {
    ezKitEl = new EZUIKit.EZUIKitPlayer({
        id: ezKitId,
        url: props.data.url,
        accessToken: props.data.accessToken,
    })
})
 
</script>
 
<template>
    <div class="modal">
        <div class="vb" :id="ezKitId"></div>
        <div class="close" @click="closeScreen"><el-icon><CircleClose /></el-icon></div>
        <div class="mask">
            <div class="list">
                <div class="item">
                    <div class="name">水位:</div>
                    <div class="val"><span>{{props.data.waterLevel}}</span>m</div>
                </div>
                <div class="item">
                    <div class="name">流速:</div>
                    <div class="val"><span>{{props.data.flowVelocity}}</span>m/s</div>
                </div>
                <div class="item">
                    <div class="name">瞬时流量:</div>
                    <div class="val"><span>{{props.data.newFlow}}</span>m³/h</div>
                </div>
                <div class="item">
                    <div class="name">累计流量:</div>
                    <div class="val"><span>{{props.data.totalFlow}}</span>m³</div>
                </div>
                <div class="item">
                    <div class="name">水面宽度:</div>
                    <div class="val"><span>{{props.data.waterWidth}}</span>m</div>
                </div>
                <div class="item">
                    <div class="name">过水面积:</div>
                    <div class="val"><span>{{props.data.waterArea}}</span>m³</div>
                </div>
            </div>
        </div>
    </div>
</template>
 
<style scoped lang="scss">
.modal{
    position: absolute;
    left: 2%;
    top: 2%;
    width: 96%;
    height: 96%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 100;
    .vb{
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
    }
    .close{
        position: absolute;
        right: 1%;
        top: 1%;
        font-size: 2rem;
        color: #fff;
    }
    .mask{
        position: absolute;
        left: 5%;
        bottom: 5%;
        width: 15%;
        background-color: rgba(0, 0, 0, 0.5);
        color: #fff;
        padding: 1rem;
        border-radius: 1rem;
        .item{
            display: flex;
            align-items: center;
            padding: 0.5rem 0;
            .name{
                width: 6rem;
            }
            .val{
                display: flex;
                align-items: center;
                span{
                    display: inline-block;
                    width: 6rem;
                    overflow: hidden;
                    text-overflow: ellipsis;
                    white-space: nowrap;
                }
            }
        }
    }
}
</style>