|
@@ -51,7 +51,9 @@ export default {
|
|
|
showStar: true,
|
|
showStar: true,
|
|
|
content: ''
|
|
content: ''
|
|
|
},
|
|
},
|
|
|
- ]
|
|
|
|
|
|
|
+ ],
|
|
|
|
|
+ dailyMenu: [],
|
|
|
|
|
+ topMenu: [],
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
components: {
|
|
components: {
|
|
@@ -72,20 +74,34 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
- this.init();
|
|
|
|
|
|
|
+ this.$nextTick(()=>{
|
|
|
|
|
+ this.init()
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
init() {
|
|
init() {
|
|
|
- this.getCoreData()
|
|
|
|
|
|
|
+ this.$util.asyncPromise(
|
|
|
|
|
+ this.getCoreData(),
|
|
|
|
|
+ this.getDailyMenu(),
|
|
|
|
|
+ this.getTopMenu(),
|
|
|
|
|
+ )
|
|
|
},
|
|
},
|
|
|
reset() {
|
|
reset() {
|
|
|
- console.log('reset')
|
|
|
|
|
},
|
|
},
|
|
|
search(data) {
|
|
search(data) {
|
|
|
- console.log(data)
|
|
|
|
|
|
|
+ this.$util.asyncPromise(
|
|
|
|
|
+ this.getCoreData(),
|
|
|
|
|
+ this.getDailyMenu(),
|
|
|
|
|
+ this.getTopMenu(),
|
|
|
|
|
+ this.$refs.LifeRestEatChart.getData(),
|
|
|
|
|
+ this.$refs.LifeRestConsumeChart.getData(),
|
|
|
|
|
+ this.$refs.LifeRestPayChart.getData(),
|
|
|
|
|
+ this.$refs.LifeRestProfitChart.getData(),
|
|
|
|
|
+ );
|
|
|
|
|
+ this.$forceUpdate();
|
|
|
},
|
|
},
|
|
|
getCoreData() {
|
|
getCoreData() {
|
|
|
- apiLifeRestaurant.getCoreData(this.queryData).then(res=>{
|
|
|
|
|
|
|
+ return apiLifeRestaurant.getCoreData(this.queryData).then(res=>{
|
|
|
this.coreData[0].num = res.list[0].value
|
|
this.coreData[0].num = res.list[0].value
|
|
|
this.coreData[0].historyNum = res.list[0].compare
|
|
this.coreData[0].historyNum = res.list[0].compare
|
|
|
this.coreData[1].num = res.list[1].value
|
|
this.coreData[1].num = res.list[1].value
|
|
@@ -94,7 +110,17 @@ export default {
|
|
|
this.coreData[2].historyNum = res.list[2].compare
|
|
this.coreData[2].historyNum = res.list[2].compare
|
|
|
this.coreData[3].num = res.list[3].value
|
|
this.coreData[3].num = res.list[3].value
|
|
|
this.coreData[3].historyNum = res.list[3].compare
|
|
this.coreData[3].historyNum = res.list[3].compare
|
|
|
- this.coreData[4].content = res.worthAttention
|
|
|
|
|
|
|
+ this.coreData[4].content = res.worthAttention;
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ getDailyMenu() {
|
|
|
|
|
+ return apiLifeRestaurant.getTodayMenu(this.queryData).then(res=>{
|
|
|
|
|
+ this.dailyMenu = res;
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ getTopMenu() {
|
|
|
|
|
+ return apiLifeRestaurant.getWelcomeDishes(this.queryData).then(res=>{
|
|
|
|
|
+ this.topMenu = res
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
}
|
|
}
|
|
@@ -124,22 +150,22 @@ export default {
|
|
|
<div class="lifeRestaurant-left">
|
|
<div class="lifeRestaurant-left">
|
|
|
<div class="lifeRestaurant-eat ioc-card-content">
|
|
<div class="lifeRestaurant-eat ioc-card-content">
|
|
|
<Card title="用餐分析">
|
|
<Card title="用餐分析">
|
|
|
- <LifeRestEatChart :height="320"></LifeRestEatChart>
|
|
|
|
|
|
|
+ <LifeRestEatChart ref="LifeRestEatChart" :query-data="queryData" :height="320"></LifeRestEatChart>
|
|
|
</Card>
|
|
</Card>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="lifeRestaurant-consume ioc-card-content">
|
|
<div class="lifeRestaurant-consume ioc-card-content">
|
|
|
<Card title="消费分析">
|
|
<Card title="消费分析">
|
|
|
- <LifeRestConsumeChart :height="320"></LifeRestConsumeChart>
|
|
|
|
|
|
|
+ <LifeRestConsumeChart ref="LifeRestConsumeChart" :query-data="queryData" :height="320"></LifeRestConsumeChart>
|
|
|
</Card>
|
|
</Card>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="lifeRestaurant-profit ">
|
|
<div class="lifeRestaurant-profit ">
|
|
|
<Card title="盈利分析">
|
|
<Card title="盈利分析">
|
|
|
- <LifeRestProfitChart :height="300"></LifeRestProfitChart>
|
|
|
|
|
|
|
+ <LifeRestProfitChart ref="LifeRestProfitChart" :query-data="queryData" :height="300"></LifeRestProfitChart>
|
|
|
</Card>
|
|
</Card>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="lifeRestaurant-pay ">
|
|
<div class="lifeRestaurant-pay ">
|
|
|
<Card title="支付分析">
|
|
<Card title="支付分析">
|
|
|
- <LifeRestPayChart :height="300"></LifeRestPayChart>
|
|
|
|
|
|
|
+ <LifeRestPayChart ref="LifeRestPayChart" :query-data="queryData" :height="300"></LifeRestPayChart>
|
|
|
</Card>
|
|
</Card>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -148,12 +174,17 @@ export default {
|
|
|
<div class="lifeRestaurant-right">
|
|
<div class="lifeRestaurant-right">
|
|
|
<div class="lifeRestaurant-top ioc-card-content">
|
|
<div class="lifeRestaurant-top ioc-card-content">
|
|
|
<Card title="受欢迎菜品" style="height: 350px ">
|
|
<Card title="受欢迎菜品" style="height: 350px ">
|
|
|
- <LifeRestTopMenu ></LifeRestTopMenu>
|
|
|
|
|
|
|
+ <div style="height: 300px;overflow-y: auto">
|
|
|
|
|
+ <LifeRestTopMenu :table-data="topMenu" ></LifeRestTopMenu>
|
|
|
|
|
+ </div>
|
|
|
</Card>
|
|
</Card>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="lifeRestaurant-cookbook ioc-card-content">
|
|
<div class="lifeRestaurant-cookbook ioc-card-content">
|
|
|
<Card title="每日菜谱" style="height: 700px">
|
|
<Card title="每日菜谱" style="height: 700px">
|
|
|
- <LifeRestDailyMenu ></LifeRestDailyMenu>
|
|
|
|
|
|
|
+ <div style="height: 650px;overflow-y: auto">
|
|
|
|
|
+ <LifeRestDailyMenu :table-data="dailyMenu" ></LifeRestDailyMenu>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
</Card>
|
|
</Card>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|