提交 64035e41 authored 作者: matian's avatar matian

update:分页修改

上级 83a92229
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
</div> </div>
<el-pagination <el-pagination
class="table-list-pagination" class="table-list-pagination"
layout="total, prev, pager, next, sizes, jumper" :layout="pagationLayout"
:page-sizes="[10, 20, 30, 50, 100]" :page-sizes="[10, 20, 30, 50, 100]"
:page-size="page.size" :page-size="page.size"
:total="page.total" :total="page.total"
...@@ -101,7 +101,8 @@ export default { ...@@ -101,7 +101,8 @@ export default {
// 是否含有翻页 // 是否含有翻页
hasPagination: { type: Boolean, default: true }, hasPagination: { type: Boolean, default: true },
// 每页多少条数据 // 每页多少条数据
limit: { type: Number, default: 20 } limit: { type: Number, default: 20 },
pagationLayout: { type: String, default: 'total, prev, pager, next, sizes, jumper' }
}, },
data() { data() {
return { return {
......
...@@ -38,7 +38,8 @@ export default { ...@@ -38,7 +38,8 @@ export default {
{ label: '主观题', prop: 'objective', align: 'center', sortable: 'custom', minWidth: 100 }, { label: '主观题', prop: 'objective', align: 'center', sortable: 'custom', minWidth: 100 },
{ label: '总分', prop: 'score', align: 'center', sortable: 'custom' }, { label: '总分', prop: 'score', align: 'center', sortable: 'custom' },
{ label: '操作', slots: 'table_operate', align: 'center' } { label: '操作', slots: 'table_operate', align: 'center' }
] ],
pagationLayout: 'prev, pager, next'
} }
} }
}, },
......
...@@ -27,11 +27,11 @@ ...@@ -27,11 +27,11 @@
</div> </div>
<app-list v-bind="tableOptions" ref="list" @sort-change="sortChange"> <app-list v-bind="tableOptions" ref="list" @sort-change="sortChange">
<template v-slot:title="{ row }"> <template v-slot:title="{ row }">
<el-button <a
type="text" type="text"
style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis" style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #c01540"
@click="toDetail" @click="toDetail"
>{{ row.title }}</el-button >{{ row.title }}</a
> >
</template> </template>
</app-list> </app-list>
...@@ -43,7 +43,7 @@ import { getTitleList, exportTitleList } from '../api' ...@@ -43,7 +43,7 @@ import { getTitleList, exportTitleList } from '../api'
export default { export default {
data() { data() {
return { return {
value: 1, value: '',
conditionList: { conditionList: {
examList: [], examList: [],
courseList: [] courseList: []
...@@ -114,10 +114,11 @@ export default { ...@@ -114,10 +114,11 @@ export default {
} }
} }
}, },
{ label: '正确率', prop: 'rate', align: 'center', sortable: 'custom' }, { label: '正确率', prop: 'rate', align: 'center', minWidth: 150, sortable: 'custom' },
{ label: '总分', prop: 'total_score', align: 'center' }, { label: '总分', prop: 'total_score', align: 'center' },
{ label: '平均得分', prop: 'average', align: 'center', sortable: 'custom' } { label: '平均得分', prop: 'average', align: 'center', sortable: 'custom', minWidth: 150 }
] ],
pagationLayout: 'prev, pager, next'
} }
} }
}, },
...@@ -174,7 +175,26 @@ export default { ...@@ -174,7 +175,26 @@ export default {
question_id: row.question_id question_id: row.question_id
} }
}) })
},
refetch() {
this.$refs.list.refetch()
} }
} }
} }
</script> </script>
<style lang="scss" scoped>
::v-deep .table-list-filter {
display: none;
}
::v-deep {
.el-table {
th {
padding: 0;
}
td {
padding: 0;
height: 46px;
}
}
}
</style>
<template> <template>
<div> <div>
<div style="font-size: 32px; margin-bottom: 15px">测试班级一</div> <div style="font-size: 32px; margin-bottom: 15px">{{ $route.query.examination_name }}</div>
<app-card> <app-card>
<h1 class="title" style="font-size: 28px">班级排名</h1> <h1 class="title" style="font-size: 28px">班级排名</h1>
<el-button type="text" style="float: right; margin-top: -40px" @click="exportClassList">导出</el-button> <el-button type="text" style="float: right; margin-top: -40px" @click="exportClassList">导出</el-button>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
pdf-content-width="100%" pdf-content-width="100%"
ref="html2Pdf" ref="html2Pdf"
> >
<section slot="pdf-content"> <section slot="pdf-content" :key="value">
<div class="container"> <div class="container">
<el-row type="flex" class="row-bg" justify="space-between" style="margin-bottom: 30px"> <el-row type="flex" class="row-bg" justify="space-between" style="margin-bottom: 30px">
<el-col <el-col
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
</h1> </h1>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<el-select v-model="value" placeholder="请选择" @change="refreshPage"> <el-select v-model="value" placeholder="全部数据" @change="refreshPage">
<el-option v-for="item in dataInfo.class_map" :key="item.id" :label="item.name" :value="item.id"> <el-option v-for="item in dataInfo.class_map" :key="item.id" :label="item.name" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
...@@ -42,7 +42,6 @@ ...@@ -42,7 +42,6 @@
:chapter_id="$route.query.chapter_id" :chapter_id="$route.query.chapter_id"
:type="$route.query.type" :type="$route.query.type"
:dataInfo="dataInfo.need_check_num" :dataInfo="dataInfo.need_check_num"
ref="scoreRankingRef"
:classValue="value" :classValue="value"
/></el-col> /></el-col>
<el-col :span="11" <el-col :span="11"
...@@ -52,7 +51,6 @@ ...@@ -52,7 +51,6 @@
:chapter_id="$route.query.chapter_id" :chapter_id="$route.query.chapter_id"
:type="$route.query.type" :type="$route.query.type"
:dataInfo="dataInfo.need_check_num" :dataInfo="dataInfo.need_check_num"
ref="titleDataRef"
:classValue="value" :classValue="value"
/></el-col> /></el-col>
</el-row> </el-row>
...@@ -82,7 +80,7 @@ export default { ...@@ -82,7 +80,7 @@ export default {
components: { VueHtml2pdf, ExamInfo, Submission, Score, ScoreRanking, TitleData, Result, ScoreRange, QuestionType }, components: { VueHtml2pdf, ExamInfo, Submission, Score, ScoreRanking, TitleData, Result, ScoreRange, QuestionType },
data() { data() {
return { return {
value: '001', value: '',
dataInfo: { dataInfo: {
need_check_num: '' need_check_num: ''
} }
...@@ -95,8 +93,8 @@ export default { ...@@ -95,8 +93,8 @@ export default {
methods: { methods: {
refreshPage() { refreshPage() {
this.getExamDataInfo() this.getExamDataInfo()
this.$refs.scoreRankingRef.getScoreRanking() // this.$refs.scoreRankingRef.getScoreRanking()
this.$refs.titleDataRef.getTitleList() // this.$refs.titleDataRef.refetch()
}, },
getExamDataInfo() { getExamDataInfo() {
const params = { const params = {
......
...@@ -83,8 +83,8 @@ export default { ...@@ -83,8 +83,8 @@ export default {
query: { query: {
course_id: row.course_id, course_id: row.course_id,
chapter_id: row.chapter_id, chapter_id: row.chapter_id,
type: 'chapter' type: 'chapter',
// examination_name: row.examination_name examination_name: row.examination_name
} }
}) })
}, },
...@@ -94,7 +94,8 @@ export default { ...@@ -94,7 +94,8 @@ export default {
query: { query: {
course_id: row.course_id, course_id: row.course_id,
chapter_id: row.chapter_id, chapter_id: row.chapter_id,
type: 'chapter' type: 'chapter',
examination_name: row.examination_name
} }
}) })
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论