diff --git a/src/views/index.vue b/src/views/index.vue index a44295b..d61aa70 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -38,13 +38,13 @@
- +
- -
ss + +
@@ -104,7 +104,7 @@ export default { {"picUrl":"http://sgwpdm.ah.sgcc.com.cn/canteen/lnyst/378915229716713472/backStaff/a643fe032af848f3adb91e05a5736330.jpg"} ], notice:"sbd食堂欢迎您", - pictureUrlList:"http://sgwpdm.ah.sgcc.com.cn/canteen/lnyst/378915229716713472/dishes/ce0e4591db7e439a9951e8c48be92d31.png", + pictures:["http://sgwpdm.ah.sgcc.com.cn/canteen/lnyst/378915229716713472/dishes/ce0e4591db7e439a9951e8c48be92d31.png","../assets/images/sp.png"], angle:0 }; }, @@ -125,13 +125,14 @@ export default { return; }, initData(){ - let param = { -     "key": "dzCanteenDiningPeople", -    "canteenId": '378928314946949120' - } + let param = { + "key": "dzCanteenDiningPeople", + "canteenId": '378928314946949120' + } getViewData(param).then(res => { this.currentSeat=res.data[0].currentSeat; this.mealNum=res.data[0].mealNum; + this.pictures = res.data[0].pictures this.initpartone(); }); //partone @@ -186,13 +187,19 @@ export default { this.curthree=curnums[2]; this.curfour=curnums[3]; }else if(curnums.length>2){ + this.curone=0; this.curtwo=curnums[0]; this.curthree=curnums[1]; this.curfour=curnums[2]; }else if(curnums.length>1){ + this.curone=0; + this.curtwo=0; this.curthree=curnums[0]; this.curfour=curnums[1]; }else{ + this.curone=0; + this.curtwo=0; + this.curthree=0; this.curfour=curnums[0]; } const mealnumd=this.mealNum+""; @@ -203,15 +210,22 @@ export default { this.mealthree=mealnums[2]; this.mealfour=mealnums[3]; }else if(mealnums.length>2){ + this.mealone=0 this.mealtwo=mealnums[0]; this.mealthree=mealnums[1]; this.mealfour=mealnums[2]; }else if(mealnums.length>1){ + this.mealone=0 + this.mealtwo=0 this.mealthree=mealnums[0]; this.mealfour=mealnums[1]; }else{ + this.mealone=0 + this.mealtwo=0 + this.mealthree=0 this.mealfour=mealnums[0]; } + this.$forceUpdate() this.initChart(); }, initChart() { diff --git a/src/views/view.vue b/src/views/view.vue index a44295b..d61aa70 100644 --- a/src/views/view.vue +++ b/src/views/view.vue @@ -38,13 +38,13 @@
- +
- -
ss + +
@@ -104,7 +104,7 @@ export default { {"picUrl":"http://sgwpdm.ah.sgcc.com.cn/canteen/lnyst/378915229716713472/backStaff/a643fe032af848f3adb91e05a5736330.jpg"} ], notice:"sbd食堂欢迎您", - pictureUrlList:"http://sgwpdm.ah.sgcc.com.cn/canteen/lnyst/378915229716713472/dishes/ce0e4591db7e439a9951e8c48be92d31.png", + pictures:["http://sgwpdm.ah.sgcc.com.cn/canteen/lnyst/378915229716713472/dishes/ce0e4591db7e439a9951e8c48be92d31.png","../assets/images/sp.png"], angle:0 }; }, @@ -125,13 +125,14 @@ export default { return; }, initData(){ - let param = { -     "key": "dzCanteenDiningPeople", -    "canteenId": '378928314946949120' - } + let param = { + "key": "dzCanteenDiningPeople", + "canteenId": '378928314946949120' + } getViewData(param).then(res => { this.currentSeat=res.data[0].currentSeat; this.mealNum=res.data[0].mealNum; + this.pictures = res.data[0].pictures this.initpartone(); }); //partone @@ -186,13 +187,19 @@ export default { this.curthree=curnums[2]; this.curfour=curnums[3]; }else if(curnums.length>2){ + this.curone=0; this.curtwo=curnums[0]; this.curthree=curnums[1]; this.curfour=curnums[2]; }else if(curnums.length>1){ + this.curone=0; + this.curtwo=0; this.curthree=curnums[0]; this.curfour=curnums[1]; }else{ + this.curone=0; + this.curtwo=0; + this.curthree=0; this.curfour=curnums[0]; } const mealnumd=this.mealNum+""; @@ -203,15 +210,22 @@ export default { this.mealthree=mealnums[2]; this.mealfour=mealnums[3]; }else if(mealnums.length>2){ + this.mealone=0 this.mealtwo=mealnums[0]; this.mealthree=mealnums[1]; this.mealfour=mealnums[2]; }else if(mealnums.length>1){ + this.mealone=0 + this.mealtwo=0 this.mealthree=mealnums[0]; this.mealfour=mealnums[1]; }else{ + this.mealone=0 + this.mealtwo=0 + this.mealthree=0 this.mealfour=mealnums[0]; } + this.$forceUpdate() this.initChart(); }, initChart() {