From 4cccc8cbeee63312e7dae82fa7153b05a624fc0f Mon Sep 17 00:00:00 2001 From: "453530270@qq.com" Date: Sat, 29 Jul 2023 11:34:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=83=A8=E5=88=86=E5=87=BD?= =?UTF-8?q?=E6=95=B0=E5=BC=95=E7=94=A8=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ty/index.vue | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) 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:''; - }); }); },