Commit fa8461fc5f8c99703a682877777e5e0b1c7b2cf8

Authored by fengwotao
1 parent e691733a

pref: 调整首页头部四个表格位置

@@ -2,36 +2,68 @@ @@ -2,36 +2,68 @@
2 <div> 2 <div>
3 <!-- 首页基础信息 --> 3 <!-- 首页基础信息 -->
4 <div class="md:flex"> 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 <div class="flex" style="height: 100px"> 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 style="width: 5.625rem; height: 5.625rem" 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 <div class="flex-auto"> 24 <div class="flex-auto">
13 <div class="flex justify-between" style="align-items: center"> 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 <CountTo 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 </div> 42 </div>
21 <Tooltip> 43 <Tooltip>
22 <template #title> 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 </template> 54 </template>
26 <img src="/src/assets/images/tip.png" style="width: 1.125rem; height: 1.125rem" /> 55 <img src="/src/assets/images/tip.png" style="width: 1.125rem; height: 1.125rem" />
27 </Tooltip> 56 </Tooltip>
28 </div> 57 </div>
29 - <div> 设备数 </div> 58 + <div> {{ !isAdmin(role) ? `产品数` : '产品数' }}</div>
30 </div> 59 </div>
31 </div> 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 </Card> 67 </Card>
36 <Card size="small" class="md:w-1/3 w-full !md:mt-0 !mt-4 !md:mr-4" style="color: #666"> 68 <Card size="small" class="md:w-1/3 w-full !md:mt-0 !mt-4 !md:mr-4" style="color: #666">
37 <div class="flex" style="height: 100px"> 69 <div class="flex" style="height: 100px">
@@ -70,7 +102,7 @@ @@ -70,7 +102,7 @@
70 growCardList?.alarmInfo?.todayAdd 102 growCardList?.alarmInfo?.todayAdd
71 )}` 103 )}`
72 : `租户总量:${growCardList?.tenantInfo?.sumCount} 今日新增 ${toThousands( 104 : `租户总量:${growCardList?.tenantInfo?.sumCount} 今日新增 ${toThousands(
73 - growCardList?.alarmInfo?.todayAdd 105 + growCardList?.tenantInfo?.todayAdd
74 )}` 106 )}`
75 }} 107 }}
76 </template> 108 </template>
@@ -104,8 +136,8 @@ @@ -104,8 +136,8 @@
104 style="font-size: 1.625rem; color: #333; font-weight: bold" 136 style="font-size: 1.625rem; color: #333; font-weight: bold"
105 > 137 >
106 <CountTo 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 <CountTo v-else :end-val="0" /> 142 <CountTo v-else :end-val="0" />
111 </div> 143 </div>
@@ -120,89 +152,57 @@ @@ -120,89 +152,57 @@
120 <template #title> 152 <template #title>
121 {{ 153 {{
122 !isAdmin(role) 154 !isAdmin(role)
123 - ? `消息数:${growCardList?.messageInfo?.messageCount} 今日新增 ${toThousands( 155 + ? `今日消息数:${
124 growCardList?.messageInfo?.todayMessageAdd 156 growCardList?.messageInfo?.todayMessageAdd
125 - )}` 157 + } 近30日新增 ${toThousands(growCardList?.messageInfo?.messageCount)}`
126 : `客户总量:${growCardList?.customerInfo?.sumCount} 今日新增 ${toThousands( 158 : `客户总量:${growCardList?.customerInfo?.sumCount} 今日新增 ${toThousands(
127 - growCardList?.messageInfo?.todayMessageAdd 159 + growCardList?.customerInfo?.todayAdd
128 )}` 160 )}`
129 }} 161 }}
130 </template> 162 </template>
131 <img src="/src/assets/images/tip.png" style="width: 1.125rem; height: 1.125rem" /> 163 <img src="/src/assets/images/tip.png" style="width: 1.125rem; height: 1.125rem" />
132 </Tooltip> 164 </Tooltip>
133 </div> 165 </div>
134 - <div> {{ !isAdmin(role) ? `消息数` : '客户总量' }}</div> 166 + <div> {{ !isAdmin(role) ? `今日消息数` : '客户总量' }}</div>
135 </div> 167 </div>
136 </div> 168 </div>
137 <div v-if="!isAdmin(role)" class="ml-2 pt-4" style="border-top: 2px solid #f0f2f5"> 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 <div v-else class="ml-2 pt-4" style="border-top: 2px solid #f0f2f5"> 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 </Card> 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 <div class="flex" style="height: 100px"> 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 style="width: 5.625rem; height: 5.625rem" 181 style="width: 5.625rem; height: 5.625rem"
161 - />  
162 - </div> 182 + /></div>
163 <div class="flex-auto"> 183 <div class="flex-auto">
164 <div class="flex justify-between" style="align-items: center"> 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 <CountTo 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 </div> 191 </div>
182 <Tooltip> 192 <Tooltip>
183 <template #title> 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 </template> 196 </template>
194 <img src="/src/assets/images/tip.png" style="width: 1.125rem; height: 1.125rem" /> 197 <img src="/src/assets/images/tip.png" style="width: 1.125rem; height: 1.125rem" />
195 </Tooltip> 198 </Tooltip>
196 </div> 199 </div>
197 - <div> {{ !isAdmin(role) ? `产品数` : '产品数' }}</div> 200 + <div> 设备数 </div>
198 </div> 201 </div>
199 </div> 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 </Card> 206 </Card>
207 </div> 207 </div>
208 <!-- 首页饼图 --> 208 <!-- 首页饼图 -->