ll
liukangdong
2024-09-20 c5b5706cd645440a877c546978751b63bf40d008
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
<template>
    <view class="main_app">
        <image src="@/static/bg@2x.png" class="main_bg" mode=""></image>
        <view class="header_wrap">
            <view class="title" @touchend="touchend">{{info.roomName}}</view>
            <view class="time_wrap">
                <view class="time">{{time}}</view>
                <view class="date">{{date}}</view>
            </view>
        </view>
        <view class="home_status">
            <text v-if="!info.meetingListResponseList || info.meetingListResponseList.length == 0">空闲中</text>
            <text v-if="info.meetingListResponseList && info.meetingListResponseList.length > 0 && info.meetingListResponseList[0].meetingStatus == 4">即将开始</text>
            <text class="orange" v-if="info.meetingListResponseList && info.meetingListResponseList.length > 0 && info.meetingListResponseList[0].meetingStatus == 2">会议中</text>
            <text v-if="info.meetingListResponseList && info.meetingListResponseList.length > 0 && info.meetingListResponseList[0].meetingStatus == 1">未开始</text>
            <text v-if="info.meetingListResponseList && info.meetingListResponseList.length > 0 && info.meetingListResponseList[0].meetingStatus == 3">已结束</text>
            <text v-if="info.meetingListResponseList && info.meetingListResponseList.length > 0 && info.meetingListResponseList[0].meetingStatus == 5">已撤销</text>
        </view>
        <view class="meeting_name">{{meetingInfo.meetingName}}</view>
        <view class="meeting_con">
            <view class="content">
                <view class="line">
                    <image src="@/static/ic_time@2x.png"></image>
                    <text>{{meetingInfo.meetingTime }}</text>
                </view>
                <view class="line">
                    <image src="@/static/ic_people@2x.png"></image>
                    <text>预约人:{{meetingInfo.bookingUser }}</text>
                </view>
            </view>
            <canvas id="qrcode" canvas-id="qrcode" class="qrcode"></canvas>
            <!-- <vueQr v-if="meetingInfo.id" :text="meetingInfo.id" class="qrcode" /> -->
        </view>
        <view class="meeting_wrap">
            <view class="title">今日会议({{ info.meetingListResponseList && info.meetingListResponseList.length > 0 ? info.meetingListResponseList.length : 0 }})</view>
            <view class="list">
                <view class="item" v-for="item in info.meetingListResponseList">
                    <view class="name">{{item.meetingName}}</view>
                    <view class="line">预约人:{{item.bookingUser}}</view>
                    <view class="line">{{item.meetingTime}}({{statusMap[item.meetingStatus]}})</view>
                    <image src="@/static/ic_meeting@2x.png" class="item_bg"></image>
                </view>
                <view v-if="!info.meetingListResponseList || info.meetingListResponseList.length == 0" class="item empty">
                    <view class="name">暂无会议</view>
                    <view class="line">预约人:-</view>
                    <view class="line">-</view>
                    <image src="@/static/ic_meeting@2x.png" class="item_bg"></image>
                </view>
            </view>
        </view>
 
        <!--  -->
        <swiper v-if="info.fileType == 0 && info.multifileList && info.multifileList.length > 0" class="swiper" circular autoplay indicator-dots>
            <swiper-item v-for="item in info.multifileList">
                <image class="swiper_item" :src="item.fileurlFull" mode="aspectFill"></image>
            </swiper-item>
        </swiper>
        <!--  -->
        <template v-if="info.fileType == 1 && info.multifileList && info.multifileList.length > 0">
            <video  :src="info.multifileList[0].fileurlFull" class="app_video" :autoplay="true" loop :controls="false"></video>
        </template>
    </view>
</template>
 
<script>
    import dayjs from 'dayjs'
    // import vueQr from 'vue-qr/src/packages/vue-qr.vue'
    import UQRCode from 'uqrcodejs'
    import {
        meetScreenData
    } from '@/api/index.js'
    export default {
        // components: {vueQr},
        data() {
            return {
                time: '',
                date: '',
                timer: null,
                touchNum: 0,
                param: {},
                info: {},
                statusMap: {
                    1: '未开始',
                    2: '进行中',
                    3: '已结束',
                    4: '即将开始',
                    5: '已撤销',
                },
                meetingInfo: {}
            }
        },
        onShow() {
            this.initDatetime()
            this.param = uni.getStorageSync('param') || {}
            if (!this.param.code) {
                return uni.navigateTo({
                    url: '/pages/index/config'
                })
            }
            this.getData()
        },
        onReady() {
        },
        methods: {
            getData() {
                meetScreenData({
                    roomId: this.param.code
                }).then(res => {
                    this.info = res.data
                    if(this.info.meetingListResponseList && this.info.meetingListResponseList.length > 0){
                        this.meetingInfo = this.info.meetingListResponseList[0]
                        this.qrcodeCreate()
                    }
                })
            },
            qrcodeCreate(){
                 // 获取uQRCode实例
                  var qr = new UQRCode();
                  // 设置二维码内容
                  qr.data = "https://uqrcode.cn/doc";
                  // 设置二维码大小,必须与canvas设置的宽高一致
                  qr.size = 83;
                  // 调用制作二维码方法
                  qr.make();
                  // 获取canvas上下文
                  var canvasContext = uni.createCanvasContext('qrcode', this); // 如果是组件,this必须传入
                  // 设置uQRCode实例的canvas上下文
                  qr.canvasContext = canvasContext;
                  // 调用绘制方法将二维码图案绘制到canvas上
                  qr.drawCanvas();
            },
            touchend() {
                this.touchNum++
                setTimeout(() => {
                    if (this.touchNum == 1) {
                        console.log('单击')
                    }
                    if (this.touchNum >= 2) {
                        uni.navigateTo({
                            url: '/pages/index/config'
                        })
                    }
                    this.touchNum = 0
                }, 250)
            },
            initDatetime() {
                let weeks = ['周日', '周一', '周二', '周三', '周四', '周五', '周六']
                this.time = dayjs().format('HH:mm')
                this.date = dayjs().format('YYYY-MM-DD') + ' ' + weeks[new Date().getDay()]
                this.timer = setInterval(() => {
                    this.time = dayjs().format('HH:mm')
                    this.date = dayjs().format('YYYY-MM-DD') + ' ' + weeks[new Date().getDay()]
                }, 1000)
                setInterval(() => {
                    this.getData()
                },this.param.time ? this.param.time * 1000 : 60 * 1000)
            }
        }
    }
</script>
 
<style lang="scss" scoped>
    .swiper{
        position: fixed;
        top: 0;
        left: 0;
        z-index: 999;
        width: 100%;
        height: 100vh;
        .swiper_item{
            background-color: #0095AC;
            width: 100%;
            height: 100vh;
        }
    }
    .app_video{
        width: 100%;
        height: 100vh;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 999;
    }
    .main_app {
        width: 100%;
        min-height: 100vh;
        position: relative;
        font-size: 28rpx;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding-bottom: 42rpx;
        color: #fff;
        overflow: hidden;
        .meeting_wrap {
            margin-left: 42rpx;
            margin-top: 85rpx;
 
            .title {
                font-weight: 500;
                font-size: 42rpx;
                color: #FFFFFF;
                line-height: 62rpx;
                height: 62rpx;
                margin-bottom: 32rpx;
            }
 
            .list {
                display: flex;
                width: calc(100vw - 42rpx);
                overflow-x: auto;
                scrollbar-width: none;
 
                &:-webkit-scrollbar {
                    display: none;
                    /* Chrome Safari */
                }
 
                .item {
                    padding: 34rpx 28rpx;
                    display: flex;
                    flex-shrink: 0;
                    flex-direction: column;
                    width: 403rpx;
                    height: 315rpx;
                    background: linear-gradient( 90deg, #0080FF 0%, #00B0FF 100%);
                    border-radius: 7rpx;
                    margin-right: 28rpx;
                    position: relative;
                    &:nth-of-type(1){
                        background: linear-gradient(90deg, #0095AC 0%, #00B5D1 100%);
                    }
                    .item_bg {
                        position: absolute;
                        width: 178rpx;
                        height: 178rpx;
                        right: 0;
                        bottom: 0;
                        // z-index: -1;
                    }
 
                    .name {
                        flex: 1;
                        font-weight: bold;
                        font-size: 39rpx;
                    }
 
                    .line {
                        font-weight: 500;
                        margin-bottom: 7rpx;
                    }
                }
 
                .empty {
                    background: rgba(255, 255, 255, 0.11);
                }
            }
        }
 
        .meeting_con {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 42rpx;
 
            .content {
                .line {
                    display: flex;
                    align-items: center;
                    font-weight: 500;
                    font-size: 32rpx;
                    margin: 24rpx 0;
 
                    image {
                        width: 30rpx;
                        height: 30rpx;
                        margin-right: 20rpx;
                    }
                }
            }
 
            .qrcode {
                width: 83px;
                height: 83px;
            }
        }
 
        .meeting_name {
            margin-bottom: 12rpx;
            font-weight: bold;
            font-size: 49rpx;
            padding-left: 42rpx;
        }
 
        .home_status {
            font-weight: bold;
            font-size: 125rpx;
            margin: 70rpx 42rpx;
            line-height: 185rpx;
            height: 185rpx;
        }
 
        .orange {
            color: #FFB100;
        }
 
        .header_wrap {
            padding: 42rpx 34rpx 0 0;
            display: flex;
            justify-content: space-between;
            align-items: center;
 
            .time_wrap {
                text-align: right;
 
                .time {
                    font-size: 56rpx;
                    margin-bottom: 4rpx;
                }
            }
 
            .title {
                font-size: 56rpx;
                font-weight: bold;
                width: 430rpx;
                height: 125rpx;
                line-height: 125rpx;
                text-align: center;
                background: #00B5D1;
                border-radius: 0rpx 7rpx 7rpx 0rpx;
            }
        }
 
        .main_bg {
            position: absolute;
            width: 100%;
            height: 100%;
            top: 0;
            left: 0;
            object-fit: cover;
            z-index: -1;
        }
    }
</style>