From 189ec3fe9344dfdc4c3d13b154b482d201e2d413 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期五, 28 四月 2023 15:06:53 +0800
Subject: [PATCH] 1.提交
---
src/views/kb/ckgl.vue | 54 +++++++++---------------------------------------------
1 files changed, 9 insertions(+), 45 deletions(-)
diff --git a/src/views/kb/ckgl.vue b/src/views/kb/ckgl.vue
index 4166ec8..2aa7c9d 100644
--- a/src/views/kb/ckgl.vue
+++ b/src/views/kb/ckgl.vue
@@ -2,22 +2,17 @@
<div>
<div class="kb_dashboard">
- <!-- 鏄熺┖鑳屾櫙-->
- <div ref="starsRef" class="stars">
- <div v-for="(item, index) in starsCount" :key="index" class="star" />
- </div>
+<!-- 鏄熺┖鑳屾櫙-->
+ <div ref="starsRef" class="stars">
+ <div v-for="(item, index) in starsCount" :key="index" class="star" />
+ </div>
<div class="kb_header">
<div class="flex_c_c kb_header_text">
<div id="topBarLeft" style="width:600px;height:100%" />
- 浠撳簱绠$悊鏁板瓧鍖栫湅鏉�
+ 浠撳簱绠$悊鐪嬫澘
<div id="topBarRight" style="width:600px;height:100%;transform:rotate(180deg);" />
</div>
-
- <div class="kb_headTime" style="left: 85px">
- <span>娴欐睙鏂板嚡杩暟瀛楃鎶�鑲′唤鏈夐檺鍏徃</span>
- </div>
-
<div class="kb_headTime">
<span>{{ headTime }}</span>
</div>
@@ -343,7 +338,6 @@
data() {
return {
- onLine: navigator.onLine, // 鐩戝惉缃戠粶鏄惁鍦ㄧ嚎
headTime: '',
tableDataTop: [],
@@ -369,14 +363,9 @@
// 涓ゅ皬鏃剁湅鏉垮埛鏂颁竴娆�
setInterval(() => {
window.location.reload()
- }, 1000 * 60 * 60 * 10)
+ }, 1000 * 60 * 120)
},
mounted() {
- // 鐩戝惉缃戠粶鏄惁鍦ㄧ嚎
- window.addEventListener('online', this.updateOnlineStatus)
- window.addEventListener('offline', this.updateOnlineStatus)
- this.updateOnlineStatus({ type: this.onLine ? 'online' : 'offline', isFirst: true })
-
this.getTopBar()
this.getWareHouseTopLeftData()
@@ -384,33 +373,8 @@
this.getEcharts()
this.setStarsRef()
},
- beforeDestroy() {
- window.removeEventListener('online', this.updateOnlineStatus)
- window.removeEventListener('offline', this.updateOnlineStatus)
- },
+
methods: {
- // 鏇存柊缃戠粶鐘舵��
- updateOnlineStatus(e) {
- if (e.isFirst) {
- // console.log('x')
- } else {
- const loading = this.$loading({
- lock: true,
- text: '鏂綉浜嗭紝姝e湪鎷煎懡鑱旂綉涓紝璇锋鏌ョ綉缁滄槸鍚︽甯�...',
- spinner: 'el-icon-loading',
- customClass: 'osloading',
- background: 'rgba(0, 0, 0, 0.7)'
- })
- const { type } = e
- this.onLine = type === 'online'
- if (this.onLine) {
- loading.close()
- this.$message.success('缃戠粶杩炴帴鎴愬姛锛�')
- } else {
- this.$message.error('缃戠粶鎺夌嚎锛岃鍏虫敞缃戠粶鐘舵�侊紒')
- }
- }
- },
setStarsRef() {
const starNodes = Array.from(this.$refs.starsRef.children)
starNodes.forEach(item => {
@@ -447,13 +411,13 @@
WareHouseTopLeftData().then(res => {
this.tableDataTop = res.data
// this.number1 = this.tableDataTop.length
- if (this.tableDataTop.length > 9) {
+ if (this.tableDataTop.length > 10) {
clearInterval(this.tableTopTask)
this.getWareHouseTopLeftData()
}
})
}
- }, this.tableDataTop.length <= 9 ? 1000 * 3 : 100)
+ }, this.tableDataTop.length <= 10 ? 1000 * 3 : 100)
})
},
// 鑾峰彇宸︿笅table鏁版嵁
--
Gitblit v1.9.3