|  |  |  | 
|---|
|  |  |  | import duration from 'dayjs/plugin/duration' | 
|---|
|  |  |  | dayjs.extend(duration) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const qrcode = ref('') | 
|---|
|  |  |  | const contentList = ref([]) | 
|---|
|  |  |  | const contentTempList = ref([]) | 
|---|
|  |  |  | const page = ref(1) | 
|---|
|  |  |  | 
|---|
|  |  |  | 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 = () => { | 
|---|
|  |  |  | 
|---|
|  |  |  | 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() | 
|---|
|  |  |  | 
|---|
|  |  |  | 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"> | 
|---|
|  |  |  | 
|---|
|  |  |  | 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; | 
|---|