提交 7dd45f36 authored 作者: matian's avatar matian

bug修复

上级 dc605c4a
...@@ -2,7 +2,12 @@ ...@@ -2,7 +2,12 @@
<app-container> <app-container>
<app-list v-bind="tableOptions" ref="list" @sort-change="sortChange"> <app-list v-bind="tableOptions" ref="list" @sort-change="sortChange">
<template v-slot:paper_title="{ row }"> <template v-slot:paper_title="{ row }">
<div :class="`paper-title active${row.ranking}`">{{ row.ranking }}</div> <div :class="`paper-title active${row.ranking}`" v-if="tabActive === '2' || tabActive === '1'">
{{ row.ranking }}
</div>
<div v-else>
{{ row.ranking }}
</div>
</template> </template>
<template v-slot:table-name="{ row }"> <template v-slot:table-name="{ row }">
<el-button type="text" @click="toPersonal(row)" v-if="tabActive === '2' || tabActive === '1'">{{ <el-button type="text" @click="toPersonal(row)" v-if="tabActive === '2' || tabActive === '1'">{{
......
<template> <template>
<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}`">{{ row.ranking }}</div> <div :class="`paper-title active${row.ranking}`" v-if="tabActive === '2' || tabActive === '1'">
{{ row.ranking }}
</div>
<div v-else>
{{ row.ranking }}
</div>
</template> </template>
<template v-slot:table_operate="{ row }"> <template v-slot:table_operate="{ row }">
<el-button type="text" @click="toDetail(row)" v-if="tabActive === '2'">查看</el-button> <el-button type="text" @click="toDetail(row)" v-if="tabActive === '2'">查看</el-button>
...@@ -25,6 +30,9 @@ export default { ...@@ -25,6 +30,9 @@ export default {
scoreRanking: { scoreRanking: {
type: Object, type: Object,
default: () => {} default: () => {}
},
pass_score: {
type: Number
} }
}, },
computed: { computed: {
...@@ -58,7 +66,18 @@ export default { ...@@ -58,7 +66,18 @@ export default {
// }) // })
} }
}, },
mounted() {
console.log(this.pass_score, '----')
},
methods: { methods: {
scoreRow(row, index) {
console.log(row, 'ffff')
if (row.row.score < this.pass_score) {
return 'warning-row'
} else {
return ''
}
},
toDetail(data) { toDetail(data) {
this.$router.push({ this.$router.push({
path: path:
...@@ -135,4 +154,7 @@ export default { ...@@ -135,4 +154,7 @@ export default {
::v-deep .table-list-filter { ::v-deep .table-list-filter {
display: none; display: none;
} }
::v-deep .warning-row {
color: #c01540;
}
</style> </style>
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
type="text" type="text"
style="font-size: 16px; color: #aa1941; float: right; margin-top: -30px" style="font-size: 16px; color: #aa1941; float: right; margin-top: -30px"
@click="exportScore" @click="exportScore"
:disabled="(count.list.length = 0)"
>导出</el-button >导出</el-button
> >
</div> </div>
...@@ -16,7 +17,13 @@ ...@@ -16,7 +17,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.no_sheet_count}`" name="noAnswer" lazy> </el-tab-pane> <el-tab-pane :label="`未作答${count.no_sheet_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>
<RankingAll :tabActive="tabStatus" :scoreRanking="scoreRanking" @resCount="handleResCount" :key="tabStatus" /> <RankingAll
:tabActive="tabStatus"
:scoreRanking="scoreRanking"
@resCount="handleResCount"
:key="tabStatus"
:pass_score="pass_score"
/>
</el-tabs> </el-tabs>
</el-card> </el-card>
</template> </template>
...@@ -47,6 +54,9 @@ export default { ...@@ -47,6 +54,9 @@ export default {
type: { type: {
type: String, type: String,
default: '' default: ''
},
pass_score: {
type: Number
} }
}, },
data() { data() {
...@@ -63,7 +73,8 @@ export default { ...@@ -63,7 +73,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,
list: []
} }
} }
}, },
...@@ -84,6 +95,7 @@ export default { ...@@ -84,6 +95,7 @@ export default {
methods: { methods: {
handleResCount(val) { handleResCount(val) {
this.count = val this.count = val
console.log(this.count.list.length, '123')
}, },
// 导出 // 导出
exportScore() { exportScore() {
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
type="text" type="text"
style="font-size: 16px; color: #aa1941; float: right; margin-top: -30px" style="font-size: 16px; color: #aa1941; float: right; margin-top: -30px"
@click="exportTitleData" @click="exportTitleData"
:disabled="listArr.length === 0"
>导出</el-button >导出</el-button
> >
</div> </div>
...@@ -44,6 +45,7 @@ import { getTitleList, exportTitleList } from '../api' ...@@ -44,6 +45,7 @@ import { getTitleList, exportTitleList } from '../api'
export default { export default {
data() { data() {
return { return {
listArr: '',
value: '', value: '',
conditionList: { conditionList: {
examList: [], examList: [],
...@@ -81,6 +83,7 @@ export default { ...@@ -81,6 +83,7 @@ export default {
remote: { remote: {
beforeRequest: this.beforeRequest, beforeRequest: this.beforeRequest,
httpRequest: getTitleList, httpRequest: getTitleList,
callback: this.callback,
params: { params: {
type: this.type, type: this.type,
course_id: this.course_id, course_id: this.course_id,
...@@ -143,6 +146,10 @@ export default { ...@@ -143,6 +146,10 @@ export default {
params.class_id = this.classValue params.class_id = this.classValue
return params return params
}, },
callback(val) {
this.listArr = val.list
return this.listArr
},
changeSeclect() { changeSeclect() {
this.$refs.list.refetch() this.$refs.list.refetch()
}, },
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
:type="$route.query.type" :type="$route.query.type"
:dataInfo="dataInfo.need_check_num" :dataInfo="dataInfo.need_check_num"
:classValue="value" :classValue="value"
:pass_score="dataInfo.paper_info.pass_score"
/></el-col> /></el-col>
<el-col :span="11" <el-col :span="11"
><TitleData ><TitleData
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论