| | |
| | | @click="resetQuery()" |
| | | >重置</el-button> |
| | | </div> |
| | | <el-table v-loading="loading" :data="expertList"> |
| | | <el-table v-loading="loading" :data="expertList" show-summary :summary-method="getSummaries"> |
| | | <el-table-column label="平台" align="center" prop="institutionName" /> |
| | | <el-table-column label="培训总人数" align="center" prop="studentCount" /> |
| | | <el-table-column label="培训学时达标人数" align="center" prop="finishCount" /> |
| | | <el-table-column label="学时合格率" align="center" prop="classHourRate" /> |
| | | <el-table-column label="考试总人数" align="center" prop="eaxmStudentCount" /> |
| | | <el-table-column label="考试合格人数" align="center" prop="passCount" /> |
| | | <el-table-column label="自测考试总人数" align="center" prop="eaxmStudentCount" /> |
| | | <el-table-column label="自测考试合格人数" align="center" prop="passCount" /> |
| | | <el-table-column label="考试合格率" align="center" prop="passRate"> |
| | | <template #default="scope"> |
| | | <span>{{scope.row.passRate}}%</span> |
| | |
| | | this.time = [] |
| | | this.getList() |
| | | }, |
| | | handleAdd(){ |
| | | |
| | | getSummaries(param) { |
| | | const { columns, data } = param |
| | | const sums = []; |
| | | columns.forEach((column, index) => { |
| | | if (index === 0) { |
| | | sums[index] = '总计'; |
| | | return |
| | | } |
| | | if (index === columns.length - 1) { |
| | | sums[index] = '--'; |
| | | return |
| | | } |
| | | const values = data.map(item => Number(item[column.property])) |
| | | if (!values.every(value => isNaN(value))) { |
| | | sums[index] = values.reduce((prev, curr) => { |
| | | const value = Number(curr); |
| | | if (!isNaN(value)) { |
| | | return prev + curr; |
| | | } else { |
| | | return prev; |
| | | } |
| | | }, 0) |
| | | } else { |
| | | sums[index] = '--'; |
| | | } |
| | | }) |
| | | return sums; |
| | | } |
| | | } |
| | | }; |