|
|
|
@ -255,28 +255,6 @@ export default { |
|
|
|
|
|
|
|
}, |
|
|
|
methods: { |
|
|
|
istygShowfn() { |
|
|
|
if (this.istygShow === false) { |
|
|
|
this.istygShow = true |
|
|
|
} else { |
|
|
|
this.istygShow = false |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
istygShowfn2() { |
|
|
|
if (this.istygShow2 === false) { |
|
|
|
this.istygShow2 = true |
|
|
|
} else { |
|
|
|
this.istygShow2 = false |
|
|
|
} |
|
|
|
}, |
|
|
|
istygShowfn3() { |
|
|
|
if (this.istygShow3 === false) { |
|
|
|
this.istygShow3 = true |
|
|
|
} else { |
|
|
|
this.istygShow3 = false |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
ty_bar1() { |
|
|
|
let that = this; |
|
|
|
@ -1042,10 +1020,10 @@ export default { |
|
|
|
} |
|
|
|
|
|
|
|
// 加延时器使图像绘制获取元素宽高最新的值 |
|
|
|
setTimeout(()=>{ |
|
|
|
// setTimeout(()=>{ |
|
|
|
// var myChart = echarts.init(Element); |
|
|
|
option && myChart.setOption(option); |
|
|
|
}, 200) |
|
|
|
// }, 200) |
|
|
|
}, |
|
|
|
|
|
|
|
// 总计 体育场馆的总数 |
|
|
|
@ -1086,108 +1064,6 @@ export default { |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
// 24小时趋势 |
|
|
|
getData24h(){ |
|
|
|
let that = this; |
|
|
|
homeApi.getID().then(res=>{ |
|
|
|
// console.log(res, '====='); |
|
|
|
let idArr = ""; |
|
|
|
res.data.data.map(item=>{ |
|
|
|
if(item.type==1){ |
|
|
|
idArr += "|"+item.groupId; |
|
|
|
} |
|
|
|
}) |
|
|
|
homeApi.getAllfFlow({groupsId:idArr}).then(res=>{ |
|
|
|
// console.log(res, '====='); |
|
|
|
that.data24h = res.data.data.dvalue; |
|
|
|
that.data24hX = res.data.data.dkeys; |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 人次占比 |
|
|
|
gethomeBarData(){ |
|
|
|
let that = this; |
|
|
|
homeApi.getID().then(res=>{ |
|
|
|
// console.log(res, '====='); |
|
|
|
let idArr = ""; |
|
|
|
res.data.data.map(item=>{ |
|
|
|
if(item.type==1){ |
|
|
|
idArr += "|"+item.groupId; |
|
|
|
} |
|
|
|
}) |
|
|
|
that.groupsData = []; |
|
|
|
homeApi.homeBarData({groupsId:idArr}).then(res=>{ |
|
|
|
console.log(res, '====='); |
|
|
|
res.data.data.groupsData.forEach(item=>{ |
|
|
|
that.groupsData.push(item); |
|
|
|
}); |
|
|
|
// console.log(that.groupsData, 'that.groupsData') |
|
|
|
that.cgn_1 = that.groupsData[0].noRepeatInNum; |
|
|
|
that.cgp_1 = that.groupsData[0].proportion; |
|
|
|
that.cgn_2 = that.groupsData[1].noRepeatInNum; |
|
|
|
that.cgp_2 = that.groupsData[1].proportion; |
|
|
|
that.cgn_3 = that.groupsData[2]?that.groupsData[2].noRepeatInNum:''; |
|
|
|
that.cgp_3 = that.groupsData[2]?that.groupsData[2].proportion:''; |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 折线趋势图 |
|
|
|
getGcgNumDatas(){ |
|
|
|
let that = this; |
|
|
|
homeApi.getID().then(res=>{ |
|
|
|
// console.log(res, '====='); |
|
|
|
let idArr = ""; |
|
|
|
res.data.data.map(item=>{ |
|
|
|
if(item.type==1){ |
|
|
|
idArr += "|"+item.groupId; |
|
|
|
} |
|
|
|
}) |
|
|
|
homeApi.allGcgNumDatas({groupsId:idArr}).then(res=>{ |
|
|
|
// console.log(res, '====='); |
|
|
|
const tmpdata = res.data.data; |
|
|
|
tmpdata.forEach((item) => { |
|
|
|
that.rsqsDataName.push(item.groupName); |
|
|
|
that.rsqsDatas.push(item.list) |
|
|
|
}) |
|
|
|
|
|
|
|
that.rsqsXData = res.data.data[0].list.dkeys; |
|
|
|
that.rsqsDatas.forEach((item) => { |
|
|
|
let rsqsData = [] |
|
|
|
Object.getOwnPropertyNames(item).forEach((value) => { |
|
|
|
|
|
|
|
if(value=='dkeys'){ |
|
|
|
|
|
|
|
} |
|
|
|
if(value=='dvalue'){ |
|
|
|
// console.log(item, value, '-----') |
|
|
|
// rsqsData.push(item[value]) |
|
|
|
rsqsData = item[value]; |
|
|
|
} |
|
|
|
}); |
|
|
|
that.rsqsDataAll.push(rsqsData) |
|
|
|
}) |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
// 动画加数从效果 |
|
|
|
addNumber(start, end, id) { |
|
|
|
var o = document.getElementById(id); |
|
|
|
var i = start; |
|
|
|
var Interval; |
|
|
|
if (i < end) { |
|
|
|
Interval = setInterval(function () { |
|
|
|
i += 4000; // 设置每次增加的动态数字,可调整 |
|
|
|
if (i > end) { |
|
|
|
clearInterval(Interval); // 清除setInterval的time,这个方法w3c可具体查看文档 |
|
|
|
o.innerHTML = end.toLocaleString(); // 此赋值是为了避免最后一次增加过后的数据和真实数据不同 |
|
|
|
i = 0; |
|
|
|
} else { |
|
|
|
o.innerHTML = i.toLocaleString(); |
|
|
|
} |
|
|
|
}, 10); // 数据跳转的速度控制 |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|