优化前端显示字样

This commit was merged in pull request #53.
This commit is contained in:
2026-07-26 16:20:52 +08:00
parent c2f11727fe
commit dc68581c5e
2 changed files with 9 additions and 9 deletions
@@ -47,7 +47,7 @@
</view> </view>
<view class="perf-item" @click="showFormula('attendance')"> <view class="perf-item" @click="showFormula('attendance')">
<text class="perf-number">{{ performance.attendanceRate != null ? performance.attendanceRate + '%' : 'N/A' }}</text> <text class="perf-number">{{ performance.attendanceRate != null ? performance.attendanceRate + '%' : 'N/A' }}</text>
<text class="perf-label">出勤率 </text> <text class="perf-label">学员出勤率 </text>
<view v-if="performance.attendanceRate != null" class="perf-bar-wrap"> <view v-if="performance.attendanceRate != null" class="perf-bar-wrap">
<view class="perf-bar" :style="attendanceBarStyle"></view> <view class="perf-bar" :style="attendanceBarStyle"></view>
</view> </view>
@@ -230,17 +230,17 @@
showFormula(type) { showFormula(type) {
if (type === 'attendance') { if (type === 'attendance') {
this.formulaTitle = '出勤率计算方式' this.formulaTitle = '学员出勤率计算方式'
this.formulaContent = '出勤率 = 出席人次 ÷ 非取消预约总数 × 100%' this.formulaContent = '学员出勤率 = 出席人次 ÷ 预约总数 × 100%'
this.formulaExample = '示例:本月有 10 人预约了你的课程,其中 2 人取消预约,8 人中实际出席 7 人\n\n出勤率 = 7 ÷ (10 - 2) × 100% = 87.5%' this.formulaExample = '示例:本月有 10 人预约了你的课程,实际出席 7 人\n\n学员出勤率 = 7 ÷ 10 × 100% = 70%'
} else if (type === 'fullness') { } else if (type === 'fullness') {
this.formulaTitle = '满员率计算方式' this.formulaTitle = '满员率计算方式'
this.formulaContent = '满员率 = 各课程(出席人数 ÷ 课程最大容量)的平均值 × 100%' this.formulaContent = '满员率 = 各课程(出席人数 ÷ 课程最大容量)的平均值 × 100%'
this.formulaExample = '示例:本月你完成了 2 节课\n- 课程 A:容量 20 人,实际出席 12 人 → 60%\n- 课程 B:容量 15 人,实际出席 9 人 → 60%\n\n满员率 = (60% + 60%) ÷ 2 = 60%' this.formulaExample = '示例:本月你完成了 2 节课\n- 课程 A:容量 20 人,实际出席 12 人 → 60%\n- 课程 B:容量 15 人,实际出席 9 人 → 60%\n\n满员率 = (60% + 60%) ÷ 2 = 60%'
} else if (type === 'composite') { } else if (type === 'composite') {
this.formulaTitle = '综合评分计算方式' this.formulaTitle = '综合评分计算方式'
this.formulaContent = '综合评分 = 授课量评分 × 40% + 出勤率评分 × 30% + 满员率评分 × 30%' this.formulaContent = '综合评分 = 授课量评分 × 35% + 学员出勤率评分 × 25% + 满员率评分 × 25% + 违规评分 × 15%'
this.formulaExample = '计算步骤:\n1. 授课量归一化:你的授课量 ÷ 全部教练最高授课量 × 100\n2. 出勤率与满员率各取实际百分值\n3. 加权求和\n\n示例:\n授课量评分 80 × 0.4 = 32\n出勤率 85 × 0.3 = 25.5\n满员率 60 × 0.3 = 18\n\n综合评分 = 32 + 25.5 + 18 = 75.5' this.formulaExample = '计算步骤:\n1. 授课量百分位排名归一化:你的授课量排名 / (总教练数-1) × 100\n2. 学员出勤率与满员率各取实际百分值\n3. 违规分:max(0, 100 - 违规次数 × 20)\n4. 加权求和\n\n示例:\n授课量评分 80 × 0.35 = 28\n学员出勤率 85 × 0.25 = 21.25\n满员率 60 × 0.25 = 15\n违规分 80 × 0.15 = 12\n\n综合评分 = 28 + 21.25 + 15 + 12 = 76.25'
} }
this.formulaVisible = true this.formulaVisible = true
}, },
@@ -131,7 +131,7 @@
<el-col :xs="16" :sm="8"> <el-col :xs="16" :sm="8">
<div class="rate-group"> <div class="rate-group">
<div class="rate-item"> <div class="rate-item">
<span class="rate-label">出勤率</span> <span class="rate-label">学员出勤率</span>
<el-progress <el-progress
:percentage="Number(summary?.bookingStatistics?.attendanceRate ?? 0)" :percentage="Number(summary?.bookingStatistics?.attendanceRate ?? 0)"
:stroke-width="12" :stroke-width="12"
@@ -265,7 +265,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="completedCourses" label="授课量" width="90" sortable /> <el-table-column prop="completedCourses" label="授课量" width="90" sortable />
<el-table-column prop="attendedStudents" label="出席人次" width="100" sortable /> <el-table-column prop="attendedStudents" label="出席人次" width="100" sortable />
<el-table-column prop="attendanceRate" label="出勤率" width="90" sortable> <el-table-column prop="attendanceRate" label="学员出勤率" width="90" sortable>
<template #default="{ row }"> <template #default="{ row }">
<span :style="{ color: rateColor(row.attendanceRate) }">{{ row.attendanceRate }}%</span> <span :style="{ color: rateColor(row.attendanceRate) }">{{ row.attendanceRate }}%</span>
</template> </template>
@@ -314,7 +314,7 @@
<el-descriptions v-if="selectedCoach" :column="2" border> <el-descriptions v-if="selectedCoach" :column="2" border>
<el-descriptions-item label="授课量">{{ selectedCoach.completedCourses }} </el-descriptions-item> <el-descriptions-item label="授课量">{{ selectedCoach.completedCourses }} </el-descriptions-item>
<el-descriptions-item label="出席人次">{{ selectedCoach.attendedStudents }} 人次</el-descriptions-item> <el-descriptions-item label="出席人次">{{ selectedCoach.attendedStudents }} 人次</el-descriptions-item>
<el-descriptions-item label="出勤率"> <el-descriptions-item label="学员出勤率">
<span :style="{ color: rateColor(selectedCoach.attendanceRate) }">{{ selectedCoach.attendanceRate }}%</span> <span :style="{ color: rateColor(selectedCoach.attendanceRate) }">{{ selectedCoach.attendanceRate }}%</span>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="满员率"> <el-descriptions-item label="满员率">