修改bug

This commit is contained in:
‘937886381’ 2024-06-28 14:55:12 +08:00
parent 242e42a56a
commit 04af70f416
2 changed files with 20 additions and 19 deletions

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-06-20 16:13:36 * @Date: 2024-06-20 16:13:36
* @LastEditTime: 2024-06-28 14:34:13 * @LastEditTime: 2024-06-28 14:54:33
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -36,7 +36,7 @@ export default {
color: [], color: [],
// color: ["#8EF0AB", "#63BDFF", "#288AFF"], // color: ["#8EF0AB", "#63BDFF", "#288AFF"],
grid: { grid: {
left: '12%', left: 50,
right: 0, right: 0,
bottom: 31, bottom: 31,
top: 30, top: 30,
@ -172,14 +172,14 @@ export default {
}, },
}, },
gridLeft(val) { // gridLeft(val) {
if (val === false) { // if (val === false) {
this.option.grid.left = '12%' // this.option.grid.left = 100
} else { // } else {
this.option.grid.left = -80 // this.option.grid.left = -80
} // }
this.canvasReset() // this.canvasReset()
}, // },
type() { type() {
this.canvasReset(); this.canvasReset();
}, },
@ -204,11 +204,7 @@ export default {
}, },
getMes() { getMes() {
console.log(this.gridLeft) console.log(this.gridLeft)
if (this.gridLeft === false) {
this.option.grid.left = '12%'
} else {
this.option.grid.left = -80
}
// console.log('222222', this.chartMsg); // console.log('222222', this.chartMsg);
if (this.myChart) { if (this.myChart) {
this.myChart.dispose(); this.myChart.dispose();
@ -217,12 +213,17 @@ export default {
this.myChart = echarts.init(chartDom); this.myChart = echarts.init(chartDom);
this.option.color = this.chartMsg.color; this.option.color = this.chartMsg.color;
this.option.xAxis.data = this.chartMsg.xData this.option.xAxis.data = this.chartMsg.xData
if (this.gridLeft === false) {
this.option.grid.left = 50
} else {
this.option.grid.left = -80
}
// this.option.yAxis.name = this.chartMsg.yName; // this.option.yAxis.name = this.chartMsg.yName;
// this.option.yAxis.axisLabel = this.chartMsg.yAxisLabel; // this.option.yAxis.axisLabel = this.chartMsg.yAxisLabel;
this.option.series = this.chartMsg.series; this.option.series = this.chartMsg.series;
this.option.yAxis = this.chartMsg.yAxis; this.option.yAxis = this.chartMsg.yAxis;
console.log(this.option.grid);
this.myChart.setOption(this.option); this.myChart.setOption(this.option);
}, },
}, },

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-04-15 10:49:13 * @Date: 2024-04-15 10:49:13
* @LastEditTime: 2024-06-28 14:40:15 * @LastEditTime: 2024-06-28 14:43:36
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -473,8 +473,8 @@ export default {
// dataArr[3].factory = item.factory === 1 ? '' : '' // dataArr[3].factory = item.factory === 1 ? '' : ''
dataArr[1]['' + m + ''] = item.chipInput dataArr[1]['' + m + ''] = item.chipInput
dataArr[2]['' + m + ''] = item.chipYield dataArr[2]['' + m + ''] = item.chipYield
dataArr[3]['' + m + ''] = item.chipAveragePower dataArr[3]['' + m + ''] = item.chipYieldRate
dataArr[4]['' + m + ''] = item.chipYieldRate dataArr[4]['' + m + ''] = item.chipAveragePower
dataArr[5]['' + m + ''] = item.chipTotalPower dataArr[5]['' + m + ''] = item.chipTotalPower
dataArr[6]['' + m + ''] = item.chipCssMarriageRate dataArr[6]['' + m + ''] = item.chipCssMarriageRate
dataArr[7]['' + m + ''] = item.chipOee dataArr[7]['' + m + ''] = item.chipOee