From bc343c6a967afe56208c9e290f862fec3f67ca02 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Wed, 25 Dec 2024 15:24:47 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=E8=AE=A1=E7=AE=97=E7=B3=BB?= =?UTF-8?q?=E6=95=B0=E7=9A=84=E7=9B=B8=E5=85=B3=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/em/mpoint_form.vue | 22 ++++++++++++++++++++-- src/views/enm_base/formulaSetting.vue | 2 +- src/views/fac_cal/mpointstat.vue | 4 ++++ 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/src/views/em/mpoint_form.vue b/src/views/em/mpoint_form.vue index 1a2dd238..7519674e 100644 --- a/src/views/em/mpoint_form.vue +++ b/src/views/em/mpoint_form.vue @@ -189,14 +189,28 @@ - + + + + + + + + + + + + + - + @@ -390,6 +404,10 @@ export default { edit: "编辑", show: "查看", }, + fmOptions:[ + {value: 1, label:"乘"}, + {value: 2, label:"除"}, + ], form: { type: 10, belong_dept: null, diff --git a/src/views/enm_base/formulaSetting.vue b/src/views/enm_base/formulaSetting.vue index d312e14d..12c83ef5 100644 --- a/src/views/enm_base/formulaSetting.vue +++ b/src/views/enm_base/formulaSetting.vue @@ -3,7 +3,7 @@
- + diff --git a/src/views/fac_cal/mpointstat.vue b/src/views/fac_cal/mpointstat.vue index 8dc2c28e..ef5f7ec4 100644 --- a/src/views/fac_cal/mpointstat.vue +++ b/src/views/fac_cal/mpointstat.vue @@ -93,6 +93,10 @@ prop="val_origin" min-width="100" > + Date: Wed, 25 Dec 2024 16:55:17 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E4=B8=BB?= =?UTF-8?q?=E8=A6=81=E6=8A=A5=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/bigScreen/index_enm.vue | 71 +++++------ src/views/enm_coal/report.vue | 46 +++++--- src/views/enm_energy/hour_base.vue | 23 ++-- src/views/enm_energy/water.vue | 40 +++++-- src/views/enm_kiln/report.vue | 45 ++++--- src/views/enm_mill/report.vue | 76 ++++++------ src/views/enm_pack/report.vue | 181 +++++++++-------------------- src/views/enm_rm/report.vue | 48 ++++---- src/views/enm_slag/report.vue | 8 +- 9 files changed, 257 insertions(+), 281 deletions(-) diff --git a/src/views/bigScreen/index_enm.vue b/src/views/bigScreen/index_enm.vue index 4c423b7f..7395aa4e 100644 --- a/src/views/bigScreen/index_enm.vue +++ b/src/views/bigScreen/index_enm.vue @@ -700,29 +700,42 @@ export default { that.option.xAxis.data = datelist; that.xAxisDate = datelist; that.$nextTick(() => { - //获取熟料产量 - that.productNum(); - that.waterAirData(); - that.getMonthData(); - //获取设备运转率 - that.eqRate(); - //余热发电 - that.generation(); - //工序电耗 - that.proceElec(); - //质量分析 - that.qualAnalys(); - //数据采集 - that.dataCollect(); - that.initDomStyle(); that.initFactory(); + this.productNum(); + this.waterAirData(); + this.getMonthData(); + this.eqRate(); + this.generation(); + this.proceElec(); + this.qualAnalys(); + this.dataCollect(); that.timerTime = setInterval(() => { that.showTime(); }, 1000); + that.timerOther = setInterval(() => { + that.initializeData(); + }, 180000); // 3分钟更新一次 }); }, + beforeUnmount() { + // 清除所有定时器,避免内存泄漏 + if (this.timerTime) { + clearInterval(this.timerTime);} + if (this.timerOther) { + clearInterval(this.timerOther);} + }, methods: { + initializeData() { + this.productNum(); + this.waterAirData(); + this.getMonthData(); + this.eqRate(); + this.generation(); + this.proceElec(); + this.qualAnalys(); + this.dataCollect(); + }, productNum() { let that = this; // 初始化option1和图表 @@ -945,6 +958,7 @@ export default { return this.$API.mtm.mgroup.list.req({ page: 0, search: "水泥包装" }); }).then((res) => { that.out_cement = res[0]?.id; //水泥包装id + let query = { page: 0, year_s: that.currentYear, @@ -952,11 +966,11 @@ export default { type: "month_s", mgroup: that.out_cement, }; - return that.$API.enm.enstat.req(query); + return that.$API.enm.mpointstat.list.req(query); }).then((response) => { response.forEach((item) => { - if (item.month_s == that.currentMonth) { - that.totalData.out_cement = item.total_production; //出厂水泥 + if (item.mpoint_name == '出厂水泥') { + that.totalData.out_cement = item.val || 0; //出厂水泥 } }) }) @@ -1281,7 +1295,6 @@ export default { let query2 = generateQueryMpoint("3631880992400515072"); return this.$API.enm.mpointstat.list.req(query2); }).then((response) => { - console.log(response,'query2'); let maxId; response.forEach((item) => { let ind = item.month - 1; @@ -2027,26 +2040,6 @@ export default { return JSON.parse(JSON.stringify(obj)); }, }, - beforeUnmount() { - let that = this; - this.scene = null; - // clearInterval(that.timerTime); - // clearInterval(that.timerData); - // clearInterval(that.qualityTimer); - that.timerTime = null; - that.timerData = null; - that.qualityTimer = null; - }, - beforeDestoryed() { - let that = this; - this.scene = null; - // clearInterval(that.timerTime); - // clearInterval(that.timerData); - // clearInterval(that.qualityTimer); - that.timerTime = null; - that.timerData = null; - that.qualityTimer = null; - }, };