生产管理

This commit is contained in:
helloDy
2024-05-22 16:28:47 +08:00
parent 2061384d96
commit fe39f72045
9 changed files with 275 additions and 204 deletions

View File

@@ -1,8 +1,8 @@
<!--
* @Author: zwq
* @Date: 2022-01-21 14:43:06
* @LastEditors: zhp
* @LastEditTime: 2024-04-17 10:03:39
* @LastEditors: DY
* @LastEditTime: 2024-05-22 13:48:58
* @Description:
-->
<template>
@@ -58,11 +58,11 @@ export default {
chart: null
}
},
mounted() {
this.$nextTick(() => {
this.initChart()
})
},
// mounted() {
// this.$nextTick(() => {
// this.initChart()
// })
// },
beforeDestroy() {
if (!this.chart) {
return
@@ -71,8 +71,7 @@ export default {
this.chart = null
},
methods: {
initChart() {
console.log(1111)
initChart(xAxis, seriesList) {
this.chart = echarts.init(document.getElementById(this.id))
console.log(this.$parent);
this.chart.setOption({
@@ -85,7 +84,7 @@ export default {
},
grid: { top: 100, right: 90, bottom: 10, left: 10, containLabel: true },
legend: {
data: ['工厂1', '工厂2'],
// data: ['工厂1', '工厂2'],
right: '90px',
top: '0%',
icon: 'rect',
@@ -107,7 +106,7 @@ export default {
{
type: 'category',
// prettier-ignore
data: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
data: xAxis
}
],
yAxis: [
@@ -122,39 +121,8 @@ export default {
bottom: "1%",
containLabel: true
},
series: [
{
name: '工厂1',
type: 'bar',
itemStyle: {
normal: {
color: 'rgba(99, 189, 255, 1)', //改变折线点的颜色
lineStyle: {
color: 'rgba(99, 189, 255, 1)' //改变折线颜色
}
}
},
data: [
2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3
],
},
{
name: '工厂2',
type: 'bar',
itemStyle: {
normal: {
color: 'rgba(142, 240, 171, 1)', //改变折线点的颜色
lineStyle: {
color: 'rgba(142, 240, 171, 1)' //改变折线颜色
}
}
},
data: [
2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
],
},
]
})
series: seriesList
}, true)
}
}
}