Commit e88ddd9234cf3de4464abe3d5f3433145c0d266c
1 parent
07bb99d4
随堂问多课时学生问答 总参与度以及总正确率班名调整
Showing
1 changed file
with
30 additions
and
30 deletions
src/views/basic/ask/components/answerQustion.vue
| @@ -248,7 +248,7 @@ export default { | @@ -248,7 +248,7 @@ export default { | ||
| 248 | if (this.tableData.length) { | 248 | if (this.tableData.length) { |
| 249 | let optionsList = []; | 249 | let optionsList = []; |
| 250 | let subjectName = []; | 250 | let subjectName = []; |
| 251 | - let rank = {}; | 251 | + // let rank = {}; |
| 252 | resultData = this.tableData.map((item) => { | 252 | resultData = this.tableData.map((item) => { |
| 253 | let params = {}; | 253 | let params = {}; |
| 254 | 254 | ||
| @@ -280,38 +280,38 @@ export default { | @@ -280,38 +280,38 @@ export default { | ||
| 280 | params["questionNum" + items.subjectName] = items.questionNum; | 280 | params["questionNum" + items.subjectName] = items.questionNum; |
| 281 | }); | 281 | }); |
| 282 | } | 282 | } |
| 283 | - if (this.types != 3) { | ||
| 284 | - let participationRateArr = []; | ||
| 285 | - let correctRateArr = []; | ||
| 286 | - this.tableData.map((item) => { | ||
| 287 | - participationRateArr.push(item.participationRate); | ||
| 288 | - correctRateArr.push(item.correctRate); | ||
| 289 | - }); | ||
| 290 | - participationRateArr = [...new Set(participationRateArr)]; | ||
| 291 | - participationRateArr = participationRateArr.sort((a, b) => { | ||
| 292 | - return b - a; | ||
| 293 | - }); | ||
| 294 | - correctRateArr = [...new Set(correctRateArr)]; | ||
| 295 | - correctRateArr = correctRateArr.sort((a, b) => { | ||
| 296 | - return b - a; | ||
| 297 | - }); | ||
| 298 | - let participationRateRank = participationRateArr.findIndex( | ||
| 299 | - (value) => { | ||
| 300 | - return item.participationRate == value; | ||
| 301 | - } | ||
| 302 | - ); | ||
| 303 | - let correctRateRank = correctRateArr.findIndex((value) => { | ||
| 304 | - return item.correctRate == value; | ||
| 305 | - }); | ||
| 306 | - rank = { | ||
| 307 | - participationRateRank: participationRateRank + 1, | ||
| 308 | - correctRateRank: correctRateRank + 1, | ||
| 309 | - }; | ||
| 310 | - } | 283 | + // if (this.types != 3) { |
| 284 | + // let participationRateArr = []; | ||
| 285 | + // let correctRateArr = []; | ||
| 286 | + // this.tableData.map((item) => { | ||
| 287 | + // participationRateArr.push(item.participationRate); | ||
| 288 | + // correctRateArr.push(item.correctRate); | ||
| 289 | + // }); | ||
| 290 | + // participationRateArr = [...new Set(participationRateArr)]; | ||
| 291 | + // participationRateArr = participationRateArr.sort((a, b) => { | ||
| 292 | + // return b - a; | ||
| 293 | + // }); | ||
| 294 | + // correctRateArr = [...new Set(correctRateArr)]; | ||
| 295 | + // correctRateArr = correctRateArr.sort((a, b) => { | ||
| 296 | + // return b - a; | ||
| 297 | + // }); | ||
| 298 | + // let participationRateRank = participationRateArr.findIndex( | ||
| 299 | + // (value) => { | ||
| 300 | + // return item.participationRate == value; | ||
| 301 | + // } | ||
| 302 | + // ); | ||
| 303 | + // let correctRateRank = correctRateArr.findIndex((value) => { | ||
| 304 | + // return item.correctRate == value; | ||
| 305 | + // }); | ||
| 306 | + // rank = { | ||
| 307 | + // participationRateRank: participationRateRank + 1, | ||
| 308 | + // correctRateRank: correctRateRank + 1, | ||
| 309 | + // }; | ||
| 310 | + // } | ||
| 311 | return { | 311 | return { |
| 312 | ...item, | 312 | ...item, |
| 313 | ...params, | 313 | ...params, |
| 314 | - ...rank, | 314 | + // ...rank, |
| 315 | }; | 315 | }; |
| 316 | }); | 316 | }); |
| 317 | this.phaseOption = [...subjectName]; | 317 | this.phaseOption = [...subjectName]; |