feat: 增加数据统计自定义功能
This commit is contained in:
@@ -42,6 +42,7 @@
|
||||
<wd-cell size="large" title="记录默认值" is-link @click="openDefaultPopup"/>
|
||||
<wd-cell size="large" title="今日概览" is-link @click="openOverviewPopup"/>
|
||||
<wd-cell size="large" title="今日计划" is-link @click="openPlanPopup"/>
|
||||
<wd-cell size="large" title="数据统计" is-link @click="openStatsPopup"/>
|
||||
<wd-cell size="large" title="存储详情" is-link @click="openStoragePopup"/>
|
||||
</wd-cell-group>
|
||||
|
||||
@@ -55,6 +56,8 @@
|
||||
|
||||
<plan-popup />
|
||||
|
||||
<stats-popup />
|
||||
|
||||
<default-popup />
|
||||
|
||||
<point-popup />
|
||||
@@ -67,7 +70,7 @@ import StoragePopup from "@/components/Profile/StoragePopup.vue";
|
||||
import OverviewPopup from "@/components/Profile/OverviewPopup.vue";
|
||||
import PlanPopup from "@/components/Profile/PlanPopup.vue";
|
||||
import { computed, ref, watch } from 'vue'
|
||||
import { getDefaultRecordValue, getOverview, getPlan, getProfile } from '@/utils/profile'
|
||||
import { getDefaultRecordValue, getOverview, getPlan, getProfile, getStats } from '@/utils/profile'
|
||||
import { useProfileStore } from '@/store/profile'
|
||||
import { useAppStore } from "@/store/app";
|
||||
import type { IProfile } from "@/type/profile";
|
||||
@@ -76,6 +79,7 @@ import DefaultPopup from "@/components/Profile/DefaultPopup.vue";
|
||||
import { getAchievement, getPoints, getRecordCount } from "@/utils/points";
|
||||
import { onShow } from "@dcloudio/uni-app";
|
||||
import PointPopup from "@/components/Profile/PointPopup.vue";
|
||||
import StatsPopup from "@/components/Profile/StatsPopup.vue";
|
||||
|
||||
const profileStore = useProfileStore()
|
||||
const appStore = useAppStore()
|
||||
@@ -122,6 +126,11 @@ function openPlanPopup() {
|
||||
profileStore.showPlanPopup = true
|
||||
}
|
||||
|
||||
function openStatsPopup() {
|
||||
profileStore.statsList = getStats()
|
||||
profileStore.showStatsPopup = true
|
||||
}
|
||||
|
||||
function openStoragePopup() {
|
||||
profileStore.storageStats = countRecordsByMonth()
|
||||
profileStore.storageTotal = getTotalCount()
|
||||
|
||||
Reference in New Issue
Block a user