|
@@ -6,7 +6,7 @@
|
|
|
<el-image :src="restaurant1" fit="scale-down" />
|
|
|
<el-col class="name"
|
|
|
>今日营业额<el-col class="num"
|
|
|
- >38155<span class="unit">元</span></el-col
|
|
|
+ >{{num[0]}}<span class="unit">元</span></el-col
|
|
|
></el-col
|
|
|
>
|
|
|
</el-col>
|
|
@@ -14,7 +14,7 @@
|
|
|
<el-image :src="restaurant1" fit="scale-down" />
|
|
|
<el-col class="name"
|
|
|
>今日销售人/次<el-col class="num"
|
|
|
- >15642<span class="unit">份</span></el-col
|
|
|
+ >{{num[1]}}<span class="unit">份</span></el-col
|
|
|
></el-col
|
|
|
>
|
|
|
</el-col>
|
|
@@ -43,6 +43,7 @@ import restaurant3 from "@/assets/images2/排名-右边.png";
|
|
|
import num1 from "@/assets/images2/第一名icon.png";
|
|
|
import num2 from "@/assets/images2/第二名icon.png";
|
|
|
import num3 from "@/assets/images2/第三名icon.png";
|
|
|
+import { getWeekDate } from "@/assets/js/dataFormate.js";
|
|
|
export default {
|
|
|
name: "restaurant",
|
|
|
data() {
|
|
@@ -61,9 +62,26 @@ export default {
|
|
|
{id:num1,name:"清炒时蔬",num:412},
|
|
|
{id:num2,name:"柠檬鸭",num:315},
|
|
|
{id:num3,name:"番茄炒蛋",num:267},
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ num:[38155,15642],
|
|
|
+ tapNo:false,
|
|
|
};
|
|
|
},
|
|
|
+ created(){
|
|
|
+ console.log(getWeekDate())
|
|
|
+ if(getWeekDate() == "周一" || getWeekDate() == "周日"){
|
|
|
+ this.list2 = [
|
|
|
+ {id:num1,name:"未营业",num:0},
|
|
|
+ {id:num2,name:"未营业",num:0},
|
|
|
+ {id:num3,name:"未营业",num:0},
|
|
|
+ ]
|
|
|
+ this.num = [0,0]
|
|
|
+ this.tapNo = true
|
|
|
+ }
|
|
|
+ if(getWeekDate() == "周六" || getWeekDate() == "周日"){
|
|
|
+ this.num = [0,0]
|
|
|
+ }
|
|
|
+ },
|
|
|
mounted() {
|
|
|
this.init()
|
|
|
this.timing()
|
|
@@ -99,7 +117,12 @@ export default {
|
|
|
},1000 * 60 * 5)
|
|
|
},
|
|
|
canyin(id){
|
|
|
- this.$emit("canyinClick",id)
|
|
|
+ if(this.tapNo == true){
|
|
|
+ //禁止跳转(周六周日休业)
|
|
|
+ }else{
|
|
|
+ this.$emit("canyinClick",id)
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
};
|
|
@@ -193,7 +216,7 @@ export default {
|
|
|
font-family: 'DINAlternate-Bold';
|
|
|
}
|
|
|
.dishName{
|
|
|
-
|
|
|
+
|
|
|
display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
|
|
|
}
|
|
|
}
|