提交 fde65a36 authored 作者: 王鹏飞's avatar 王鹏飞

chore: update

上级 a79b34bd
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<div class="operate-btn"> <div class="operate-btn">
<el-button type="primary" icon="el-icon-plus" @click="$router.push({ path: '/question/create' })" v-permission="'question_create'">新建试题</el-button> <el-button type="primary" icon="el-icon-plus" @click="$router.push({ path: '/question/create' })" v-permission="'question_create'">新建试题</el-button>
<el-button type="primary" icon="el-icon-upload2" @click="importDialogVisible = true" v-permission="'question_import'">批量导入试题</el-button> <el-button type="primary" icon="el-icon-upload2" @click="importDialogVisible = true" v-permission="'question_import'">批量导入试题</el-button>
<el-button type="primary" icon="el-icon-download" @click="handleExport"> 批量导出试题 </el-button> <el-button type="primary" icon="el-icon-download" :loading="exportLoading" @click="handleExport">批量导出试题</el-button>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-delete" icon="el-icon-delete"
...@@ -54,7 +54,8 @@ export default { ...@@ -54,7 +54,8 @@ export default {
filterRadio: 1, // 题库筛选 filterRadio: 1, // 题库筛选
filterInput: '', // tree回显内容 filterInput: '', // tree回显内容
defaultProps: '', defaultProps: '',
params: {} params: {},
exportLoading: false
} }
}, },
computed: { computed: {
...@@ -207,9 +208,14 @@ export default { ...@@ -207,9 +208,14 @@ export default {
}, },
// 导出试题 // 导出试题
handleExport() { handleExport() {
exportQuestion(this.params).then(res => { this.exportLoading = true
saveAs(res, 'export.xlsx') exportQuestion(this.params)
}) .then(res => {
saveAs(res, 'export.xlsx')
})
.finally(() => {
this.exportLoading = false
})
} }
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论