修改bug

This commit is contained in:
‘937886381’
2024-04-03 16:01:11 +08:00
parent 1fd547893f
commit 43e54e8ee7
19 changed files with 455 additions and 347 deletions

View File

@@ -2,7 +2,7 @@
<!--
* @Author: zhp
* @Date: 2023-09-21 09:06:28
* @LastEditTime: 2024-04-01 09:12:56
* @LastEditTime: 2024-04-03 15:14:24
* @LastEditors: zhp
* @Description:
-->
@@ -101,7 +101,8 @@ export default {
position: 'top', //在上方显示
textStyle: { //数值样式
color: '#ced1d5',
fontSize: 12
fontSize: 12,
fontWight: 'bolder'
}
},
}
@@ -193,18 +194,19 @@ export default {
axisLine: {
lineStyle: {
type: 'solid',
color: '#213259', // 左边线的颜色
color: '#25528f', // 左边线的颜色
width: '1' // 坐标线的宽度
}
},
axisLabel: {
textStyle: {
align: 'left',
color: 'rgba(255,255,255,0.5)' // 坐标值得具体的颜色
}
},
splitLine: {
lineStyle: {
color: '#213259'
color: '#25528f'
}
},
data: nameList
@@ -226,6 +228,7 @@ export default {
nameTextStyle: {// y轴上方单位的颜色
color: 'rgba(255,255,255,0.5)', // 坐标值得具体的颜色
align: "left",
padding: [0, 0, 0, 8]
},
position: 'right',
alignTicks: true,
@@ -233,19 +236,20 @@ export default {
show: true,
lineStyle: {
type: 'solid',
color: '#213259', // 左边线的颜色
color: '#25528f', // 左边线的颜色
width: '1' // 坐标线的宽度
}
},
axisLabel: {
textStyle: {
color: '#ced1d5', // 坐标值得具体的颜色
formatter: '{value}%'
color: 'rgba(255,255,255,0.5)', // 坐标值得具体的颜色
formatter: '{value}%',
align:'left',
}
},
splitLine: {
lineStyle: {
color: '#213259'
color: '#25528f'
}
}
// type: 'value'
@@ -270,6 +274,7 @@ export default {
color: 'rgba(255,255,255,0.5)', // 坐标值得具体的颜色
// fontSize: 10,
align: "right",
padding:[0,4,0,0]
},
position: 'left',
alignTicks: true,
@@ -277,19 +282,21 @@ export default {
show: true,
lineStyle: {
type: 'solid',
color: '#213259', // 左边线的颜色
color: '#25528f', // 左边线的颜色
width: '1' // 坐标线的宽度
}
},
axisLabel: {
// padding: [0, 20, 0, 0],
textStyle: {
margin: 60,
color: 'rgba(255,255,255,0.5)', // 坐标值得具体的颜色
formatter: '{value} 片'
}
},
splitLine: {
lineStyle: {
color: '#213259'
color: '#25528f'
}
}
// type: 'value'

View File

@@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-09-21 09:06:28
* @LastEditTime: 2024-03-29 16:26:28
* @LastEditTime: 2024-04-03 15:10:31
* @LastEditors: zhp
* @Description:
-->
@@ -167,19 +167,19 @@ export default {
type: 'cross'
}
},
grid: { top: 90, right: 70, bottom: 20, left: 20, containLabel: true },
legend: {
itemWidth: 10,
itemHeight: 10,
top: '0%',
right: '20px',
data: ['产线良品率', '产线产量'],
textStyle: {
fontSize: 12 * this.beilv,
color: '#ced1d5',
fontWight: 'bolder'
}
},
grid: { top: 70, right: 20, bottom: 10, left: 10, containLabel: true },
// legend: {
// itemWidth: 10,
// itemHeight: 10,
// top: '2%',
// right: '30px',
// data: ['产线良品率', '产线产量'],
// textStyle: {
// fontSize: 12 * this.beilv,
// color: '#ced1d5',
// fontWight: 'bolder'
// }
// },
xAxis: {
axisTick: {
show: false
@@ -227,6 +227,7 @@ export default {
nameTextStyle: {// y轴上方单位的颜色
color: 'rgba(255,255,255,0.5)', // 坐标值得具体的颜色
align: "left",
padding: [0, 0, 0, 8]
},
position: 'right',
alignTicks: true,
@@ -271,6 +272,7 @@ export default {
nameTextStyle: {
color: 'rgba(255,255,255,0.5)', // 坐标值得具体的颜色
// fontSize: 10,
padding: [0, 4, 0, 0],
align: "right",
},
// position: 'left',

View File

@@ -113,7 +113,7 @@ export default {
textStyle: { //数值样式
color: 'rgba(255,255,255,0.5)', // 坐标值得具体的颜色
fontSize: 12,
fontWeight: 'bolder'
fontWeight: 'normal'
}
},
}
@@ -133,7 +133,7 @@ export default {
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}
},
grid: { top: 90, right: 60, bottom: 20, left: 30, containLabel: true },
grid: { top: 70, right: 40, bottom: 10, left: 40, containLabel: true },
// legend: {
// itemWidth: 10,
// itemHeight: 10,
@@ -175,7 +175,7 @@ export default {
name: '单位kwh',
nameTextStyle: {
color: 'rgba(255,255,255,0.5)', // 坐标值得具体的颜色
fontSize: 10,
fontSize: 12,
align: 'right',
},
type: 'value',

View File

@@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-12-27 13:54:52
* @LastEditTime: 2024-04-01 09:14:45
* @LastEditTime: 2024-04-03 15:48:43
* @LastEditors: zhp
* @Description:
-->
@@ -114,6 +114,10 @@ export default {
totalData.push(sum);
}
// }
// rawData[1].map((d, did) =>
// console.log((d / totalData[did]).toFixed(3))
// // totalData[did] <= 0 ? 0 : d / totalData[did]
// )
console.log('total', totalData)
const series = [
'良品',
@@ -163,15 +167,15 @@ export default {
let singleData = series.filter(function (item) {
return item.name == name
})
return name + parseFloat((singleData[0].data * 100).toFixed(3)) + '%'
return name + parseFloat((singleData[0].data * 100).toFixed(2)) + '%'
},
itemWidth: 12,
itemHeight: 12,
bottom: '20',
left: '20',
icon: 'rect',
icon: 'roundRect',
textStyle: {
color: 'rgba(255,255,255,.6)',
color: 'rgba(255,255,255,.9)',
fontSize:12,
}
},
@@ -204,7 +208,7 @@ export default {
splitNumber: 50,
// boundaryGap: [20, 20],
textStyle: {
color: 'rgba(255,255,255,.6)',
color: 'rgba(255,255,255,.9)',
verticalAlign: 'bottom',
fontSize: 16,
align: 'left',
@@ -232,7 +236,7 @@ export default {
splitNumber: 50,
// boundaryGap: [20, 20],
textStyle: {
color: 'rgba(255,255,255,.6)',
color: 'rgba(255,255,255,.9)',
verticalAlign: 'bottom',
fontSize: 16,
align: 'right',