| | |
| | | </el-button> |
| | | </template> --> |
| | | |
| | | <template slot="menuLeft"> |
| | | <!-- <template slot="menuLeft"> |
| | | <el-button type="danger" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | @click="questionBankHandleDelete">删 除 |
| | | </el-button> |
| | | </template> |
| | | </template> --> |
| | | |
| | | <template slot-scope="{ type,row }" slot="menu"> |
| | | <el-button |
| | | :type="type" |
| | | size="small" |
| | | icon="el-icon-refresh-left" |
| | | :disabled="row.applyStatus==4" |
| | | @click="handleCancel(row)" |
| | | >取消报名 |
| | | </el-button> |
| | | <el-button |
| | | :type="type" |
| | | size="small" |
| | | icon="el-icon-receiving" |
| | | :disabled="row.applyStatus==4" |
| | | @click="handlePrint(row)" |
| | | >准考证打印 |
| | | </el-button> |
| | |
| | | import { |
| | | getApplyList, |
| | | addApply, |
| | | updateApply, |
| | | remove |
| | | } from "@/api/examapi/applyexam"; |
| | | import { mapState } from 'vuex' |
| | | |
| | | |
| | | var DIC = { |
| | | applyStatus: [{ |
| | | label: '已报名', |
| | | value: 2 |
| | | }, { |
| | | label: '已取消', |
| | | value: 4 |
| | | }] |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | data () { |
| | | |
| | | return { |
| | | obj: { |
| | | name: '张三', |
| | | }, |
| | | questionBankOption: { |
| | | // 操作栏多余按钮去除 |
| | | delBtn: true, |
| | | delBtn: false, |
| | | editBtn: false, |
| | | addBtn: true, |
| | | selection: true, |
| | | menu: true, |
| | | // 导出按钮 |
| | | excelBtn: true, |
| | | // excelBtn: true, |
| | | viewBtn: false, |
| | | |
| | | // title: '题库', |
| | |
| | | indexLabel: '序号', |
| | | //dialogType: 'drawer', |
| | | dialogClickModal: false, |
| | | //tree 默认展开 |
| | | defaultExpandAll:true, |
| | | // 操作栏宽度 |
| | | menuWidth: 200, |
| | | |
| | | column: [ |
| | | { |
| | | label: "保安姓名", |
| | | prop: "name", |
| | | prop: "userId", |
| | | type: 'tree', |
| | | dicUrl: '', |
| | | search: true, |
| | | hide:true, |
| | | slot: true, |
| | | // 表单新增时是否禁止 |
| | | addDisabled: false, |
| | |
| | | }] |
| | | }, |
| | | { |
| | | label: "试卷名称", |
| | | label: "保安姓名", |
| | | prop: "name", |
| | | // 表单新增时是否禁止 |
| | | addDisabled: false, |
| | | // 表单新增时是否可见 |
| | | addDisplay: false, |
| | | // 表单新增时是否为查看模式 |
| | | addDetail: false, |
| | | // 表单编辑时是否禁止 |
| | | editDisabled: false, |
| | | // 表单编辑时是否可见 |
| | | editDisplay: false, |
| | | // 表单编辑时是否为查看模式 |
| | | editDetail: false, |
| | | viewDisplay:true, |
| | | props: { |
| | | label: "title", |
| | | value: "id", |
| | | }, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择保安姓名", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "考试名称", |
| | | prop: "examName", |
| | | type: 'tree', |
| | | dicUrl: '/api/exampaper/page-tree', |
| | |
| | | required: true, |
| | | message: "请选择准考证号", |
| | | trigger: "blur" |
| | | }] |
| | | }], |
| | | width: 100 |
| | | }, |
| | | { |
| | | label: "身份证号", |
| | |
| | | // 表单新增时是否禁止 |
| | | addDisabled: true, |
| | | // 表单新增时是否可见 |
| | | addDisplay: true, |
| | | addDisplay: false, |
| | | // 表单新增时是否为查看模式 |
| | | addDetail: false, |
| | | // 表单编辑时是否禁止 |
| | |
| | | ? "0" + new Date().getSeconds() |
| | | : new Date().getSeconds())), |
| | | |
| | | width: 180 |
| | | width: 160 |
| | | }, |
| | | { |
| | | label: "考试时间", |
| | |
| | | editDisplay: true, |
| | | // 表单编辑时是否为查看模式 |
| | | editDetail: false, |
| | | width: 180 |
| | | } |
| | | width: 160 |
| | | },{ |
| | | label: "报名状态", |
| | | prop: "applyStatus", |
| | | slot: true, |
| | | // 表单新增时是否禁止 |
| | | addDisabled: false, |
| | | // 表单新增时是否可见 |
| | | addDisplay: false, |
| | | // 表单新增时是否为查看模式 |
| | | addDetail: false, |
| | | // 表单编辑时是否禁止 |
| | | editDisabled: false, |
| | | // 表单编辑时是否可见 |
| | | editDisplay: true, |
| | | // 表单编辑时是否为查看模式 |
| | | editDetail: false, |
| | | dicData:DIC.applyStatus, |
| | | search:true, |
| | | type:"select" |
| | | }, |
| | | ] |
| | | }, |
| | | questionBankSearch: {}, |
| | |
| | | |
| | | // 新增 |
| | | questionBankRowSave (row, done, loading) { |
| | | |
| | | addApply({ userId: row.name, examId: row.examName, applyTime: row.applyTime }).then(() => { |
| | | // debugger; |
| | | addApply({ userId: row.userId, examId: row.examName, applyTime: row.applyTime }).then(() => { |
| | | this.questionBankOnLoad(this.questionBankPage); |
| | | this.$message({ |
| | | type: "success", |
| | |
| | | }); |
| | | }, |
| | | |
| | | //取消报名 |
| | | handleCancel(row){ |
| | | this.$confirm("确定取消报名?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | row.applyStatus = 4; |
| | | return updateApply(row); |
| | | }) |
| | | .then(() => { |
| | | this.questionBankOnLoad(this.questionBankPage); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | questionBankHandleDelete () { |
| | | if (this.questionBankSelectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据"); |