diff --git a/src/views/core/analysis/balanceAnalysis/chart.vue b/src/views/core/analysis/balanceAnalysis/chart.vue index 8de0dc23..3df9d162 100644 --- a/src/views/core/analysis/balanceAnalysis/chart.vue +++ b/src/views/core/analysis/balanceAnalysis/chart.vue @@ -36,10 +36,10 @@ export default { trigger: 'axis', }, legend: { - icon: 'roundRect', - itemWidth: 12, - itemHeight: 12, - }, + icon: 'roundRect', + itemWidth: 12, + itemHeight: 12, + }, grid: { top: '12%', left: '6%', @@ -63,8 +63,7 @@ export default { ], }, yAxis: { - // todo - name: '产线TT', + name: ['设备CT', '设备TT', '产线CT', '产线TT'][this.activeIndex], nameLocation: 'end', nameGap: 28, nameTextStyle: { @@ -132,51 +131,71 @@ export default { const eqCt = this.tableData.map((row) => ({ name: row.equName, type: 'line', - symbol: 'circle', - symbolSize: 8, + symbol: 'circle', + symbolSize: 8, data: this.getListFromTableRow(row, '_eq_ct'), })); - this.chart.setOption({ ...this.templateOption, series: eqCt }); + this.chart.setOption({ + ...this.templateOption, + yAxis: { ...this.templateOption.yAxis, name: '设备CT' }, + series: eqCt, + }); break; case 1: const eqTt = this.tableData.map((row) => ({ name: row.equName, type: 'line', - symbol: 'circle', - symbolSize: 8, + symbol: 'circle', + symbolSize: 8, data: this.getListFromTableRow(row, '_eq_tt'), })); - this.chart.setOption({ ...this.templateOption, series: eqTt }); + this.chart.setOption({ + ...this.templateOption, + yAxis: { ...this.templateOption.yAxis, name: '设备TT' }, + series: eqTt, + }); break; case 2: const plCt = this.tableData.map((row) => ({ name: row.equName, type: 'line', - symbol: 'circle', - symbolSize: 8, + symbol: 'circle', + symbolSize: 8, data: this.getListFromTableRow(row, '_pl_ct'), })); - this.chart.setOption({ ...this.templateOption, series: plCt }); + this.chart.setOption({ + ...this.templateOption, + yAxis: { ...this.templateOption.yAxis, name: '产线CT' }, + series: plCt, + }); break; case 3: const plTt = this.tableData.map((row) => ({ name: row.equName, type: 'line', - symbol: 'circle', - symbolSize: 8, + symbol: 'circle', + symbolSize: 8, data: this.getListFromTableRow(row, '_pl_tt'), })); - this.chart.setOption({ ...this.templateOption, series: plTt }); + this.chart.setOption({ + ...this.templateOption, + yAxis: { ...this.templateOption.yAxis, name: '产线TT' }, + series: plTt, + }); break; default: const eqCt2 = this.tableData.map((row) => ({ name: row.equName, type: 'line', - symbol: 'circle', - symbolSize: 8, + symbol: 'circle', + symbolSize: 8, data: this.getListFromTableRow(row, '_eq_ct'), })); - this.chart.setOption({ ...this.templateOption, series: eqCt2 }); + this.chart.setOption({ + ...this.templateOption, + yAxis: { ...this.templateOption.yAxis, name: '设备CT' }, + series: eqCt2, + }); } }, }, diff --git a/src/views/equipment/timing-diagram/status/index.vue b/src/views/equipment/timing-diagram/status/index.vue index 6ea4f148..2c639b08 100644 --- a/src/views/equipment/timing-diagram/status/index.vue +++ b/src/views/equipment/timing-diagram/status/index.vue @@ -80,6 +80,8 @@