From 3af6b66647d82c33382e4a45de70d9902d9f5e0d Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 11 Apr 2025 10:02:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/statistics/hunliao.vue | 2 +- src/views/statistics/ppass_num.vue | 1 + src/views/statistics/product_check2.vue | 34 ++++++++++++------------- 3 files changed, 18 insertions(+), 19 deletions(-) diff --git a/src/views/statistics/hunliao.vue b/src/views/statistics/hunliao.vue index b53cc4a9..f215c8b0 100644 --- a/src/views/statistics/hunliao.vue +++ b/src/views/statistics/hunliao.vue @@ -207,7 +207,7 @@ export default { dataList.forEach(ite => { if (nameList.indexOf(ite.物料名) > -1) { } else { nameList.push(ite.物料名); - seriesData.push([]) + seriesData.push([0,0,0,0,0,0,0,0,0,0,0,0]) } }) dataList.forEach(item => { diff --git a/src/views/statistics/ppass_num.vue b/src/views/statistics/ppass_num.vue index e37ac3fb..080c179b 100644 --- a/src/views/statistics/ppass_num.vue +++ b/src/views/statistics/ppass_num.vue @@ -203,6 +203,7 @@ export default { is_count_utask: -1, select_cols_mgroup: ", mgroup.name AS 工段", group_bys_mgroup: ", mgroup.name", + order_bys_mgroup:",工段" }, raise_exception: true, }; diff --git a/src/views/statistics/product_check2.vue b/src/views/statistics/product_check2.vue index 3cf6a5a7..fccfc61c 100644 --- a/src/views/statistics/product_check2.vue +++ b/src/views/statistics/product_check2.vue @@ -35,9 +35,9 @@
-

各工序检验

- - 各工段检验 + + { - this.processOption = res; - this.process = res[0].id; - this.processName = res[0].name; + getMgroup(){ + this.$API.mtm.mgroup.list.req({belong_dept__name:'6车间',page:0}).then((res) => { + this.mgroupOption = res; + this.mgroup = res[0].id; + this.mgroupName = res[0].name; this.getData(); }); }, - processChange() { - this.processName = this.processOption.find(item => item.id === this.process).name; + mgroupChange() { + this.mgroupName = this.mgroupOption.find(item => item.id === this.mgroup).name; this.getData(); }, getData(){ @@ -169,7 +169,7 @@ query: { end_date: that.end_date, start_date: that.start_date, - mgroup_name: that.processName,group_bys_mgroup: ", mgroup.name", + mgroup_name: that.mgroupName,group_bys_mgroup: ", mgroup.name", group_bys_material: "",order_bys_material: "", select_cols_mgroup: ", mgroup.name AS 工段", select_cols_material: "", @@ -178,7 +178,6 @@ }; //获取echarts数据 that.$API.bi.dataset.exec.req(exec, obj).then((res) => { - console.log('获取echarts数据:', res); if (res.data2.ds0) { let data = res.data2.ds0; let seriesData = [ @@ -201,14 +200,13 @@ }) }) } - console.log('seriesData:', seriesData); that.option1.series[0].data = seriesData; } }); let obj2 = { query: { start_date: that.start_date, end_date: that.end_date, - mgroup_name: that.processName,group_bys_mgroup: ", mgroup.name", + mgroup_name: that.mgroupName,group_bys_mgroup: ", mgroup.name", select_cols_mgroup: ", mgroup.name AS 工段", is_count_utask: -1 },