From 05cd6a216ba17cfe357bbe52e4a9e53494d5717c Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期三, 09 十月 2024 10:23:03 +0800
Subject: [PATCH] ll
---
screen/src/views/PlatformCall.vue | 50 ++++++++++++++++++++++++++++++++++----------------
1 files changed, 34 insertions(+), 16 deletions(-)
diff --git a/screen/src/views/PlatformCall.vue b/screen/src/views/PlatformCall.vue
index bca3c16..9d2a827 100644
--- a/screen/src/views/PlatformCall.vue
+++ b/screen/src/views/PlatformCall.vue
@@ -6,6 +6,7 @@
import duration from 'dayjs/plugin/duration'
dayjs.extend(duration)
+const qrcode = ref('')
const contentList = ref([])
const contentTempList = ref([])
const page = ref(1)
@@ -31,28 +32,35 @@
if (res.data && res.data.waitWorkList) {
callList.value = res.data.waitWorkList
}
+ qrcode.value = res.data.qrCode
+ initQrcode()
clearInterval(timerCall.value)
setInitCall()
})
}
-initData()
-// setInterval(() => {
-// initData()
-// }, 60 * 1000)
const frequencyFn = (length) => {
- if(length <= 16){ // 2
+ if (length <= 16) { // 2
return 30 * 1000
- }else if(length <= 24 ){ // 3
+ } else if (length <= 24) { // 3
return 20 * 1000
- }else if( length <= 32 ){// 4
+ } else if (length <= 32) {// 4
return 15 * 1000
- }else if( length <= 48 ){// 6
+ } else if (length <= 48) {// 6
return 10 * 1000
- }else if( length <= 60 ){// 10
+ } else if (length <= 60) {// 10
return 6 * 1000
- }else{
+ } else {
return 4 * 1000
+ }
+}
+const frequencyCallFn = (length) => {
+ if (length <= 10) { // 2
+ return 6 * 1000
+ } else if (length <= 20) { // 3
+ return 3 * 1000
+ } else {
+ return 2 * 1000
}
}
const setInitContent = () => {
@@ -83,18 +91,21 @@
pageCall.value++
}
activeCall.value = callList.value[pageCall.value]
- }, 6 * 1000)
+ }, frequencyCallFn(callList.value.length))
}
}
onMounted(() => {
- initQrcode()
+ initData()
+ setInterval(() => {
+ initData()
+ }, 60 * 1000)
})
const initQrcode = () => {
var qr = new UQRCode()
// 璁剧疆浜岀淮鐮佸唴瀹�
- qr.data = "https://uqrcode.cn/doc"
+ qr.data = qrcode.value
qr.size = 254
// 璋冪敤鍒朵綔浜岀淮鐮佹柟娉�
qr.make()
@@ -161,8 +172,11 @@
padding: item.status == 2 || item.status == 3,
}" class="status">{{ statusMap[item.status] }}</div>
</div>
- <div class="item">{{ item.platformName }}</div>
- <div class="item">{{ item.optTimeTemp }}</div>
+ <div class="item">{{ item.platformName || '-' }}</div>
+ <div class="item">
+ <div class="time_place">棰勮瀹屾垚鏃堕棿</div>
+ <div>{{ item.optTimeTemp || '-' }}</div>
+ </div>
</div>
</div>
<div class="current">
@@ -289,10 +303,14 @@
display: flex;
justify-content: center;
align-items: center;
+ flex-direction: column;
font-weight: 500;
font-size: 36px;
flex: 10;
-
+ .time_place{
+ font-weight: 500;
+ font-size: 24px;
+ }
.status {
width: 174px;
height: 76px;
--
Gitblit v1.9.3