From 5c3f71a9c4a2e936f2fc26911871d5a5ffb639f9 Mon Sep 17 00:00:00 2001 From: "453530270@qq.com" Date: Mon, 14 Aug 2023 15:53:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=82=B9=E5=87=BB=E7=BA=BF?= =?UTF-8?q?=E5=9B=BE=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/HomeView.vue | 28 ++++++++-------------------- src/views/TycView.vue | 3 ++- 2 files changed, 10 insertions(+), 21 deletions(-) diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index f50eaa2..b29e0f6 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -175,10 +175,12 @@ export default { // 实时进馆人数 ssjgNumDatas: [], - //折线区域的数据 + //折线区域的数据 y zxliddata:[], - // 折线名称 + // x 轴 zxlindata:[], + // 折线名 + zxndata:[], //websocket wsobj:null, @@ -256,22 +258,6 @@ export default { this.kcdata = tcdata // 环形图 this.cgchart() - - // let tcidata = new Array; - // ccdata.forEach(item=>{ - // crcle infomation - // tcidata.push({ - // name:item.groupName, - // rate:item.proportion - // }); - // }); - // console.log(tcidata) - // this.kcrate = tcidata - // this.tycra = tcidata[0] - // this.tygra = tcidata[1] - // this.yygra = tcidata[2] - // this.bwgra = tcidata[3] - }); }, @@ -525,7 +511,7 @@ export default { var option; var color = ['#FF99CC', '#6666FF', '#FF6600', '#7049f0', '#fa704d', '#01babc',] - var name = [] + var name = this.zxndata var xData = this.zxlindata var data = this.zxliddata @@ -796,17 +782,19 @@ export default { // get allTimeData const tmpdata = res.data.data // X 轴的名称字段 + const narr = new Array const xarr =new Array const darr =new Array; tmpdata.forEach(function(item,idx){ // 读取list const list = item.list + narr.push(item.groupName) xarr.push(list.dkeys) darr.push(list.dvalue) }) // console.log(darr) - + this.zxndata = narr this.zxlindata = xarr this.zxliddata = darr diff --git a/src/views/TycView.vue b/src/views/TycView.vue index d46e1ee..49d61ff 100644 --- a/src/views/TycView.vue +++ b/src/views/TycView.vue @@ -666,7 +666,8 @@ export default { if(index==0){ iconData.push({icon: 'image://img/tyg_icon.png', name: name[0]}) }else if(index==1){ - iconData.push({icon: 'image://img/yyg_icon_3.png', name: name[1]}) + // iconData.push({icon: 'image://img/yyg_icon_3.png', name: name[1]}) + iconData.push({icon: 'image://'+require('@/assets/img/yyg_icon_3.png'), name: name[1]}) }else if(index==2){ iconData.push({icon: 'image://img/tyc_icon.png', name: name[2]}) }