提交 95e322d2 authored 作者: matian's avatar matian

班级数据列表平均分低于及格线标红

上级 7097b2fc
<template> <template>
<app-container> <app-container>
<app-list v-bind="tableOptions" ref="list" @sort-change="sortChange"> <app-list v-bind="tableOptions" ref="list" @sort-change="sortChange" :row-class-name="scoreRow">
<template v-slot:paper_title="{ row }"> <template v-slot:paper_title="{ row }">
<div :class="`paper-title active${row.ranking}`" v-if="tabActive === '2' || tabActive === '1'"> <div :class="`paper-title active${row.ranking}`" v-if="tabActive === '2' || tabActive === '1'">
{{ row.ranking }} {{ row.ranking }}
...@@ -26,6 +26,9 @@ export default { ...@@ -26,6 +26,9 @@ export default {
return {} return {}
}, },
props: { props: {
pass_score: {
type: Number
},
tabActive: { tabActive: {
type: String, type: String,
default: '' default: ''
...@@ -63,7 +66,17 @@ export default { ...@@ -63,7 +66,17 @@ export default {
} }
} }
}, },
methods: { methods: {
scoreRow(row, index) {
console.log(row, 'fjgdj')
console.log(this.pass_count)
if (row.row.total_average < this.pass_score) {
return 'warning-row'
} else {
return ''
}
},
toPersonal(row) { toPersonal(row) {
this.$router.push({ this.$router.push({
path: path:
...@@ -127,5 +140,8 @@ export default { ...@@ -127,5 +140,8 @@ export default {
height: 41px; height: 41px;
} }
} }
.warning-row {
color: #c01540;
}
} }
</style> </style>
...@@ -11,7 +11,13 @@ ...@@ -11,7 +11,13 @@
<el-tab-pane :label="`待评价${count.commit_count}`" name="toEvaluate" lazy> </el-tab-pane> <el-tab-pane :label="`待评价${count.commit_count}`" name="toEvaluate" lazy> </el-tab-pane>
<el-tab-pane :label="`未作答${count.cache_count}`" name="noAnswer" lazy> </el-tab-pane> <el-tab-pane :label="`未作答${count.cache_count}`" name="noAnswer" lazy> </el-tab-pane>
<!-- <el-tab-pane :label="`未提交${count.cache_count}`" name="toSubmit" lazy> </el-tab-pane> --> <!-- <el-tab-pane :label="`未提交${count.cache_count}`" name="toSubmit" lazy> </el-tab-pane> -->
<Finished :paramList="paramList" :tabActive="tabStatus" :key="tabStatus" @resCount="handleResCount" /> <Finished
:paramList="paramList"
:tabActive="tabStatus"
:key="tabStatus"
@resCount="handleResCount"
:pass_score="count.pass_score"
/>
</el-tabs> </el-tabs>
</app-card> </app-card>
</div> </div>
...@@ -36,7 +42,8 @@ export default { ...@@ -36,7 +42,8 @@ export default {
checked_count: 0, checked_count: 0,
commit_count: 0, commit_count: 0,
no_sheet_count: 0, no_sheet_count: 0,
cache_count: 0 cache_count: 0,
pass_score: 0
} }
} }
}, },
...@@ -56,6 +63,7 @@ export default { ...@@ -56,6 +63,7 @@ export default {
}, },
methods: { methods: {
handleResCount(val) { handleResCount(val) {
console.log(val, '---val')
this.count = val this.count = val
}, },
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论