Showing
1 changed file
with
71 additions
and
71 deletions
... | ... | @@ -2,36 +2,68 @@ |
2 | 2 | <div> |
3 | 3 | <!-- 首页基础信息 --> |
4 | 4 | <div class="md:flex"> |
5 | - <Card size="small" class="md:w-1/3 w-full !md:mt-0 !mt-4 !md:mr-4" style="color: #666"> | |
5 | + <Card | |
6 | + v-if="!isAdmin(role)" | |
7 | + size="small" | |
8 | + class="md:w-1/3 w-full !md:mt-0 !mt-4 !md:mr-4" | |
9 | + style="color: #666" | |
10 | + > | |
6 | 11 | <div class="flex" style="height: 100px"> |
7 | - <div class="mr-4" | |
8 | - ><img | |
9 | - src="/src/assets/images/device-count.png" | |
12 | + <div class="mr-4"> | |
13 | + <img | |
14 | + v-if="!isAdmin(role)" | |
15 | + src="/src/assets/images/product.png" | |
10 | 16 | style="width: 5.625rem; height: 5.625rem" |
11 | - /></div> | |
17 | + /> | |
18 | + <img | |
19 | + v-else | |
20 | + src="/src/assets/images/product.png" | |
21 | + style="width: 5.625rem; height: 5.625rem" | |
22 | + /> | |
23 | + </div> | |
12 | 24 | <div class="flex-auto"> |
13 | 25 | <div class="flex justify-between" style="align-items: center"> |
14 | - <div style="font-size: 1.625rem; color: #333; font-weight: bold"> | |
26 | + <div | |
27 | + v-if="!isAdmin(role)" | |
28 | + style="font-size: 1.625rem; color: #333; font-weight: bold" | |
29 | + > | |
15 | 30 | <CountTo |
16 | - v-if="growCardList?.deviceInfo?.sumCount" | |
17 | - :endVal="growCardList.deviceInfo.sumCount" | |
31 | + v-if="growCardList?.productInfo?.sumCount" | |
32 | + :end-val="growCardList.productInfo.sumCount" | |
18 | 33 | /> |
19 | - <CountTo v-else :endVal="0" /> | |
34 | + <CountTo v-else :end-val="0" /> | |
35 | + </div> | |
36 | + <div style="font-size: 1.625rem; color: #333; font-weight: bold" v-else> | |
37 | + <CountTo | |
38 | + v-if="growCardList?.productInfo?.sumCount" | |
39 | + :end-val="growCardList.productInfo?.sumCount" | |
40 | + /> | |
41 | + <CountTo v-else :end-val="0" /> | |
20 | 42 | </div> |
21 | 43 | <Tooltip> |
22 | 44 | <template #title> |
23 | - 设备数 : {{ growCardList?.deviceInfo.sumCount }} 今日新增 | |
24 | - {{ toThousands(growCardList?.deviceInfo?.todayAdd) }} | |
45 | + {{ | |
46 | + !isAdmin(role) | |
47 | + ? `产品数:${growCardList?.productInfo?.sumCount} 今日新增 ${toThousands( | |
48 | + growCardList?.productInfo?.todayAdd | |
49 | + )}` | |
50 | + : `产品数:${growCardList?.customerInfo?.sumCount} 今日新增 ${toThousands( | |
51 | + growCardList?.productInfo?.todayAdd | |
52 | + )}` | |
53 | + }} | |
25 | 54 | </template> |
26 | 55 | <img src="/src/assets/images/tip.png" style="width: 1.125rem; height: 1.125rem" /> |
27 | 56 | </Tooltip> |
28 | 57 | </div> |
29 | - <div> 设备数 </div> | |
58 | + <div> {{ !isAdmin(role) ? `产品数` : '产品数' }}</div> | |
30 | 59 | </div> |
31 | 60 | </div> |
32 | - <div class="ml-2 pt-4" style="border-top: 2px solid #f0f2f5"> | |
33 | - 今日新增 {{ toThousands(growCardList?.deviceInfo?.todayAdd) }} | |
34 | - </div> | |
61 | + <div v-if="!isAdmin(role)" class="ml-2 pt-4" style="border-top: 2px solid #f0f2f5"> | |
62 | + 今日新增 {{ toThousands(growCardList?.productInfo?.todayAdd) }}</div | |
63 | + > | |
64 | + <div v-else class="ml-2 pt-4" style="border-top: 2px solid #f0f2f5"> | |
65 | + 今日新增 {{ toThousands(growCardList?.productInfo?.todayAdd) }}</div | |
66 | + > | |
35 | 67 | </Card> |
36 | 68 | <Card size="small" class="md:w-1/3 w-full !md:mt-0 !mt-4 !md:mr-4" style="color: #666"> |
37 | 69 | <div class="flex" style="height: 100px"> |
... | ... | @@ -70,7 +102,7 @@ |
70 | 102 | growCardList?.alarmInfo?.todayAdd |
71 | 103 | )}` |
72 | 104 | : `租户总量:${growCardList?.tenantInfo?.sumCount} 今日新增 ${toThousands( |
73 | - growCardList?.alarmInfo?.todayAdd | |
105 | + growCardList?.tenantInfo?.todayAdd | |
74 | 106 | )}` |
75 | 107 | }} |
76 | 108 | </template> |
... | ... | @@ -104,8 +136,8 @@ |
104 | 136 | style="font-size: 1.625rem; color: #333; font-weight: bold" |
105 | 137 | > |
106 | 138 | <CountTo |
107 | - v-if="growCardList?.messageInfo?.messageCount" | |
108 | - :end-val="growCardList.messageInfo.messageCount" | |
139 | + v-if="growCardList?.messageInfo?.todayMessageAdd" | |
140 | + :end-val="growCardList.messageInfo.todayMessageAdd" | |
109 | 141 | /> |
110 | 142 | <CountTo v-else :end-val="0" /> |
111 | 143 | </div> |
... | ... | @@ -120,89 +152,57 @@ |
120 | 152 | <template #title> |
121 | 153 | {{ |
122 | 154 | !isAdmin(role) |
123 | - ? `消息数:${growCardList?.messageInfo?.messageCount} 今日新增 ${toThousands( | |
155 | + ? `今日消息数:${ | |
124 | 156 | growCardList?.messageInfo?.todayMessageAdd |
125 | - )}` | |
157 | + } 近30日新增 ${toThousands(growCardList?.messageInfo?.messageCount)}` | |
126 | 158 | : `客户总量:${growCardList?.customerInfo?.sumCount} 今日新增 ${toThousands( |
127 | - growCardList?.messageInfo?.todayMessageAdd | |
159 | + growCardList?.customerInfo?.todayAdd | |
128 | 160 | )}` |
129 | 161 | }} |
130 | 162 | </template> |
131 | 163 | <img src="/src/assets/images/tip.png" style="width: 1.125rem; height: 1.125rem" /> |
132 | 164 | </Tooltip> |
133 | 165 | </div> |
134 | - <div> {{ !isAdmin(role) ? `消息数` : '客户总量' }}</div> | |
166 | + <div> {{ !isAdmin(role) ? `今日消息数` : '客户总量' }}</div> | |
135 | 167 | </div> |
136 | 168 | </div> |
137 | 169 | <div v-if="!isAdmin(role)" class="ml-2 pt-4" style="border-top: 2px solid #f0f2f5"> |
138 | - 今日新增 {{ toThousands(growCardList?.messageInfo?.todayMessageAdd) }}</div | |
170 | + 近30日新增 {{ toThousands(growCardList?.messageInfo?.messageCount) }}</div | |
139 | 171 | > |
140 | 172 | <div v-else class="ml-2 pt-4" style="border-top: 2px solid #f0f2f5"> |
141 | - 今日新增 {{ toThousands(growCardList?.customerInfo?.todayAdd) }}</div | |
173 | + 近30日新增 {{ toThousands(growCardList?.customerInfo?.todayAdd) }}</div | |
142 | 174 | > |
143 | 175 | </Card> |
144 | - <Card | |
145 | - v-if="!isAdmin(role)" | |
146 | - size="small" | |
147 | - class="md:w-1/3 w-full !md:mt-0 !mt-4 !md:ml-4" | |
148 | - style="color: #666" | |
149 | - > | |
176 | + <Card size="small" class="md:w-1/3 w-full !md:mt-0 !mt-4 !md:ml-4" style="color: #666"> | |
150 | 177 | <div class="flex" style="height: 100px"> |
151 | - <div class="mr-4"> | |
152 | - <img | |
153 | - v-if="!isAdmin(role)" | |
154 | - src="/src/assets/images/product.png" | |
155 | - style="width: 5.625rem; height: 5.625rem" | |
156 | - /> | |
157 | - <img | |
158 | - v-else | |
159 | - src="/src/assets/images/product.png" | |
178 | + <div class="mr-4" | |
179 | + ><img | |
180 | + src="/src/assets/images/device-count.png" | |
160 | 181 | style="width: 5.625rem; height: 5.625rem" |
161 | - /> | |
162 | - </div> | |
182 | + /></div> | |
163 | 183 | <div class="flex-auto"> |
164 | 184 | <div class="flex justify-between" style="align-items: center"> |
165 | - <div | |
166 | - v-if="!isAdmin(role)" | |
167 | - style="font-size: 1.625rem; color: #333; font-weight: bold" | |
168 | - > | |
169 | - <CountTo | |
170 | - v-if="growCardList?.productInfo?.sumCount" | |
171 | - :end-val="growCardList.productInfo.sumCount" | |
172 | - /> | |
173 | - <CountTo v-else :end-val="0" /> | |
174 | - </div> | |
175 | - <div style="font-size: 1.625rem; color: #333; font-weight: bold" v-else> | |
185 | + <div style="font-size: 1.625rem; color: #333; font-weight: bold"> | |
176 | 186 | <CountTo |
177 | - v-if="growCardList?.productInfo?.sumCount" | |
178 | - :end-val="growCardList.productInfo?.sumCount" | |
187 | + v-if="growCardList?.deviceInfo?.sumCount" | |
188 | + :endVal="growCardList.deviceInfo.sumCount" | |
179 | 189 | /> |
180 | - <CountTo v-else :end-val="0" /> | |
190 | + <CountTo v-else :endVal="0" /> | |
181 | 191 | </div> |
182 | 192 | <Tooltip> |
183 | 193 | <template #title> |
184 | - {{ | |
185 | - !isAdmin(role) | |
186 | - ? `产品数:${growCardList?.productInfo?.sumCount} 今日新增 ${toThousands( | |
187 | - growCardList?.productInfo?.todayAdd | |
188 | - )}` | |
189 | - : `产品数:${growCardList?.customerInfo?.sumCount} 今日新增 ${toThousands( | |
190 | - growCardList?.productInfo?.todayAdd | |
191 | - )}` | |
192 | - }} | |
194 | + 设备数 : {{ growCardList?.deviceInfo.sumCount }} 今日新增 | |
195 | + {{ toThousands(growCardList?.deviceInfo?.todayAdd) }} | |
193 | 196 | </template> |
194 | 197 | <img src="/src/assets/images/tip.png" style="width: 1.125rem; height: 1.125rem" /> |
195 | 198 | </Tooltip> |
196 | 199 | </div> |
197 | - <div> {{ !isAdmin(role) ? `产品数` : '产品数' }}</div> | |
200 | + <div> 设备数 </div> | |
198 | 201 | </div> |
199 | 202 | </div> |
200 | - <div v-if="!isAdmin(role)" class="ml-2 pt-4" style="border-top: 2px solid #f0f2f5"> | |
201 | - 今日新增 {{ toThousands(growCardList?.productInfo?.todayAdd) }}</div | |
202 | - > | |
203 | - <div v-else class="ml-2 pt-4" style="border-top: 2px solid #f0f2f5"> | |
204 | - 今日新增 {{ toThousands(growCardList?.productInfo?.todayAdd) }}</div | |
205 | - > | |
203 | + <div class="ml-2 pt-4" style="border-top: 2px solid #f0f2f5"> | |
204 | + 今日新增 {{ toThousands(growCardList?.deviceInfo?.todayAdd) }} | |
205 | + </div> | |
206 | 206 | </Card> |
207 | 207 | </div> |
208 | 208 | <!-- 首页饼图 --> | ... | ... |