diff --git a/src/views/ty/index.vue b/src/views/ty/index.vue index 8c28631..4237ab8 100644 --- a/src/views/ty/index.vue +++ b/src/views/ty/index.vue @@ -236,7 +236,6 @@ export default { this.ty_pieDo()//右上角占比 this.ty_bar3()//右下角趋势图 }, 200); - // this.ty_bar2() }) @@ -612,9 +611,9 @@ export default { function run(myChart){ let that = this; // 获取新数据-处理 - that.getGcgNumDatas(); + // that.getGcgNumDatas(); setTimeout(() => { - var xData = this.rsqsXData; + // var xData = this.rsqsXData; var data = this.rsqsDataAll; var series = []; @@ -696,7 +695,7 @@ export default { var myChart3 = echarts.init(pieDom3); function run(){ - that.gethomeBarData(); + // that.gethomeBarData(); setTimeout(() => { myChart1.clear(); that.ty_pie(myChart1,that.groupsData[0]); @@ -711,9 +710,9 @@ export default { }, 1500); } run(); - // setInterval(function () { - // run(); - // }, 3000); + setInterval(function () { + run(); + }, 3000); }, ty_pie(myChart,DD){ let that = this; @@ -842,10 +841,10 @@ export default { } // 加延时器使图像绘制获取元素宽高最新的值 - // setTimeout(()=>{ + setTimeout(()=>{ // var myChart = echarts.init(Element); option && myChart.setOption(option); - // }, 200) + }, 200) }, // 24小时趋势 @@ -870,17 +869,22 @@ export default { // 人次占比 gethomeBarData(){ let that = this; + + // 群组编号字符串,| 分割 + let idArr = ""; homeApi.getID().then(res=>{ // console.log(res, '====='); - let idArr = ""; + // let idArr = ""; res.data.data.map(item=>{ if(item.type==1){ idArr += "|"+item.groupId; } }) - that.groupsData = []; - // 场馆人次占比 - homeApi.homeBarData({groupsId:idArr}).then(res=>{ + // that.groupsData = []; + }); + + // 场馆人次占比 + homeApi.homeBarData({groupsId:idArr}).then(res=>{ // console.log(res, '=场馆人次占比='); res.data.data.groupsData.forEach(item=>{ that.groupsData.push(item); @@ -895,7 +899,6 @@ export default { that.cgn_3 = that.groupsData[2].groupName; that.cgv_2 = that.groupsData[1].noRepeatInNum; that.cgp_3 = that.groupsData[2]?that.groupsData[2].proportion:''; - }); }); },