From 7651d8d17f9819c7864624e058b6810521049ba7 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期五, 14 四月 2023 16:28:40 +0800
Subject: [PATCH] 1.递交
---
src/views/kb/ckgl.vue | 50 +++++++-------------------------------------------
1 files changed, 7 insertions(+), 43 deletions(-)
diff --git a/src/views/kb/ckgl.vue b/src/views/kb/ckgl.vue
index 4166ec8..5657808 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 => {
--
Gitblit v1.9.3