From 7cc272502eca2a660331f21c5c74c886e2a994eb Mon Sep 17 00:00:00 2001 From: caill <815519168@qq.com> Date: Wed, 17 Apr 2024 16:23:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/mork2.js | 920 ++++++++++++++++++++++++++-- src/pages/modules/home/index.vue | 772 ++++++++++++----------- src/pages/modules/home/workshop.vue | 22 +- 3 files changed, 1265 insertions(+), 449 deletions(-) diff --git a/src/config/mork2.js b/src/config/mork2.js index 7bcb1b1..675ecbe 100644 --- a/src/config/mork2.js +++ b/src/config/mork2.js @@ -1236,119 +1236,909 @@ export const screenTableData = () => { let res = { 'deviceErrorRecordList': [ { - 'deviceCode': 'YJ06', - 'deviceName': '压机06', - 'errorInfo': '故障', - 'errorTime': '2024-02-28 13:02:44' - }, - { - 'deviceCode': 'YJ01', - 'deviceName': '压机01', - 'errorInfo': '故障', - 'errorTime': '2024-02-28 13:02:44' + 'deviceCode': 'YJ02', + 'deviceName': '压机02', + 'errorInfo': '0', + 'errorTime': '2024-04-01 13:41:42' }, { 'deviceCode': 'YJ02', 'deviceName': '压机02', - 'errorInfo': '故障', - 'errorTime': '2024-02-28 13:02:44' + 'errorInfo': '0', + 'errorTime': '2024-04-01 13:41:36' + }, + { + 'deviceCode': 'RGV', + 'deviceName': 'RGV', + 'errorInfo': '0', + 'errorTime': '2024-04-01 13:39:31' + }, + { + 'deviceCode': 'RGV', + 'deviceName': 'RGV', + 'errorInfo': '1', + 'errorTime': '2024-04-01 13:39:30' + }, + { + 'deviceCode': 'FJCDJXS01', + 'deviceName': '分拣拆垛机械手01', + 'errorInfo': '0', + 'errorTime': '2024-04-01 13:32:16' + }, + { + 'deviceCode': 'YJ01', + 'deviceName': '压机01', + 'errorInfo': '0', + 'errorTime': '2024-04-01 13:12:39' + }, + { + 'deviceCode': 'YJ01', + 'deviceName': '压机01', + 'errorInfo': '0', + 'errorTime': '2024-04-01 13:09:34' + }, + { + 'deviceCode': 'YJ02', + 'deviceName': '压机02', + 'errorInfo': '0', + 'errorTime': '2024-04-01 13:09:33' + }, + { + 'deviceCode': 'YJ02', + 'deviceName': '压机02', + 'errorInfo': '0', + 'errorTime': '2024-04-01 13:08:57' + }, + { + 'deviceCode': 'YJ01', + 'deviceName': '压机01', + 'errorInfo': '0', + 'errorTime': '2024-04-01 13:08:56' + }, + { + 'deviceCode': 'YJ02', + 'deviceName': '压机02', + 'errorInfo': '0', + 'errorTime': '2024-04-01 13:06:05' + }, + { + 'deviceCode': 'YJ01', + 'deviceName': '压机01', + 'errorInfo': '0', + 'errorTime': '2024-04-01 13:06:04' }, { 'deviceCode': 'YJ03', 'deviceName': '压机03', - 'errorInfo': '故障', - 'errorTime': '2024-02-28 13:02:44' + 'errorInfo': '0', + 'errorTime': '2024-04-01 13:05:36' }, { 'deviceCode': 'YJ03', 'deviceName': '压机03', - 'errorInfo': '故障', - 'errorTime': '2024-02-28 13:02:44' + 'errorInfo': '0', + 'errorTime': '2024-04-01 13:05:30' + }, + { + 'deviceCode': 'YJ01', + 'deviceName': '压机01', + 'errorInfo': '0', + 'errorTime': '2024-04-01 13:00:38' + }, + { + 'deviceCode': 'YJ02', + 'deviceName': '压机02', + 'errorInfo': '0', + 'errorTime': '2024-04-01 13:00:38' + }, + { + 'deviceCode': 'FJCDJXS01', + 'deviceName': '分拣拆垛机械手01', + 'errorInfo': '0', + 'errorTime': '2024-04-01 12:48:57' + }, + { + 'deviceCode': 'YJ07', + 'deviceName': '压机07', + 'errorInfo': '0', + 'errorTime': '2024-04-01 12:48:41' + }, + { + 'deviceCode': 'YJ07', + 'deviceName': '压机07', + 'errorInfo': '0', + 'errorTime': '2024-04-01 12:43:05' + }, + { + 'deviceCode': 'YJ03', + 'deviceName': '压机03', + 'errorInfo': '0', + 'errorTime': '2024-04-01 12:40:34' + }, + { + 'deviceCode': 'YJ03', + 'deviceName': '压机03', + 'errorInfo': '0', + 'errorTime': '2024-04-01 12:40:06' + }, + { + 'deviceCode': 'YJ03', + 'deviceName': '压机03', + 'errorInfo': '0', + 'errorTime': '2024-04-01 12:39:39' + }, + { + 'deviceCode': 'YJ03', + 'deviceName': '压机03', + 'errorInfo': '0', + 'errorTime': '2024-04-01 12:39:23' + }, + { + 'deviceCode': 'YJ07', + 'deviceName': '压机07', + 'errorInfo': '0', + 'errorTime': '2024-04-01 12:38:24' + }, + { + 'deviceCode': 'YJ07', + 'deviceName': '压机07', + 'errorInfo': '0', + 'errorTime': '2024-04-01 12:38:21' + }, + { + 'deviceCode': 'YJ03', + 'deviceName': '压机03', + 'errorInfo': '0', + 'errorTime': '2024-04-01 12:36:27' + }, + { + 'deviceCode': 'YJ02', + 'deviceName': '压机02', + 'errorInfo': '0', + 'errorTime': '2024-04-01 12:35:07' + }, + { + 'deviceCode': 'YJ02', + 'deviceName': '压机02', + 'errorInfo': '0', + 'errorTime': '2024-04-01 12:32:36' + }, + { + 'deviceCode': 'YJ01', + 'deviceName': '压机01', + 'errorInfo': '0', + 'errorTime': '2024-04-01 11:58:40' + }, + { + 'deviceCode': 'YJ02', + 'deviceName': '压机02', + 'errorInfo': '0', + 'errorTime': '2024-04-01 11:58:40' + }, + { + 'deviceCode': 'YJ01', + 'deviceName': '压机01', + 'errorInfo': '0', + 'errorTime': '2024-04-01 11:52:43' + }, + { + 'deviceCode': 'YJ02', + 'deviceName': '压机02', + 'errorInfo': '0', + 'errorTime': '2024-04-01 11:52:43' + }, + { + 'deviceCode': 'YJ04', + 'deviceName': '压机04', + 'errorInfo': '0', + 'errorTime': '2024-04-01 11:26:29' + }, + { + 'deviceCode': 'YJ04', + 'deviceName': '压机04', + 'errorInfo': '0', + 'errorTime': '2024-04-01 11:26:11' + }, + { + 'deviceCode': 'YJ04', + 'deviceName': '压机04', + 'errorInfo': '0', + 'errorTime': '2024-04-01 11:22:54' + }, + { + 'deviceCode': 'YJ04', + 'deviceName': '压机04', + 'errorInfo': '0', + 'errorTime': '2024-04-01 11:22:10' + }, + { + 'deviceCode': 'YJ04', + 'deviceName': '压机04', + 'errorInfo': '0', + 'errorTime': '2024-04-01 11:21:58' + }, + { + 'deviceCode': 'YJ04', + 'deviceName': '压机04', + 'errorInfo': '0', + 'errorTime': '2024-04-01 11:20:04' + }, + { + 'deviceCode': 'YJ03', + 'deviceName': '压机03', + 'errorInfo': '0', + 'errorTime': '2024-04-01 11:16:46' + }, + { + 'deviceCode': 'YJ03', + 'deviceName': '压机03', + 'errorInfo': '0', + 'errorTime': '2024-04-01 11:16:12' + }, + { + 'deviceCode': 'YJ04', + 'deviceName': '压机04', + 'errorInfo': '0', + 'errorTime': '2024-04-01 11:15:34' + }, + { + 'deviceCode': 'YJ03', + 'deviceName': '压机03', + 'errorInfo': '0', + 'errorTime': '2024-04-01 11:15:33' + }, + { + 'deviceCode': 'YJ03', + 'deviceName': '压机03', + 'errorInfo': '0', + 'errorTime': '2024-04-01 11:14:48' + }, + { + 'deviceCode': 'YJ03', + 'deviceName': '压机03', + 'errorInfo': '0', + 'errorTime': '2024-04-01 11:13:48' + }, + { + 'deviceCode': 'YJ03', + 'deviceName': '压机03', + 'errorInfo': '0', + 'errorTime': '2024-04-01 11:13:15' + }, + { + 'deviceCode': 'YJ03', + 'deviceName': '压机03', + 'errorInfo': '0', + 'errorTime': '2024-04-01 11:13:04' + }, + { + 'deviceCode': 'YJ03', + 'deviceName': '压机03', + 'errorInfo': '0', + 'errorTime': '2024-04-01 11:11:37' + }, + { + 'deviceCode': 'YJ03', + 'deviceName': '压机03', + 'errorInfo': '0', + 'errorTime': '2024-04-01 11:10:24' + }, + { + 'deviceCode': 'YJ03', + 'deviceName': '压机03', + 'errorInfo': '0', + 'errorTime': '2024-04-01 11:08:04' + }, + { + 'deviceCode': 'YJ04', + 'deviceName': '压机04', + 'errorInfo': '0', + 'errorTime': '2024-04-01 11:08:03' + }, + { + 'deviceCode': 'YJ04', + 'deviceName': '压机04', + 'errorInfo': '0', + 'errorTime': '2024-04-01 11:07:15' + }, + { + 'deviceCode': 'YJ03', + 'deviceName': '压机03', + 'errorInfo': '0', + 'errorTime': '2024-04-01 11:07:14' + }, + { + 'deviceCode': 'YJ03', + 'deviceName': '压机03', + 'errorInfo': '0', + 'errorTime': '2024-04-01 11:05:29' + }, + { + 'deviceCode': 'YJ06', + 'deviceName': '压机06', + 'errorInfo': '0', + 'errorTime': '2024-04-01 11:01:20' + }, + { + 'deviceCode': 'YJ06', + 'deviceName': '压机06', + 'errorInfo': '0', + 'errorTime': '2024-04-01 11:01:12' + }, + { + 'deviceCode': 'YJ05', + 'deviceName': '压机05', + 'errorInfo': '0', + 'errorTime': '2024-04-01 11:01:10' + }, + { + 'deviceCode': 'YJ05', + 'deviceName': '压机05', + 'errorInfo': '0', + 'errorTime': '2024-04-01 11:00:58' + }, + { + 'deviceCode': 'YJ06', + 'deviceName': '压机06', + 'errorInfo': '0', + 'errorTime': '2024-04-01 11:00:57' + }, + { + 'deviceCode': 'YJ03', + 'deviceName': '压机03', + 'errorInfo': '0', + 'errorTime': '2024-04-01 11:00:13' + }, + { + 'deviceCode': 'RGV', + 'deviceName': 'RGV', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:56:59' + }, + { + 'deviceCode': 'RGV', + 'deviceName': 'RGV', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:56:49' + }, + { + 'deviceCode': 'FJCDJXS01', + 'deviceName': '分拣拆垛机械手01', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:55:27' + }, + { + 'deviceCode': 'FJCDJXS01', + 'deviceName': '分拣拆垛机械手01', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:48:26' + }, + { + 'deviceCode': 'RGV', + 'deviceName': 'RGV', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:42:53' + }, + { + 'deviceCode': 'RGV', + 'deviceName': 'RGV', + 'errorInfo': '1', + 'errorTime': '2024-04-01 10:42:31' + }, + { + 'deviceCode': 'RGV', + 'deviceName': 'RGV', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:42:30' + }, + { + 'deviceCode': 'RGV', + 'deviceName': 'RGV', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:41:57' + }, + { + 'deviceCode': 'RGV', + 'deviceName': 'RGV', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:41:51' + }, + { + 'deviceCode': 'RGV', + 'deviceName': 'RGV', + 'errorInfo': '1', + 'errorTime': '2024-04-01 10:40:50' + }, + { + 'deviceCode': 'YJ04', + 'deviceName': '压机04', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:40:20' + }, + { + 'deviceCode': 'YJ03', + 'deviceName': '压机03', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:40:18' + }, + { + 'deviceCode': 'YJ04', + 'deviceName': '压机04', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:40:08' + }, + { + 'deviceCode': 'YJ03', + 'deviceName': '压机03', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:40:07' + }, + { + 'deviceCode': 'YJ03', + 'deviceName': '压机03', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:39:40' + }, + { + 'deviceCode': 'YJ04', + 'deviceName': '压机04', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:39:40' + }, + { + 'deviceCode': 'YJ03', + 'deviceName': '压机03', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:39:12' + }, + { + 'deviceCode': 'YJ04', + 'deviceName': '压机04', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:39:11' + }, + { + 'deviceCode': 'YJ04', + 'deviceName': '压机04', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:37:16' + }, + { + 'deviceCode': 'YJ04', + 'deviceName': '压机04', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:36:39' + }, + { + 'deviceCode': 'YJ03', + 'deviceName': '压机03', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:35:19' + }, + { + 'deviceCode': 'YJ02', + 'deviceName': '压机02', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:35:00' + }, + { + 'deviceCode': 'YJ04', + 'deviceName': '压机04', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:34:59' + }, + { + 'deviceCode': 'YJ03', + 'deviceName': '压机03', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:34:58' + }, + { + 'deviceCode': 'YJ04', + 'deviceName': '压机04', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:34:55' + }, + { + 'deviceCode': 'YJ03', + 'deviceName': '压机03', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:34:55' + }, + { + 'deviceCode': 'YJ02', + 'deviceName': '压机02', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:34:49' + }, + { + 'deviceCode': 'YJ03', + 'deviceName': '压机03', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:34:49' + }, + { + 'deviceCode': 'YJ03', + 'deviceName': '压机03', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:34:23' + }, + { + 'deviceCode': 'YJ04', + 'deviceName': '压机04', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:34:10' + }, + { + 'deviceCode': 'YJ03', + 'deviceName': '压机03', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:34:08' + }, + { + 'deviceCode': 'YJ02', + 'deviceName': '压机02', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:26:23' + }, + { + 'deviceCode': 'YJ03', + 'deviceName': '压机03', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:26:19' + }, + { + 'deviceCode': 'YJ04', + 'deviceName': '压机04', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:26:18' + }, + { + 'deviceCode': 'YJ02', + 'deviceName': '压机02', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:26:05' + }, + { + 'deviceCode': 'YJ03', + 'deviceName': '压机03', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:25:47' + }, + { + 'deviceCode': 'YJ04', + 'deviceName': '压机04', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:25:46' + }, + { + 'deviceCode': 'YJ03', + 'deviceName': '压机03', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:23:41' + }, + { + 'deviceCode': 'YJ04', + 'deviceName': '压机04', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:23:40' + }, + { + 'deviceCode': 'YJ02', + 'deviceName': '压机02', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:22:52' + }, + { + 'deviceCode': 'YJ01', + 'deviceName': '压机01', + 'errorInfo': '0', + 'errorTime': '2024-04-01 10:22:50' } ], 'mixingList': [ { - 'materialName': '004', - 'planQty': '0', - 'realQty': '0' + 'materialName': 'ML-60BT1', + 'planQty': '1200', + 'realQty': '800' } ], 'historyList': [ { - 'produceDate': '03-06', - 'suppressedNum': '800', + 'produceDate': '04-01', + 'suppressedNum': null, 'finishedNum': '0' + }, + { + 'produceDate': '03-30', + 'suppressedNum': null, + 'finishedNum': '0' + }, + { + 'produceDate': '03-29', + 'suppressedNum': null, + 'finishedNum': '0' + }, + { + 'produceDate': '03-27', + 'suppressedNum': '896', + 'finishedNum': '504' + }, + { + 'produceDate': '03-25', + 'suppressedNum': '207', + 'finishedNum': '5292' + }, + { + 'produceDate': '03-22', + 'suppressedNum': '850', + 'finishedNum': '756' + }, + { + 'produceDate': '03-21', + 'suppressedNum': '926', + 'finishedNum': '1764' } ], - 'deviceErrorList': [ + 'productList': [ { - 'deviceName': '压机01', - 'errorNum': '1' + 'materialName': 'BP-65A', + 'requiredNum': '1000', + 'suppressedNum': '756', + 'finishedNum': '756' }, { - 'deviceName': '压机02', - 'errorNum': '2' + 'materialName': 'BP-70A', + 'requiredNum': '1000', + 'suppressedNum': '756', + 'finishedNum': '756' }, { - 'deviceName': '压机03', - 'errorNum': '3' + 'materialName': 'ML-70BD', + 'requiredNum': '2000', + 'suppressedNum': '2772', + 'finishedNum': '2772' }, { - 'deviceName': '压机04', - 'errorNum': '4' + 'materialName': 'ML-75B', + 'requiredNum': '4000', + 'suppressedNum': '2016', + 'finishedNum': '2016' + } + ], + 'klInfoList': [ + { + 'materialCode': 'KLHW01', + 'weight': '10.00' }, { - 'deviceName': '压机05', - 'errorNum': '5' + 'materialCode': 'KLHW02', + 'weight': '9.00' }, { - 'deviceName': '压机06', - 'errorNum': '6' + 'materialCode': 'KLHW03', + 'weight': '8.00' }, { - 'deviceName': '压机07', - 'errorNum': '7' + 'materialCode': 'KLHW04', + 'weight': '7.00' }, { - 'deviceName': '压机08', - 'errorNum': '8' + 'materialCode': 'KLHW05', + 'weight': '6.00' }, { - 'deviceName': '压机09', - 'errorNum': '9' + 'materialCode': 'KLHW06', + 'weight': '0.00' }, { - 'deviceName': '压机10', - 'errorNum': '10' + 'materialCode': 'KLHW07', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW08', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW09', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW10', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW11', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW12', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW13', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW14', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW15', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW16', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW17', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW18', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW19', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW20', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW21', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW22', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW23', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW24', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW25', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW26', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW27', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW28', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW29', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW30', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW31', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW32', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW33', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW34', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW35', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW36', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW37', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW38', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW39', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW40', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW41', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW42', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW43', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW44', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW45', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW46', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW47', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW48', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW49', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW50', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW51', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW52', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW53', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW54', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW55', + 'weight': '0.00' + }, + { + 'materialCode': 'KLHW56', + 'weight': '0.00' } ], 'deviceRunStat': { - 'total': 240, + 'total': 0, 'runNum': 0, - 'unProducedNum': 240, + 'unProducedNum': 0, 'freeNum': 0, 'errorNum': 0 - }, - 'productList': [ - { - 'materialName': '001', - 'requiredNum': '1000', - 'suppressedNum': '378', - 'finishedNum': '100' - }, - { - 'materialName': '003', - 'requiredNum': '1000', - 'suppressedNum': '756', - 'finishedNum': '0' - }, - { - 'materialName': '004', - 'requiredNum': '6000', - 'suppressedNum': '7846', - 'finishedNum': '0' - } - ] + } } return res } diff --git a/src/pages/modules/home/index.vue b/src/pages/modules/home/index.vue index 02c0619..98ddf32 100644 --- a/src/pages/modules/home/index.vue +++ b/src/pages/modules/home/index.vue @@ -41,9 +41,9 @@
-

历史分析

+

困料货架泥料库(吨)

-
+
@@ -78,16 +78,6 @@
-
-
-

30天故障-TOP10

-
-
-
-
-
-
-

设备报警信息

@@ -118,7 +108,17 @@
- + +
+
+

历史分析

+
+
+
+
+
+
+
@@ -156,9 +156,10 @@ export default { deviceErrorRecordList: [], // 设备报警信息 mixingList: [], // 当日混料 historyList: [], // 历史分析 - deviceErrorList: [], // 30天故障Top10 productList: [], // 当日成品 - deviceRunStat: {} // 设备运行统计 + klInfoList: [], // 困料货架泥料库(吨) + deviceRunStat: {}, // 设备运行统计 + deviceErrorList: [] // 30天故障Top10 } }, computed: { @@ -177,7 +178,7 @@ export default { }, created () { this._screenTableData() - // this.refresh() + this.refresh() }, beforeDestroy () { clearInterval(this.timer) @@ -185,11 +186,25 @@ export default { clearInterval(this.chart2Timer) clearInterval(this.chart3Timer) clearInterval(this.chart4Timer) + this.timer = null + this.chart1Timer = null + this.chart2Timer = null + this.chart3Timer = null + this.chart4Timer = null + }, + destroyed () { + clearInterval(this.timer) + clearInterval(this.chart1Timer) + clearInterval(this.chart2Timer) + clearInterval(this.chart3Timer) + clearInterval(this.chart4Timer) + this.timer = null + this.chart1Timer = null + this.chart2Timer = null + this.chart3Timer = null + this.chart4Timer = null }, methods: { - expandTooltip () { - this.expand = !this.expand - }, refresh () { this.timer = setInterval(() => { this._screenTableData() @@ -201,15 +216,14 @@ export default { clearInterval(this.chart2Timer) clearInterval(this.chart3Timer) clearInterval(this.chart4Timer) + this.chart1Timer = null + this.chart2Timer = null + this.chart3Timer = null + this.chart4Timer = null this.deviceErrorRecordList = [...res.deviceErrorRecordList] this.mixingList = [...res.mixingList] this.productList = [...res.productList] - this.historyList = [...res.historyList] - this.deviceErrorList = [...res.deviceErrorList] - this.deviceErrorList.map((e, i) => { - this.$set(e, 'sort', i + 1) - }) - this.deviceErrorList = this.deviceErrorList.reverse() + this.klInfoList = [...res.klInfoList] let seriesData = [{value: res.deviceRunStat.runNum, name: '正常运行'}, {value: res.deviceRunStat.unProducedNum, name: '暂未生产'}, {value: res.deviceRunStat.freeNum, name: '空闲设备'}, {value: res.deviceRunStat.errorNum, name: '故障设备'}] seriesData.map(el => { let rate = Number(el.value) * 100 / Number(res.deviceRunStat.total) @@ -218,6 +232,7 @@ export default { }) this.deviceRunStat = res.deviceRunStat this.deviceRunStat.seriesData = seriesData + this.historyList = [...res.historyList] this.setEchart1() this.setEchart2() this.setEchart3() @@ -305,7 +320,7 @@ export default { }, yAxis: { type: 'value', - name: '单位:吨', + // name: '单位:吨', nameTextStyle: { color: '#B5C5D4', fontSize: 14, @@ -578,6 +593,360 @@ export default { }) }, setEchart3 () { + let ydata = [] + let xdata = [] + this.klInfoList.map(el => { + ydata.push(el.materialCode) + xdata.push(el.weight) + }) + let dataZoomMove = { + start: 0, + end: 3 + } + let img = { + bg1: bg1, + bg2: bg2, + bg3: bg3, + bg4: bg4 + } + let colorArray = [] + this.klInfoList.map((e, i) => { + if (i === 0) { + colorArray.push({top: '#8C620F', bottom: '#C7B51C'}) + } else if (i === 1) { + colorArray.push({top: '#3261FB', bottom: '#6BB5FB'}) + } else if (i === 2) { + colorArray.push({top: '#6B4C43', bottom: '#B8A590'}) + } else { + colorArray.push({top: '#537BCB', bottom: '#ADC0E6'}) + } + }) + let option = { + dataZoom: [ + { + show: false, // 为true 滚动条出现 + startValue: dataZoomMove.start, + endValue: dataZoomMove.end, + yAxisIndex: [0, 1] // 关联多个y轴 + }, + { + // 没有下面这块的话,只能拖动滚动条,鼠标滚轮在区域内不能控制外部滚动条 + type: 'inside', + yAxisIndex: 0, + zoomOnMouseWheel: false, // 滚轮是否触发缩放 + moveOnMouseMove: true, // 鼠标滚轮触发滚动 + moveOnMouseWheel: true + } + ], + grid: { + top: 13, + left: 0, + right: 0, + bottom: 0, + containLabel: true + }, + xAxis: { + type: 'value', + axisLabel: { + show: false + }, + axisLine: { + show: false + }, + axisTick: { + show: false + }, + splitLine: { + show: false + } + }, + yAxis: [ + { + type: 'category', + data: ydata, + inverse: true, + axisLabel: { + inside: true, + verticalAlign: 'bottom', + lineHeight: 50, + margin: 0, // 刻度标签与轴线之间的距离 + formatter: function (value) { + let k = ydata.indexOf(value) + let index = k + 1 + if (k === 0) { + return '{one|' + 'TOP' + index + '} {a|' + value + '}' + } else if (k === 1) { + return '{two|' + 'TOP' + index + '} {a|' + value + '}' + } else if (k === 2) { + return '{three|' + 'TOP' + index + '} {a|' + value + '}' + } else { + return '{four|' + 'TOP' + index + '} {a|' + value + '}' + } + }, + rich: { + // 第一名 + one: { + backgroundColor: { + image: img.bg1 + }, + color: '#fff', + width: 60, + height: 32, + fontSize: 16, + lineHeight: 16, + align: 'center', + fontFamily: 'YouSheBiaoTiHei' + }, + // 第二名 + two: { + backgroundColor: { + image: img.bg2 + }, + color: '#fff', + width: 60, + height: 32, + fontSize: 16, + lineHeight: 16, + align: 'center', + fontFamily: 'YouSheBiaoTiHei' + }, + // 第三名 + three: { + backgroundColor: { + image: img.bg3 + }, + color: '#fff', + width: 60, + height: 32, + fontSize: 16, + lineHeight: 16, + align: 'center', + fontFamily: 'YouSheBiaoTiHei' + }, + four: { + backgroundColor: { + image: img.bg4 + }, + color: '#fff', + width: 60, + height: 32, + fontSize: 16, + lineHeight: 16, + align: 'center', + fontFamily: 'YouSheBiaoTiHei' + }, + a: { + color: '#AEC3DC', + height: 32, + fontSize: 16, + lineHeight: 16, + padding: [0, 0, 0, 7], + fontFamily: 'SourceHanSansCN-Regular' + } + } + }, + axisLine: { + show: false + }, + axisTick: { + show: false + }, + splitLine: { + show: false + } + }, + + { + type: 'category', + data: ydata, + inverse: true, + axisLabel: { + inside: true, + verticalAlign: 'bottom', + lineHeight: 50, + margin: 2, + formatter: function (value) { + let k = ydata.indexOf(value) + let index = k + return `{a|${xdata[index]}}` + }, + rich: { + a: { + height: 50, + fontSize: 20, + lineHeight: 50, + align: 'right', + fontFamily: 'YouSheBiaoTiHei', + color: '#E1F6FF' + } + } + }, + axisLine: { + show: false + }, + axisTick: { + show: false + }, + splitLine: { + show: false + } + } + ], + series: [ + { + data: xdata, + type: 'bar', + barWidth: 3, + showBackground: true, + backgroundStyle: { + color: '#ffffff' + }, + itemStyle: { + color: (params) => { + let num = colorArray.length + return { + type: 'linear', + colorStops: [ + { + offset: 0, + color: colorArray[params.dataIndex % num].bottom + }, + { + offset: 1, + color: colorArray[params.dataIndex % num].top + }, + { + offset: 0, + color: colorArray[params.dataIndex % num].bottom + }, + { + offset: 1, + color: colorArray[params.dataIndex % num].top + }, + { + offset: 0, + color: colorArray[params.dataIndex % num].bottom + }, + { + offset: 1, + color: colorArray[params.dataIndex % num].top + } + ] + } + } + } + } + ] + } + if (document.getElementById('new_home_echart_3') == null) { + return + } + this.$echarts.dispose(document.getElementById('new_home_echart_3')) + let echart = this.$echarts.init(document.getElementById('new_home_echart_3')) + echart.setOption(option) + const startMoveDataZoom = () => { + this.chart3Timer = setInterval(() => { + dataZoomMove.start += 1 + dataZoomMove.end += 1 + if (dataZoomMove.end > xdata.length - 1) { + dataZoomMove.start = 0 + dataZoomMove.end = 5 + } + echart.setOption({ + dataZoom: [ + { + type: 'slider', // 有type这个属性,滚动条在最下面,也可以不行,写y:36,这表示距离顶端36px,一般就是在图上面。 + startValue: dataZoomMove.start, + endValue: dataZoomMove.end + } + ] + }) + }, 2000) + } + startMoveDataZoom() + document.getElementById('new_home_echart_3').addEventListener('mouseout', () => { + if (this.chart3Timer) return + let dataZoomMoveGet = echart.getOption().dataZoom[0] + dataZoomMove.start = dataZoomMoveGet.startValue + dataZoomMove.end = dataZoomMoveGet.endValue + startMoveDataZoom() + }) + document.getElementById('new_home_echart_3').addEventListener('mouseover', () => { + clearInterval(this.chart3Timer) + this.chart3Timer = undefined + }) + window.addEventListener('resize', () => { + echart.resize() + }) + }, + setEchart4 () { + let colors = ['#1980EA', '#67D470', '#B4C9EF', '#EF5252', '#BCBF5C', '#6d5edd', '#bf41bb'] + let seriesData = this.deviceRunStat.seriesData + let total = this.deviceRunStat.total + let option = { + color: colors, + grid: { + top: 0, + left: 0, + right: 0, + bottom: 0, + containLabel: true + }, + title: { + text: `{a|总数}\n{b|${total}}`, + x: 'center', + y: '39%', + textStyle: { + rich: { + a: { + fontSize: 16, + lineHeight: 20, + color: '#A8C3E6', + fontFamily: 'SourceHanSansCN-Regular' + }, + b: { + fontSize: 30, + lineHeight: 36, + color: '#DBE7F6', + fontFamily: 'YouSheBiaoTiHei' + } + } + } + }, + series: [{ + name: '设备运行统计', + type: 'pie', + radius: ['61%', '69%'], + center: ['50%', '50%'], + labelLine: { + show: false + }, + tooltip: { + show: false + }, + itemStyle: { + borderColor: 'RGBA(27, 58, 98, .5)', + borderWidth: 2 + }, + label: { + show: false + }, + selectedMode: 'single', + selectedOffset: 20, + data: seriesData + }] + } + if (document.getElementById('new_home_echart_4') == null) { + return + } + this.$echarts.dispose(document.getElementById('new_home_echart_4')) + let echart = this.$echarts.init(document.getElementById('new_home_echart_4')) + echart.setOption(option) + window.addEventListener('resize', () => { + echart.resize() + }) + }, + setEchart5 () { let img = { imgSrc1: symbol3, imgSrc2: symbol4, @@ -759,14 +1128,14 @@ export default { } ] } - if (document.getElementById('new_home_echart_3') == null) { + if (document.getElementById('new_home_echart_5') == null) { return } - this.$echarts.dispose(document.getElementById('new_home_echart_3')) - let echart = this.$echarts.init(document.getElementById('new_home_echart_3')) + this.$echarts.dispose(document.getElementById('new_home_echart_5')) + let echart = this.$echarts.init(document.getElementById('new_home_echart_5')) echart.setOption(option) let len = 0 - this.chart3Timer = setInterval(() => { + this.chart4Timer = setInterval(() => { if (len === barName.length) { len = 0 } @@ -792,349 +1161,6 @@ export default { window.addEventListener('resize', () => { echart.resize() }) - }, - setEchart4 () { - let colors = ['#1980EA', '#67D470', '#B4C9EF', '#EF5252', '#BCBF5C', '#6d5edd', '#bf41bb'] - let seriesData = this.deviceRunStat.seriesData - let total = this.deviceRunStat.total - let option = { - color: colors, - grid: { - top: 0, - left: 0, - right: 0, - bottom: 0, - containLabel: true - }, - title: { - text: `{a|总数}\n{b|${total}}`, - x: 'center', - y: '39%', - textStyle: { - rich: { - a: { - fontSize: 16, - lineHeight: 20, - color: '#A8C3E6', - fontFamily: 'SourceHanSansCN-Regular' - }, - b: { - fontSize: 30, - lineHeight: 36, - color: '#DBE7F6', - fontFamily: 'YouSheBiaoTiHei' - } - } - } - }, - series: [{ - name: '设备运行统计', - type: 'pie', - radius: ['61%', '69%'], - center: ['50%', '50%'], - labelLine: { - show: false - }, - tooltip: { - show: false - }, - itemStyle: { - borderColor: 'RGBA(27, 58, 98, .5)', - borderWidth: 2 - }, - label: { - show: false - }, - selectedMode: 'single', - selectedOffset: 20, - data: seriesData - }] - } - if (document.getElementById('new_home_echart_4') == null) { - return - } - this.$echarts.dispose(document.getElementById('new_home_echart_4')) - let echart = this.$echarts.init(document.getElementById('new_home_echart_4')) - echart.setOption(option) - window.addEventListener('resize', () => { - echart.resize() - }) - }, - setEchart5 () { - let ydata = [] - let xdata = [] - let total = 0 - this.deviceErrorList.map(el => { - total = Math.max(total, Number(el.errorNum)) - }) - let data = [] - this.deviceErrorList.map(el => { - ydata.push(el.deviceName) - xdata.push({name: el.deviceName, value: el.errorNum, sort: el.sort}) - data.push({value: total, num: el.errorNum}) - }) - let img = { - bg1: bg1, - bg2: bg2, - bg3: bg3, - bg4: bg4 - } - let colorArray = [ - { - top: '#537BCB', - bottom: '#ADC0E6' - }, - { - top: '#537BCB', - bottom: '#ADC0E6' - }, - { - top: '#537BCB', - bottom: '#ADC0E6' - }, - { - top: '#537BCB', - bottom: '#ADC0E6' - }, - { - top: '#537BCB', - bottom: '#ADC0E6' - }, - { - top: '#537BCB', - bottom: '#ADC0E6' - }, - { - top: '#537BCB', - bottom: '#ADC0E6' - }, - { - top: '#6B4C43', - bottom: '#B8A590' - }, - { - top: '#3261FB', - bottom: '#6BB5FB' - }, { - top: '#8C620F', - bottom: '#C7B51C' - } - ] - let option = { - grid: { - top: 13, - left: 0, - right: 0, - bottom: 0, - containLabel: true - }, - xAxis: { - splitLine: { - show: false - }, - axisLine: { - show: false - }, - axisLabel: { - show: false - }, - axisTick: { - show: false - } - }, - yAxis: { - type: 'category', - data: ydata, - axisLine: { - show: false - }, - axisTick: { - show: false - }, - axisLabel: { - show: false - }, - max: total - }, - series: [{ - type: 'bar', - showBackground: true, - backgroundStyle: { - color: '#FFFFFF', - borderWidth: 5 - }, - label: { - show: true, - position: [-2, -32], - formatter: (value) => { - let o = value.data - if (o.sort === 1) { - return '{one|' + 'TOP' + o.sort + '} {a|' + o.name + '}' - } else if (o.sort === 2) { - return '{two|' + 'TOP' + o.sort + '} {a|' + o.name + '}' - } else if (o.sort === 3) { - return '{three|' + 'TOP' + o.sort + '} {a|' + o.name + '}' - } else { - return '{four|' + 'TOP' + o.sort + '} {a|' + o.name + '}' - } - }, - rich: { - // 第一名 - one: { - backgroundColor: { - image: img.bg1 - }, - color: '#fff', - width: 60, - height: 32, - fontSize: 16, - lineHeight: 16, - align: 'center', - fontFamily: 'YouSheBiaoTiHei' - }, - // 第二名 - two: { - backgroundColor: { - image: img.bg2 - }, - color: '#fff', - width: 60, - height: 32, - fontSize: 16, - lineHeight: 16, - align: 'center', - fontFamily: 'YouSheBiaoTiHei' - }, - // 第三名 - three: { - backgroundColor: { - image: img.bg3 - }, - color: '#fff', - width: 60, - height: 32, - fontSize: 16, - lineHeight: 16, - align: 'center', - fontFamily: 'YouSheBiaoTiHei' - }, - four: { - backgroundColor: { - image: img.bg4 - }, - color: '#fff', - width: 60, - height: 32, - fontSize: 16, - lineHeight: 16, - align: 'center', - fontFamily: 'YouSheBiaoTiHei' - }, - a: { - color: '#AEC3DC', - height: 32, - fontSize: 16, - lineHeight: 16, - padding: [0, 0, 0, 7], - fontFamily: 'SourceHanSansCN-Regular' - } - } - }, - barWidth: 3, - itemStyle: { - color: (params) => { - let num = colorArray.length - return { - type: 'linear', - colorStops: [ - { - offset: 0, - color: colorArray[params.dataIndex % num].bottom - }, - { - offset: 1, - color: colorArray[params.dataIndex % num].top - }, - { - offset: 0, - color: colorArray[params.dataIndex % num].bottom - }, - { - offset: 1, - color: colorArray[params.dataIndex % num].top - }, - { - offset: 0, - color: colorArray[params.dataIndex % num].bottom - }, - { - offset: 1, - color: colorArray[params.dataIndex % num].top - } - ] - // globalCoord: false - } - } - }, - data: xdata - }, { - name: '背景', - type: 'bar', - barWidth: 3, - barGap: '-100%', - itemStyle: { - color: '#fff' - }, - z: 1, - label: { - show: true, - position: 'insideTopRight', - offset: [0, -32], - formatter: (value) => { - return '{a|' + value.data.num + '}' - }, - rich: { - a: { - height: 32, - fontSize: 20, - lineHeight: 20, - align: 'left', - fontFamily: 'YouSheBiaoTiHei', - color: '#E1F6FF' - } - } - }, - data: data - }], - dataZoom: [ - { - yAxisIndex: [0, 1], // 这里是从X轴的0刻度开始 - show: false, // 是否显示滑动条,不影响使用 - type: 'slider', // 这个 dataZoom 组件是 slider 型 dataZoom 组件 - startValue: 9, // 从头开始。 - endValue: 6 // 展示到第几个。 - } - ] - } - if (document.getElementById('new_home_echart_5') == null) { - return - } - this.$echarts.dispose(document.getElementById('new_home_echart_5')) - let echart = this.$echarts.init(document.getElementById('new_home_echart_5')) - echart.setOption(option) - this.chart4Timer = setInterval(() => { - if (option.dataZoom[0].endValue === 0) { - option.dataZoom[0].endValue = 6 - option.dataZoom[0].startValue = 9 - } else { - option.dataZoom[0].endValue = option.dataZoom[0].endValue - 1 - option.dataZoom[0].startValue = option.dataZoom[0].startValue - 1 - } - echart.setOption(option) - }, 2000) - window.addEventListener('resize', () => { - echart.resize() - }) } } } diff --git a/src/pages/modules/home/workshop.vue b/src/pages/modules/home/workshop.vue index 045c2dd..5ea1878 100644 --- a/src/pages/modules/home/workshop.vue +++ b/src/pages/modules/home/workshop.vue @@ -199,7 +199,7 @@ export default { {type: 'yaossx', device_code: '出窑输送线', coords: '94,635,592,654', shape: 'rect'} ], interTime: this.$store.getters.setTime, - timer3: null, + wsTimer: null, MixMachineList: [], // 混碾机 MixBlankingList: [], // 混碾机对接位 PressMachineList: [], // 压机 @@ -217,13 +217,17 @@ export default { } }, created () { - clearInterval(this.timer3) + this._deviceCondition() + this._inOutKilnDetail() this.refresh() }, beforeDestroy () { - this.$once('hook:beforeDestroy', () => { - clearInterval(this.timer3) - }) + clearInterval(this.wsTimer) + this.wsTimer = null + }, + destroyed () { + clearInterval(this.wsTimer) + this.wsTimer = null }, methods: { showPop ($event, e) { @@ -324,13 +328,9 @@ export default { this.pkId = '' }, refresh () { - this._deviceCondition() - this._inOutKilnDetail() - // this._kilnDetail() - this.timer3 = setInterval(() => { + this.wsTimer = setInterval(() => { this._deviceCondition() this._inOutKilnDetail() - // this._kilnDetail() }, this.interTime) }, async _deviceCondition () { @@ -340,7 +340,7 @@ export default { this.PressMachineList = [...res.PressMachineList] this.ManipulatorInfoList = [...res.ManipulatorInfoList] this.StackingPositionList = [...res.StackingPositionList] - this.yzslwPositionList = [...res.yzslwPositionList] + this.yzslwPositionList = [...res.YzslwPositionList] this.SortAndPalletizingList = [...res.SortAndPalletizingList] this.manualSortingList = [...res.manualSortingList] this.manualSortingList = this.manualSortingList.reverse()