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]}) }