Merge branch 'master' into dev
# Conflicts:
# src/views/exam/exam/ExamManage.vue
# vue.config.js
New file |
| | |
| | | import axios from "./request"; |
| | | |
| | | // 获取作弊记录分页 |
| | | export const getCheatRecords = (params) => { |
| | | return axios({ |
| | | url: "/api/cheat-record/page", |
| | | method: "GET", |
| | | params: params |
| | | }) |
| | | } |
| | | |
| | | // 获取作弊记录列表 |
| | | export const getCheatRecordList = () => { |
| | | return axios({ |
| | | url: "/api/cheat-record/list", |
| | | method: "GET" |
| | | }) |
| | | } |
| | | |
| | | // 通过id获取作弊记录 |
| | | export const getCheatRecordById = (params) => { |
| | | return axios({ |
| | | url: "/api/cheat-record/" + params, |
| | | method: "GET" |
| | | }) |
| | | } |
| | | |
| | | // 通过id删除作弊记录 |
| | | export const deleteCheatRecordById = (params) => { |
| | | return axios({ |
| | | url: "/api/cheat-record/" + params, |
| | | method: "DELETE" |
| | | }) |
| | | } |
| | | |
| | | // 批量删除作弊记录 |
| | | export const deleteCheatRecordByIds = (params) => { |
| | | return axios({ |
| | | url: "/api/cheat-record/batch", |
| | | method: "DELETE", |
| | | data: params |
| | | }) |
| | | } |
| | | |
| | | // 修改作弊记录 |
| | | export const editCheatRecord = (params) => { |
| | | return axios({ |
| | | url: "/api/cheat-record/", |
| | | method: "PUT", |
| | | data: params |
| | | }) |
| | | } |
| | | |
| | | // 添加作弊记录 |
| | | export const addCheatRecord = (params) => { |
| | | return axios({ |
| | | url: "/api/cheat-record/", |
| | | method: "POST", |
| | | data: params |
| | | }) |
| | | } |
| | |
| | | data: params |
| | | }) |
| | | } |
| | | |
| | | // 班级恢复正常 |
| | | export const recover = (id) => { |
| | | return axios({ |
| | | url: "/api/admin/classes/recover/" + id, |
| | | method: "PUT" |
| | | }) |
| | | } |
| | |
| | | <el-button v-if="scope.row.status !== '解散'" @click="studentManager(scope.row.id)" size="small" |
| | | type="success">成员管理 |
| | | </el-button> |
| | | <el-button v-if="scope.row.status !== '解散'" @click="dissolution(scope.row.id)" type="danger" |
| | | size="small">解散 |
| | | </el-button> |
| | | <el-popconfirm |
| | | class="confirm" |
| | | title="确定要解散该班级?" |
| | | @confirm="dissolution(scope.row.id)" |
| | | > |
| | | <el-button slot="reference" v-if="scope.row.status !== '解散'" type="danger" |
| | | size="small">解散 |
| | | </el-button> |
| | | </el-popconfirm> |
| | | <el-popconfirm |
| | | class="confirm" |
| | | title="确定要恢复该班级吗?" |
| | | @confirm="recover(scope.row.id)" |
| | | > |
| | | <el-button slot="reference" v-if="scope.row.status === '解散'" type="success" |
| | | size="small">恢复正常 |
| | | </el-button> |
| | | </el-popconfirm> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { addClasses, editClasses, getClassess, dissolution } from '@/api/classes' |
| | | import { addClasses, editClasses, getClassess, dissolution, recover } from '@/api/classes' |
| | | import { addClassesNotify } from '@/api/classesNotify' |
| | | import Pagination from '@/components/Pagination' |
| | | |
| | |
| | | this.page() |
| | | }) |
| | | }, |
| | | recover(id) { |
| | | recover(id).then(res => { |
| | | this.$message.success(res.data.message) |
| | | this.page() |
| | | }) |
| | | }, |
| | | handlerEdit (row) { |
| | | this.form = row |
| | | this.open = true |
| | |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .confirm { |
| | | margin-left: 5px; |
| | | } |
| | | .flex { |
| | | display: flex; |
| | | } |
| | |
| | | width="300px" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button @click="handlerEditStudent(scope.row)" type="warning">编辑</el-button> |
| | | <el-button @click="remove(scope.row.id)" type="danger">删除</el-button> |
| | | <el-button type="primary">分配角色</el-button> |
| | | <el-button @click="handlerEditStudent(scope.row)" type="warning" size="small">编辑</el-button> |
| | | <el-button @click="remove(scope.row.id)" type="danger" size="small">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | </el-form-item> |
| | | <el-form-item label="性别" prop="sex"> |
| | | <el-select v-model="studentForm.sex"> |
| | | <el-option label="男" value="N"></el-option> |
| | | <el-option label="女" value="V"></el-option> |
| | | <el-option label="男" :value="1"></el-option> |
| | | <el-option label="女" :value="2"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="电话" prop="phone"> |
| | |
| | | return { |
| | | studentForm: { |
| | | realName: '', |
| | | sex: '', |
| | | sex: 1, |
| | | phone: '', |
| | | age: null, |
| | | account: '', |
| | |
| | | submitStudentForm () { |
| | | this.$refs['studentForm'].validate((valid) => { |
| | | if (valid) { |
| | | this.studentForm.classes = this.classes.id |
| | | this.studentForm.classesId = this.classes.id |
| | | if (this.studentForm.id) { |
| | | edit(this.studentForm).then(res => { |
| | | this.addOpen = false |
| | |
| | | @click="handlerEdit(scope.row)" |
| | | >修改 |
| | | </el-button> |
| | | <el-popconfirm |
| | | v-if="scope.row.status === 'not_start'" |
| | | style="margin: 0 5px" |
| | | title="确定要删除该考试吗?" |
| | | @confirm="deleteExam(scope.row.id)" |
| | | > |
| | | <el-button slot="reference" type="danger" size="small">删除</el-button> |
| | | </el-popconfirm> |
| | | |
| | | <el-button v-if="scope.row.status === 'finished'" type="success" size="small" @click="markPaper(scope.row)">阅卷</el-button> |
| | | <el-button type="danger" size="small" @click="deleteExam(scope.row.id)">删除</el-button> |
| | | <el-button type="success" size="small" @click="markPaper(scope.row)">阅卷</el-button> |
| | | <el-button type="warning" size="small" @click="monitor(scope.row)">监控</el-button> |
| | |
| | | </el-form> |
| | | |
| | | <el-table v-loading="listLoading" :data="tableData" border fit highlight-current-row style="width: 100%"> |
| | | <el-table-column prop="id" label="Id" /> |
| | | <el-table-column prop="userName" label="用户名"/> |
| | | <el-table-column prop="realName" label="真实姓名" /> |
| | | <el-table-column prop="userLevel" label="学级" :formatter="levelFormatter"/> |
| | |
| | | hotOnly: false, |
| | | proxy: { |
| | | '/api': { |
| | | target: 'http://localhost:8000', |
| | | // target: 'http://192.168.3.64:8000', |
| | | // target: 'http://localhost:8000', |
| | | target: 'http://192.168.3.64:8000', |
| | | changeOrigin: true |
| | | } |
| | | } |