修改报表导出

master
夜笙歌 6 months ago
parent adc51e266b
commit b61a582437

@ -75,7 +75,7 @@ export default {
this.reportDetailList = response.data.tempList
this.$refs.chart1.setData({
xAxis: {
data: response.data.tempList[0],
data: response.data.tempList[0],
axisLine: {
// show:true,
onZero: false,
@ -91,72 +91,54 @@ export default {
},
},
legend: {
data: ['温度1', '温度2', '温度3', '温度4', '温度5', '温度6', '温度7', '温度8', '温度9', '温度10', '温度11', '室温']
// data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '']
},
yAxis: {
scale: true,
type: 'value',
axisLabel: {
formatter: '{value}℃'
yAxis: [
{
scale: true,
type: 'value',
axisLabel: {
formatter: '{value}℃'
}
},
{
scale: true,
// min:0,
type: 'value',
axisLabel: {
formatter: '{value}V'
}
}
},
series: response.data.tempList.map((e,i)=>{
if(i === 0){
],
series: response.data.tempList.map((e, i) => {
if (i === 0) {
return
}
return {
name: '温度' + [i],
type: 'line',
data: this.reportDetailList[i],
label:{
show:true,
position:'top'
label: {
show: true,
position: 'top'
}
}
})
})
this.$refs.chart2.setData({
xAxis: {
data: response.data.vList[0],
axisLine: {
// show:true,
onZero: false,
},
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
crossStyle: {
color: '#999',
},
},
},
legend: {
data: ['温度1', '温度2', '温度3', '温度4', '温度5', '温度6', '温度7', '温度8', '温度9', '温度10', '温度11', '室温']
},
yAxis: {
scale: true,
type: 'value',
axisLabel: {
formatter: '{value}℃'
}
},
series: response.data.vList.map((e,i)=>{
if(i === 0){
return
}
return {
name: '温度' + [i],
type: 'line',
data: this.reportDetailList[i],
label:{
show:true,
position:'top'
}).concat(response.data.vList.map((e, i) => {
if (i === 0) {
return
}
return {
name: '电压' + [i],
yAxisIndex:1,
type: 'line',
data: this.reportDetailList[i],
label: {
show: true,
position: 'top'
}
}
}
}))
})
})
}
)
},

Loading…
Cancel
Save