|
|
@ -64,7 +64,7 @@ export default defineComponent({
|
|
|
|
textStyle: {
|
|
|
|
textStyle: {
|
|
|
|
color: '#000'
|
|
|
|
color: '#000'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
interval: 0, //显示所有X轴信息
|
|
|
|
// interval: 0, //显示所有X轴信息
|
|
|
|
rotate: -40 //倾斜角度
|
|
|
|
rotate: -40 //倾斜角度
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data: []
|
|
|
|
data: []
|
|
|
@ -175,15 +175,19 @@ export default defineComponent({
|
|
|
|
const initeCharts = () => {
|
|
|
|
const initeCharts = () => {
|
|
|
|
let myChart = echarts.init(document.getElementById('myChart'))
|
|
|
|
let myChart = echarts.init(document.getElementById('myChart'))
|
|
|
|
// 绘制图表
|
|
|
|
// 绘制图表
|
|
|
|
console.log(state.option)
|
|
|
|
|
|
|
|
myChart.setOption(state.option)
|
|
|
|
myChart.setOption(state.option)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const setData = (e) => {
|
|
|
|
const setData = (e) => {
|
|
|
|
let X = e.SpeedList.map(v => v.time)
|
|
|
|
let X = e.TPList.map(v => v.time)
|
|
|
|
let Y1 = e.SpeedList.map(v => v.speed)
|
|
|
|
let Y1 = []
|
|
|
|
let Y2 = e.TPList.map(v => v.temperature)
|
|
|
|
let Y2 = e.TPList.map(v => v.temperature)
|
|
|
|
let Y3 = e.TPList.map(v => v.press)
|
|
|
|
let Y3 = e.TPList.map(v => v.press)
|
|
|
|
const {option} = toRefs(state)
|
|
|
|
const {option} = toRefs(state)
|
|
|
|
|
|
|
|
X.forEach(res => {
|
|
|
|
|
|
|
|
Y1.push(e.SpeedList.find(v => v.time === res)?.speed || 0)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
console.log(X)
|
|
|
|
|
|
|
|
console.log(Y1)
|
|
|
|
option.value.xAxis.data = X
|
|
|
|
option.value.xAxis.data = X
|
|
|
|
option.value.series[0].data = Y1
|
|
|
|
option.value.series[0].data = Y1
|
|
|
|
option.value.series[1].data = Y2
|
|
|
|
option.value.series[1].data = Y2
|
|
|
|