From 7ac4ab3890d94e7c11bce1292ef5143fefa8b4ce Mon Sep 17 00:00:00 2001
From: zzyuan <781948537@qq.com>
Date: Wed, 11 Jun 2025 15:55:30 +0800
Subject: [PATCH] =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9=EF=BC=8C?=
=?UTF-8?q?=E5=9B=BE=E7=89=87=E8=8E=B7=E5=8F=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/index.vue | 30 ++++++++++++++++++++++--------
src/views/view.vue | 30 ++++++++++++++++++++++--------
2 files changed, 44 insertions(+), 16 deletions(-)
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 @@
@@ -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 @@
@@ -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() {