diff --git a/src/views/bigScreen/gxerp/index_com.vue b/src/views/bigScreen/gxerp/index_com.vue index 7237e412..2b286cae 100644 --- a/src/views/bigScreen/gxerp/index_com.vue +++ b/src/views/bigScreen/gxerp/index_com.vue @@ -19,17 +19,9 @@
-
-
-
日投产量
-
DAILY INPUT
-
-
{{ sctj.rtcs }}
-
-
-
日加工数
+
昨日加工数
PROCESSED
{{ sctj.rjgs }}
@@ -37,7 +29,7 @@
-
加工前不良
+
昨日加工前不良
PRE-DEFECT
{{ sctj.rjgqbls }}
@@ -45,7 +37,7 @@
-
日合格数
+
昨日合格数
QUALIFIED
{{ sctj.rhgs }}
@@ -53,12 +45,20 @@
-
日不合格数
+
昨日不合格数
REJECTED
{{ sctj.rbhgs }}
+
+
+
昨日合格率
+
DAILY QUALITY RATE
+
+
{{ sctj.rhgl }}
+
+
@@ -170,11 +170,11 @@ export default { gz: 0, }, sctj: { - rtcs: 0, rjgs: 0, rjgqbls: 0, rhgs: 0, rbhgs: 0, + rhgl: 0, }, dayInterval: null, chartInterval2: null, @@ -195,7 +195,7 @@ export default { headerBGC: 'rgba(0, 229, 255, 0.16)', oddRowBGC: 'rgba(0, 229, 255, 0.04)', evenRowBGC: 'rgba(0, 229, 255, 0.10)', - header: ['设备名称', '设备编号', '设备状态', '物料数量'], + header: ['设备名称', '设备编号', '设备状态', '日加工量', '累计加工量'], headerHeight: 38, rowNum: 8, align: 'center', @@ -206,7 +206,7 @@ export default { headerBGC: 'rgba(0, 229, 255, 0.16)', oddRowBGC: 'rgba(0, 229, 255, 0.04)', evenRowBGC: 'rgba(0, 229, 255, 0.10)', - header: ['日期', '加工数', '合格数', '不合格数'], + header: ['日期', '物料名', '接收数', '合格数', '不合格数', '交送数'], headerHeight: 38, rowNum: 7, align: 'center', @@ -248,7 +248,7 @@ export default { that.daysList.push(dayitem); }) that.today = new Date().toISOString().split('T')[0]; - that.yesterday = new Date(new Date().getTime() - 24 * 60 * 60 * 1000).toISOString().split('T')[0]; + that.yesterday =that.$TOOL.dateFormat2(new Date().getTime() - 24 * 60 * 60 * 1000);; this.xAxisData = xAxisData; let startDate = new Date(daysArr[0]).getTime() - (1000 * 60 * 60 * 24); let endDate = new Date(daysArr[6]).getTime() + (1000 * 60 * 60 * 24); @@ -322,19 +322,22 @@ export default { let list = res.data2.ds0; if (list.length > 0) { list.forEach((item) => { - let dateNow = new Date().getDate(); - if (item.日 == dateNow) { + let dateYes = that.yesterday.split('-')[2]; + if (item.日 == dateYes) { that.sctj.rtcs = item.总重量; that.sctj.rjgs = item.生产数; that.sctj.rjgqbls = item.生产数 - item.不合格数 - item.合格数; that.sctj.rhgs = item.合格数; that.sctj.rbhgs = item.不合格数; + that.sctj.rhgl = Number((item.合格率).toFixed(2)); } let arr = []; arr[0] = item.年 + '-' + item.月 + '-' + item.日; - arr[1] = item.生产数; - arr[2] = item.合格数; - arr[3] = item.不合格数; + arr[1] = item.物料名; + arr[2] = item.接收数; + arr[3] = item.生产数; + arr[4] = item.合格数; + arr[5] = item.交送数; that.configDatas.data.push(arr); }); } @@ -373,29 +376,40 @@ export default { }) }, //设备状态 - getEqState(id) { + getEqState() { let that = this; - that.$API.wpm.ana.equipLastMlog.req({ mgroup: id }).then((res) => { - that.hh.yx += res.运行; - that.hh.wyx += res.未运行; - that.hh.gz += res.故障; - if (res.rows.length > 0) { - res.rows.forEach((item) => { + let obj = { + query: { query_date: that.today, mgroup_name: that.mgroupName }, + }; + that.$API.wpm.ana.equipLastMlog.req({ mgroup: that.mgroupId }).then((res) => { + that.hh.yx = res.运行; + that.hh.wyx = res.未运行; + that.hh.gz = res.故障; + }); + that.$API.bi.dataset.exec.req("equit_static", obj).then((res) => { + let list = res.data2.ds0; + if (list.length > 0) { + list.forEach((item) => { let arr = []; - arr[0] = item.name; - arr[1] = item.number; - if (item.mstate == '运行') { - arr[2] = '● 运行中'; - } else if (item.mstate == '未运行') { - arr[2] = '● 未运行'; - } else if (item.mstate == '故障') { + arr[0] = item.设备名称; + arr[1] = item.设备编号; + if (item.运行状态 == '运行') { + arr[2] = '● 运行'; + } else if (item.运行状态 == '待机') { + arr[2] = '● 待机'; + } else if (item.运行状态 == '停机') { + arr[2] = '● 停机'; + }else if (item.运行状态 == '故障') { arr[2] = '● 故障'; + }else if (item.运行状态 == '离线') { + arr[2] = '● 离线'; } - arr[3] = item.t_count_use ? item.t_count_use : 0; + arr[3] = item.当日加工量 ? item.当日加工量 : 0; + arr[4] = item.累计总加工量 ? item.累计总加工量 : 0; that.configDataEq.data.push(arr); }); } - }); + }) }, //库存统计列表 getMaterials(page) {