| | |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <div style="display: flex"> |
| | | <el-button type="primary" @click="submitForm">查询</el-button> |
| | | <el-popover placement="bottom" trigger="click"> |
| | | <el-button class="op-item" type="primary" @click="submitForm">查询</el-button> |
| | | <el-popover class="op-item" placement="bottom" trigger="click"> |
| | | <el-button type="warning" size="mini" v-for="item in editUrlEnum" :key="item.key" |
| | | @click="$router.push({path:item.value})">{{item.name}} |
| | | </el-button> |
| | | <el-button slot="reference" type="primary" class="link-left">添加</el-button> |
| | | <el-button slot="reference" type="primary">添加</el-button> |
| | | |
| | | </el-popover> |
| | | <el-button class="op-item" type="danger" @click="downloadImportTemplate">下载导入模板</el-button> |
| | | <el-upload |
| | | class="upload-demo" |
| | | class="op-item" |
| | | :action="upLoadUrl" |
| | | :with-credentials="true" |
| | | :on-success="handlePreview" |
| | |
| | | import Pagination from '@/components/Pagination' |
| | | import QuestionShow from './components/Show' |
| | | import questionApi from '@/api/question' |
| | | import store from '@/store' |
| | | import {downloadExcel} from '@/utils/download' |
| | | |
| | | import Cookies from 'js-cookie' |
| | | export default { |
| | |
| | | this.subjectFilter = this.subjects |
| | | }, |
| | | methods: { |
| | | // 下载导入模板 |
| | | downloadImportTemplate () { |
| | | questionApi.downloadImportTemplate().then(res => { |
| | | downloadExcel(res, '题目导出') |
| | | }) |
| | | }, |
| | | handlePreview(e){ |
| | | console.log(e) |
| | | if (e.code==1){ |
| | | if (e.code === 1) { |
| | | this.search() |
| | | this.$message.success(e.message) |
| | | }else { |
| | |
| | | } |
| | | </script> |
| | | <style scoped lang="scss"> |
| | | .op-item { |
| | | margin-left: 5px; |
| | | } |
| | | .upload-demo{ |
| | | margin-left: 5px; |
| | | } |