修改bug

This commit is contained in:
‘937886381’
2024-03-29 16:56:21 +08:00
parent c8913f192c
commit 7a14b2846a
21 changed files with 992 additions and 803 deletions

View File

@@ -2,7 +2,7 @@
<!--
* @Author: zhp
* @Date: 2023-09-21 09:06:28
* @LastEditTime: 2024-03-25 18:34:58
* @LastEditTime: 2024-03-29 16:25:59
* @LastEditors: zhp
* @Description:
-->
@@ -71,9 +71,9 @@ export default {
mounted() {
console.log('mounted')
console.log('borderRadius: ', this.borderRadius)
// this.$nextTick(() => {
// this.initChart()
// })
this.$el.addEventListener('resize', () => {
console.log('resziing.....');
});
},
beforeDestroy() {
if (!this.chart) {
@@ -114,6 +114,7 @@ export default {
name: '产线良品率',
symbol: 'circle', //变为实心圆
type: 'line',
// symbolSize: 7,
yAxisIndex: 0,
areaStyle: {
opacity: 0.8,
@@ -141,6 +142,16 @@ export default {
]
// const colors = ['#5470C6', '#91CC75', '#EE6666']
this.chart = echarts.init(document.getElementById(this.id))
let isFinished = false //标记 isFinished
this.chart.on('finished', _ => {
if (!isFinished) {
console.log('我只执行一次')
isFinished = true
// this.isLoading = false //关闭loading
this.chart.resize() //重新渲染charts大小
}
console.log(113, 'finished')
})
this.chart.setOption({
// color: colors,
tooltip: {
@@ -151,22 +162,33 @@ export default {
},
grid: {
left: "3%",
right: "5%",
right: "10%",
bottom: "3%",
containLabel: true
},
legend: {
itemWidth: 10,
itemHeight: 10,
top: '20',
// right: '20px',
data: ['产线产量', '产线良品率'],
top: '5',
right: '20px',
data: [
// { icon: 'rect', name: '直接访问' },
{ icon: 'roundRect', name: '产线产量' },
{
icon: 'circle', name: '产线良品率',
itemWidth: 7,
itemHeight: 7,
},
],
textStyle: {
fontSize: 12 * this.beilv,
color: '#ced1d5'
}
},
xAxis: {
axisTick: {
show: false
},
type: 'category',
axisLine: {
lineStyle: {
@@ -202,7 +224,7 @@ export default {
type: 'value',
name: '良品率/%',
nameTextStyle: {// y轴上方单位的颜色
color: '#fff',
color: 'rgba(255,255,255,0.5)', // 坐标值得具体的颜色
align: "left",
},
position: 'right',
@@ -245,7 +267,7 @@ export default {
type: 'value',
name: '产量/㎡', // y轴上方的单位
nameTextStyle: {
color: "#fff",
color: 'rgba(255,255,255,0.5)', // 坐标值得具体的颜色
// fontSize: 10,
align: "right",
},