This commit is contained in:
weipengfei 2024-06-19 18:46:11 +08:00
commit 8218aa7042
2 changed files with 23 additions and 17 deletions

View File

@ -7,8 +7,8 @@
<img class="w-[50px] h-[50px] mr-2" :src="item.src" /> <img class="w-[50px] h-[50px] mr-2" :src="item.src" />
</div> </div>
<div> <div>
<div class="text-info text-3xl">{{ item.title }}</div> <div class="text-info">{{ item.title }}</div>
<div class="text-3xl">{{ item.value() }}</div> <div class="text-6xl">{{ item.value() }}</div>
</div> </div>
</div> </div>
</el-row> </el-row>
@ -27,8 +27,8 @@
<img class="w-[50px] h-[50px] mr-2" :src="item.src" /> <img class="w-[50px] h-[50px] mr-2" :src="item.src" />
</div> </div>
<div> <div>
<div class="text-info text-3xl">{{ item.title }}</div> <div class="text-info ">{{ item.title }}</div>
<div class="text-3xl">{{ item.value() }}</div> <div class="text-6xl">{{ item.value() }}</div>
</div> </div>
</div> </div>
</el-row> </el-row>

View File

@ -16,8 +16,8 @@
<img class="w-[50px] h-[50px] mr-2" :src="item.src" /> <img class="w-[50px] h-[50px] mr-2" :src="item.src" />
</div> </div>
<div> <div>
<div class="text-info text-3xl">{{ item.title }}</div> <div class="text-info">{{ item.title }}</div>
<div class="text-3xl">{{ item.value() }}</div> <div class="text-6xl">{{ item.value() }}</div>
</div> </div>
</div> </div>
</div> </div>
@ -27,13 +27,13 @@
<img class="w-[50px] h-[50px] mr-2" :src="item.src" /> <img class="w-[50px] h-[50px] mr-2" :src="item.src" />
</div> </div>
<div> <div>
<div class="text-info text-3xl">{{ item.title }}</div> <div class="text-info ">{{ item.title }}</div>
<div class="text-3xl">{{ item.value() }}</div> <div class="text-6xl">{{ item.value() }}</div>
</div> </div>
</div> </div>
</div> </div>
</el-card> </el-card>
<el-card :key="date"> <el-card :key="date" v-loading="!visitorOption.xAxis.data.length">
<template #header> <template #header>
营业趋势 营业趋势
</template> </template>
@ -88,10 +88,8 @@ const deteToQuery = () => {
function getFirstAndLastDayOfCurrentMonth() { function getFirstAndLastDayOfCurrentMonth() {
var today = new Date(); var today = new Date();
var firstDay = new Date(today.getFullYear(), today.getMonth(), 1); var firstDayFormatted = formatDate(today);
var lastDay = new Date(today.getFullYear(), today.getMonth() + 1, 0); var lastDayFormatted = formatDate(today);
var firstDayFormatted = formatDate(firstDay);
var lastDayFormatted = formatDate(lastDay);
return { firstDay: firstDayFormatted, lastDay: lastDayFormatted }; return { firstDay: firstDayFormatted, lastDay: lastDayFormatted };
} }
@ -109,7 +107,15 @@ date.value[1] = getFirstAndLastDayOfCurrentMonth().lastDay;
const formData = ref({ const formData = ref({
order_amount: 0 order_amount: 0,
receipt_amount: 0,
income_amount: 0,
verify_amount: 0,
cashier_amount: 0,
balance_amount: 0,
user_number: 0,
cash_amount: 0,
}) })
@ -186,20 +192,20 @@ const visitorOption = reactive({
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] data: []
}, },
yAxis: { yAxis: {
type: 'value' type: 'value'
}, },
series: [ series: [
{ {
data: [820, 932, 901, 934, 1290, 1330, 1320], data: [],
type: 'line', type: 'line',
smooth: true, smooth: true,
name: "门店收款" name: "门店收款"
}, },
{ {
data: [15, 12, 14, 78, 96, 54, 85], data: [],
type: 'line', type: 'line',
smooth: true, smooth: true,
name: '新增用户' name: '新增用户'