Merge branch 'master' of http://192.168.0.105:10010/r/zhba_enterprises
8 files modified
1 files added
| | |
| | | justify-content: center; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | |
| | | .user-info-table { |
| | | margin-top: 30px; |
| | | width: 60%; |
| | |
| | | border: 1px solid #000; |
| | | background-color: #fff; |
| | | } |
| | | |
| | | |
| | | .user-info-tr { |
| | | height: 50px; |
| | | } |
| | | |
| | | |
| | | .avatar { |
| | | width: 140px; |
| | | height: 190px; |
| | | } |
| | | |
| | | |
| | | .title { |
| | | margin-top: 20px; |
| | | } |
| | | |
| | | |
| | | .avatar { |
| | | width: 140px; |
| | | height: 190px; |
| | | } |
| | | |
| | | |
| | | .my-picture { |
| | | width: 150px; |
| | | /* height: 200px; */ |
| | |
| | | var examType = JSON.parse(getData("data")).examType; |
| | | // console.log(JSON.parse(getData("data")), 111); |
| | | |
| | | axios.get('http://47.49.21.216:82/apply/getApplyInfo?id=' + id + "&applyExamType=" + examType).then(function(res) { |
| | | axios.get('http://localhost:81/apply/getApplyInfo?id=' + id + "&applyExamType=" + examType).then(function(res) { |
| | | var data = res.data.data; |
| | | var str = `<span class="title">${data.examName}</span> |
| | | <span class="title">准考证信息</span> |
| | |
| | | </script> |
| | | </body> |
| | | |
| | | </html> |
| | | </html> |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | export const getPaperList = (current, size, params) => { |
| | | return request({ |
| | | url: '/api/examSubjectChoices/getEexPaperChoices', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size |
| | | } |
| | | }) |
| | | return request({ |
| | | url: '/api/examSubjectChoices/getEexPaperChoices', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | export const updatePaper = (row) => { |
| | | return request({ |
| | | url: '/api/examSubjectChoices/updateChoicesValue', |
| | | method: 'post', |
| | | params: { |
| | | ...row |
| | | } |
| | | }) |
| | | return request({ |
| | | url: '/api/examSubjectChoices/updateChoicesValue', |
| | | method: 'post', |
| | | params: { |
| | | ...row |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | export const saveSubjectChoicesAndOption = (row) => { |
| | | return request({ |
| | | url: '/api/examSubjectChoices/saveSubjectChoicesAndOption', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | export const remove = (params) => { |
| | | return request({ |
| | | url: '/api/exampaper/UnbindSubject', |
| | | method: 'get', |
| | | params: { |
| | | ...params |
| | | } |
| | | }) |
| | | } |
| | | return request({ |
| | | url: '/api/exampaper/UnbindSubject', |
| | | method: 'get', |
| | | params: { |
| | | ...params |
| | | } |
| | | }) |
| | | } |
| | |
| | | } |
| | | |
| | | .el-menu--display, |
| | | .el-menu--display + .el-submenu__icon-arrow { |
| | | .el-menu--display+.el-submenu__icon-arrow { |
| | | display: none; |
| | | } |
| | | |
| | |
| | | |
| | | .el-dropdown-menu__item--divided:before, |
| | | .el-menu, |
| | | .el-menu--horizontal > .el-menu-item:not(.is-disabled):focus, |
| | | .el-menu--horizontal > .el-menu-item:not(.is-disabled):hover, |
| | | .el-menu--horizontal > .el-submenu .el-submenu__title:hover { |
| | | .el-menu--horizontal>.el-menu-item:not(.is-disabled):focus, |
| | | .el-menu--horizontal>.el-menu-item:not(.is-disabled):hover, |
| | | .el-menu--horizontal>.el-submenu .el-submenu__title:hover { |
| | | background-color: transparent; |
| | | } |
| | | |
| | | .el-dropdown-menu__item--divided:before, |
| | | .el-menu, |
| | | .el-menu--horizontal > .el-menu-item:not(.is-disabled):focus, |
| | | .el-menu--horizontal > .el-menu-item:not(.is-disabled):hover, |
| | | .el-menu--horizontal > .el-submenu .el-submenu__title:hover { |
| | | .el-menu--horizontal>.el-menu-item:not(.is-disabled):focus, |
| | | .el-menu--horizontal>.el-menu-item:not(.is-disabled):hover, |
| | | .el-menu--horizontal>.el-submenu .el-submenu__title:hover { |
| | | background-color: transparent !important; |
| | | } |
| | | |
| | |
| | | |
| | | .recruitmentManagement .el-card.is-never-shadow.avue-crud__search { |
| | | width: calc(100% - 380px) !important; |
| | | left: 200px !important; |
| | | left: 120px !important; |
| | | } |
| | | |
| | | .hasButOne .el-card.is-never-shadow.avue-crud__search { |
| | |
| | | } |
| | | |
| | | .morpheus-box .el-card.is-never-shadow.avue-crud__search { |
| | | width: calc(100% - 390px) !important; |
| | | left: 270px !important; |
| | | width: calc(100% - 590px) !important; |
| | | left: 420px !important; |
| | | } |
| | | |
| | | .morpheus-box-exam .el-card.is-never-shadow.avue-crud__search { |
| | |
| | | } |
| | | |
| | | //top 导航 按钮 |
| | | .el-menu--horizontal > .el-menu-item.is-active, |
| | | .el-menu--horizontal>.el-menu-item.is-active, |
| | | .avue-top, |
| | | .el-dropdown { |
| | | color: #fff !important; |
| | | } |
| | | } |
| | |
| | | label: "考试名称", |
| | | prop: "examName", |
| | | type: 'tree', |
| | | dicUrl: '/api/exampaper/page-tree', |
| | | dicUrl: '/api/exampaper/page-tree?examType=1', |
| | | // search: true, |
| | | slot: true, |
| | | // 表单新增时是否禁止 |
| | |
| | | // 新增 |
| | | questionBankRowSave (row, done, loading) { |
| | | // debugger; |
| | | addApply({ userId: row.userId, examId: row.examName, applyTime: row.applyTime }).then(() => { |
| | | addApply({ userId: row.userId, examId: row.examName, applyTime: row.applyTime }).then((res) => { |
| | | this.questionBankOnLoad(this.questionBankPage); |
| | | this.$message({ |
| | | if(res.data.data==201){ |
| | | this.$message({ |
| | | type: "warning", |
| | | message:"已报名,不能重复报名", |
| | | }); |
| | | }else if(res.data.data==201){ |
| | | this.$message({ |
| | | type: "warning", |
| | | message:"报名失败", |
| | | }); |
| | | }else{ |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | message:"报名成功", |
| | | }); |
| | | } |
| | | done(); |
| | | }, error => { |
| | | window.console.log(error); |
| New file |
| | |
| | | <template> |
| | | <el-dialog |
| | | :title="this.id?'修改':'新增'" |
| | | width="60%" |
| | | modal-append-to-body='false' |
| | | append-to-body='true' |
| | | :close-on-click-model="true" |
| | | :visible.sync="visible" |
| | | @close='closeDialog' |
| | | > |
| | | <el-row style="margin-left:60px;margin-bottom:40px"> |
| | | <el-radio-group v-model="choicesType"> |
| | | <el-radio label="0">单选题</el-radio> |
| | | <el-radio label="1">多选题</el-radio> |
| | | <el-radio label="2">判断题</el-radio> |
| | | <el-radio label="3">实操题</el-radio> |
| | | </el-radio-group> |
| | | </el-row> |
| | | <avue-form ref="form" :option="option" v-model="form" @submit="submit" v-if="choicesType=='0'"></avue-form> |
| | | <avue-form ref="formCheckbox" :option="optionCheckbox" v-model="formCheckbox" @submit="submitCheckbox" v-if="choicesType=='1'"></avue-form> |
| | | <avue-form ref="formJudge" :option="optionJudge" v-model="formJudge" @submit="submitJudge" v-if="choicesType=='2'"></avue-form> |
| | | <avue-form ref="formFill" :option="optionFill" v-model="formFill" @submit="submitFill" v-if="choicesType=='3'"> |
| | | <template slot="optionContent"> |
| | | <!-- <el-button type="success" icon="el-icon-plus" circle style="margin-bottom:20px" @click="addRows"></el-button> |
| | | <div v-for="(item,index) in list" :key="index"> |
| | | <div class="optionContent-suffix"> |
| | | <span>{{index+1}}: </span> |
| | | <el-input class="optionContent-input" |
| | | placeholder="请输入内容" |
| | | v-model="inputs[`input${index + 1}`]"> |
| | | </el-input> |
| | | <el-button type="danger" class="optionContent-botton" icon="el-icon-delete" circle @click="deleteRows(index)"></el-button> |
| | | </div> |
| | | </div> --> |
| | | </template> |
| | | </avue-form> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | import { mapState } from 'vuex' |
| | | import {saveSubjectChoicesAndOption} from "@/api/examapi/examSubjects"; |
| | | import {getSubjectAnswer} from "@/api/exam/subject"; |
| | | |
| | | export default { |
| | | name: "add", |
| | | data() { |
| | | return { |
| | | inputs:{ |
| | | input1: 1, |
| | | }, |
| | | optionContentAId:null, |
| | | optionContentBId:null, |
| | | optionContentCId:null, |
| | | optionContentDId:null, |
| | | arrContent:["1"], |
| | | list:[ |
| | | { |
| | | data:1 |
| | | }, |
| | | { |
| | | data:1 |
| | | }, |
| | | { |
| | | data:1 |
| | | }, |
| | | ], |
| | | // index:1, |
| | | visible:false, |
| | | choicesType:"0", |
| | | loading: true, |
| | | form:{ |
| | | score:1 |
| | | }, |
| | | option: { |
| | | height: "auto", |
| | | calcHeight: 80, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: false, |
| | | stripe: true, |
| | | align: "center", |
| | | index: true, |
| | | selection: true, |
| | | viewBtn: true, |
| | | defaultExpandAll: true, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | label: "题目名称", |
| | | prop: "subjectName", |
| | | search: true, |
| | | type:"textarea", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入题目名称", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | span:24 |
| | | }, |
| | | { |
| | | label: "类型", |
| | | prop: "tktype", |
| | | slot: true, |
| | | type: "checkbox", |
| | | dicData: [ |
| | | { |
| | | label: '简易题库', |
| | | value: 'A' |
| | | }, |
| | | { |
| | | label: '复杂题库', |
| | | value: 'B' |
| | | }, |
| | | { |
| | | label: '模拟题库', |
| | | value: 'C' |
| | | } |
| | | ], |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择类型", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | span:24 |
| | | }, |
| | | { |
| | | label: "选项", |
| | | prop: "", |
| | | type:"text", |
| | | span:24 |
| | | }, |
| | | { |
| | | label: "A", |
| | | prop: "optionContentA", |
| | | span:24, |
| | | placeholder:"请输入内容", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入内容", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "B", |
| | | prop: "optionContentB", |
| | | span:24, |
| | | placeholder:"请输入内容", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入内容", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "C", |
| | | prop: "optionContentC", |
| | | span:24, |
| | | placeholder:"请输入内容", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入内容", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "D", |
| | | prop: "optionContentD", |
| | | span:24, |
| | | placeholder:"请输入内容", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入内容", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "答案", |
| | | prop: "answer", |
| | | span: 24, |
| | | // type: "checkbox", |
| | | type: "radio", |
| | | dicData: [ |
| | | { |
| | | label: 'A', |
| | | value: 'A' |
| | | }, |
| | | { |
| | | label: 'B', |
| | | value: 'B' |
| | | }, |
| | | { |
| | | label: 'C', |
| | | value: 'C' |
| | | }, |
| | | { |
| | | label: 'D', |
| | | value: 'D' |
| | | } |
| | | ], |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择答案", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "解析", |
| | | prop: "analysis", |
| | | span:24, |
| | | type:"textarea" |
| | | }, |
| | | { |
| | | label: "分值", |
| | | prop: "score", |
| | | span:24, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入分值", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | |
| | | ], |
| | | |
| | | }, |
| | | formCheckbox:{ |
| | | score:1 |
| | | }, |
| | | optionCheckbox: { |
| | | height: "auto", |
| | | calcHeight: 80, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: false, |
| | | stripe: true, |
| | | align: "center", |
| | | index: true, |
| | | selection: true, |
| | | viewBtn: true, |
| | | defaultExpandAll: true, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | label: "题目名称", |
| | | prop: "subjectName", |
| | | search: true, |
| | | type:"textarea", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入题目名称", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | span:24 |
| | | }, |
| | | { |
| | | label: "类型", |
| | | prop: "tktype", |
| | | slot: true, |
| | | type: "checkbox", |
| | | dicData: [ |
| | | { |
| | | label: '简易题库', |
| | | value: 'A' |
| | | }, |
| | | { |
| | | label: '复杂题库', |
| | | value: 'B' |
| | | }, |
| | | { |
| | | label: '模拟题库', |
| | | value: 'C' |
| | | } |
| | | ], |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择类型", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | span:24 |
| | | }, |
| | | { |
| | | label: "选项", |
| | | prop: "", |
| | | type:"text", |
| | | span:24 |
| | | }, |
| | | { |
| | | label: "A", |
| | | prop: "optionContentA", |
| | | span:24, |
| | | placeholder:"请输入内容", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入内容", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "B", |
| | | prop: "optionContentB", |
| | | span:24, |
| | | placeholder:"请输入内容", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入内容", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "C", |
| | | prop: "optionContentC", |
| | | span:24, |
| | | placeholder:"请输入内容", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入内容", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "D", |
| | | prop: "optionContentD", |
| | | span:24, |
| | | placeholder:"请输入内容", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入内容", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "答案", |
| | | prop: "answer", |
| | | span: 24, |
| | | type: "checkbox", |
| | | // type: "radio", |
| | | dicData: [ |
| | | { |
| | | label: 'A', |
| | | value: 'A' |
| | | }, |
| | | { |
| | | label: 'B', |
| | | value: 'B' |
| | | }, |
| | | { |
| | | label: 'C', |
| | | value: 'C' |
| | | }, |
| | | { |
| | | label: 'D', |
| | | value: 'D' |
| | | } |
| | | ], |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择答案", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "解析", |
| | | prop: "analysis", |
| | | span:24, |
| | | type:"textarea" |
| | | }, |
| | | { |
| | | label: "分值", |
| | | prop: "score", |
| | | span:24, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入分值", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | |
| | | ], |
| | | |
| | | }, |
| | | formJudge:{ |
| | | score:1 |
| | | }, |
| | | optionJudge: { |
| | | height: "auto", |
| | | calcHeight: 80, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: false, |
| | | stripe: true, |
| | | align: "center", |
| | | index: true, |
| | | selection: true, |
| | | viewBtn: true, |
| | | defaultExpandAll: true, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | label: "题目名称", |
| | | prop: "subjectName", |
| | | search: true, |
| | | type:"textarea", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入题目名称", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | span:24 |
| | | }, |
| | | { |
| | | label: "类型", |
| | | prop: "tktype", |
| | | slot: true, |
| | | type: "checkbox", |
| | | dicData: [ |
| | | { |
| | | label: '简易题库', |
| | | value: 'A' |
| | | }, |
| | | { |
| | | label: '复杂题库', |
| | | value: 'B' |
| | | }, |
| | | { |
| | | label: '模拟题库', |
| | | value: 'C' |
| | | } |
| | | ], |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择类型", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | span:24 |
| | | }, |
| | | // { |
| | | // label: "选项", |
| | | // prop: "", |
| | | // type:"text", |
| | | // span:24 |
| | | // }, |
| | | // { |
| | | // label: "正确", |
| | | // prop: "optionContentA", |
| | | // span:24 |
| | | // }, |
| | | // { |
| | | // label: "错误", |
| | | // prop: "optionContentB", |
| | | // span:24 |
| | | // }, |
| | | { |
| | | label: "答案", |
| | | prop: "answer", |
| | | span: 24, |
| | | type: "radio", |
| | | dicData: [ |
| | | { |
| | | label: '正确', |
| | | value: '正确' |
| | | }, |
| | | { |
| | | label: '错误', |
| | | value: '错误' |
| | | } |
| | | ], |
| | | mock:{ |
| | | type:'dic', |
| | | }, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择答案", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "解析", |
| | | prop: "analysis", |
| | | span:24, |
| | | type:"textarea" |
| | | }, |
| | | { |
| | | label: "分值", |
| | | prop: "score", |
| | | defaultValue:2, |
| | | span:24, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入分值", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | |
| | | ], |
| | | |
| | | }, |
| | | formFill:{ |
| | | score:1 |
| | | }, |
| | | optionFill: { |
| | | height: "auto", |
| | | calcHeight: 80, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: false, |
| | | stripe: true, |
| | | align: "center", |
| | | index: true, |
| | | selection: true, |
| | | viewBtn: true, |
| | | defaultExpandAll: true, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | label: "题目名称", |
| | | prop: "subjectName", |
| | | type:"textarea", |
| | | search: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入题目名称", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | span:24 |
| | | }, |
| | | { |
| | | label: "类型", |
| | | prop: "tktype", |
| | | slot: true, |
| | | type: "checkbox", |
| | | dicData: [ |
| | | { |
| | | label: '简易题库', |
| | | value: 'A' |
| | | }, |
| | | { |
| | | label: '复杂题库', |
| | | value: 'B' |
| | | }, |
| | | { |
| | | label: '模拟题库', |
| | | value: 'C' |
| | | } |
| | | ], |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择类型", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | span:24 |
| | | }, |
| | | { |
| | | label: "选项", |
| | | prop: "", |
| | | type:"text", |
| | | span:24 |
| | | }, |
| | | { |
| | | label: "1", |
| | | prop: "optionContent1", |
| | | span:24, |
| | | placeholder:"请输入内容", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入内容", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "2", |
| | | prop: "optionContent2", |
| | | span:24, |
| | | placeholder:"请输入内容", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入内容", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "3", |
| | | prop: "optionContent3", |
| | | span:24, |
| | | placeholder:"请输入内容" |
| | | }, |
| | | { |
| | | label: "4", |
| | | prop: "optionContent4", |
| | | span:24, |
| | | placeholder:"请输入内容" |
| | | }, |
| | | { |
| | | label: "5", |
| | | prop: "optionContent5", |
| | | span:24, |
| | | placeholder:"请输入内容" |
| | | }, |
| | | { |
| | | label: "答案", |
| | | prop: "answer", |
| | | span: 24, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入答案", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "解析", |
| | | prop: "analysis", |
| | | span:24, |
| | | type:"textarea" |
| | | }, |
| | | { |
| | | label: "分值", |
| | | prop: "score", |
| | | span:24, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入分值", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | } |
| | | |
| | | ], |
| | | |
| | | }, |
| | | data: [], |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapState({ |
| | | userInfo: state => state.user.userInfo |
| | | }) |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | methods: { |
| | | //初始化 |
| | | inits(id) { |
| | | this.id = id || 0; |
| | | this.visible = true; |
| | | this.list = [{data:1}] |
| | | if(this.id){ |
| | | //查询题目信息 |
| | | this.getSubjectInfo(id); |
| | | } |
| | | }, |
| | | //查询题目信息 |
| | | getSubjectInfo(id){ |
| | | var that = this; |
| | | var param = { |
| | | id:id |
| | | } |
| | | getSubjectAnswer((param)).then(res => { |
| | | var data = res.data.data; |
| | | that.choicesType = data.choicesType.toString(); |
| | | //单选题 |
| | | if(data.choicesType==0){ |
| | | that.form = data; |
| | | that.optionContentAId = data.examSubjectOptions[0].id; |
| | | that.optionContentBId = data.examSubjectOptions[1].id; |
| | | that.optionContentCId = data.examSubjectOptions[2].id; |
| | | that.optionContentDId = data.examSubjectOptions[3].id; |
| | | that.form.optionContentA = data.examSubjectOptions[0].optionContent; |
| | | that.form.optionContentB = data.examSubjectOptions[1].optionContent; |
| | | that.form.optionContentC = data.examSubjectOptions[2].optionContent; |
| | | that.form.optionContentD = data.examSubjectOptions[3].optionContent; |
| | | } |
| | | //多选题 |
| | | if(data.choicesType==1){ |
| | | that.formCheckbox = data; |
| | | that.optionContentAId = data.examSubjectOptions[0].id; |
| | | that.optionContentBId = data.examSubjectOptions[1].id; |
| | | that.optionContentCId = data.examSubjectOptions[2].id; |
| | | that.optionContentDId = data.examSubjectOptions[3].id; |
| | | that.formCheckbox.optionContentA = data.examSubjectOptions[0].optionContent; |
| | | that.formCheckbox.optionContentB = data.examSubjectOptions[1].optionContent; |
| | | that.formCheckbox.optionContentC = data.examSubjectOptions[2].optionContent; |
| | | that.formCheckbox.optionContentD = data.examSubjectOptions[3].optionContent; |
| | | } |
| | | //判断题 |
| | | if(data.choicesType==2){ |
| | | that.formJudge = data; |
| | | } |
| | | //实操题 |
| | | if(data.choicesType==3){ |
| | | that.formFill = data; |
| | | that.formFill.optionContent1 = data.examSubjectOptions[0].optionContent; |
| | | that.formFill.optionContent2 = data.examSubjectOptions[1].optionContent; |
| | | that.formFill.optionContent3 = data.examSubjectOptions[2].optionContent; |
| | | that.formFill.optionContent4 = data.examSubjectOptions[3].optionContent; |
| | | that.formFill.optionContent5 = data.examSubjectOptions[4].optionContent; |
| | | } |
| | | }); |
| | | }, |
| | | //加一行 |
| | | addRows(){ |
| | | //获取已有行的数据 |
| | | // debugger; |
| | | if(this.index==6){ |
| | | return; |
| | | } |
| | | this.index++; |
| | | this.list.push({ |
| | | data:this.index |
| | | }) |
| | | this.inputs[`input${this.index+1}`] = ''; |
| | | console.log(this.inputs) |
| | | console.log(this.list,111); |
| | | }, |
| | | //减一行 |
| | | deleteRows(index){ |
| | | if(this.index==1){ |
| | | return; |
| | | } |
| | | this.index--; |
| | | this.list.splice(index,1); |
| | | }, |
| | | //单选题提交(新增)数据 |
| | | submit(row, done, loading) { |
| | | var that = this; |
| | | row['choicesType'] = this.choicesType; |
| | | row['creator'] = this.userInfo.user_name; |
| | | row.tktype = row.tktype.join(","); |
| | | //选项信息 |
| | | const examSubjectOptions = [ |
| | | { |
| | | id:that.optionContentAId, |
| | | optionName:"A", |
| | | optionContent:row.optionContentA, |
| | | creator:this.userInfo.user_name, |
| | | }, |
| | | { |
| | | id:that.optionContentBId, |
| | | optionName:"B", |
| | | optionContent:row.optionContentB, |
| | | creator:this.userInfo.user_name, |
| | | }, |
| | | { |
| | | id:that.optionContentCId, |
| | | optionName:"C", |
| | | optionContent:row.optionContentC, |
| | | creator:this.userInfo.user_name, |
| | | }, |
| | | { |
| | | id:that.optionContentDId, |
| | | optionName:"D", |
| | | optionContent:row.optionContentD, |
| | | creator:this.userInfo.user_name, |
| | | } |
| | | ] |
| | | row['examSubjectOptions'] = examSubjectOptions; |
| | | saveSubjectChoicesAndOption(row).then( |
| | | () => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | that.visible = false; |
| | | that.$refs.form.resetFields(); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | }, |
| | | //多选题提交(新增)数据 |
| | | submitCheckbox(row, done, loading) { |
| | | var that = this; |
| | | row['choicesType'] = this.choicesType; |
| | | row['creator'] = this.userInfo.user_name; |
| | | row.tktype = row.tktype.join(","); |
| | | row.answer = row.answer.join(","); |
| | | //选项信息 |
| | | const examSubjectOptions = [ |
| | | { |
| | | id:that.optionContentAId, |
| | | optionName:"A", |
| | | optionContent:row.optionContentA, |
| | | creator:this.userInfo.user_name, |
| | | }, |
| | | { |
| | | id:that.optionContentBId, |
| | | optionName:"B", |
| | | optionContent:row.optionContentB, |
| | | creator:this.userInfo.user_name, |
| | | }, |
| | | { |
| | | id:that.optionContentCId, |
| | | optionName:"C", |
| | | optionContent:row.optionContentC, |
| | | creator:this.userInfo.user_name, |
| | | }, |
| | | { |
| | | id:that.optionContentDId, |
| | | optionName:"D", |
| | | optionContent:row.optionContentD, |
| | | creator:this.userInfo.user_name, |
| | | } |
| | | ] |
| | | row['examSubjectOptions'] = examSubjectOptions; |
| | | saveSubjectChoicesAndOption(row).then( |
| | | () => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | that.visible = false; |
| | | that.$refs.formCheckbox.resetFields(); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | }, |
| | | //判断题提交(新增)数据 |
| | | submitJudge(row, done, loading) { |
| | | var that = this; |
| | | row['choicesType'] = this.choicesType; |
| | | row['creator'] = this.userInfo.user_name; |
| | | row.tktype = row.tktype.join(","); |
| | | saveSubjectChoicesAndOption(row).then( |
| | | () => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | that.visible = false; |
| | | that.$refs.formJudge.resetFields(); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | }, |
| | | //填空排序题提交(新增)数据 |
| | | submitFill(row, done, loading) { |
| | | var that = this; |
| | | row['choicesType'] = this.choicesType; |
| | | row['creator'] = this.userInfo.user_name; |
| | | row.tktype = row.tktype.join(","); |
| | | //选项信息 |
| | | var examSubjectOptions = []; |
| | | if(row.optionContent1){ |
| | | examSubjectOptions.push({ |
| | | optionName:"1", |
| | | optionContent:row.optionContent1, |
| | | creator:this.userInfo.user_name, |
| | | }) |
| | | } |
| | | if(row.optionContent2){ |
| | | examSubjectOptions.push({ |
| | | optionName:"2", |
| | | optionContent:row.optionContent2, |
| | | creator:this.userInfo.user_name, |
| | | }) |
| | | } |
| | | if(row.optionContent3){ |
| | | examSubjectOptions.push({ |
| | | optionName:"3", |
| | | optionContent:row.optionContent3, |
| | | creator:this.userInfo.user_name, |
| | | }) |
| | | } |
| | | if(row.optionContent4){ |
| | | examSubjectOptions.push({ |
| | | optionName:"4", |
| | | optionContent:row.optionContent4, |
| | | creator:this.userInfo.user_name, |
| | | }) |
| | | } |
| | | if(row.optionContent5){ |
| | | examSubjectOptions.push({ |
| | | optionName:"5", |
| | | optionContent:row.optionContent5, |
| | | creator:this.userInfo.user_name, |
| | | }) |
| | | } |
| | | row['examSubjectOptions'] = examSubjectOptions; |
| | | saveSubjectChoicesAndOption(row).then( |
| | | () => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | that.visible = false; |
| | | that.$refs.formFill.resetFields(); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | }, |
| | | //关闭窗口清除数据 |
| | | closeDialog(){ |
| | | if(this.choicesType==0){ |
| | | this.$refs.form.resetFields(); |
| | | } |
| | | |
| | | if(this.choicesType==1){ |
| | | this.$refs.formCheckbox.resetFields(); |
| | | } |
| | | |
| | | if(this.choicesType==2){ |
| | | this.$refs.formJudge.resetFields(); |
| | | } |
| | | |
| | | if(this.choicesType==3){ |
| | | this.$refs.formFill.resetFields(); |
| | | } |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | |
| | | .optionContent-suffix{ |
| | | margin-top: 5px; |
| | | } |
| | | |
| | | .optionContent-suffix span{ |
| | | margin-left: -20px; |
| | | } |
| | | |
| | | |
| | | .optionContent-suffix .optionContent-input{ |
| | | width: 90%; |
| | | margin-left: 10px; |
| | | } |
| | | |
| | | |
| | | .optionContent-suffix .optionContent-botton{ |
| | | margin-left: 10px; |
| | | } |
| | | |
| | | </style> |
| | |
| | | this.refreshChange(); |
| | | done(); |
| | | }, |
| | | refreshChange() { |
| | | this.questionBankOnLoad(this.page, this.query); |
| | | }, |
| | | |
| | | } |
| | | } |
| | |
| | | * menu-name 题库查询 |
| | | */ |
| | | <template> |
| | | <div> |
| | | <el-row class="morpheus-box"> |
| | | <el-col :span="24"> |
| | | <el-card> |
| | |
| | | @row-del="questionBankHandleDel"> |
| | | |
| | | <template slot="menuLeft"> |
| | | <el-button type="primary" |
| | | size="small" |
| | | icon="el-icon-plus" |
| | | @click="questionBankHandleAdd">新 增 |
| | | </el-button> |
| | | <el-button |
| | | type="success" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-upload2" |
| | | @click="handleImport" |
| | | >题库导入 |
| | | </el-button> |
| | | <el-button type="danger" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="{row}" slot="menu"> |
| | | <el-button type="text" |
| | | size="mini" |
| | | icon="el-icon-edit" |
| | | @click="questionBankHandleAdd(row)">编辑 |
| | | </el-button> |
| | | <el-button type="text" |
| | | size="mini" |
| | | icon="el-icon-delete" |
| | | @click="questionBankHandleDel(row)">删除 |
| | | </el-button> |
| | | </template> |
| | | |
| | | </avue-crud> |
| | | |
| | | <el-dialog |
| | | title="题库导入" |
| | | append-to-body |
| | | :visible.sync="excelBox" |
| | | width="555px" |
| | | > |
| | | <avue-form |
| | | :option="excelOption" |
| | | v-model="excelForm" |
| | | :upload-after="uploadAfter" |
| | | > |
| | | <template slot="excelTemplate"> |
| | | <el-button type="primary" @click="handleTemplate"> |
| | | 点击下载<i class="el-icon-download el-icon--right"></i> |
| | | </el-button> |
| | | </template> |
| | | </avue-form> |
| | | </el-dialog> |
| | | |
| | | </div> |
| | | |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | <addsubject ref="addsubject"></addsubject> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | remove, |
| | | } from "@/api/examapi/subject"; |
| | | |
| | | import addsubject from "./addsubject.vue"; |
| | | |
| | | export default { |
| | | components:{ |
| | | addsubject |
| | | }, |
| | | data () { |
| | | return { |
| | | excelBox:false, |
| | | excelForm: {}, |
| | | excelOption: { |
| | | submitBtn: false, |
| | | emptyBtn: false, |
| | | column: [ |
| | | { |
| | | label: "模板上传", |
| | | prop: "excelFile", |
| | | type: "upload", |
| | | drag: true, |
| | | loadText: "模板上传中,请稍等", |
| | | span: 24, |
| | | propsHttp: { |
| | | res: "data", |
| | | }, |
| | | tip: "请上传 .xls,.xlsx 标准格式文件", |
| | | action: "/api/examSubjectChoices/import-examSubject", |
| | | }, |
| | | { |
| | | label: "模板下载", |
| | | prop: "excelTemplate", |
| | | formslot: true, |
| | | span: 24, |
| | | }, |
| | | ], |
| | | }, |
| | | questionBankOption: { |
| | | // 操作栏多余按钮去除 |
| | | delBtn: true, |
| | | |
| | | delBtn: false, |
| | | editBtn: false, |
| | | |
| | | addBtn: false, |
| | | |
| | | selection: true, |
| | | menu: true, |
| | | // 导出按钮 |
| | | excelBtn: true, |
| | | excelBtnText: '题库导出', |
| | | // title: '题库', |
| | | |
| | | align: 'center', |
| | | height: 'auto', |
| | | calcHeight: 80, |
| | |
| | | dialogClickModal: false, |
| | | // 操作栏宽度 |
| | | menuWidth: 226, |
| | | |
| | | column: [ |
| | | { |
| | | label: "题目名称", |
| | | prop: "subjectName", |
| | | |
| | | search: true, |
| | | slot: true, |
| | | }, |
| | |
| | | }, { |
| | | label: '判断题', |
| | | value: 2, |
| | | }, { |
| | | label: '实操题', |
| | | value: 3, |
| | | }], |
| | | slot: true, |
| | | width: 96, |
| | |
| | | }, |
| | | }, |
| | | methods: { |
| | | questionBankHandleAdd(row){ |
| | | this.$refs.addsubject.inits(row.id); |
| | | }, |
| | | questionBankOnLoad (page, params = {}) { |
| | | this.questionBankLoading = false; |
| | | getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
| | |
| | | }); |
| | | }, |
| | | |
| | | |
| | | //导出数据 |
| | | handleExport() { |
| | | this.$confirm("是否导出清册数据?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | window.open(`/api/apply/export-apply?examId=${this.$route.query.id}`); |
| | | }); |
| | | }, |
| | | handleImport() { |
| | | this.excelBox = true; |
| | | }, |
| | | handleTemplate() { |
| | | window.open( |
| | | `/api/examSubjectChoices/export-template` |
| | | ); |
| | | }, |
| | | uploadAfter(res, done, loading, column) { |
| | | window.console.log(column); |
| | | this.excelBox = false; |
| | | this.refreshChange(); |
| | | done(); |
| | | }, |
| | | refreshChange() { |
| | | this.questionBankOnLoad(this.page, this.query); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | value: "id" |
| | | }, |
| | | searchSpan: 5, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入姓名", |
| | | trigger: "blur" |
| | | }], |
| | | }, { |
| | | label: "姓名", |
| | | prop: "realName", |
| | |
| | | > |
| | | <template slot="menuLeft"> |
| | | <el-button |
| | | style="display:none" |
| | | type="danger" |
| | | size="small" |
| | | plain |
| | |
| | | :size="size" |
| | | :type="type" |
| | | :disabled="row.cancel==2" |
| | | >撤销报名</el-button |
| | | >取消报名</el-button |
| | | > |
| | | <el-button |
| | | icon="el-icon-folder-checked" |
| | |
| | | selection: true, |
| | | column: column, |
| | | delBtn: false, |
| | | editBtn: false, |
| | | }, |
| | | }; |
| | | }, |
| | |
| | | }, |
| | | rowSave(form, done, loading) { |
| | | var that = this; |
| | | // var form = this.data[0]; |
| | | // delete form.id; |
| | | // for (var k = 0; k < 13; k++) { |
| | | adddata(form).then( |
| | | (res) => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | if(res.data.data==201){ |
| | | this.$message({ |
| | | type: "warning", |
| | | message:"已报名,不能重复报名", |
| | | }); |
| | | }else if(res.data.data==201){ |
| | | this.$message({ |
| | | type: "warning", |
| | | message:"报名失败", |
| | | }); |
| | | }else{ |
| | | this.$message({ |
| | | type: "success", |
| | | message:"报名成功", |
| | | }); |
| | | } |
| | | done(); |
| | | }, |
| | | (error) => { |
| | |
| | | loading(); |
| | | } |
| | | ); |
| | | // } |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | |
| | | }) |
| | | }, |
| | | revoke(row,done,loading) { |
| | | this.$confirm("确定撤销报名?", { |
| | | this.$confirm("确定取消报名?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "成功撤销报名!", |
| | | message: "取消报名成功!", |
| | | }); |
| | | done(); |
| | | }, |