| | |
| | | size="small" |
| | | @click="handlerEdit(scope.row)" |
| | | v-if="scope.row.status === 'not_start'" |
| | | v-show="scope.row.status !== 'cancel'" |
| | | >修改 |
| | | </el-button> |
| | | <el-popconfirm |
| | | v-if="scope.row.status === 'not_start'" |
| | | v-show="scope.row.status !== 'cancel'" |
| | | style="margin: 0 5px" |
| | | title="确定要删除该考试吗?" |
| | | @confirm="deleteExam(scope.row.id)" |
| | | > |
| | | <el-button slot="reference" type="danger" size="small">删除</el-button> |
| | | <el-button slot="reference" type="danger" size="small" v-show="scope.row.status !== 'cancel'">删除</el-button> |
| | | </el-popconfirm> |
| | | |
| | | <el-button v-if="scope.row.status === 'finished'" type="success" size="small" @click="markPaper(scope.row)"> |
| | | <el-button v-if="scope.row.status === 'finished'" type="success" size="small" @click="markPaper(scope.row)" v-show="scope.row.status !== 'cancel'"> |
| | | 阅卷 |
| | | </el-button> |
| | | <el-button v-if="scope.row.status === 'ing'" type="warning" size="small" @click="monitor(scope.row)">监控</el-button> |
| | | <el-button v-if="scope.row.status === 'ing'" type="warning" size="small" @click="monitor(scope.row)" v-show="scope.row.status !== 'cancel'">监控</el-button> |
| | | <el-popconfirm |
| | | class="confirm" |
| | | style="margin: 0 5px" |
| | | title="确定要作废该考试记录吗?" |
| | | @confirm="cancel(scope.row.id)" |
| | | > |
| | | <el-button slot="reference" v-show="scope.row.status !== 'cancel'" type="danger" |
| | | size="small" |
| | | v-if="scope.row.status !== 'ing'">作废 |
| | | </el-button> |
| | | </el-popconfirm> |
| | | <el-popconfirm |
| | | class="confirm" |
| | | title="确定要恢复该考试记录吗?" |
| | | @confirm="recover(scope.row.id)" |
| | | > |
| | | <el-button slot="reference" v-show="scope.row.status === 'cancel'" type="success" |
| | | size="small">恢复正常 |
| | | </el-button> |
| | | </el-popconfirm> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | |
| | | <script> |
| | | import Pagination from '@/components/Pagination' |
| | | import { getExams, addExam, editExam, deleteExamById } from '@/api/exam' |
| | | import { myClasses } from '@/api/classes' |
| | | import { getExams, addExam, editExam, deleteExamById, cancel, recover } from '@/api/exam' |
| | | import examPaperAPI from '@/api/examPaper' |
| | | |
| | | export default { |
| | |
| | | this.MyExamPaperList() |
| | | }, |
| | | methods: { |
| | | // 作废考试 |
| | | cancel (id) { |
| | | cancel(id).then(res => { |
| | | this.$message.success(res.data.message) |
| | | this.page() |
| | | }) |
| | | }, |
| | | // 恢复考试 |
| | | recover (id) { |
| | | recover(id).then(res => { |
| | | this.$message.success(res.data.message) |
| | | this.page() |
| | | }) |
| | | }, |
| | | // 考试监控列表 |
| | | monitor (row) { |
| | | this.$router.push({ path: '/exam/monitor', query: { examId: row.id } }) |
| | |
| | | return '未开始' |
| | | } else if (row.status === 'finished') { |
| | | return '已结束' |
| | | } else if (row.status === 'cancel') { |
| | | return '已作废' |
| | | } |
| | | }, |
| | | MyExamPaperList () { |