5 files modified
2 files added
| | |
| | | const baseAnswerUrl = '/api/exam/v1/answer/' |
| | | |
| | | export function fetchAnswerList(query) { |
| | | return request({ |
| | | url: baseAnswerUrl + 'answerList', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | return request({ |
| | | url: baseAnswerUrl + 'answerList', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | export function getAnswer(id) { |
| | | return request({ |
| | | url: baseAnswerUrl + id, |
| | | method: 'get' |
| | | }) |
| | | return request({ |
| | | url: baseAnswerUrl + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | export function getAnswerInfo(id, query) { |
| | | return request({ |
| | | url: baseAnswerUrl + id + '/info', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | return request({ |
| | | url: baseAnswerUrl + id + '/info', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | export function getAnswerListInfo(id, query) { |
| | | return request({ |
| | | url: baseAnswerUrl + 'record/' + id + '/answerListInfo', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | return request({ |
| | | url: baseAnswerUrl + 'record/' + id + '/answerListInfo', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | export function addAnswer(obj) { |
| | | return request({ |
| | | url: baseAnswerUrl, |
| | | method: 'post', |
| | | data: obj |
| | | }) |
| | | return request({ |
| | | url: baseAnswerUrl, |
| | | method: 'post', |
| | | data: obj |
| | | }) |
| | | } |
| | | |
| | | export function putAnswer(obj) { |
| | | return request({ |
| | | url: baseAnswerUrl, |
| | | method: 'put', |
| | | data: obj |
| | | }) |
| | | return request({ |
| | | url: baseAnswerUrl, |
| | | method: 'put', |
| | | data: obj |
| | | }) |
| | | } |
| | | |
| | | export function delAnswer(id) { |
| | | return request({ |
| | | url: baseAnswerUrl + id, |
| | | method: 'delete' |
| | | }) |
| | | return request({ |
| | | url: baseAnswerUrl + id, |
| | | method: 'delete' |
| | | }) |
| | | } |
| | | |
| | | export function save(obj) { |
| | | return request({ |
| | | url: baseAnswerUrl + 'save', |
| | | method: 'post', |
| | | data: obj |
| | | }) |
| | | return request({ |
| | | url: baseAnswerUrl + 'save', |
| | | method: 'post', |
| | | data: obj |
| | | }) |
| | | } |
| | | |
| | | export const saveAndNext = (params) => { |
| | | return request({ |
| | | url: '/api/examScore/saveExamScore', |
| | | method: 'post', |
| | | data: { |
| | | // "allGrade": 0, |
| | | "allScore": 200, |
| | | "candidateNo": params.securityId + ' ', |
| | | "company": params.company, |
| | | "examName": params.examName, |
| | | "examResultVOS": params.examResultVOS, |
| | | "examTime": params.examTime, |
| | | "examType": Number(params.examType), |
| | | "learnGrade": 0, |
| | | "papersId": Number(params.papersId), |
| | | "securityName": params.securityName |
| | | } |
| | | }) |
| | | return request({ |
| | | url: '/api/examScore/saveExamScore', |
| | | method: 'post', |
| | | data: { |
| | | // "allGrade": 0, |
| | | // "allScore": 200, |
| | | "userId": params.userId, |
| | | "candidateNo": params.securityId + ' ', |
| | | "company": params.company, |
| | | "examName": params.examName, |
| | | "examResultVOS": params.examResultVOS, |
| | | "examTime": params.examTime, |
| | | "examType": Number(params.examType), |
| | | "learnGrade": 0, |
| | | "papersId": Number(params.papersId), |
| | | "securityName": params.securityName |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export function anonymousUserSaveAndNext(obj, nextType, nextSubjectId, nextSubjectType) { |
| | | let url = baseAnswerUrl + 'anonymousUser/saveAndNext?nextType=' + nextType |
| | | if (nextSubjectId !== undefined) { |
| | | url += '&nextSubjectId=' + nextSubjectId |
| | | } |
| | | if (nextSubjectType !== undefined) { |
| | | url += '&nextSubjectType=' + nextSubjectType |
| | | } |
| | | return request({ |
| | | url: url, |
| | | method: 'post', |
| | | data: obj |
| | | }) |
| | | let url = baseAnswerUrl + 'anonymousUser/saveAndNext?nextType=' + nextType |
| | | if (nextSubjectId !== undefined) { |
| | | url += '&nextSubjectId=' + nextSubjectId |
| | | } |
| | | if (nextSubjectType !== undefined) { |
| | | url += '&nextSubjectType=' + nextSubjectType |
| | | } |
| | | return request({ |
| | | url: url, |
| | | method: 'post', |
| | | data: obj |
| | | }) |
| | | } |
| | | |
| | | export function submit(obj) { |
| | | return request({ |
| | | url: baseAnswerUrl + 'submit', |
| | | method: 'post', |
| | | data: obj |
| | | }) |
| | | return request({ |
| | | url: baseAnswerUrl + 'submit', |
| | | method: 'post', |
| | | data: obj |
| | | }) |
| | | } |
| | | |
| | | export function anonymousUserSubmit(obj) { |
| | | return request({ |
| | | url: baseAnswerUrl + 'anonymousUser/submit', |
| | | method: 'post', |
| | | data: obj |
| | | }) |
| | | return request({ |
| | | url: baseAnswerUrl + 'anonymousUser/submit', |
| | | method: 'post', |
| | | data: obj |
| | | }) |
| | | } |
| | | |
| | | export function anonymousUserSubmitAll(obj, examinationId, identifier) { |
| | | return request({ |
| | | url: baseAnswerUrl + 'anonymousUser/submitAll/' + examinationId + '?identifier=' + identifier, |
| | | method: 'post', |
| | | data: obj |
| | | }) |
| | | } |
| | | return request({ |
| | | url: baseAnswerUrl + 'anonymousUser/submitAll/' + examinationId + '?identifier=' + identifier, |
| | | method: 'post', |
| | | data: obj |
| | | }) |
| | | } |
| | |
| | | import ( /* webpackChunkName: "views" */ '@/views/trainExam/index') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/applyexam', |
| | | redirect: '/applyexam/index', |
| | | component: Layout, |
| | | children: [{ |
| | | path: 'index', |
| | | name: '报名考试', |
| | | meta: { |
| | | i18n: 'index', |
| | | }, |
| | | component: () => |
| | | import( /* webpackChunkName: "views" */ '@/views/applyexam/index') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/startexam', |
| | | redirect: '/startexam/index', |
| | | component: Layout, |
| | | children: [{ |
| | | path: 'index', |
| | | name: '开始考试', |
| | | meta: { |
| | | i18n: 'index', |
| | | }, |
| | | component: () => |
| | | import( /* webpackChunkName: "views" */ '@/views/startexam/index') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/titleDetails', |
| | | component: () => |
| | | import( /* webpackChunkName: "views" */ '@/views/exam/topicDetails') |
| | | }, |
| | | { |
| | | path: '', |
| | | component: Layout, |
| | | children: [{ |
| | | path: '/exam/subjects/:id', |
| | | component: () => import('@/views/exam/examSubjects'), |
| | | name: '题目管理', |
| | | title: '题目管理', |
| | | noCache: true |
| | | }] |
| | | }, |
| | | { |
| | | path: '', |
| | | component: Layout, |
| | | children: [{ |
| | | path: '/startexam/:id', |
| | | component: () => import('@/views/startexam/index'), |
| | | name: '开始考试', |
| | | title: '开始考试', |
| | | noCache: true |
| | | }] |
| | | }, |
| | | ] |
| | | { |
| | | path: '/applyexam', |
| | | redirect: '/applyexam/index', |
| | | component: Layout, |
| | | children: [{ |
| | | path: 'index', |
| | | name: '报名考试', |
| | | meta: { |
| | | i18n: 'index', |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/applyexam/index') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/applydetailed', |
| | | redirect: '/applydetailed/index', |
| | | component: Layout, |
| | | children: [{ |
| | | path: 'index', |
| | | name: '报名清册', |
| | | meta: { |
| | | i18n: 'index', |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/applydetailed/index') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/startexam', |
| | | redirect: '/startexam/index', |
| | | component: Layout, |
| | | children: [{ |
| | | path: 'index', |
| | | name: '开始考试', |
| | | meta: { |
| | | i18n: 'index', |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/startexam/index') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/titleDetails', |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/exam/topicDetails') |
| | | }, |
| | | { |
| | | path: '', |
| | | component: Layout, |
| | | children: [{ |
| | | path: '/exam/subjects/:id', |
| | | component: () => |
| | | import ('@/views/exam/examSubjects'), |
| | | name: '题目管理', |
| | | title: '题目管理', |
| | | noCache: true |
| | | }] |
| | | }, |
| | | { |
| | | path: '', |
| | | component: Layout, |
| | | children: [{ |
| | | path: '/startexam/:id', |
| | | component: () => |
| | | import ('@/views/startexam/index'), |
| | | name: '开始考试', |
| | | title: '开始考试', |
| | | noCache: true |
| | | }] |
| | | }, |
| | | ] |
| | |
| | | |
| | | .morpheus-box-apply-exam .el-card.is-never-shadow.avue-crud__search { |
| | | width: calc(100% - 390px) !important; |
| | | left: 220px !important; |
| | | left: 120px !important; |
| | | } |
| | | |
| | | .avue-form { |
| New file |
| | |
| | | /* |
| | | * @Author: Morpheus |
| | | * @Date: 2021-07-05 16:31:54 |
| | | * @Last Modified by: Morpheus |
| | | * @Last Modified time: 2021-07-19 19:39:45 |
| | | * menu-name 报名考试 |
| | | */ |
| | | <template> |
| | | <el-row class="morpheus-box-apply-exam"> |
| | | <el-col :span="24" class="hasButOne"> |
| | | <el-card> |
| | | <div class="exam-card-body"> |
| | | |
| | | <avue-crud v-model="obj" |
| | | class="company-box" |
| | | :option="questionBankOption" |
| | | :search.sync="questionBankSearch" |
| | | :table-loading="questionBankLoading" |
| | | :data="questionBankData" |
| | | ref="questionBankCrud" |
| | | :page.sync="questionBankPage" |
| | | @on-load="questionBankOnLoad" |
| | | @selection-change="questionBankSelectionChange" |
| | | @search-change="questionBankSearchChange" |
| | | @search-reset="questionBankSearchReset" |
| | | @current-change="questionBankCurrentChange" |
| | | @size-change="questionBankSizeChange" |
| | | @row-save="questionBankRowSave" |
| | | @row-del="questionBankRowDel"> |
| | | |
| | | <!-- 自定义按钮 --> |
| | | <template slot="menuLeft"> |
| | | <el-button |
| | | type="warning" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-download" |
| | | @click="handleExport" |
| | | >导出 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="{ type,row }" slot="menu"> |
| | | <el-button |
| | | :type="type" |
| | | size="small" |
| | | icon="el-icon-receiving" |
| | | @click="handlePrint(row)" |
| | | >准考证打印 |
| | | </el-button> |
| | | </template> |
| | | |
| | | </avue-crud> |
| | | |
| | | </div> |
| | | |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { |
| | | getApplyList, |
| | | addApply, |
| | | remove |
| | | } from "@/api/examapi/applyexam"; |
| | | import { mapState } from 'vuex' |
| | | |
| | | |
| | | |
| | | |
| | | export default { |
| | | data () { |
| | | |
| | | return { |
| | | obj: { |
| | | name: '张三', |
| | | }, |
| | | questionBankOption: { |
| | | // 操作栏多余按钮去除 |
| | | delBtn: false, |
| | | editBtn: false, |
| | | addBtn: false, |
| | | selection: true, |
| | | menu: true, |
| | | // 导出按钮 |
| | | // excelBtn: true, |
| | | viewBtn: false, |
| | | |
| | | // title: '题库', |
| | | |
| | | align: 'center', |
| | | height: 'auto', |
| | | calcHeight: 80, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 4, |
| | | index: true, |
| | | indexLabel: '序号', |
| | | //dialogType: 'drawer', |
| | | dialogClickModal: false, |
| | | // 操作栏宽度 |
| | | menuWidth: 200, |
| | | |
| | | column: [ |
| | | { |
| | | label: "保安姓名", |
| | | prop: "name", |
| | | type: 'tree', |
| | | dicUrl: '', |
| | | search: true, |
| | | slot: true, |
| | | // 表单新增时是否禁止 |
| | | addDisabled: false, |
| | | // 表单新增时是否可见 |
| | | addDisplay: true, |
| | | // 表单新增时是否为查看模式 |
| | | addDetail: false, |
| | | // 表单编辑时是否禁止 |
| | | editDisabled: true, |
| | | // 表单编辑时是否可见 |
| | | editDisplay: true, |
| | | // 表单编辑时是否为查看模式 |
| | | editDetail: false, |
| | | props: { |
| | | label: "title", |
| | | value: "id", |
| | | }, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择保安姓名", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "考试名称", |
| | | prop: "examName", |
| | | type: 'tree', |
| | | dicUrl: '/api/exampaper/page-tree', |
| | | // search: true, |
| | | slot: true, |
| | | // 表单新增时是否禁止 |
| | | addDisabled: false, |
| | | // 表单新增时是否可见 |
| | | addDisplay: true, |
| | | // 表单新增时是否为查看模式 |
| | | addDetail: false, |
| | | // 表单编辑时是否禁止 |
| | | editDisabled: true, |
| | | // 表单编辑时是否可见 |
| | | editDisplay: true, |
| | | // 表单编辑时是否为查看模式 |
| | | editDetail: false, |
| | | props: { |
| | | label: "examName", |
| | | value: "id", |
| | | }, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择试卷名称", |
| | | trigger: "blur" |
| | | }], |
| | | width: 220 |
| | | }, |
| | | { |
| | | label: "所属公司", |
| | | prop: "deptName", |
| | | search: true, |
| | | slot: true, |
| | | // 表单新增时是否禁止 |
| | | addDisabled: false, |
| | | // 表单新增时是否可见 |
| | | addDisplay: false, |
| | | // 表单新增时是否为查看模式 |
| | | addDetail: false, |
| | | // 表单编辑时是否禁止 |
| | | editDisabled: true, |
| | | // 表单编辑时是否可见 |
| | | editDisplay: true, |
| | | // 表单编辑时是否为查看模式 |
| | | editDetail: false, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择所属公司", |
| | | trigger: "blur" |
| | | }], |
| | | width: 220 |
| | | }, |
| | | { |
| | | label: "准考证号", |
| | | prop: "candidateNo", |
| | | slot: true, |
| | | // 表单新增时是否禁止 |
| | | addDisabled: false, |
| | | // 表单新增时是否可见 |
| | | addDisplay: false, |
| | | // 表单新增时是否为查看模式 |
| | | addDetail: false, |
| | | // 表单编辑时是否禁止 |
| | | editDisabled: false, |
| | | // 表单编辑时是否可见 |
| | | editDisplay: true, |
| | | // 表单编辑时是否为查看模式 |
| | | editDetail: false, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择准考证号", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "身份证号", |
| | | prop: "idCardNo", |
| | | slot: true, |
| | | // 表单新增时是否禁止 |
| | | addDisabled: false, |
| | | // 表单新增时是否可见 |
| | | addDisplay: false, |
| | | // 表单新增时是否为查看模式 |
| | | addDetail: false, |
| | | // 表单编辑时是否禁止 |
| | | editDisabled: false, |
| | | // 表单编辑时是否可见 |
| | | editDisplay: true, |
| | | // 表单编辑时是否为查看模式 |
| | | editDetail: false, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择准考证号", |
| | | trigger: "blur" |
| | | }], |
| | | width: 200 |
| | | }, |
| | | { |
| | | label: "报考证件", |
| | | prop: "applyCard", |
| | | slot: true, |
| | | // 表单新增时是否禁止 |
| | | addDisabled: false, |
| | | // 表单新增时是否可见 |
| | | addDisplay: false, |
| | | // 表单新增时是否为查看模式 |
| | | addDetail: false, |
| | | // 表单编辑时是否禁止 |
| | | editDisabled: false, |
| | | // 表单编辑时是否可见 |
| | | editDisplay: true, |
| | | // 表单编辑时是否为查看模式 |
| | | editDetail: false, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择准考证号", |
| | | trigger: "blur" |
| | | }], |
| | | }, |
| | | // { |
| | | // label: "试卷分数", |
| | | // prop: "paperScore", |
| | | // slot: true, |
| | | // // 表单新增时是否禁止 |
| | | // addDisabled: false, |
| | | // // 表单新增时是否可见 |
| | | // addDisplay: false, |
| | | // // 表单新增时是否为查看模式 |
| | | // addDetail: false, |
| | | // // 表单编辑时是否禁止 |
| | | // editDisabled: true, |
| | | // // 表单编辑时是否可见 |
| | | // editDisplay: true, |
| | | // // 表单编辑时是否为查看模式 |
| | | // editDetail: false |
| | | // }, |
| | | { |
| | | label: "报名时间", |
| | | prop: "applyTime", |
| | | type: "datetime", |
| | | // span: 24, |
| | | format: 'yyyy-MM-dd HH:mm:ss', |
| | | valueFormat: 'yyyy-MM-dd HH:mm:ss', |
| | | // 表单新增时是否禁止 |
| | | addDisabled: true, |
| | | // 表单新增时是否可见 |
| | | addDisplay: true, |
| | | // 表单新增时是否为查看模式 |
| | | addDetail: false, |
| | | // 表单编辑时是否禁止 |
| | | editDisabled: true, |
| | | // 表单编辑时是否可见 |
| | | editDisplay: true, |
| | | // 表单编辑时是否为查看模式 |
| | | editDetail: false, |
| | | value: (new Date().getFullYear() + '-' + (new Date().getMonth() + 1 < 10 |
| | | ? "0" + (new Date().getMonth() + 1) |
| | | : new Date().getMonth() + 1) + '-' + (new Date().getDate() < 10 |
| | | ? "0" + new Date().getDate() |
| | | : new Date().getDate()) + ' ' + (new Date().getHours() < 10 |
| | | ? "0" + new Date().getHours() |
| | | : new Date().getHours()) + ':' + (new Date().getMinutes() < 10 |
| | | ? "0" + new Date().getMinutes() |
| | | : new Date().getMinutes()) + ':' + (new Date().getSeconds() < 10 |
| | | ? "0" + new Date().getSeconds() |
| | | : new Date().getSeconds())), |
| | | |
| | | width: 180 |
| | | }, |
| | | { |
| | | label: "考试时间", |
| | | prop: "examTime", |
| | | type: "datetime", |
| | | // span: 24, |
| | | format: 'yyyy-MM-dd HH:mm:ss', |
| | | valueFormat: 'yyyy-MM-dd HH:mm:ss', |
| | | // 表单新增时是否禁止 |
| | | addDisabled: false, |
| | | // 表单新增时是否可见 |
| | | addDisplay: false, |
| | | // 表单新增时是否为查看模式 |
| | | addDetail: false, |
| | | // 表单编辑时是否禁止 |
| | | editDisabled: false, |
| | | // 表单编辑时是否可见 |
| | | editDisplay: true, |
| | | // 表单编辑时是否为查看模式 |
| | | editDetail: false, |
| | | width: 180 |
| | | } |
| | | ] |
| | | }, |
| | | questionBankSearch: {}, |
| | | questionBankLoading: true, |
| | | questionBankData: [ |
| | | |
| | | ], |
| | | questionBankPage: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 16 |
| | | }, |
| | | questionBankQuery: {}, |
| | | questionBankSelectionList: [], |
| | | } |
| | | }, |
| | | |
| | | watch: { |
| | | "form.examname": { |
| | | // form是表单或者表格绑定的数据集,v-model='form' |
| | | handler (val) { |
| | | if (val) { |
| | | //地址截取,从县/区开始截取,并且取从县区第一个出现的位置开始 |
| | | var address = val.formattedAddress.toString(); |
| | | if (address.search("县") != -1) { |
| | | this.form.address = address.substring( |
| | | address.indexOf("县") + 1, |
| | | address.length |
| | | ); |
| | | } |
| | | if (address.search("区") != -1) { |
| | | this.form.address = address.substring( |
| | | address.indexOf("区") + 1, |
| | | address.length |
| | | ); |
| | | } |
| | | } |
| | | }, |
| | | immediate: true, |
| | | }, |
| | | }, |
| | | created () { |
| | | |
| | | console.log(this.userInfo) |
| | | |
| | | if (this.userInfo.role_name.indexOf('ksxtadmin') != -1) { |
| | | |
| | | this.questionBankOption.column[0].dicUrl = "/api/blade-system/dept/lazy-tree-user?parentId=" |
| | | } else { |
| | | this.questionBankOption.column[0].dicUrl = "/api/blade-system/dept/lazy-tree-user?parentId=" + this.userInfo.dept_id |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | }, |
| | | mounted() { |
| | | var flag = false, |
| | | i = 0, |
| | | ind = null; |
| | | this.$store.state.tags.tagList.forEach((item, index) => { |
| | | if (item.label == "报名清册") { |
| | | if (flag == false) { |
| | | ind = index; |
| | | flag = true; |
| | | } |
| | | i++; |
| | | } |
| | | }); |
| | | if (i > 1) { |
| | | this.$store.state.tags.tagList.splice(ind, 1); |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapState({ |
| | | userInfo: state => state.user.userInfo |
| | | }), |
| | | ids () { |
| | | let ids = []; |
| | | this.questionBankSelectionList.forEach(ele => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | }, |
| | | }, |
| | | methods: { |
| | | //准考证查看 |
| | | handlePrint(row) { |
| | | var obj = row; |
| | | obj["name"] = "准考证信息"; |
| | | this.$router.push({ |
| | | path: `/applyexam/papers`, |
| | | query: obj, |
| | | }); |
| | | }, |
| | | questionBankOnLoad (page, params = {}) { |
| | | // debugger; |
| | | params['examId'] = this.$route.query.id; |
| | | this.questionBankLoading = false; |
| | | getApplyList(page.currentPage, page.pageSize, Object.assign(params, this.questionBankQuery)).then(res => { |
| | | const data = res.data.data; |
| | | this.questionBankPage.total = data.total; |
| | | this.questionBankData = data.records; |
| | | this.questionBankLoading = false; |
| | | this.questionBankSelectionClear(); |
| | | }); |
| | | }, |
| | | questionBankSelectionClear () { |
| | | this.questionBankSelectionList = []; |
| | | this.$refs.questionBankCrud.toggleSelection(); |
| | | }, |
| | | questionBankSelectionChange (list) { |
| | | this.questionBankSelectionList = list; |
| | | }, |
| | | questionBankSearchChange (params, done) { |
| | | this.questionBankQuery = params; |
| | | this.questionBankPage.currentPage = 1; |
| | | this.questionBankOnLoad(this.questionBankPage, params); |
| | | done(); |
| | | }, |
| | | questionBankSearchReset () { |
| | | this.questionBankQuery = {}; |
| | | this.questionBankOnLoad(this.questionBankPage); |
| | | }, |
| | | questionBankCurrentChange (currentPage) { |
| | | this.questionBankPage.currentPage = currentPage; |
| | | }, |
| | | questionBankSizeChange (pageSize) { |
| | | this.questionBankPage.pageSize = pageSize; |
| | | }, |
| | | |
| | | // 新增 |
| | | questionBankRowSave (row, done, loading) { |
| | | |
| | | addApply({ userId: row.name, examId: row.examName, applyTime: row.applyTime }).then(() => { |
| | | this.questionBankOnLoad(this.questionBankPage); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }, error => { |
| | | window.console.log(error); |
| | | loading(); |
| | | }); |
| | | }, |
| | | |
| | | questionBankRowDel (row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | | }) |
| | | .then(() => { |
| | | this.questionBankOnLoad(this.questionBankPage); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | questionBankHandleDelete () { |
| | | if (this.questionBankSelectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据"); |
| | | return; |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | | }) |
| | | .then(() => { |
| | | this.questionBankOnLoad(this.questionBankPage); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | this.$refs.questionBankCrud.toggleSelection(); |
| | | }); |
| | | }, |
| | | |
| | | //导出数据 |
| | | handleExport() { |
| | | this.$confirm("是否导出清册数据?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | window.open(`/api/apply/export-apply}`); |
| | | }); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | </style> |
| New file |
| | |
| | | <template> |
| | | <!-- <iframe src="http://124.71.113.22/map/index.html?openid=PatrolManagement" style="width: 100%;height: 100%" frameborder="0"></iframe> --> |
| | | <iframe :src="url" style="width: 100%; height: 100%" frameborder="0"></iframe> |
| | | </template> |
| | | |
| | | <script> |
| | | //占位路由 巡逻管理 |
| | | export default { |
| | | data() { |
| | | return { |
| | | url: "/papers.html", |
| | | }; |
| | | }, |
| | | created(){ |
| | | var d = this.$route.query; |
| | | this.url += "?data=" + JSON.stringify(d); |
| | | // console.log(d); |
| | | }, |
| | | mounted() { |
| | | var flag = false, |
| | | i = 0, |
| | | ind = null; |
| | | this.$store.state.tags.tagList.forEach((item, index) => { |
| | | if (item.label == "准考证信息") { |
| | | if (flag == false) { |
| | | ind = index; |
| | | flag = true; |
| | | } |
| | | i++; |
| | | } |
| | | }); |
| | | if (i > 1) { |
| | | this.$store.state.tags.tagList.splice(ind, 1); |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | </style> |
| | |
| | | selection: true, |
| | | menu: true, |
| | | // 导出按钮 |
| | | excelBtn: true, |
| | | // excelBtn: true, |
| | | viewBtn: false, |
| | | |
| | | // title: '题库', |
| | |
| | | }] |
| | | }, |
| | | { |
| | | label: "试卷名称", |
| | | label: "考试名称", |
| | | prop: "examName", |
| | | type: 'tree', |
| | | dicUrl: '/api/exampaper/page-tree', |
| | |
| | | |
| | | <el-button type="text" |
| | | size="mini" |
| | | icon="icon-kaoshi" |
| | | icon="el-icon-collection" |
| | | class="start-kaoshi" |
| | | |
| | | @click="startExam(row)">开始考试 |
| | | @click="startExam(row)">报名清册 |
| | | </el-button> |
| | | </template> |
| | | |
| | |
| | | |
| | | column: [ |
| | | { |
| | | label: "试卷名称", |
| | | label: "考试名称", |
| | | prop: "examName", |
| | | search: true, |
| | | searchSpan: 5, |
| | |
| | | |
| | | startExam (row) { |
| | | this.$router.push({ |
| | | path: `/startexam/${row.id}`, |
| | | path: `/applydetailed`, |
| | | query: row |
| | | }) |
| | | }, |