|
@@ -50,34 +50,34 @@
|
|
|
</template>
|
|
|
|
|
|
<div class="flex flex-wrap">
|
|
|
- <div class="w-1/2 md:w-1/4">
|
|
|
+ <div class="w-1/2 md:w-1/3">
|
|
|
<div class="leading-10">到店人次</div>
|
|
|
<div class="text-6xl">{{ workbenchData.today.todayVisits }}</div>
|
|
|
<!-- <div class="text-tx-secondary text-xs">
|
|
|
总访问量:{{ workbenchData.today.totalVisits }}
|
|
|
</div> -->
|
|
|
</div>
|
|
|
- <div class="w-1/2 md:w-1/4">
|
|
|
+ <div class="w-1/2 md:w-1/3">
|
|
|
<div class="leading-10">销售额(元)</div>
|
|
|
<div class="text-6xl">{{ workbenchData.today.todaySales }}</div>
|
|
|
<!-- <div class="text-tx-secondary text-xs">
|
|
|
总销售额:{{ workbenchData.today.totalSales }}
|
|
|
</div> -->
|
|
|
</div>
|
|
|
- <div class="w-1/2 md:w-1/4">
|
|
|
+ <div class="w-1/2 md:w-1/3">
|
|
|
<div class="leading-10">订单量(笔)</div>
|
|
|
<div class="text-6xl">{{ workbenchData.today.todayOrder }}</div>
|
|
|
<!-- <div class="text-tx-secondary text-xs">
|
|
|
总订单量:{{ workbenchData.today.totalOrder }}
|
|
|
</div> -->
|
|
|
</div>
|
|
|
- <div class="w-1/2 md:w-1/4">
|
|
|
+ <!-- <div class="w-1/2 md:w-1/4">
|
|
|
<div class="leading-10">新到店人数</div>
|
|
|
<div class="text-6xl">{{ workbenchData.today.todayUsers }}</div>
|
|
|
- <!-- <div class="text-tx-secondary text-xs">
|
|
|
+ <div class="text-tx-secondary text-xs">
|
|
|
总访用户:{{ workbenchData.today.totalUsers }}
|
|
|
- </div> -->
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
+ </div> -->
|
|
|
</div>
|
|
|
</el-card>
|
|
|
</div>
|
|
@@ -157,7 +157,7 @@ import menu_auth from './image/menu_auth.png'
|
|
|
import menu_web from './image/menu_web.png'
|
|
|
import oa_code from './image/oa_code.png'
|
|
|
import service_code from './image/service_code.png'
|
|
|
-import { getShopConfig, changeShopStatus } from '@/api/shop'
|
|
|
+import { getShopConfig, changeShopStatus, statisticsDishTop10 } from '@/api/shop'
|
|
|
// 表单数据
|
|
|
const workbenchData: any = reactive({
|
|
|
shopId: '',
|
|
@@ -267,13 +267,13 @@ const workbenchData: any = reactive({
|
|
|
yAxis: {
|
|
|
type: 'category',
|
|
|
data: [
|
|
|
- '西红柿炒鸡蛋',
|
|
|
- '梅菜扣肉',
|
|
|
- '黄瓜变蛋',
|
|
|
- '蛋炒饭',
|
|
|
- '爆炒虾尾',
|
|
|
- '香辣虾',
|
|
|
- '爆炒鱿鱼'
|
|
|
+ // '西红柿炒鸡蛋',
|
|
|
+ // '梅菜扣肉',
|
|
|
+ // '黄瓜变蛋',
|
|
|
+ // '蛋炒饭',
|
|
|
+ // '爆炒虾尾',
|
|
|
+ // '香辣虾',
|
|
|
+ // '爆炒鱿鱼'
|
|
|
],
|
|
|
axisLine: {
|
|
|
show: false
|
|
@@ -335,7 +335,8 @@ const workbenchData: any = reactive({
|
|
|
},
|
|
|
series: [
|
|
|
{
|
|
|
- data: [33, 26, 25, 15, 12, 9, 9],
|
|
|
+ // data: [33, 26, 25, 15, 12, 9, 9],
|
|
|
+ data: [],
|
|
|
type: 'bar',
|
|
|
label: {
|
|
|
show: true,
|
|
@@ -378,8 +379,19 @@ const changeStatus = () => {
|
|
|
}
|
|
|
changeShopStatus({ id: workbenchData.shopId, status: workbenchData.shopStatus })
|
|
|
}
|
|
|
+const dishTop10 = () => {
|
|
|
+ statisticsDishTop10().then((res) => {
|
|
|
+ let list = res || [];
|
|
|
+ // 按照 quantity 倒序排列
|
|
|
+ list.sort((a: { quantity: number }, b: { quantity: number }) => b.quantity - a.quantity);
|
|
|
+ // console.warn("**statisticsDishTop10****",list)
|
|
|
+ workbenchData.listOption.yAxis.data = list.map((it: { title: any })=>it.title);
|
|
|
+ workbenchData.listOption.series[0].data = list.map((it: { quantity: any })=>it.quantity);
|
|
|
+ })
|
|
|
+}
|
|
|
shopInfo()
|
|
|
getData()
|
|
|
+dishTop10()
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped></style>
|