修改报表导出

master
夜笙歌 4 months ago
parent adc51e266b
commit b61a582437

@ -91,15 +91,25 @@ export default {
}, },
}, },
legend: { 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: { yAxis: [
{
scale: true, scale: true,
type: 'value', type: 'value',
axisLabel: { axisLabel: {
formatter: '{value}℃' formatter: '{value}℃'
} }
}, },
{
scale: true,
// min:0,
type: 'value',
axisLabel: {
formatter: '{value}V'
}
}
],
series: response.data.tempList.map((e, i) => { series: response.data.tempList.map((e, i) => {
if (i === 0) { if (i === 0) {
return return
@ -113,41 +123,13 @@ export default {
position: 'top' position: 'top'
} }
} }
}) }).concat(response.data.vList.map((e, i) => {
})
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) { if (i === 0) {
return return
} }
return { return {
name: '温度' + [i], name: '电压' + [i],
yAxisIndex:1,
type: 'line', type: 'line',
data: this.reportDetailList[i], data: this.reportDetailList[i],
label: { label: {
@ -155,7 +137,7 @@ export default {
position: 'top' position: 'top'
} }
} }
}) }))
}) })
} }
) )

Loading…
Cancel
Save