|
|
@@ -39,6 +39,9 @@
|
|
|
</view>
|
|
|
|
|
|
<!-- 汇总卡片 -->
|
|
|
+ <view class="summary-range" v-if="list.length > 0">
|
|
|
+ <text class="range-text">统计范围:{{ summaryDateRange }}</text>
|
|
|
+ </view>
|
|
|
<view class="summary-section" v-if="list.length > 0">
|
|
|
<view class="summary-card">
|
|
|
<text class="summary-label">总收入</text>
|
|
|
@@ -197,7 +200,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { ref, onMounted } from 'vue'
|
|
|
+import { ref, computed, onMounted } from 'vue'
|
|
|
import { onReachBottom } from '@dcloudio/uni-app'
|
|
|
import { getDailyStatList, getMonthlyStatList, getDailyStatAggregate } from '../../api/stat.js'
|
|
|
import { getStationList } from '../../api/station.js'
|
|
|
@@ -231,6 +234,13 @@ const summary = ref({
|
|
|
})
|
|
|
const summaryLoading = ref(false)
|
|
|
|
|
|
+const summaryDateRange = computed(() => {
|
|
|
+ if (filterKey.value) {
|
|
|
+ return activeTab.value === 0 ? filterKey.value : filterKey.value
|
|
|
+ }
|
|
|
+ return '全部日期'
|
|
|
+})
|
|
|
+
|
|
|
const emptySummary = () => ({
|
|
|
totalIncome: 0, totalConsumption: 0, totalOrders: 0,
|
|
|
totalRegistrations: 0, totalActiveUsers: 0,
|
|
|
@@ -475,6 +485,14 @@ onMounted(async () => {
|
|
|
border: none;
|
|
|
}
|
|
|
|
|
|
+.summary-range {
|
|
|
+ padding: 8rpx 20rpx 12rpx;
|
|
|
+}
|
|
|
+.range-text {
|
|
|
+ font-size: 22rpx;
|
|
|
+ color: #999999;
|
|
|
+}
|
|
|
+
|
|
|
.summary-section {
|
|
|
display: grid;
|
|
|
grid-template-columns: repeat(3, 1fr);
|