Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-csf-h5
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jianan
yd-csf-h5
Commits
4fe4c6ef
Commit
4fe4c6ef
authored
Nov 03, 2026
by
yuzhenWang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wyz' into 'test'
优化发测试 See merge request
!4
parents
5edcb151
5c0a6668
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
src/views/HomeView.vue
+12
-12
No files found.
src/views/HomeView.vue
View file @
4fe4c6ef
...
@@ -3,8 +3,8 @@ import { computed, onMounted, ref } from 'vue'
...
@@ -3,8 +3,8 @@ import { computed, onMounted, ref } from 'vue'
import
{
useI18n
}
from
'vue-i18n'
import
{
useI18n
}
from
'vue-i18n'
import
ApiLoader
from
'@/components/common/ApiLoader.vue'
import
ApiLoader
from
'@/components/common/ApiLoader.vue'
import
MetricCard
from
'@/components/feature/MetricCard.vue'
import
MetricCard
from
'@/components/feature/MetricCard.vue'
import
TodoCard
from
'@/components/feature/TodoCard.vue'
//
import TodoCard from '@/components/feature/TodoCard.vue'
import
{
fetchMetricSummary
,
fetchTodos
,
todoDataSource
}
from
'@/api/modules/dashboard'
import
{
fetchMetricSummary
,
fetchTodos
}
from
'@/api/modules/dashboard'
import
type
{
MetricSummary
,
TodoItem
,
TodoType
}
from
'@/api/types'
import
type
{
MetricSummary
,
TodoItem
,
TodoType
}
from
'@/api/types'
import
{
formatHkd
}
from
'@/utils/money'
import
{
formatHkd
}
from
'@/utils/money'
...
@@ -32,16 +32,16 @@ const restCards = computed<RestCard[]>(() => {
...
@@ -32,16 +32,16 @@ const restCards = computed<RestCard[]>(() => {
]
]
})
})
// 一次遍历统计,原实现为三次 filter(每类各扫一遍)
//
//
一次遍历统计,原实现为三次 filter(每类各扫一遍)
const
countByType
=
computed
(()
=>
//
const countByType = computed(() =>
todos
.
value
.
reduce
(
//
todos.value.reduce(
(
acc
,
todo
)
=>
{
//
(acc, todo) => {
acc
[
todo
.
type
]
+=
1
//
acc[todo.type] += 1
return
acc
//
return acc
},
//
},
{
renewal
:
0
,
lapse
:
0
,
birthday
:
0
}
as
Record
<
TodoType
,
number
>
//
{ renewal: 0, lapse: 0, birthday: 0 } as Record
<
TodoType
,
number
>
)
//
)
)
//
)
async
function
load
()
{
async
function
load
()
{
loading
.
value
=
true
loading
.
value
=
true
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment