From 4fa58b62fc2bd0fce32ae32456595f82e0618dbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98937886381=E2=80=99?= <‘937886381@qq.com’> Date: Wed, 10 Jul 2024 09:59:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/produce/data/index.vue | 9 +++++---- src/views/report/chipOEEBM/index.vue | 6 +++--- src/views/report/completionStatusIntrBM/index.vue | 9 +++++---- src/views/report/packageOEEBM/index.vue | 6 +++--- src/views/report/produceConversion.vue | 2 +- src/views/report/productionSituationTablets.vue | 2 +- src/views/report/productionYield.vue | 2 +- 7 files changed, 19 insertions(+), 17 deletions(-) diff --git a/src/views/produce/data/index.vue b/src/views/produce/data/index.vue index 57a8cc4..ff0318c 100644 --- a/src/views/produce/data/index.vue +++ b/src/views/produce/data/index.vue @@ -1,7 +1,7 @@ @@ -404,7 +404,8 @@ export default { // y轴数据 arr.forEach((fac,index) => { console.log('fac',fac); - let i = 0 + let i = 0 + let position = fac.id == 1 ? [1, -16,] : [-8, -16,] while ( i < 3) { // 下标 const index1 = ['chipYield', 'componentYield', 'bipvProductOutput'][i] @@ -424,7 +425,7 @@ export default { show: i === 2 ? true : false, position: 'top', // fontSize:10, - // position: [-index + 1, -index +1], + position: position, formatter(params) { return fac.name.substring(0, 2) } @@ -451,7 +452,7 @@ export default { label: { show: true, position: 'top', - // position: [-index + 1, -index + 1], + position: position, formatter(params) { if (params.value === 0) { return '' diff --git a/src/views/report/chipOEEBM/index.vue b/src/views/report/chipOEEBM/index.vue index 498779f..9ba3b16 100644 --- a/src/views/report/chipOEEBM/index.vue +++ b/src/views/report/chipOEEBM/index.vue @@ -187,19 +187,19 @@ export default { { prop: "yoy", label: msg.yoyColumn, - filter: (val) => (val || val === 0 ? val : "-"), + filter: (val) => (val || val === 0 ? parseFloat(val.toFixed(2)) : "-"), minWidth: 150, }, { prop: "queryValue", label: msg.queryColumn, - filter: (val) => (val || val === 0 ? val : "-"), + filter: (val) => (val || val === 0 ? parseFloat(val.toFixed(2)) : "-"), minWidth: 150, }, { prop: "target", label: msg.targetColumn, - filter: (val) => (val || val === 0 ? val : "-"), + filter: (val) => (val || val === 0 ? parseFloat(val.toFixed(2)) : "-"), minWidth: 150, }, ]; diff --git a/src/views/report/completionStatusIntrBM/index.vue b/src/views/report/completionStatusIntrBM/index.vue index d8160e5..49eb197 100644 --- a/src/views/report/completionStatusIntrBM/index.vue +++ b/src/views/report/completionStatusIntrBM/index.vue @@ -222,6 +222,7 @@ export default { }); }, setChartMsg(val) { + console.log(val); let xData1 = []; let xData2 = []; let barData1 = []; @@ -231,12 +232,12 @@ export default { for (let i = 0; i < val.length; i++) { if (val[i].unit !== "㎡") { xData1.push(val[i].item); - barData1.push(parseFloat(val[i].target.toFixed(2)) || 0); - barData2.push(parseFloat(val[i].queryValue.toFixed(2)) || 0); + barData1.push(val[i].target ? parseFloat(val[i].target.toFixed(2)) : 0); + barData2.push(val[i].queryValue ? parseFloat(val[i].queryValue.toFixed(2)) : 0); } else { xData2.push(val[i].item); - barData3.push(parseFloat(val[i].target.toFixed(2)) || 0); - barData4.push(parseFloat(val[i].queryValue.toFixed(2)) || 0); + barData3.push(val[i].target ? parseFloat(val[i].target.toFixed(2)) : 0); + barData4.push(val[i].queryValue ? parseFloat(val[i].queryValue.toFixed(2)) : 0); } } this.chartMsg1.xData = xData1; diff --git a/src/views/report/packageOEEBM/index.vue b/src/views/report/packageOEEBM/index.vue index 88f9a00..3ac9be3 100644 --- a/src/views/report/packageOEEBM/index.vue +++ b/src/views/report/packageOEEBM/index.vue @@ -187,19 +187,19 @@ export default { { prop: "yoy", label: msg.yoyColumn, - filter: (val) => (val || val === 0 ? val : "-"), + filter: (val) => (val || val === 0 ? parseFloat(val.toFixed(2)) : "-"), minWidth: 150, }, { prop: "queryValue", label: msg.queryColumn, - filter: (val) => (val || val === 0 ? val : "-"), + filter: (val) => (val || val === 0 ? parseFloat(val.toFixed(2)) : "-"), minWidth: 150, }, { prop: "target", label: msg.targetColumn, - filter: (val) => (val || val === 0 ? val : "-"), + filter: (val) => (val || val === 0 ? parseFloat(val.toFixed(2)) : "-"), minWidth: 150, }, ]; diff --git a/src/views/report/produceConversion.vue b/src/views/report/produceConversion.vue index 7457e41..bff668d 100644 --- a/src/views/report/produceConversion.vue +++ b/src/views/report/produceConversion.vue @@ -583,7 +583,7 @@ export default { this.chartMsg.xData.push(ele.reportTimep) this.otherProps.push({ label: ele.reportTimep, - filter: (val) => (val || val === 0 ? val : "-"), + filter: (val) => (val || val === 0 ? parseFloat(val.toFixed(2)) : "-"), prop: 'value' + i }) }) diff --git a/src/views/report/productionSituationTablets.vue b/src/views/report/productionSituationTablets.vue index 138332b..e782b4a 100644 --- a/src/views/report/productionSituationTablets.vue +++ b/src/views/report/productionSituationTablets.vue @@ -664,7 +664,7 @@ export default { // this.chartMsg.xData.push(ele.titleValue.replace(/[^\d]/g, " ")) this.otherProps.push({ label: ele.titleValue, - filter: (val) => (val || val === 0 ? val : "-"), + filter: (val) => (val || val === 0 ? parseFloat(val.toFixed(2)) : "-"), prop: 'value' + i }) }) diff --git a/src/views/report/productionYield.vue b/src/views/report/productionYield.vue index f7c6208..f629f2a 100644 --- a/src/views/report/productionYield.vue +++ b/src/views/report/productionYield.vue @@ -603,7 +603,7 @@ export default { // this.chartMsg.xData.push(ele.titleValue) this.otherProps.push({ label: ele.titleValue, - filter: (val) => (val || val === 0 ? val : "-"), + filter: (val) => (val || val === 0 ? parseFloat(val.toFixed(2)) : "-"), prop: 'value' + i }) })