| | |
| | | select: id => post('/api/admin/department/get/' + id), |
| | | selectUser: id => post('/api/admin/department/getUserByDepartment/' + id), |
| | | selectDepartmentUser: id => post('/api/admin/department/getDepartmentUser'), |
| | | getUserByExam: id => post('/api/admin/department/getDepartmentUser?examPaperId=' + id), |
| | | deleteSubject: id => post('/api/admin/education/department/delete/' + id), |
| | | addData: query => post('/api/admin/department/add', query), |
| | | // 获取部门用户下拉列表 |
| | |
| | | pageList: query => post('/api/admin/exam/paper/page', query), |
| | | taskExamPage: query => post('/api/admin/exam/paper/taskExamPage', query), |
| | | edit: query => post('/api/admin/exam/paper/edit', query), |
| | | missExam: query => post('/api/admin/exam/paper/missExam', query), |
| | | select: id => post('/api/admin/exam/paper/select/' + id), |
| | | deletePaper: id => post('/api/admin/exam/paper/delete/' + id), |
| | | pageselfList: query => get('/api/admin/exam/templates/list', query), |
| | |
| | | <el-table-column label="操作" align="center" width="300px"> |
| | | <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="primary" @click="missExam(row)">补考</el-button> |
| | | <el-button size="mini" type="danger" @click="deletePaper(row)" class="link-left">删除</el-button> |
| | | <el-button size="mini" type="danger" @click="handleExport(row)" class="link-left">导出</el-button> |
| | | </template> |
| | |
| | | </el-table> |
| | | <pagination v-show="total>0" :total="total" :page.sync="queryParam.pageIndex" :limit.sync="queryParam.pageSize" |
| | | @pagination="search"/> |
| | | |
| | | <el-dialog |
| | | title="补考" |
| | | :visible.sync="dialogVisible" |
| | | width="550px"> |
| | | <el-form :model="form" ref="form" :rules="rules"> |
| | | <el-form-item label="考生:" prop="menuIds" required> |
| | | <el-cascader v-model="form.menuIds" :options="options" :props="{ multiple: true }" clearable collapse-tags></el-cascader> |
| | | </el-form-item> |
| | | <el-form-item label="时间:" prop="limitDateTime" required v-if="examPaper.paperType === 4"> |
| | | <el-date-picker v-model="form.limitDateTime" value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange" |
| | | range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">取 消</el-button> |
| | | <el-button type="primary" @click="submitUpdate">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import { mapGetters, mapState, mapActions } from 'vuex' |
| | | import Pagination from '@/components/Pagination' |
| | | import examPaperApi from '@/api/examPaper' |
| | | import departmentApi from '@/api/department' |
| | | |
| | | export default { |
| | | components: { Pagination }, |
| | | data () { |
| | | return { |
| | | form: { |
| | | menuIds: [], |
| | | userIds: [], |
| | | examPaperId: null, |
| | | limitDateTime: [] |
| | | }, |
| | | examPaper: {}, |
| | | options: [], |
| | | dialogVisible: false, |
| | | queryParam: { |
| | | id: null, |
| | | level: null, |
| | |
| | | subjectFilter: null, |
| | | listLoading: true, |
| | | tableData: [], |
| | | total: 0 |
| | | total: 0, |
| | | rules: { |
| | | menuIds: [ |
| | | { required: true, message: '请选择考生', trigger: 'change' } |
| | | ], |
| | | limitDateTime: [ |
| | | { required: true, message: '请选择补考时间', trigger: 'blur' } |
| | | ] |
| | | }, |
| | | } |
| | | }, |
| | | created () { |
| | |
| | | } |
| | | }) |
| | | }, |
| | | missExam(item) { |
| | | this.form = { |
| | | menuIds: [], |
| | | userIds: [], |
| | | examPaperId: null, |
| | | limitDateTime: [] |
| | | } |
| | | this.dialogVisible = true; |
| | | this.examPaper = item; |
| | | departmentApi.getUserByExam(item.id).then(res => { |
| | | this.options = res.response.map(x=>{return{value:x.department.id,label:x.department.name,children:x.userList.map(xx=>{return{value: xx.id,label: xx.realName}})}}) |
| | | }) |
| | | }, |
| | | submitUpdate () { |
| | | this.$refs.form.validate((valid) => { |
| | | if (valid) { |
| | | let op = []; |
| | | for(var ele of this.form.menuIds){ |
| | | op.push(ele[1]) |
| | | }; |
| | | this.form.menuIds = JSON.stringify(this.form.menuIds); |
| | | this.form.userIds = op; |
| | | this.form.examPaperId = this.examPaper.id; |
| | | examPaperApi.missExam(this.form).then(re => { |
| | | if (re.code === 1) { |
| | | this.$message.success("操作成功") |
| | | this.dialogVisible = false; |
| | | } |
| | | }) |
| | | } else { |
| | | return false |
| | | } |
| | | }) |
| | | }, |
| | | levelChange () { |
| | | this.queryParam.subjectId = null |
| | | this.subjectFilter = this.subjects |