From b1876ef3cdcb819e4799fe0d5c84f95bdb96529b Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期四, 09 五月 2024 16:13:04 +0800
Subject: [PATCH] 1.车间看板开发
---
src/views/kanbanManager/ckgl.vue | 43 +++----------------------------------------
1 files changed, 3 insertions(+), 40 deletions(-)
diff --git a/src/views/kanbanManager/ckgl.vue b/src/views/kanbanManager/ckgl.vue
index 59a2f13..5a99feb 100644
--- a/src/views/kanbanManager/ckgl.vue
+++ b/src/views/kanbanManager/ckgl.vue
@@ -98,14 +98,7 @@
data() {
return {
- onLine: navigator.onLine, // 鐩戝惉缃戠粶鏄惁鍦ㄧ嚎
-
headTime: '',
-
- tableTopTask: null,
- tableBottomTask: null,
- echartsRightTop: null,
- echartsRightBottom: null,
configTableTop: {
headerBGC: 'rgba(38, 68 ,139, 0.2)', // 琛ㄥご鑳屾櫙鑹�
@@ -202,11 +195,6 @@
}, 1000 * 60 * 120)
},
mounted() {
- // 鐩戝惉缃戠粶鏄惁鍦ㄧ嚎
- window.addEventListener('online', this.updateOnlineStatus)
- window.addEventListener('offline', this.updateOnlineStatus)
- this.updateOnlineStatus({ type: this.onLine ? 'online' : 'offline', isFirst: true })
-
this.getProcureOutsourcLeftTop()
setInterval(() => {
this.getProcureOutsourcLeftTop()
@@ -219,33 +207,8 @@
this.getEcharts()
},
- 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('缃戠粶鎺夌嚎锛岃鍏虫敞缃戠粶鐘舵�侊紒')
- }
- }
- },
// 鑾峰彇宸︿笂table鏁版嵁
getProcureOutsourcLeftTop() {
ProcureOutsourcLeftTop().then(res => {
@@ -299,13 +262,13 @@
loadEcharts('bar04', bar02(res.data.filter(i => i.qty > 0).map(i => i.qty), res.data.filter(i => i.qty > 0).map(i => i.materiel_name)))
})
- this.echartsRightTop = setInterval(() => {
+ setInterval(() => {
ProcureOutsourcRightTop().then(res => {
loadEcharts('bar03', bar02(res.data.filter(i => i.qty > 0).map(i => i.qty), res.data.filter(i => i.qty > 0).map(i => i.materiel_name)))
})
}, 1000 * 25)
- this.echartsRightBottom = setInterval(() => {
+ setInterval(() => {
ProductionStockedInRightBottom().then(res => {
loadEcharts('bar04', bar02(res.data.filter(i => i.qty > 0).map(i => i.qty), res.data.filter(i => i.qty > 0).map(i => i.materiel_name)))
})
--
Gitblit v1.9.3