Commit 435fe1c348fac415c8d1e79195d54c69793b34b2
1 parent
e1f34014
refactor: improve code readability in storeDashboard component
- Reformatted template code for better alignment and readability. - Ensured consistent spacing in Vue template expressions for clarity.
Showing
1 changed file
with
18 additions
and
9 deletions
antis-ncc-admin/src/views/extend/storeDashboard/index.vue
| @@ -182,7 +182,8 @@ | @@ -182,7 +182,8 @@ | ||
| 182 | <el-table :data="topBillingItems" size="small" border stripe> | 182 | <el-table :data="topBillingItems" size="small" border stripe> |
| 183 | <el-table-column type="index" label="排名" width="60" align="center"> | 183 | <el-table-column type="index" label="排名" width="60" align="center"> |
| 184 | <template slot-scope="scope"> | 184 | <template slot-scope="scope"> |
| 185 | - <el-tag v-if="scope.$index < 3" :type="['danger', 'warning', 'success'][scope.$index]" size="mini"> | 185 | + <el-tag v-if="scope.$index < 3" |
| 186 | + :type="['danger', 'warning', 'success'][scope.$index]" size="mini"> | ||
| 186 | {{ scope.$index + 1 }} | 187 | {{ scope.$index + 1 }} |
| 187 | </el-tag> | 188 | </el-tag> |
| 188 | <span v-else>{{ scope.$index + 1 }}</span> | 189 | <span v-else>{{ scope.$index + 1 }}</span> |
| @@ -191,13 +192,15 @@ | @@ -191,13 +192,15 @@ | ||
| 191 | <el-table-column prop="itemName" label="品项名称" min-width="180" /> | 192 | <el-table-column prop="itemName" label="品项名称" min-width="180" /> |
| 192 | <el-table-column prop="billingAmount" label="开单金额" width="140" align="right"> | 193 | <el-table-column prop="billingAmount" label="开单金额" width="140" align="right"> |
| 193 | <template slot-scope="scope"> | 194 | <template slot-scope="scope"> |
| 194 | - <span style="font-weight: 600; color: #67C23A;">¥{{ formatMoney(scope.row.billingAmount) }}</span> | 195 | + <span style="font-weight: 600; color: #67C23A;">¥{{ |
| 196 | + formatMoney(scope.row.billingAmount) }}</span> | ||
| 195 | </template> | 197 | </template> |
| 196 | </el-table-column> | 198 | </el-table-column> |
| 197 | <el-table-column prop="billingCount" label="开单次数" width="100" align="center" /> | 199 | <el-table-column prop="billingCount" label="开单次数" width="100" align="center" /> |
| 198 | <el-table-column prop="category" label="分类" width="80" align="center"> | 200 | <el-table-column prop="category" label="分类" width="80" align="center"> |
| 199 | <template slot-scope="scope"> | 201 | <template slot-scope="scope"> |
| 200 | - <el-tag size="mini" :type="getCategoryType(scope.row.category)">{{ scope.row.category }}</el-tag> | 202 | + <el-tag size="mini" :type="getCategoryType(scope.row.category)">{{ |
| 203 | + scope.row.category }}</el-tag> | ||
| 201 | </template> | 204 | </template> |
| 202 | </el-table-column> | 205 | </el-table-column> |
| 203 | </el-table> | 206 | </el-table> |
| @@ -217,13 +220,16 @@ | @@ -217,13 +220,16 @@ | ||
| 217 | <el-table-column type="index" label="排名" width="60" align="center" /> | 220 | <el-table-column type="index" label="排名" width="60" align="center" /> |
| 218 | <el-table-column prop="name" label="健康师姓名" min-width="120" /> | 221 | <el-table-column prop="name" label="健康师姓名" min-width="120" /> |
| 219 | <el-table-column prop="billingPerformance" label="开单业绩" width="120" align="right"> | 222 | <el-table-column prop="billingPerformance" label="开单业绩" width="120" align="right"> |
| 220 | - <template slot-scope="scope">¥{{ formatMoney(scope.row.billingPerformance) }}</template> | 223 | + <template slot-scope="scope">¥{{ formatMoney(scope.row.billingPerformance) |
| 224 | + }}</template> | ||
| 221 | </el-table-column> | 225 | </el-table-column> |
| 222 | <el-table-column prop="consumePerformance" label="消耗业绩" width="120" align="right"> | 226 | <el-table-column prop="consumePerformance" label="消耗业绩" width="120" align="right"> |
| 223 | - <template slot-scope="scope">¥{{ formatMoney(scope.row.consumePerformance) }}</template> | 227 | + <template slot-scope="scope">¥{{ formatMoney(scope.row.consumePerformance) |
| 228 | + }}</template> | ||
| 224 | </el-table-column> | 229 | </el-table-column> |
| 225 | <el-table-column prop="totalPerformance" label="总业绩" width="120" align="right"> | 230 | <el-table-column prop="totalPerformance" label="总业绩" width="120" align="right"> |
| 226 | - <template slot-scope="scope">¥{{ formatMoney(scope.row.totalPerformance) }}</template> | 231 | + <template slot-scope="scope">¥{{ formatMoney(scope.row.totalPerformance) |
| 232 | + }}</template> | ||
| 227 | </el-table-column> | 233 | </el-table-column> |
| 228 | </el-table> | 234 | </el-table> |
| 229 | </el-card> | 235 | </el-card> |
| @@ -239,7 +245,8 @@ | @@ -239,7 +245,8 @@ | ||
| 239 | <el-table-column prop="itemName" label="品项名称" min-width="150" /> | 245 | <el-table-column prop="itemName" label="品项名称" min-width="150" /> |
| 240 | <el-table-column prop="consumeAmount" label="消耗金额" width="120" align="right"> | 246 | <el-table-column prop="consumeAmount" label="消耗金额" width="120" align="right"> |
| 241 | <template slot-scope="scope"> | 247 | <template slot-scope="scope"> |
| 242 | - <span style="font-weight: 600; color: #409EFF;">¥{{ formatMoney(scope.row.consumeAmount) }}</span> | 248 | + <span style="font-weight: 600; color: #409EFF;">¥{{ |
| 249 | + formatMoney(scope.row.consumeAmount) }}</span> | ||
| 243 | </template> | 250 | </template> |
| 244 | </el-table-column> | 251 | </el-table-column> |
| 245 | <el-table-column prop="category" label="分类" width="80" /> | 252 | <el-table-column prop="category" label="分类" width="80" /> |
| @@ -340,7 +347,8 @@ | @@ -340,7 +347,8 @@ | ||
| 340 | <span class="rank-number">{{ comparison.performanceRanking }}</span> | 347 | <span class="rank-number">{{ comparison.performanceRanking }}</span> |
| 341 | <span class="rank-total">/ {{ comparison.totalStoreCount }}</span> | 348 | <span class="rank-total">/ {{ comparison.totalStoreCount }}</span> |
| 342 | </div> | 349 | </div> |
| 343 | - <div class="ranking-badge" :class="getRankingClass(comparison.performanceRanking, comparison.totalStoreCount)"> | 350 | + <div class="ranking-badge" |
| 351 | + :class="getRankingClass(comparison.performanceRanking, comparison.totalStoreCount)"> | ||
| 344 | {{ getRankingText(comparison.performanceRanking, comparison.totalStoreCount) }} | 352 | {{ getRankingText(comparison.performanceRanking, comparison.totalStoreCount) }} |
| 345 | </div> | 353 | </div> |
| 346 | </div> | 354 | </div> |
| @@ -410,7 +418,8 @@ | @@ -410,7 +418,8 @@ | ||
| 410 | <span class="progress-label">{{ metric.label }}</span> | 418 | <span class="progress-label">{{ metric.label }}</span> |
| 411 | <span class="progress-value">{{ metric.value }}%</span> | 419 | <span class="progress-value">{{ metric.value }}%</span> |
| 412 | </div> | 420 | </div> |
| 413 | - <el-progress :percentage="metric.value" :color="metric.color" :stroke-width="8"></el-progress> | 421 | + <el-progress :percentage="metric.value" :color="metric.color" |
| 422 | + :stroke-width="8"></el-progress> | ||
| 414 | </div> | 423 | </div> |
| 415 | </div> | 424 | </div> |
| 416 | </el-card> | 425 | </el-card> |