diff --git a/index.html b/index.html index 132cc24..370c577 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ - 宁德华弘大屏监控 + 车间物料监控
diff --git a/src/config/mork2.js b/src/config/mork2.js index e6898e0..ff1f345 100644 --- a/src/config/mork2.js +++ b/src/config/mork2.js @@ -1,1103 +1,78 @@ /* eslint-disable */ -export const screenTableData = () => { - let res = { - 'deviceErrorRecordList': [ - { - 'deviceCode': 'YJ02', - 'deviceName': '压机02', - 'errorInfo': '0', - 'errorTime': '2024-04-01 13:41:42' - }, - { - 'deviceCode': 'YJ02', - 'deviceName': '压机02', - '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': '0', - 'errorTime': '2024-04-01 13:05:36' - }, - { - 'deviceCode': 'YJ03', - 'deviceName': '压机03', - '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': 'ML-60BT1', - 'planQty': '1200', - 'realQty': '800' - } - ], - 'historyList': [ - { - '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' - } - ], - 'productList': [ - { - 'materialName': 'BP-65A', - 'requiredNum': '1000', - 'suppressedNum': '756', - 'finishedNum': '756' - }, - { - 'materialName': 'BP-70A', - 'requiredNum': '1000', - 'suppressedNum': '756', - 'finishedNum': '756' - }, - { - 'materialName': 'ML-70BD', - 'requiredNum': '2000', - 'suppressedNum': '2772', - 'finishedNum': '2772' - }, - { - 'materialName': 'ML-75B', - 'requiredNum': '4000', - 'suppressedNum': '2016', - 'finishedNum': '2016' - } - ], - 'klInfoList': [ - { - 'materialCode': 'KLHW01', - 'weight': '10.00' - }, - { - 'materialCode': 'KLHW02', - 'weight': '9.00' - }, - { - 'materialCode': 'KLHW03', - 'weight': '8.00' - }, - { - 'materialCode': 'KLHW04', - 'weight': '7.00' - }, - { - 'materialCode': 'KLHW05', - 'weight': '6.00' - }, - { - 'materialCode': 'KLHW06', - 'weight': '0.00' - }, - { - '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': 0, - 'runNum': 0, - 'unProducedNum': 0, - 'freeNum': 0, - 'errorNum': 0 - }, - // 库存量监控 最多7个元素 - 'inventory': [ - { - // 物料编码 - 'materialCode': 'GBMCZ3027L323217GM003ZX22-31', - 'materialName': '物料一', - // 数量 - 'qty': 1 - }, - { - // 物料编码 - 'materialCode': 'GBMCZ3027L323217GM003ZX22-32', - 'materialName': '物料二', - // 数量 - 'qty': 2 - }, - { - // 物料编码 - 'materialCode': 'GBMCZ3027L323217GM003ZX22-3', - 'materialName': '物料三', - // 数量 - 'qty': 3 - }, - { - // 物料编码 - 'materialCode': 'GBMCZ3027L323217GM003ZX22-4', - 'materialName': '物料四', - // 数量 - 'qty': 4 - }, - { - // 物料编码 - 'materialCode': 'GBMCZ3027L323217GM003ZX22-5', - 'materialName': '物料五', - // 数量 - 'qty': 5 - }, - { - // 物料编码 - 'materialCode': 'GBMCZ3027L323217GM003ZX22-6', - 'materialName': '物料6', - // 数量 - 'qty': 6 - }, - { - // 物料编码 - 'materialCode': 'GBMCZ3027L323217GM003ZX22-7', - 'materialName': '物料7', - // 数量 - 'qty': 7 - } - ] - } - return res -} export const inventoryAnalysis = () => { let res = [ { - "material_id": "29", - "material_code": "62", - "material_name": "线族以头积", - "total_material_qty": "20", - "percentage": "10%" + "total_material_qty": 50.0, + "percentage": "33.33%", + "material_id": "1759155580745945088", + "material_name": "测试物料2", + "material_code": "A1002" }, { - "material_id": "17", - "material_code": "77", - "material_name": "细二到属标", - "total_material_qty": "30", - "percentage": "10%" - }, - { - "material_id": "36", - "material_code": "59", - "material_name": "社极近东", - "total_material_qty": "50", - "percentage": "10%" - }, - { - "material_id": "29", - "material_code": "62", - "material_name": "线族以头积1", - "total_material_qty": "20", - "percentage": "10%" - }, - { - "material_id": "17", - "material_code": "77", - "material_name": "细二到属标2", - "total_material_qty": "30", - "percentage": "10%" - }, - { - "material_id": "36", - "material_code": "59", - "material_name": "社极近东3", - "total_material_qty": "50", - "percentage": "10%" - }, - { - "material_id": "36", - "material_code": "59", - "material_name": "社极近东4", - "total_material_qty": "50", - "percentage": "40%" - } + "total_material_qty": 100.0, + "percentage": "66.67%", + "material_id": "1759154624864063488", + "material_name": "测试物料", + "material_code": "A1001" + } ] return res } export const inventoryIOAnalysis = () => { let res = [ - { - "material_id": "61", - "material_code": "51", - "material_name": "几大个厂过重", - "total_instorage_qty": 3, - "total_outstorage_qty": 69 - }, - { - "material_id": "33", - "material_code": "46", - "material_name": "力等定权名建织", - "total_instorage_qty": 7, - "total_outstorage_qty": 24 - }, - { - "material_id": "26", - "material_code": "29", - "material_name": "百局和历收备根", - "total_instorage_qty": 94, - "total_outstorage_qty": 73 - }, - { - "material_id": "61", - "material_code": "51", - "material_name": "几大个厂过重", - "total_instorage_qty": 3, - "total_outstorage_qty": 69 + { + "total_outstorage_qty": 0.0, + "total_instorage_qty": 100.0, + "material_id": "1759154624864063488", + "material_name": "测试物料", + "material_code": "A1001" }, { - "material_id": "33", - "material_code": "46", - "material_name": "力等定权名建织", - "total_instorage_qty": 7, - "total_outstorage_qty": 24 - }, - { - "material_id": "26", - "material_code": "29", - "material_name": "百局和历收备根", - "total_instorage_qty": 94, - "total_outstorage_qty": 73 + "total_outstorage_qty": 28.0, + "total_instorage_qty": 78.0, + "material_id": "1759155580745945088", + "material_name": "测试物料2", + "material_code": "A1002" } - ] +] return res } export const historyInventoryIOAnalysis = () => { let res = [ { - "data": "2024-10-01", - "total_instorage_qty": 96, - "total_outstorage_qty": 7 + "total_outstorage_qty": 0.0, + "data": "08-01", + "total_instorage_qty": 0.0 }, { - "data": "2024-10-02", - "total_instorage_qty": 5, - "total_outstorage_qty": 86 + "total_outstorage_qty": 1.0, + "data": "08-02", + "total_instorage_qty": 0.0 }, { - "data": "2024-10-03", - "total_instorage_qty": 20, - "total_outstorage_qty": 29 + "total_outstorage_qty": 0.0, + "data": "08-03", + "total_instorage_qty": 0.0 }, { - "data": "2024-10-04", - "total_instorage_qty": 20, - "total_outstorage_qty": 29 + "total_outstorage_qty": 0.0, + "data": "08-04", + "total_instorage_qty": 0.0 }, { - "data": "2024-10-05", - "total_instorage_qty": 20, - "total_outstorage_qty": 29 + "total_outstorage_qty": 0.0, + "data": "08-05", + "total_instorage_qty": 0.0 }, { - "data": "2024-10-06", - "total_instorage_qty": 20, - "total_outstorage_qty": 29 + "total_outstorage_qty": 6.0, + "data": "08-06", + "total_instorage_qty": 6.0 }, { - "data": "2024-10-07", - "total_instorage_qty": 20, - "total_outstorage_qty": 29 + "total_outstorage_qty": 28.0, + "data": "08-07", + "total_instorage_qty": 178.0 } ] return res @@ -1105,19 +80,19 @@ export const historyInventoryIOAnalysis = () => { export const todayProduceStatistic = () => { let res = [ { - "region_code": "52", - "region_name": "反亲更族治至", - "count": 20 + "count": 0, + "region_name": "备成型壳制备区", + "region_code": "BCXKZB" }, { - "region_code": "98", - "region_name": "主管当格", - "count": 57 + "count": 0, + "region_name": "型壳焙烧区", + "region_code": "XKBS" }, { - "region_code": "88", - "region_name": "白光基社认", - "count": 59 + "count": 0, + "region_name": "蒸汽脱蜡区", + "region_code": "ZQTL" } ] return res @@ -1125,97 +100,177 @@ export const todayProduceStatistic = () => { export const todayLoadingAndUnloadingStatistics = () => { let res = [ { - "region_code": "46", - "region_name": "区间一", - "material_loading_count": 87, - "material_unloading_count": 93 + "material_loading_count": 0, + "material_unloading_count": 0, + "region_name": "2F面层制壳间", + "region_code": "2FMCZKJ" }, { - "region_code": "46", - "region_name": "区间二", - "material_loading_count": 87, - "material_unloading_count": 93 - }, - { - "region_code": "46", - "region_name": "区间三", - "material_loading_count": 87, - "material_unloading_count": 93 - }, - { - "region_code": "46", - "region_name": "区间四", - "material_loading_count": 87, - "material_unloading_count": 93 - }, - { - "region_code": "46", - "region_name": "区间5", - "material_loading_count": 87, - "material_unloading_count": 93 - }, - { - "region_code": "46", - "region_name": "区间6", - "material_loading_count": 87, - "material_unloading_count": 93 -}, -{ - "region_code": "46", - "region_name": "区间7", - "material_loading_count": 87, - "material_unloading_count": 93 -}, -{ - "region_code": "46", - "region_name": "区间8", - "material_loading_count": 87, - "material_unloading_count": 93 -}, -{ - "region_code": "46", - "region_name": "区间9", - "material_loading_count": 87, - "material_unloading_count": 93 -}, -{ -"region_code": "46", -"region_name": "区间10", -"material_loading_count": 100, -"material_unloading_count": 100 -}, -{ - "region_code": "46", - "region_name": "区间11", - "material_loading_count": 87, - "material_unloading_count": 93 -}, -{ -"region_code": "46", -"region_name": "区间12", -"material_loading_count": 87, -"material_unloading_count": 93 -} + "material_loading_count": 0, + "material_unloading_count": 0, + "region_name": "3F蜡模组树区", + "region_code": "3FLMZS" + }, + { + "material_loading_count": 0, + "material_unloading_count": 0, + "region_name": "备成型壳制备区", + "region_code": "BCXKZB" + }, + { + "material_loading_count": 0, + "material_unloading_count": 0, + "region_name": "蜡模制备区", + "region_code": "LMZB" + }, + { + "material_loading_count": 0, + "material_unloading_count": 0, + "region_name": "蜡模组盘区", + "region_code": "LMZP" + }, + { + "material_loading_count": 0, + "material_unloading_count": 0, + "region_name": "型壳焙烧区", + "region_code": "XKBS" + }, + { + "material_loading_count": 0, + "material_unloading_count": 0, + "region_name": "自动制壳区", + "region_code": "ZDZK" + }, + { + "material_loading_count": 0, + "material_unloading_count": 0, + "region_name": "蒸汽脱蜡区", + "region_code": "ZQTL" + } ] return res } export const todayTask = () => { let res = [ { - "task_code": "55", - "carno": "ullamco sit eiusmod Lorem mollit", - "start_point_code": "60", - "next_point_code": "84", - "create_time": "1978-01-20 04:34:04", - "task_status": "eiusmod quis minim" + "task_status": "完成", + "create_time": "2024-08-07 13:19:10", + "carno": "", + "task_code": "1821053300573868033", + "next_point_code": "01-01-01", + "start_point_code": "CKDJ1" }, { - "task_code": "58", - "carno": "in dolore dolore", - "start_point_code": "12", - "next_point_code": "3", - "create_time": "1999-08-23 09:35:07", - "task_status": "est" + "task_status": "完成", + "create_time": "2024-08-07 13:13:46", + "carno": "", + "task_code": "1821051936523292673", + "next_point_code": "RKDJ2", + "start_point_code": "01-01-02" + }, + { + "task_status": "完成", + "create_time": "2024-08-07 13:16:10", + "carno": "", + "task_code": "1821052566008631297", + "next_point_code": "01-01-02", + "start_point_code": "RKDJ2" + }, + { + "task_status": "完成", + "create_time": "2024-08-07 13:19:00", + "carno": "", + "task_code": "1821053354068021249", + "next_point_code": "01-01-02", + "start_point_code": "CKDJ2" + }, + { + "task_status": "完成", + "create_time": "2024-08-07 13:16:20", + "carno": "", + "task_code": "1821052576351784961", + "next_point_code": "01-01-03", + "start_point_code": "RKDJ1" + }, + { + "task_status": "完成", + "create_time": "2024-08-07 13:10:35", + "carno": "AMB-02", + "task_code": "1821050896554004481", + "next_point_code": "01-02-02", + "start_point_code": "RKDJ5" + }, + { + "task_status": "完成", + "create_time": "2024-08-07 13:17:52", + "carno": "", + "task_code": "1821053001335443457", + "next_point_code": "CKDJ2", + "start_point_code": "01-01-02" + }, + { + "task_status": "完成", + "create_time": "2024-08-07 13:10:15", + "carno": "AMB-01", + "task_code": "1821050807915778049", + "next_point_code": "01-01-03", + "start_point_code": "RKDJ3" + }, + { + "task_status": "完成", + "create_time": "2024-08-07 13:13:56", + "carno": "", + "task_code": "1821051969201115137", + "next_point_code": "RKDJ3", + "start_point_code": "01-01-03" + }, + { + "task_status": "完成", + "create_time": "2024-08-07 13:10:05", + "carno": "AMB-01", + "task_code": "1821050760486588417", + "next_point_code": "01-01-02", + "start_point_code": "RKDJ2" + }, + { + "task_status": "完成", + "create_time": "2024-08-07 13:10:25", + "carno": "AMB-02", + "task_code": "1821050853545611265", + "next_point_code": "01-02-01", + "start_point_code": "RKDJ4" + }, + { + "task_status": "完成", + "create_time": "2024-08-07 13:13:36", + "carno": "", + "task_code": "1821051901286944769", + "next_point_code": "RKDJ1", + "start_point_code": "01-01-01" + }, + { + "task_status": "完成", + "create_time": "2024-08-07 13:17:42", + "carno": "", + "task_code": "1821052983480291329", + "next_point_code": "CKDJ1", + "start_point_code": "01-01-01" + }, + { + "task_status": "完成", + "create_time": "2024-08-07 13:16:00", + "carno": "", + "task_code": "1821052554327494657", + "next_point_code": "01-01-01", + "start_point_code": "RKDJ3" + }, + { + "task_status": "完成", + "create_time": "2024-08-07 13:09:55", + "carno": "AMB-01", + "task_code": "1821050707009212417", + "next_point_code": "01-01-01", + "start_point_code": "RKDJ1" } ] return res @@ -1223,28 +278,55 @@ export const todayTask = () => { export const agvInfo = () => { let res = [ { - "device_code": "3", - "device_name": "1号AGV", - "task_code": "89", - "battery_level": "75%", - "status": "正常", - "message": "运行正常" + "battery_level": "0.0%", + "task_code": "0", + "todayTaskNum": 0, + "message": "运行正常", + "monthTaskNum": 1, + "device_name": "AMB-03", + "today_odo": 0.0, + "device_code": "AMB-03", + "x": 0.0, + "angle": 0.0, + "y": 0.0, + "time": 0.0, + "odo": 0, + "total_time": 0.0, + "status": "未知状态" }, { - "device_code": "11", - "device_name": "2号AGV", - "task_code": "89", - "battery_level": "75%", - "status": "正常", - "message": "运行正常" + "battery_level": "0.0%", + "task_code": "0", + "todayTaskNum": 2, + "message": "运行正常", + "monthTaskNum": 4, + "device_name": "AMB-02", + "today_odo": 0.0, + "device_code": "AMB-02", + "x": 0.0, + "angle": 0.0, + "y": 0.0, + "time": 0.0, + "odo": 0, + "total_time": 0.0, + "status": "未知状态" }, { - "device_code": "45", - "device_name": "3号AGV", - "task_code": "89", - "battery_level": "75%", - "status": "正常", - "message": "运行正常" + "battery_level": "0.0%", + "task_code": "0", + "todayTaskNum": 5, + "message": "运行正常", + "monthTaskNum": 7, + "device_name": "AMB-01", + "today_odo": 0.0, + "device_code": "AMB-01", + "x": 0.0, + "angle": 0.0, + "y": 0.0, + "time": 0.0, + "odo": 0, + "total_time": 0.0, + "status": "未知状态" } ] return res @@ -1252,41 +334,81 @@ export const agvInfo = () => { export const rgvInfo = () => { let res = [ { - "device_code": "52", - "device_name": "1号RGV", - "current_loc": "RK01", - "target_loc": "L1-01", - "battery_level": "75%", - "status": "正常", - "message": "运行正常" + "current_loc": "0", + "battery_level": "0.0%", + "heartbeat": 0, + "task_code": 0, + "vehicleCode": null, + "allTaskNum": 0, + "error": 0, + "todayTaskNum": 0, + "message": "运行异常", + "mode": "未知", + "device_name": "RGV01", + "target_loc": "0", + "device_code": "RGV01", + "x": null, + "y": null, + "action": 0, + "status": "休息中" }, { - "device_code": "52", - "device_name": "1号RGV", - "current_loc": "RK01", - "target_loc": "L1-01", - "battery_level": "75%", - "status": "正常", - "message": "运行正常" - }, - { - "device_code": "52", - "device_name": "1号RGV", - "current_loc": "RK01", - "target_loc": "L1-01", - "battery_level": "75%", - "status": "正常", - "message": "运行正常" - }, - { - "device_code": "52", - "device_name": "1号RGV", - "current_loc": "RK01", - "target_loc": "L1-01", - "battery_level": "75%", - "status": "正常", - "message": "运行正常" -} + "current_loc": "0", + "battery_level": "0.0%", + "heartbeat": 0, + "task_code": 0, + "vehicleCode": null, + "allTaskNum": 0, + "error": 0, + "todayTaskNum": 0, + "message": "运行异常", + "mode": "未知", + "device_name": "RGV02", + "target_loc": "0", + "device_code": "RGV02", + "x": null, + "y": null, + "action": 0, + "status": "休息中" + }, + { + "current_loc": "0", + "battery_level": "0.0%", + "heartbeat": 0, + "task_code": 0, + "vehicleCode": null, + "allTaskNum": 0, + "error": 0, + "todayTaskNum": 0, + "message": "运行异常", + "mode": "未知", + "device_name": "RGV04", + "target_loc": "0", + "device_code": "RGV04", + "x": null, + "y": null, + "action": 0, + "status": "休息中" + }, + { + "current_loc": "0", + "battery_level": "0.0%", + "heartbeat": 0, + "task_code": 0, + "vehicleCode": null, + "allTaskNum": 0, + "error": 0, + "todayTaskNum": 0, + "message": "运行异常", + "mode": "未知", + "device_name": "RGV03", + "target_loc": "0", + "device_code": "RGV03", + "x": null, + "y": null, + "action": 0, + "status": "休息中" + } ] return res } diff --git a/src/pages/modules/home/index.vue b/src/pages/modules/home/index.vue index f46e299..94931df 100644 --- a/src/pages/modules/home/index.vue +++ b/src/pages/modules/home/index.vue @@ -124,10 +124,7 @@
  • 设备
  • 起点位置
  • 终点位置
  • -
  • 物料号
  • -
  • 物料名称
  • -
  • 数量
  • -
  • 重量
  • +
  • 任务号
  • 任务状态
  • @@ -142,10 +139,7 @@
    -->
    {{e.start_point_code}}
    {{e.next_point_code}}
    -
    {{e.next_point_code}}
    -
    {{e.next_point_code}}
    -
    {{e.next_point_code}}
    -
    {{e.next_point_code}}
    +
    {{e.task_code}}
    {{e.task_status}}
    @@ -277,12 +271,10 @@ export default { }, async _inventoryAnalysis () { let res = await inventoryAnalysis() - if (res.length) { - clearInterval(this.chart1Timer) - this.chart1Timer = null - this.materList = [...res] - this.setEchart1() - } + clearInterval(this.chart1Timer) + this.chart1Timer = null + this.materList = [...res] + this.setEchart1() }, async _inventoryIOAnalysis () { let res = await inventoryIOAnalysis() @@ -330,6 +322,9 @@ export default { this.materList.map(e => { total = total + Number(e.total_material_qty) }, 0) + if (!this.materList.length) { + total = '0' + } let option = { color: colors, grid: { @@ -731,29 +726,29 @@ export default { lineHeight: 12, // align: 'right', fontFamily: 'SourceHanSansCN-Regular', - margin: 10, - formatter: (value) => { - let str = '' - let num = 5 - let valLength = value.length - let rowNum = Math.ceil(valLength / num) - if (rowNum > 1) { - for (let i = 0; i < rowNum; i++) { - let temp = '' - let start = i * num - let end = start + num - if (i === rowNum - 1) { - temp = value.substring(start, end) - } else { - temp = value.substring(start, end) + '\n' - } - str += temp - } - return str - } else { - return value - } - } + margin: 10 + // formatter: (value) => { + // let str = '' + // let num = 5 + // let valLength = value.length + // let rowNum = Math.ceil(valLength / num) + // if (rowNum > 1) { + // for (let i = 0; i < rowNum; i++) { + // let temp = '' + // let start = i * num + // let end = start + num + // if (i === rowNum - 1) { + // temp = value.substring(start, end) + // } else { + // temp = value.substring(start, end) + '\n' + // } + // str += temp + // } + // return str + // } else { + // return value + // } + // } }, data: barName }, @@ -1339,10 +1334,10 @@ export default { .scroll_tab_1 width 100% height 38px - background left center / auto 100% url('../../../images/table-bg_1.png') no-repeat + background center / 100% 100% url('../../../images/table-bg_1.png') no-repeat li float left - width 9% + width 15% font-size 16px; line-height 38px color #AFBED8 @@ -1356,8 +1351,8 @@ export default { padding 0 5px overflow hidden box-sizing border-box - &:nth-child(1), &:nth-child(2) - width 18.5% + &:nth-child(1), &:nth-child(5) + width 20% .state display block width 20px @@ -1379,7 +1374,7 @@ export default { background rgba(31,46,73,0.55) .scroll-ul_1_div float left - width 9% + width 15% height 39px display flex flex-direction row @@ -1392,13 +1387,13 @@ export default { text-align center font-family: 'SourceHanSansCN-Regular'; font-style: italic; - word-wrap break-word - word-break break-all - // white-space nowrap + // word-wrap break-word + // word-break break-all + white-space nowrap padding 0 5px overflow hidden - &:nth-child(1), &:nth-child(2) - width 18.5% + &:nth-child(1), &:nth-child(5) + width 20% .state display block width 20px @@ -1451,6 +1446,7 @@ export default { color: #78B1DE; letter-spacing: 2px; text-align: center; + white-space nowrap .agv_txt display: flex; justify-content: space-between;