2
2
<div >
3
3
<el-card shadow =" never" >
4
4
<el-skeleton :loading =" loading" animated >
5
- <el-row :gutter =" 20 " justify =" space-between" >
5
+ <el-row :gutter =" 16 " justify =" space-between" >
6
6
<el-col :xl =" 12" :lg =" 12" :md =" 12" :sm =" 24" :xs =" 24" >
7
7
<div class =" flex items-center" >
8
- <img :src =" avatar" alt =" " class =" mr-20px h-70px w-70px rounded-[50%]" />
8
+ <el-avatar :src =" avatar" :size =" 70" class =" mr-16px" >
9
+ <img src =" @/assets/imgs/avatar.gif" alt =" " />
10
+ </el-avatar >
9
11
<div >
10
12
<div class =" text-20px" >
11
13
{{ t('workplace.welcome') }} {{ username }} {{ t('workplace.happyDay') }}
19
21
<el-col :xl =" 12" :lg =" 12" :md =" 12" :sm =" 24" :xs =" 24" >
20
22
<div class =" h-70px flex items-center justify-end lt-sm:mt-10px" >
21
23
<div class =" px-8px text-right" >
22
- <div class =" mb-20px text-14px text-gray-400" >{{ t('workplace.project') }}</div >
24
+ <div class =" mb-16px text-14px text-gray-400" >{{ t('workplace.project') }}</div >
23
25
<CountTo
24
26
class =" text-20px"
25
27
:start-val =" 0"
29
31
</div >
30
32
<el-divider direction =" vertical" />
31
33
<div class =" px-8px text-right" >
32
- <div class =" mb-20px text-14px text-gray-400" >{{ t('workplace.toDo') }}</div >
34
+ <div class =" mb-16px text-14px text-gray-400" >{{ t('workplace.toDo') }}</div >
33
35
<CountTo
34
36
class =" text-20px"
35
37
:start-val =" 0"
39
41
</div >
40
42
<el-divider direction =" vertical" border-style =" dashed" />
41
43
<div class =" px-8px text-right" >
42
- <div class =" mb-20px text-14px text-gray-400" >{{ t('workplace.access') }}</div >
44
+ <div class =" mb-16px text-14px text-gray-400" >{{ t('workplace.access') }}</div >
43
45
<CountTo
44
46
class =" text-20px"
45
47
:start-val =" 0"
54
56
</el-card >
55
57
</div >
56
58
57
- <el-row class =" mt-5px " :gutter =" 20 " justify =" space-between" >
58
- <el-col :xl =" 16" :lg =" 16" :md =" 24" :sm =" 24" :xs =" 24" class =" mb-10px " >
59
+ <el-row class =" mt-8px " :gutter =" 8 " justify =" space-between" >
60
+ <el-col :xl =" 16" :lg =" 16" :md =" 24" :sm =" 24" :xs =" 24" class =" mb-8px " >
59
61
<el-card shadow =" never" >
60
62
<template #header >
61
63
<div class =" h-3 flex justify-between" >
76
78
>
77
79
<el-card shadow =" hover" >
78
80
<div class =" flex items-center" >
79
- <Icon :icon =" item.icon" :size =" 25" class =" mr-10px " />
81
+ <Icon :icon =" item.icon" :size =" 25" class =" mr-8px " />
80
82
<span class =" text-16px" >{{ item.name }}</span >
81
83
</div >
82
- <div class =" mt-15px text-14px text-gray-400" >{{ t(item.message) }}</div >
83
- <div class =" mt-20px flex justify-between text-12px text-gray-400" >
84
+ <div class =" mt-16px text-14px text-gray-400" >{{ t(item.message) }}</div >
85
+ <div class =" mt-16px flex justify-between text-12px text-gray-400" >
84
86
<span >{{ item.personal }}</span >
85
87
<span >{{ formatTime(item.time, 'yyyy-MM-dd') }}</span >
86
88
</div >
90
92
</el-skeleton >
91
93
</el-card >
92
94
93
- <el-card shadow =" never" class =" mt-5px " >
95
+ <el-card shadow =" never" class =" mt-8px " >
94
96
<el-skeleton :loading =" loading" animated >
95
97
<el-row :gutter =" 20" justify =" space-between" >
96
98
<el-col :xl =" 10" :lg =" 10" :md =" 24" :sm =" 24" :xs =" 24" >
97
- <el-card shadow =" hover" class =" mb-10px " >
99
+ <el-card shadow =" hover" class =" mb-8px " >
98
100
<el-skeleton :loading =" loading" animated >
99
101
<Echart :options =" pieOptionsData" :height =" 280" />
100
102
</el-skeleton >
101
103
</el-card >
102
104
</el-col >
103
105
<el-col :xl =" 14" :lg =" 14" :md =" 24" :sm =" 24" :xs =" 24" >
104
- <el-card shadow =" hover" class =" mb-10px " >
106
+ <el-card shadow =" hover" class =" mb-8px " >
105
107
<el-skeleton :loading =" loading" animated >
106
108
<Echart :options =" barOptionsData" :height =" 280" />
107
109
</el-skeleton >
111
113
</el-skeleton >
112
114
</el-card >
113
115
</el-col >
114
- <el-col :xl =" 8" :lg =" 8" :md =" 24" :sm =" 24" :xs =" 24" class =" mb-10px " >
116
+ <el-col :xl =" 8" :lg =" 8" :md =" 24" :sm =" 24" :xs =" 24" class =" mb-8px " >
115
117
<el-card shadow =" never" >
116
118
<template #header >
117
119
<div class =" h-3 flex justify-between" >
120
122
</template >
121
123
<el-skeleton :loading =" loading" animated >
122
124
<el-row >
123
- <el-col v-for =" item in shortcut" :key =" `team-${item.name}`" :span =" 8" class =" mb-10px " >
125
+ <el-col v-for =" item in shortcut" :key =" `team-${item.name}`" :span =" 8" class =" mb-8px " >
124
126
<div class =" flex items-center" >
125
- <Icon :icon =" item.icon" class =" mr-10px " />
127
+ <Icon :icon =" item.icon" class =" mr-8px " />
126
128
<el-link type =" default" :underline =" false" @click =" setWatermark(item.name)" >
127
129
{{ item.name }}
128
130
</el-link >
131
133
</el-row >
132
134
</el-skeleton >
133
135
</el-card >
134
- <el-card shadow =" never" class =" mt-10px " >
136
+ <el-card shadow =" never" class =" mt-8px " >
135
137
<template #header >
136
138
<div class =" h-3 flex justify-between" >
137
139
<span >{{ t('workplace.notice') }}</span >
141
143
<el-skeleton :loading =" loading" animated >
142
144
<div v-for =" (item, index) in notice" :key =" `dynamics-${index}`" >
143
145
<div class =" flex items-center" >
144
- <img :src =" avatar" alt =" " class =" mr-20px h-35px w-35px rounded-[50%]" />
146
+ <el-avatar :src =" avatar" :size =" 35" class =" mr-16px" >
147
+ <img src =" @/assets/imgs/avatar.gif" alt =" " />
148
+ </el-avatar >
145
149
<div >
146
150
<div class =" text-14px" >
147
151
<Highlight :keys =" item.keys.map((v) => t(v))" >
148
152
{{ item.type }} : {{ item.title }}
149
153
</Highlight >
150
154
</div >
151
- <div class =" mt-15px text-12px text-gray-400" >
155
+ <div class =" mt-16px text-12px text-gray-400" >
152
156
{{ formatTime(item.date, 'yyyy-MM-dd') }}
153
157
</div >
154
158
</div >
@@ -167,7 +171,6 @@ import { formatTime } from '@/utils'
167
171
168
172
import { useUserStore } from ' @/store/modules/user'
169
173
import { useWatermark } from ' @/hooks/web/useWatermark'
170
- import avatarImg from ' @/assets/imgs/avatar.gif'
171
174
import type { WorkplaceTotal , Project , Notice , Shortcut } from ' ./types'
172
175
import { pieOptions , barOptions } from ' ./echarts-data'
173
176
@@ -177,7 +180,7 @@ const { t } = useI18n()
177
180
const userStore = useUserStore ()
178
181
const { setWatermark } = useWatermark ()
179
182
const loading = ref (true )
180
- const avatar = userStore .getUser .avatar ? userStore . getUser . avatar : avatarImg
183
+ const avatar = userStore .getUser .avatar
181
184
const username = userStore .getUser .nickname
182
185
const pieOptionsData = reactive <EChartsOption >(pieOptions ) as EChartsOption
183
186
// 获取统计数
0 commit comments