提交 ce6e62e2 authored 作者: matian's avatar matian

bug修复

上级 c4774539
...@@ -101,7 +101,7 @@ export default { ...@@ -101,7 +101,7 @@ export default {
// 是否含有翻页 // 是否含有翻页
hasPagination: { type: Boolean, default: true }, hasPagination: { type: Boolean, default: true },
// 每页多少条数据 // 每页多少条数据
limit: { type: Number, default: 10 }, limit: { type: Number, default: 20 },
pagationLayout: { type: String, default: 'total, prev, pager, next, sizes, jumper' } pagationLayout: { type: String, default: 'total, prev, pager, next, sizes, jumper' }
}, },
data() { data() {
......
...@@ -82,6 +82,15 @@ export function getClassDetail(params) { ...@@ -82,6 +82,15 @@ export function getClassDetail(params) {
params params
}) })
} }
/**
* 获取班级详情
*/
export function exportClassDetail(params) {
return httpRequest.get('/api/zy/v3-teacher/statistics/class-details', {
params,
responseType: 'blob'
})
}
/** /**
* 考试数据-看板(题目数据) * 考试数据-看板(题目数据)
*/ */
......
...@@ -52,7 +52,8 @@ export default { ...@@ -52,7 +52,8 @@ export default {
{ 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' pagationLayout: 'prev, pager, next',
limit: 10
} }
} }
}, },
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</div> </div>
<template #header-aside> <template #header-aside>
<el-button type="text" size="mini" @click="toExamData(row)">导出</el-button> <el-button type="text" size="mini" @click="exportClassDetail">导出</el-button>
</template> </template>
<!-- 操作 --> <!-- 操作 -->
<template v-slot:table-operate="{ row }"> <template v-slot:table-operate="{ row }">
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
</template> </template>
<script> <script>
import { getClassDetail } from '../api' import { getClassDetail, exportClassDetail } from '../api'
export default { export default {
data() { data() {
return { return {
...@@ -43,7 +43,7 @@ export default { ...@@ -43,7 +43,7 @@ export default {
queryInfo: { queryInfo: {
query: '', query: '',
pagenum: 1, pagenum: 1,
pagesize: 10 pagesize: 20
} }
} }
}, },
...@@ -152,6 +152,32 @@ export default { ...@@ -152,6 +152,32 @@ export default {
this.tableOptions.remote.params.sort = columns.prop this.tableOptions.remote.params.sort = columns.prop
} }
this.$refs.list.refetch() this.$refs.list.refetch()
},
// 导出
exportClassDetail() {
const params = {
type: this.$route.query.type,
course_id: this.$route.query.course_id,
examination_id: this.$route.query.examination_id,
chapter_id: this.$route.query.chapter_id,
class_id: this.$route.query.class_id,
status: this.$route.query.status,
download: 'true'
}
exportClassDetail(params).then(r => {
const content = r
const blob = new Blob([content], { type: 'application/vnd.ms-excel' })
if ('download' in document.createElement('a')) {
const elink = document.createElement('a')
elink.download = '班级数据.xlsx'
elink.style.display = 'none'
elink.href = URL.createObjectURL(blob)
document.body.appendChild(elink)
elink.click()
URL.revokeObjectURL(elink.href)
document.body.removeChild(elink)
}
})
} }
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论