diff --git a/src/assets/js/getData1.js b/src/assets/js/getData1.js index 8380e16..efe0a69 100644 --- a/src/assets/js/getData1.js +++ b/src/assets/js/getData1.js @@ -21,261 +21,53 @@ export const deviceStatusList = (id) => post('api/deviceScreen/deviceStatusList' /** 1.10近30天设备故障统计 */ export const errCensus = (id) => post('api/deviceScreen/errCensus', {}) -export const productionStatistics = () => { - let res = { - 'code': 200, - 'desc': '操作成功', - 'result': { - 'planRes': [ - { - 'workorder_procedure': '压制', - 'label': '2', - 'plan_qty': 20000, - 'real_qty': 480 - }, - { - 'workorder_procedure': '原料', - 'label': '1', - 'plan_qty': 0, - 'real_qty': 0 - }, - { - 'workorder_procedure': '干燥', - 'label': '3', - 'plan_qty': 0, - 'real_qty': 0 - }, - { - 'workorder_procedure': '包装', - 'label': '4', - 'plan_qty': 0, - 'real_qty': 0 - } - ], - 'materialTask': [ - { - 'plan_qty': '0', - 'real_qty': '0', - 'label': '1', - 'workorder_procedure': '原料' - } - ], - 'finishedRes': [ - { - 'workorder_procedure': '压制', - 'label': '2', - 'plan_qty': 20000, - 'real_qty': 480 - }, - { - 'workorder_procedure': '原料', - 'label': '1', - 'plan_qty': 0, - 'real_qty': 0 - }, - { - 'workorder_procedure': '干燥', - 'label': '3', - 'plan_qty': 0, - 'real_qty': 0 - }, - { - 'workorder_procedure': '包装', - 'label': '4', - 'plan_qty': 0, - 'real_qty': 0 - } - ], - 'productionTask': [ - { - 'workorder_id': '1650768844706480128', - 'label': null, - 'device_name': '压机5', - 'material_code': 'ZLMCZ1001C111122GM001BD20-8', - 'material_name': null, - 'cust_name': null, - 'plan_qty': 1000000, - 'real_qty': 0, - 'qualified_qty': 0, - 'unqualified_qty': 0, - 'order_status': '3', - 'order_status_name': '生产中', - 'shift_type': null, - 'realproducestart_date': '2023-04-25 15:51:44', - 'realproduceend_date': '-' - }, - { - 'workorder_id': '1650404416467193856', - 'label': null, - 'device_name': '压机3', - 'material_code': 'ZLMCZ1001C111122GM001BD20-8', - 'material_name': null, - 'cust_name': null, - 'plan_qty': 1000000, - 'real_qty': 0, - 'qualified_qty': 0, - 'unqualified_qty': 0, - 'order_status': '3', - 'order_status_name': '生产中', - 'shift_type': null, - 'realproducestart_date': '2023-04-24 15:42:59', - 'realproduceend_date': '-' - }, - { - 'workorder_id': '1649612373595746304', - 'label': null, - 'device_name': '压机7', - 'material_code': 'ZLMCZ1001C122211GM001BD20-8', - 'material_name': null, - 'cust_name': null, - 'plan_qty': 100000, - 'real_qty': 0, - 'qualified_qty': 0, - 'unqualified_qty': 0, - 'order_status': '3', - 'order_status_name': '生产中', - 'shift_type': null, - 'realproducestart_date': '2023-04-22 11:29:10', - 'realproduceend_date': '-' - }, - { - 'workorder_id': '1648878346865606656', - 'label': null, - 'device_name': '压机4', - 'material_code': 'ZLMCZ1001C122211GM001BD20-8', - 'material_name': null, - 'cust_name': null, - 'plan_qty': 100000, - 'real_qty': 0, - 'qualified_qty': 0, - 'unqualified_qty': 0, - 'order_status': '3', - 'order_status_name': '生产中', - 'shift_type': null, - 'realproducestart_date': '2023-04-20 10:43:55', - 'realproduceend_date': '-' - }, - { - 'workorder_id': '1648195777525485568', - 'label': null, - 'device_name': '压机2', - 'material_code': 'ZLMCZ1001C111122GM001BD20-8', - 'material_name': null, - 'cust_name': null, - 'plan_qty': 10000, - 'real_qty': 0, - 'qualified_qty': 0, - 'unqualified_qty': 0, - 'order_status': '3', - 'order_status_name': '生产中', - 'shift_type': null, - 'realproducestart_date': '2023-04-18 13:34:36', - 'realproduceend_date': '-' - }, - { - 'workorder_id': '1647845461961498624', - 'label': null, - 'device_name': '压机1', - 'material_code': 'ZLMCZ1001C111122GM001BD20-8', - 'material_name': null, - 'cust_name': null, - 'plan_qty': 10000, - 'real_qty': 0, - 'qualified_qty': 0, - 'unqualified_qty': 0, - 'order_status': '3', - 'order_status_name': '生产中', - 'shift_type': null, - 'realproducestart_date': '2023-04-17 14:18:58', - 'realproduceend_date': '-' - }, - { - 'workorder_id': '1650040960085835776', - 'label': null, - 'device_name': '压机3', - 'material_code': 'ZLMCZ1001C111122GM001BD20-8', - 'material_name': null, - 'cust_name': null, - 'plan_qty': 100000, - 'real_qty': 100004, - 'qualified_qty': 99807, - 'unqualified_qty': 197, - 'order_status': '5', - 'order_status_name': '完成', - 'shift_type': null, - 'realproducestart_date': '2023-04-23 15:38:03', - 'realproduceend_date': '2023-04-24 12:01:03' - }, - { - 'workorder_id': '1649231836326563840', - 'label': null, - 'device_name': '压机3', - 'material_code': 'ZLMCZ1001C122211GM001BD20-8', - 'material_name': null, - 'cust_name': null, - 'plan_qty': 100000, - 'real_qty': 276285, - 'qualified_qty': 263808, - 'unqualified_qty': 12477, - 'order_status': '5', - 'order_status_name': '完成', - 'shift_type': null, - 'realproducestart_date': '2023-04-21 10:10:40', - 'realproduceend_date': '2023-04-23 14:17:33' - }, - { - 'workorder_id': '1648871924408909824', - 'label': null, - 'device_name': '压机3', - 'material_code': 'ZLMCZ1001C111122GM001BD20-8', - 'material_name': null, - 'cust_name': null, - 'plan_qty': 100000, - 'real_qty': 0, - 'qualified_qty': 0, - 'unqualified_qty': 0, - 'order_status': '5', - 'order_status_name': '完成', - 'shift_type': null, - 'realproducestart_date': '2023-04-20 10:11:33', - 'realproduceend_date': '2023-04-21 09:44:15' - }, - { - 'workorder_id': '1648869698739240960', - 'label': null, - 'device_name': '压机3', - 'material_code': 'ZLMCZ1001C111122GM001BD20-8', - 'material_name': null, - 'cust_name': null, - 'plan_qty': 100000, - 'real_qty': 1652528, - 'qualified_qty': 1549371, - 'unqualified_qty': 103157, - 'order_status': '5', - 'order_status_name': '完成', - 'shift_type': null, - 'realproducestart_date': '2023-04-20 10:03:54', - 'realproduceend_date': '2023-04-20 10:03:54' - }, - { - 'workorder_id': '1648860718914801664', - 'label': null, - 'device_name': '压机3', - 'material_code': 'ZLMCZ1001C111122GM001BD20-8', - 'material_name': null, - 'cust_name': null, - 'plan_qty': 10000, - 'real_qty': 1652528, - 'qualified_qty': 1549371, - 'unqualified_qty': 103157, - 'order_status': '5', - 'order_status_name': '完成', - 'shift_type': null, - 'realproducestart_date': '-', - 'realproduceend_date': '2023-04-20 09:37:49' - } - ] - } - } - return res -} +/** 生产统计 */ +export const productionStatistics = (id) => post('api/dashboard/productionStatistics', {}) +// export const productionStatistics = () => { +// let res = { +// 'total': { +// 'pressWeight': 0, +// 'dryWeight': 0, +// 'sortWeight': 0 +// }, +// 'mixProduction': [ +// { +// 'value': 0, +// 'name': 'string' +// } +// ], +// 'pressProduction': { +// 'dailyProductionQty': 0, +// 'dailyProductionWeight': 0, +// 'equipmentProduction': [ +// { +// 'name': 'string', +// 'qty': 0, +// 'weight': 0 +// } +// ] +// }, +// 'finishedProductCompletionRate': [ +// { +// 'name': 'string', +// 'completed': 0, +// 'uncompleted': 0 +// } +// ], +// 'workOrder': [ +// { +// 'workOrderCode': 'string', +// 'equipment': 'string', +// 'materialCode': 'string', +// 'customer': 'string', +// 'planned': 0, +// 'completed': 0, +// 'status': 'string', +// 'planStartTime': 'string', +// 'startTime': 'string', +// 'endTime': 'string' +// } +// ] +// } +// return res +// } diff --git a/src/pages/shunhe/ProdCount.vue b/src/pages/shunhe/ProdCount.vue index b210a64..f665e2c 100644 --- a/src/pages/shunhe/ProdCount.vue +++ b/src/pages/shunhe/ProdCount.vue @@ -66,10 +66,10 @@