修改bug
This commit is contained in:
parent
2d67ca4347
commit
4fa58b62fc
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-04-15 10:49:13
|
* @Date: 2024-04-15 10:49:13
|
||||||
* @LastEditTime: 2024-07-09 16:37:39
|
* @LastEditTime: 2024-07-10 09:58:59
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -404,7 +404,8 @@ export default {
|
|||||||
// y轴数据
|
// y轴数据
|
||||||
arr.forEach((fac,index) => {
|
arr.forEach((fac,index) => {
|
||||||
console.log('fac',fac);
|
console.log('fac',fac);
|
||||||
let i = 0
|
let i = 0
|
||||||
|
let position = fac.id == 1 ? [1, -16,] : [-8, -16,]
|
||||||
while ( i < 3) {
|
while ( i < 3) {
|
||||||
// 下标
|
// 下标
|
||||||
const index1 = ['chipYield', 'componentYield', 'bipvProductOutput'][i]
|
const index1 = ['chipYield', 'componentYield', 'bipvProductOutput'][i]
|
||||||
@ -424,7 +425,7 @@ export default {
|
|||||||
show: i === 2 ? true : false,
|
show: i === 2 ? true : false,
|
||||||
position: 'top',
|
position: 'top',
|
||||||
// fontSize:10,
|
// fontSize:10,
|
||||||
// position: [-index + 1, -index +1],
|
position: position,
|
||||||
formatter(params) {
|
formatter(params) {
|
||||||
return fac.name.substring(0, 2)
|
return fac.name.substring(0, 2)
|
||||||
}
|
}
|
||||||
@ -451,7 +452,7 @@ export default {
|
|||||||
label: {
|
label: {
|
||||||
show: true,
|
show: true,
|
||||||
position: 'top',
|
position: 'top',
|
||||||
// position: [-index + 1, -index + 1],
|
position: position,
|
||||||
formatter(params) {
|
formatter(params) {
|
||||||
if (params.value === 0) {
|
if (params.value === 0) {
|
||||||
return ''
|
return ''
|
||||||
|
@ -187,19 +187,19 @@ export default {
|
|||||||
{
|
{
|
||||||
prop: "yoy",
|
prop: "yoy",
|
||||||
label: msg.yoyColumn,
|
label: msg.yoyColumn,
|
||||||
filter: (val) => (val || val === 0 ? val : "-"),
|
filter: (val) => (val || val === 0 ? parseFloat(val.toFixed(2)) : "-"),
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: "queryValue",
|
prop: "queryValue",
|
||||||
label: msg.queryColumn,
|
label: msg.queryColumn,
|
||||||
filter: (val) => (val || val === 0 ? val : "-"),
|
filter: (val) => (val || val === 0 ? parseFloat(val.toFixed(2)) : "-"),
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: "target",
|
prop: "target",
|
||||||
label: msg.targetColumn,
|
label: msg.targetColumn,
|
||||||
filter: (val) => (val || val === 0 ? val : "-"),
|
filter: (val) => (val || val === 0 ? parseFloat(val.toFixed(2)) : "-"),
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
@ -222,6 +222,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
setChartMsg(val) {
|
setChartMsg(val) {
|
||||||
|
console.log(val);
|
||||||
let xData1 = [];
|
let xData1 = [];
|
||||||
let xData2 = [];
|
let xData2 = [];
|
||||||
let barData1 = [];
|
let barData1 = [];
|
||||||
@ -231,12 +232,12 @@ export default {
|
|||||||
for (let i = 0; i < val.length; i++) {
|
for (let i = 0; i < val.length; i++) {
|
||||||
if (val[i].unit !== "㎡") {
|
if (val[i].unit !== "㎡") {
|
||||||
xData1.push(val[i].item);
|
xData1.push(val[i].item);
|
||||||
barData1.push(parseFloat(val[i].target.toFixed(2)) || 0);
|
barData1.push(val[i].target ? parseFloat(val[i].target.toFixed(2)) : 0);
|
||||||
barData2.push(parseFloat(val[i].queryValue.toFixed(2)) || 0);
|
barData2.push(val[i].queryValue ? parseFloat(val[i].queryValue.toFixed(2)) : 0);
|
||||||
} else {
|
} else {
|
||||||
xData2.push(val[i].item);
|
xData2.push(val[i].item);
|
||||||
barData3.push(parseFloat(val[i].target.toFixed(2)) || 0);
|
barData3.push(val[i].target ? parseFloat(val[i].target.toFixed(2)) : 0);
|
||||||
barData4.push(parseFloat(val[i].queryValue.toFixed(2)) || 0);
|
barData4.push(val[i].queryValue ? parseFloat(val[i].queryValue.toFixed(2)) : 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.chartMsg1.xData = xData1;
|
this.chartMsg1.xData = xData1;
|
||||||
|
@ -187,19 +187,19 @@ export default {
|
|||||||
{
|
{
|
||||||
prop: "yoy",
|
prop: "yoy",
|
||||||
label: msg.yoyColumn,
|
label: msg.yoyColumn,
|
||||||
filter: (val) => (val || val === 0 ? val : "-"),
|
filter: (val) => (val || val === 0 ? parseFloat(val.toFixed(2)) : "-"),
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: "queryValue",
|
prop: "queryValue",
|
||||||
label: msg.queryColumn,
|
label: msg.queryColumn,
|
||||||
filter: (val) => (val || val === 0 ? val : "-"),
|
filter: (val) => (val || val === 0 ? parseFloat(val.toFixed(2)) : "-"),
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: "target",
|
prop: "target",
|
||||||
label: msg.targetColumn,
|
label: msg.targetColumn,
|
||||||
filter: (val) => (val || val === 0 ? val : "-"),
|
filter: (val) => (val || val === 0 ? parseFloat(val.toFixed(2)) : "-"),
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
@ -583,7 +583,7 @@ export default {
|
|||||||
this.chartMsg.xData.push(ele.reportTimep)
|
this.chartMsg.xData.push(ele.reportTimep)
|
||||||
this.otherProps.push({
|
this.otherProps.push({
|
||||||
label: ele.reportTimep,
|
label: ele.reportTimep,
|
||||||
filter: (val) => (val || val === 0 ? val : "-"),
|
filter: (val) => (val || val === 0 ? parseFloat(val.toFixed(2)) : "-"),
|
||||||
prop: 'value' + i
|
prop: 'value' + i
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -664,7 +664,7 @@ export default {
|
|||||||
// this.chartMsg.xData.push(ele.titleValue.replace(/[^\d]/g, " "))
|
// this.chartMsg.xData.push(ele.titleValue.replace(/[^\d]/g, " "))
|
||||||
this.otherProps.push({
|
this.otherProps.push({
|
||||||
label: ele.titleValue,
|
label: ele.titleValue,
|
||||||
filter: (val) => (val || val === 0 ? val : "-"),
|
filter: (val) => (val || val === 0 ? parseFloat(val.toFixed(2)) : "-"),
|
||||||
prop: 'value' + i
|
prop: 'value' + i
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -603,7 +603,7 @@ export default {
|
|||||||
// this.chartMsg.xData.push(ele.titleValue)
|
// this.chartMsg.xData.push(ele.titleValue)
|
||||||
this.otherProps.push({
|
this.otherProps.push({
|
||||||
label: ele.titleValue,
|
label: ele.titleValue,
|
||||||
filter: (val) => (val || val === 0 ? val : "-"),
|
filter: (val) => (val || val === 0 ? parseFloat(val.toFixed(2)) : "-"),
|
||||||
prop: 'value' + i
|
prop: 'value' + i
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user