| | |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // 考试记录作废 |
| | | export const cancel = (id) => { |
| | | return axios({ |
| | | url: '/api/admin/exam/cancel/' + id, |
| | | method: 'PUT' |
| | | }) |
| | | } |
| | | |
| | | // 考试记录恢复 |
| | | export const recover = (id) => { |
| | | return axios({ |
| | | url: "/api/admin/exam/recover/" + id, |
| | | method: "PUT" |
| | | }) |
| | | } |
| | |
| | | <template> |
| | | <div class="sidebar-logo-container" :class="{'collapse':collapse}"> |
| | | <transition name="sidebarLogoFade"> |
| | | <router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/"> |
| | | <router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/dashboard"> |
| | | <img src="@/assets/logo.png" class="sidebar-logo"> |
| | | <h1 class="sidebar-title">{{ title }} </h1> |
| | | </router-link> |
| | | <router-link v-else key="expand" class="sidebar-logo-link" to="/"> |
| | | <router-link v-else key="expand" class="sidebar-logo-link" to="/dashboard"> |
| | | <img src="@/assets/logo.png" class="sidebar-logo"> |
| | | <h1 class="sidebar-title">{{ title }} </h1> |
| | | </router-link> |
| | |
| | | this.page() |
| | | }) |
| | | }, |
| | | recover(id) { |
| | | recover (id) { |
| | | recover(id).then(res => { |
| | | this.$message.success(res.data.message) |
| | | this.page() |
| | |
| | | </el-form> |
| | | <div> |
| | | <el-button type="primary" @click="handlerAdd" size="small">添加</el-button> |
| | | <el-button type="danger" @click="batchRemove" size="small" style="margin-left: 5px">删除</el-button> |
| | | <el-popconfirm title="确认批量删除吗?" @confirm="batchRemove"> |
| | | <el-button slot="reference" type="danger" size="small" style="margin-left: 5px">删除</el-button> |
| | | </el-popconfirm> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | 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 () { |
| | |
| | | <div class="app-container"> |
| | | <el-form :model="queryParam" ref="queryForm" :inline="true"> |
| | | <el-form-item> |
| | | <el-input v-model="queryParam.keyword" placeholder="请输入名称" clearable></el-input> |
| | | <el-input v-model="queryParam.keyword" placeholder="请输入名称" @input="search" clearable></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="search">查询</el-button> |
| | | <el-button type="primary" @click="search" size="small">查询</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | |
| | | <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) |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | // 获取科目 |
| | |
| | | <div class="button-container"> |
| | | <el-button v-if="item.status!==2" @click="start(item)" type="primary" size="small">开始上课</el-button> |
| | | <el-button @click="handleUpdate(item)" type="warning" size="small">编辑</el-button> |
| | | <el-button @click="remove(item)" type="danger" size="small">删除</el-button> |
| | | <el-popconfirm |
| | | style="margin: 0 5px" |
| | | title="确定要删除该培训吗?" |
| | | @confirm="remove(item)" |
| | | > |
| | | <el-button slot="reference" type="danger" size="small" >删除</el-button> |
| | | </el-popconfirm> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | |
| | | |
| | | <script> |
| | | |
| | | import examPaperApi from "@/api/examPaper"; |
| | | |
| | | export default { |
| | | props: { |
| | | tableData: [] |
| | |
| | | this.$emit('handleUpdate', item) |
| | | }, |
| | | remove (item) { |
| | | this.$emit('remove', item) |
| | | this.$confirm('此操作将永久删除该成员, 是否继续?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.$emit('remove', item) |
| | | }) |
| | | }, |
| | | start (item) { |
| | | this.$emit('start', item) |
| | |
| | | <router-link :to="{path:'/log/user/list', query:{userId:row.id}}" class="link-left"> |
| | | <el-button size="mini" >日志</el-button> |
| | | </router-link> |
| | | <el-button size="mini" type="danger" @click="deleteUser(row)" class="link-left">删除</el-button> |
| | | <el-popconfirm |
| | | style="margin: 0 5px" |
| | | title="确定要删除该成员吗?" |
| | | @confirm="deleteUser(row)" |
| | | > |
| | | <el-button slot="reference" type="danger" size="mini">删除</el-button> |
| | | </el-popconfirm> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | }) |
| | | }, |
| | | deleteUser (row) { |
| | | let _this = this |
| | | userApi.deleteUser(row.id).then(re => { |
| | | if (re.code === 1) { |
| | | _this.search() |
| | | _this.$message.success(re.message) |
| | | } else { |
| | | _this.$message.error(re.message) |
| | | } |
| | | this.$confirm('此操作将永久删除该成员, 是否继续?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | let _this = this |
| | | userApi.deleteUser(row.id).then(re => { |
| | | if (re.code === 1) { |
| | | _this.search() |
| | | _this.$message.success(re.message) |
| | | } else { |
| | | _this.$message.error(re.message) |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | submitForm () { |