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

update:分页修改

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