|
|
@ -62,7 +62,7 @@ export default {
|
|
|
|
this.chart = echarts.init(this.$el, 'macarons')
|
|
|
|
this.chart = echarts.init(this.$el, 'macarons')
|
|
|
|
this.setOptions(this.chartData)
|
|
|
|
this.setOptions(this.chartData)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
setOptions({expectedData, actualData} = {}) {
|
|
|
|
setOptions({expectedData, actualData,expedData} = {}) {
|
|
|
|
const week = () =>{
|
|
|
|
const week = () =>{
|
|
|
|
let today = new Date();
|
|
|
|
let today = new Date();
|
|
|
|
let firstDayOfYear = new Date(today.getFullYear(), 0, 1);
|
|
|
|
let firstDayOfYear = new Date(today.getFullYear(), 0, 1);
|
|
|
@ -77,7 +77,7 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.chart.setOption({
|
|
|
|
this.chart.setOption({
|
|
|
|
title: {
|
|
|
|
title: {
|
|
|
|
text: `第${week()}周`,
|
|
|
|
text: `第${week()}周产量`,
|
|
|
|
textStyle: {
|
|
|
|
textStyle: {
|
|
|
|
align: 'center',
|
|
|
|
align: 'center',
|
|
|
|
color: '#000',
|
|
|
|
color: '#000',
|
|
|
@ -87,7 +87,7 @@ export default {
|
|
|
|
left: '0%',
|
|
|
|
left: '0%',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
xAxis: {
|
|
|
|
xAxis: {
|
|
|
|
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
|
|
|
data: ['2023-12-11', '2023-12-12', '2023-12-13', '2023-12-14', '2023-12-15', '2023-12-16', '2023-12-17'],
|
|
|
|
// boundaryGap: false,
|
|
|
|
// boundaryGap: false,
|
|
|
|
axisTick: {
|
|
|
|
axisTick: {
|
|
|
|
show: false
|
|
|
|
show: false
|
|
|
@ -124,7 +124,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
series: [
|
|
|
|
series: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
name: 'actual1',
|
|
|
|
name: '订单违约率',
|
|
|
|
type: 'bar',
|
|
|
|
type: 'bar',
|
|
|
|
yAxisIndex:1,
|
|
|
|
yAxisIndex:1,
|
|
|
|
itemStyle: {
|
|
|
|
itemStyle: {
|
|
|
@ -144,7 +144,7 @@ export default {
|
|
|
|
animationEasing: 'quadraticOut'
|
|
|
|
animationEasing: 'quadraticOut'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
name: 'actual',
|
|
|
|
name: '产量',
|
|
|
|
smooth: false,
|
|
|
|
smooth: false,
|
|
|
|
type: 'line',
|
|
|
|
type: 'line',
|
|
|
|
itemStyle: {
|
|
|
|
itemStyle: {
|
|
|
@ -159,7 +159,7 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data: actualData,
|
|
|
|
data: expedData,
|
|
|
|
animationDuration: 1000,
|
|
|
|
animationDuration: 1000,
|
|
|
|
animationEasing: 'quadraticOut'
|
|
|
|
animationEasing: 'quadraticOut'
|
|
|
|
}
|
|
|
|
}
|
|
|
|