projects/mesxc-zhp #315

Merged
juzi merged 2 commits from projects/mesxc-zhp into projects/mesxc-test 2024-04-08 15:11:35 +08:00

View File

@ -207,8 +207,6 @@ export default {
}).then((res) => { }).then((res) => {
let mapArr= [] let mapArr= []
let mapLegendData = [] let mapLegendData = []
// let mapXAxisData = []
for (let i in res.data) {
let obj = { let obj = {
name: '', name: '',
type: 'line', type: 'line',
@ -216,6 +214,9 @@ export default {
data: [], data: [],
mapXAxisData: [], mapXAxisData: [],
} }
// let mapXAxisData = []
for (let i in res.data) {
// console.log(i) // console.log(i)
let dataArr = [] let dataArr = []
res.data[i].forEach(ele => { res.data[i].forEach(ele => {
@ -225,8 +226,9 @@ export default {
obj.name = i obj.name = i
obj.data = dataArr obj.data = dataArr
mapLegendData.push(i) mapLegendData.push(i)
mapArr.push(obj)
} }
mapArr.push(obj)
console.log(mapArr);
// console.log(res.data[res]); // console.log(res.data[res]);
var chartDom = this.activeName === 'day' ? document.getElementById('mapDayMain') : this.activeName === 'week' ? document.getElementById('mapWeekMain') : document.getElementById('mapMonthMain') var chartDom = this.activeName === 'day' ? document.getElementById('mapDayMain') : this.activeName === 'week' ? document.getElementById('mapWeekMain') : document.getElementById('mapMonthMain')
var myChart = echarts.init(chartDom); var myChart = echarts.init(chartDom);