| | |
| | | /* |
| | | * @Author: Morpheus |
| | | * @Date: 2021-07-05 16:31:54 |
| | | * @Last Modified by: liu |
| | | * @Last Modified time: 2021-11-23 14:12:55 |
| | | * menu-name 考试管理 |
| | | */ |
| | | /* * @Author: Morpheus * @Date: 2021-07-05 16:31:54 * @Last Modified by: liu * |
| | | @Last Modified time: 2021-11-23 14:12:55 * menu-name 考试管理 */ |
| | | <template> |
| | | <el-row class="morpheus-box-paper"> |
| | | <el-col :span="24"> |
| | | <el-card> |
| | | <div |
| | | :class="[ |
| | | 'exam-card-body', |
| | | $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '', |
| | | ]" |
| | | > |
| | | <avue-crud |
| | | v-model="form" |
| | | class="company-box" |
| | | :option="questionBankOption" |
| | | :search.sync="questionBankSearch" |
| | | :table-loading="questionBankLoading" |
| | | :data="questionBankData" |
| | | ref="questionBankCrud" |
| | | :page.sync="questionBankPage" |
| | | @on-load="questionBankOnLoad" |
| | | :before-open="beforeOpen" |
| | | @selection-change="questionBankSelectionChange" |
| | | @search-change="questionBankSearchChange" |
| | | @search-reset="questionBankSearchReset" |
| | | @current-change="questionBankCurrentChange" |
| | | @size-change="questionBankSizeChange" |
| | | @row-save="questionBankRowSave" |
| | | @row-update="questionBankRowUpdate" |
| | | @row-del="questionBankRowDel" |
| | | > |
| | | <template slot-scope="{ row }" slot="auditStatus"> |
| | | <el-tag class="dtype"> |
| | | {{ |
| | | row.auditStatus == 1 |
| | | ? "审核通过" |
| | | : row.auditStatus == 2 |
| | | ? "审核不通过" |
| | | : "待审核" |
| | | }} |
| | | <i class="zc" v-if="row.auditStatus == 1"></i> |
| | | <i class="yj" v-if="row.auditStatus == 2"></i> |
| | | <i class="gz" v-if="row.auditStatus == 3"></i> |
| | | </el-tag> |
| | | </template> |
| | | <template slot="menuLeft"> |
| | | <el-button |
| | | style="display: none" |
| | | type="danger" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | @click="questionBankHandleDelete" |
| | | >删 除 |
| | | </el-button> |
| | | <!--图例 components--> |
| | | <span> |
| | | <Legend :datas="datalistLIU"></Legend> |
| | | </span> |
| | | </template> |
| | | <basic-container |
| | | :class="[ |
| | | 'exam-card-body', |
| | | $store.state.control.screenSize == 1366 ? 'smallSize' : 'normalSize', |
| | | $store.state.control.windowWidth >= 1024 ? 'tooRowSearch1' : '' |
| | | ]" |
| | | > |
| | | <avue-crud |
| | | v-model="form" |
| | | class="company-box tablesss" |
| | | :option="questionBankOption" |
| | | :search.sync="questionBankSearch" |
| | | :table-loading="questionBankLoading" |
| | | :data="questionBankData" |
| | | ref="questionBankCrud" |
| | | :page.sync="questionBankPage" |
| | | @on-load="questionBankOnLoad" |
| | | :before-open="beforeOpen" |
| | | @selection-change="questionBankSelectionChange" |
| | | @search-change="questionBankSearchChange" |
| | | @search-reset="questionBankSearchReset" |
| | | @current-change="questionBankCurrentChange" |
| | | @size-change="questionBankSizeChange" |
| | | @row-save="questionBankRowSave" |
| | | @row-update="questionBankRowUpdate" |
| | | @row-del="questionBankRowDel" |
| | | > |
| | | <template slot-scope="{ row }" slot="auditStatus"> |
| | | <el-tag class="dtype"> |
| | | {{ |
| | | row.auditStatus == 1 |
| | | ? "审核通过" |
| | | : row.auditStatus == 2 |
| | | ? "审核不通过" |
| | | : "待审核" |
| | | }} |
| | | <i class="zc" v-if="row.auditStatus == 1"></i> |
| | | <i class="yj" v-if="row.auditStatus == 2"></i> |
| | | <i class="gz" v-if="row.auditStatus == 3"></i> |
| | | </el-tag> |
| | | </template> |
| | | <template slot="menuLeft"> |
| | | <el-button |
| | | style="display: none" |
| | | type="danger" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | @click="questionBankHandleDelete" |
| | | >删 除 |
| | | </el-button> |
| | | <!--图例 components--> |
| | | <span> |
| | | <Legend :datas="datalistLIU"></Legend> |
| | | </span> |
| | | </template> |
| | | |
| | | <template slot-scope="{ row }" slot="examStatus"> |
| | | <el-tag>{{ row.examStatus == 0 ? "已发布" : "草稿" }}</el-tag> |
| | | </template> |
| | | <template slot-scope="{ row }" slot="examStatus"> |
| | | <el-tag>{{ row.examStatus == 0 ? "已发布" : "草稿" }}</el-tag> |
| | | </template> |
| | | |
| | | <template slot-scope="{ row }" slot="menu"> |
| | | <el-button |
| | | type="text" |
| | | size="mini" |
| | | icon="el-icon-collection" |
| | | class="start-kaoshi" |
| | | v-if="permission.trainExam_trainPapers" |
| | | @click="startExam(row)" |
| | | >报名清册 |
| | | </el-button> |
| | | <el-button |
| | | type="text" |
| | | size="mini" |
| | | icon="el-icon-folder-checked" |
| | | v-if="permission.trainExam_check" |
| | | @click="handleAudit(row)" |
| | | >审核 |
| | | </el-button> |
| | | <el-button |
| | | type="text" |
| | | size="mini" |
| | | icon="el-icon-circle-check" |
| | | v-if="permission.trainExam_confirm" |
| | | @click="handleConfirm(row)" |
| | | >考试名单确认 |
| | | </el-button> |
| | | <el-button |
| | | type="text" |
| | | size="mini" |
| | | icon="el-icon-search" |
| | | v-if="permission.trainExam_index_examScoreViews" |
| | | @click="examScoreViews(row)" |
| | | >成绩查看 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | <template slot-scope="{ row }" slot="menu"> |
| | | <el-button |
| | | type="text" |
| | | size="mini" |
| | | icon="el-icon-collection" |
| | | class="start-kaoshi" |
| | | v-if="permission.trainExam_trainPapers" |
| | | @click="startExam(row)" |
| | | >报名清册 |
| | | </el-button> |
| | | <el-button |
| | | type="text" |
| | | size="mini" |
| | | icon="el-icon-folder-checked" |
| | | v-if="permission.trainExam_check" |
| | | @click="handleAudit(row)" |
| | | >审核 |
| | | </el-button> |
| | | <el-button |
| | | type="text" |
| | | size="mini" |
| | | icon="el-icon-circle-check" |
| | | v-if="permission.trainExam_confirm" |
| | | @click="handleConfirm(row)" |
| | | >考试名单确认 |
| | | </el-button> |
| | | <el-button |
| | | type="text" |
| | | size="mini" |
| | | icon="el-icon-search" |
| | | v-if="permission.trainExam_index_examScoreViews" |
| | | @click="examScoreViews(row)" |
| | | >成绩查看 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | |
| | | <el-dialog |
| | | title="考试申请审核" |
| | | :visible.sync="dialogFormVisible" |
| | | modal-append-to-body="false" |
| | | append-to-body="true" |
| | | :close-on-click-model="true" |
| | | > |
| | | <avue-form |
| | | ref="formAudit" |
| | | v-model="Audit" |
| | | :option="optionAudit" |
| | | @reset-change="emptytChange" |
| | | @submit="submit" |
| | | ></avue-form> |
| | | </el-dialog> |
| | | </div> |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | <el-dialog |
| | | title="考试申请审核" |
| | | :visible.sync="dialogFormVisible" |
| | | modal-append-to-body="false" |
| | | append-to-body="true" |
| | | :close-on-click-model="true" |
| | | > |
| | | <avue-form |
| | | ref="formAudit" |
| | | v-model="Audit" |
| | | :option="optionAudit" |
| | | @reset-change="emptytChange" |
| | | @submit="submit" |
| | | ></avue-form> |
| | | </el-dialog> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | remove, |
| | | update, |
| | | updateAudit, |
| | | applyConfirm, |
| | | applyConfirm |
| | | } from "@/api/examapi/examination"; |
| | | import { auditColumn } from "./data"; |
| | | import { mapGetters } from "vuex"; |
| | | import Legend from "@/components/liu-legend/Legend"; |
| | | export default { |
| | | components: { |
| | | Legend, |
| | | Legend |
| | | }, |
| | | data() { |
| | | var validatePass = (rule, value, callback) => { |
| | |
| | | datalistLIU: [ |
| | | { |
| | | color: "#29C093", |
| | | text: "审核通过", |
| | | text: "审核通过" |
| | | }, |
| | | { |
| | | color: "#F34A4A", |
| | | text: "审核不通过", |
| | | text: "审核不通过" |
| | | }, |
| | | { |
| | | color: "#F48F57", |
| | | text: "待审核", |
| | | }, |
| | | text: "待审核" |
| | | } |
| | | ], |
| | | Audit: {}, |
| | | dialogFormVisible: false, |
| | |
| | | menuWidth: 230, |
| | | dialogClickModal: false, |
| | | column: auditColumn, |
| | | ...this.$store.state.control.clearOtherBut, |
| | | ...this.$store.state.control.clearOtherBut |
| | | }, |
| | | questionBankOption: { |
| | | // 操作栏多余按钮去除 |
| | |
| | | label: "培训学校名称", |
| | | prop: "deptName", |
| | | slot: true, |
| | | search:true, |
| | | searchSpan:5, |
| | | searchLabelWidth:110, |
| | | search: true, |
| | | searchSpan: 5, |
| | | searchLabelWidth: 110, |
| | | // 表单新增时是否禁止 |
| | | addDisabled: true, |
| | | // 表单新增时是否可见 |
| | |
| | | editDetail: false, |
| | | // hide: true, |
| | | display: false, |
| | | overHidden: true, |
| | | overHidden: true |
| | | }, |
| | | // { |
| | | // label: "考试名称", |
| | |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | search:true, |
| | | searchSpan:4, |
| | | search: true, |
| | | searchSpan: 4, |
| | | hide: true, |
| | | // 表单新增时是否禁止 |
| | | addDisabled: false, |
| | |
| | | { |
| | | required: true, |
| | | message: "请选择考试时间", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | trigger: "blur" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: "考试时间", |
| | |
| | | { |
| | | required: true, |
| | | message: "请选择考试时间", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | trigger: "blur" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: "考试开始时间", |
| | |
| | | editDisplay: false, |
| | | // 表单编辑时是否为查看模式 |
| | | editDetail: false, |
| | | width: 120, |
| | | width: 120 |
| | | }, |
| | | { |
| | | label: "考试开始截止时间", |
| | |
| | | editDisplay: true, |
| | | // 表单编辑时是否为查看模式 |
| | | editDetail: false, |
| | | width: 120, |
| | | width: 120 |
| | | }, |
| | | |
| | | // { |
| | |
| | | // 表单编辑时是否可见 |
| | | editDisplay: false, |
| | | // 表单编辑时是否为查看模式 |
| | | editDetail: false, |
| | | editDetail: false |
| | | }, |
| | | { |
| | | label: "注意事项", |
| | |
| | | editDisplay: false, |
| | | // 表单编辑时是否为查看模式 |
| | | editDetail: false, |
| | | width: 150, |
| | | width: 150 |
| | | }, |
| | | { |
| | | label: "报名人数", |
| | |
| | | editDisplay: false, |
| | | // 表单编辑时是否为查看模式 |
| | | editDetail: false, |
| | | width: 70, |
| | | width: 70 |
| | | }, |
| | | { |
| | | label: "考试人数", |
| | |
| | | editDisplay: false, |
| | | // 表单编辑时是否为查看模式 |
| | | editDetail: false, |
| | | width: 70, |
| | | width: 70 |
| | | }, |
| | | { |
| | | label: "申请时间", |
| | |
| | | { |
| | | required: true, |
| | | message: "请选择结束时间", |
| | | trigger: "click", |
| | | }, |
| | | ], |
| | | trigger: "click" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: "审核时间", |
| | |
| | | { |
| | | required: true, |
| | | message: "请选择结束时间", |
| | | trigger: "click", |
| | | }, |
| | | ], |
| | | trigger: "click" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: "审核状态", |
| | |
| | | { |
| | | required: true, |
| | | message: "请选择审核类型", |
| | | trigger: "blur", |
| | | }, |
| | | trigger: "blur" |
| | | } |
| | | ], |
| | | dicData: [ |
| | | { |
| | | label: "审核通过", |
| | | value: 1, |
| | | value: 1 |
| | | }, |
| | | { |
| | | label: "不通过", |
| | | value: 2, |
| | | value: 2 |
| | | }, |
| | | { |
| | | label: "待审核", |
| | | value: 3, |
| | | }, |
| | | value: 3 |
| | | } |
| | | ], |
| | | width: 110, |
| | | width: 110 |
| | | }, |
| | | { |
| | | label: "审核明细", |
| | |
| | | addDisplay: false, |
| | | prop: "auditDetail", |
| | | width: 90, |
| | | overHidden: true, |
| | | overHidden: true |
| | | }, |
| | | { |
| | | label: "距考试开始时间", |
| | |
| | | addDisplay: false, |
| | | prop: "deadline", |
| | | width: 110, |
| | | overHidden: true, |
| | | overHidden: true |
| | | }, |
| | | { |
| | | label: "考试名单确认人", |
| | |
| | | editDetail: false, |
| | | // hide: true, |
| | | display: false, |
| | | width: 110, |
| | | width: 110 |
| | | }, |
| | | { |
| | | label: "确认时间", |
| | |
| | | editDisplay: false, |
| | | // 表单编辑时是否为查看模式 |
| | | editDetail: false, |
| | | width: 130, |
| | | }, |
| | | ], |
| | | width: 130 |
| | | } |
| | | ] |
| | | }, |
| | | questionBankSearch: {}, |
| | | questionBankLoading: true, |
| | |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 16, |
| | | ...this.$store.state.control.changePageSize, |
| | | ...this.$store.state.control.changePageSize |
| | | }, |
| | | questionBankQuery: {}, |
| | | questionBankSelectionList: [], |
| | | questionBankSelectionList: [] |
| | | }; |
| | | }, |
| | | mounted() {}, |
| | | mounted() { |
| | | this.$store.commit("setWindowSizeHeightAdd"); |
| | | }, |
| | | computed: { |
| | | ids() { |
| | | let ids = []; |
| | | this.questionBankSelectionList.forEach((ele) => { |
| | | this.questionBankSelectionList.forEach(ele => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | |
| | | addBtn: this.vaildData(null, false), |
| | | viewBtn: this.vaildData(this.permission.trainExam_edit, false), |
| | | delBtn: this.vaildData(null, false), |
| | | editBtn: this.vaildData(null, false), |
| | | editBtn: this.vaildData(null, false) |
| | | }; |
| | | }, |
| | | } |
| | | }, |
| | | watch: {}, |
| | | methods: { |
| | |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign(params, this.questionBankQuery) |
| | | ).then((res) => { |
| | | ).then(res => { |
| | | const data = res.data.data; |
| | | this.questionBankPage.total = data.total; |
| | | this.questionBankData = data.records; |
| | | this.questionBankLoading = false; |
| | | this.$store.commit("setWindowSizeHeightAdd"); |
| | | this.questionBankSelectionClear(); |
| | | }); |
| | | }, |
| | |
| | | this.questionBankOnLoad(this.questionBankPage); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | error => { |
| | | window.console.log(error); |
| | | done(); |
| | | done(); |
| | | } |
| | | ); |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if(this.userInfo.role_name=="培训公司管理员"){ |
| | | if (["edit"].includes(type)) { |
| | | if(this.form.auditStatus==1){ |
| | | this.$message({ |
| | | type: "warning", |
| | | message: "当前考试申请已审核通过,无法再修改考试申请信息!", |
| | | }); |
| | | return; |
| | | } |
| | | beforeOpen(done, type) { |
| | | if (this.userInfo.role_name == "培训公司管理员") { |
| | | if (["edit"].includes(type)) { |
| | | if (this.form.auditStatus == 1) { |
| | | this.$message({ |
| | | type: "warning", |
| | | message: "当前考试申请已审核通过,无法再修改考试申请信息!" |
| | | }); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | done(); |
| | | }, |
| | |
| | | if (row.examType == 1) { |
| | | this.$router.push({ |
| | | path: `/applydetailed`, |
| | | query: row, |
| | | query: row |
| | | }); |
| | | } |
| | | |
| | |
| | | if (row.examType == 2) { |
| | | this.$router.push({ |
| | | path: `/trainApply`, |
| | | query: row, |
| | | query: row |
| | | }); |
| | | } |
| | | }, |
| | |
| | | if (row.examType == 2) { |
| | | this.$router.push({ |
| | | path: `/trainExam/singleperformance`, |
| | | query: row, |
| | | query: row |
| | | }); |
| | | } |
| | | }, |
| | |
| | | this.questionBankOnLoad(this.questionBankPage); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | error => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | |
| | | const data = { |
| | | id: row.id, |
| | | startTime: row.startTime + ":00", |
| | | endTime: row.endTime + ":00", |
| | | endTime: row.endTime + ":00" |
| | | }; |
| | | // row.startTime = row.startTime + ":00"; |
| | | // row.endTime = row.endTime + ":00"; |
| | |
| | | this.questionBankOnLoad(this.questionBankPage); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | error => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | |
| | | this.questionBankOnLoad(this.questionBankPage); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "操作成功!" |
| | | }); |
| | | }); |
| | | }, |
| | |
| | | this.$confirm("已确认当前考试申请人员名单无误?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | row["confirmUser"] = this.userInfo.Id; |
| | |
| | | this.questionBankOnLoad(this.questionBankPage); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "操作成功!" |
| | | }); |
| | | }); |
| | | }, |
| | |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | |
| | | this.questionBankOnLoad(this.questionBankPage); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "操作成功!" |
| | | }); |
| | | this.$refs.questionBankCrud.toggleSelection(); |
| | | }); |
| | |
| | | handleAudit(row) { |
| | | this.dialogFormVisible = true; |
| | | this.Audit = row; |
| | | }, |
| | | }, |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |