| | |
| | | <el-table-column label="操作" align="center" width="160px"> |
| | | <template slot-scope="{row}"> |
| | | <el-button size="mini" @click="$router.push({ path: '/exam/paper/edit', query: { id: row.id } })">编辑</el-button> |
| | | <el-button size="mini" type="danger" @click="deletePaper(row)" class="link-left">删除</el-button> |
| | | <el-popconfirm |
| | | style="margin: 0 5px" |
| | | title="确定要删除该试卷吗?" |
| | | @confirm="deletePaper(row)" |
| | | > |
| | | <el-button slot="reference" type="danger" size="mini" class="link-left">删除</el-button> |
| | | </el-popconfirm> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | import subjectApi from '@/api/subject' |
| | | import examPaperApi from '@/api/examPaper' |
| | | import { downloadExcel } from '@/utils/download' |
| | | import userApi from "@/api/user"; |
| | | |
| | | export default { |
| | | components: { Pagination }, |
| | |
| | | this.listLoading = false |
| | | }) |
| | | }, |
| | | deletePaper(row) { |
| | | let _this = this |
| | | examPaperApi.deletePaper(row.id).then(re => { |
| | | if (re.code === 1) { |
| | | _this.search() |
| | | _this.$message.success(re.message) |
| | | } else { |
| | | _this.$message.error(re.message) |
| | | } |
| | | deletePaper (row) { |
| | | this.$confirm('此操作将永久删除该成员, 是否继续?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | let _this = this |
| | | examPaperApi.deletePaper(row.id).then(re => { |
| | | if (re.code === 1) { |
| | | _this.search() |
| | | _this.$message.success(re.message) |
| | | } else { |
| | | _this.$message.error(re.message) |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | // 获取科目 |