| | |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const batchAudit = (row) => { |
| | | return request({ |
| | | url: '/api/scoreAuditRecords/batchAudit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | |
| | | ref="questionBankCrud" |
| | | :page.sync="questionBankPage" |
| | | @on-load="questionBankOnLoad" |
| | | @selection-change="questionBankSelectionChange" |
| | | @selection-change="selectionChange" |
| | | @search-change="questionBankSearchChange" |
| | | @search-reset="questionBankSearchReset" |
| | | @current-change="questionBankCurrentChange" |
| | |
| | | @refresh-change="refreshChange" |
| | | > |
| | | <!-- 自定义按钮 --> |
| | | |
| | | <template slot="menuLeft"> |
| | | <!-- <el-button type="danger" |
| | | size="mini" |
| | | icon="el-icon-delete" |
| | | plain |
| | | @click="handleDelete">新增 |
| | | </el-button> --> |
| | | <!-- <el-button type="danger" |
| | | size="mini" |
| | | icon="el-icon-delete" |
| | | plain |
| | | @click="handleDelete">删除 |
| | | </el-button> --> |
| | | <el-button |
| | | type="primary" |
| | | size="small" |
| | | plain |
| | | v-if="checks" |
| | | icon="el-icon-collection-tag" |
| | | @click="handleBatchAudit" |
| | | >批量审批 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="{ type, size, row }" slot="menu"> |
| | |
| | | @submit="submit" |
| | | ></avue-form> |
| | | </el-dialog> |
| | | <el-dialog |
| | | title="批量审批" |
| | | append-to-body |
| | | :visible.sync="dialogBatchAudit" |
| | | width="900px" |
| | | @close="closeDialog" |
| | | > |
| | | <avue-form |
| | | ref="formBatchAudit" |
| | | v-model="batchAudit" |
| | | :option="optionBatchAudit" |
| | | @reset-change="emptytChange" |
| | | @submit="submitBatchAudit" |
| | | ></avue-form> |
| | | </el-dialog> |
| | | </el-row> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getList, update, applyAudit } from "@/api/examapi/modifiedGrades"; |
| | | import { |
| | | getList, |
| | | update, |
| | | applyAudit, |
| | | batchAudit, |
| | | } from "@/api/examapi/modifiedGrades"; |
| | | import { mapGetters } from "vuex"; |
| | | import { getRoleDetail } from "@/api/system/role"; |
| | | export default { |
| | |
| | | return { |
| | | Audit: {}, |
| | | dialogFormVisible: false, |
| | | dialogBatchAudit: false, |
| | | batchAudit: { |
| | | number: 0, |
| | | }, |
| | | optionBatchAudit: { |
| | | height: "auto", |
| | | filterBtn: true, |
| | | calcHeight: 30, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: true, //liu |
| | | index: true, |
| | | stripe: true, |
| | | viewBtn: true, |
| | | selection: false, |
| | | excelBtn: false, |
| | | menuWidth: 380, |
| | | dialogClickModal: false, |
| | | ...this.$store.state.control.clearOtherBut, |
| | | column: [ |
| | | { |
| | | label: "所选保安人数", |
| | | prop: "number", |
| | | span: 24, |
| | | value: 0, |
| | | disabled: true, |
| | | labelWidth: 110, |
| | | }, |
| | | { |
| | | label: "审核状态", |
| | | search: true, |
| | | searchSpan: 5, |
| | | span: 24, |
| | | prop: "status", |
| | | slot: true, |
| | | editDisplay: false, |
| | | addDisplay: false, |
| | | type: "select", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择审核类型", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | dicData: [ |
| | | { |
| | | label: "待审核", |
| | | value: 1, |
| | | }, |
| | | { |
| | | label: "审核通过", |
| | | value: 2, |
| | | }, |
| | | { |
| | | label: "审核不通过", |
| | | value: 3, |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "审核明细", |
| | | span: 24, |
| | | type: "textarea", |
| | | prop: "auditDetail", |
| | | }, |
| | | ], |
| | | }, |
| | | choiceList: [], |
| | | optionAudit: { |
| | | height: "auto", |
| | | calcHeight: 30, |
| | |
| | | delBtn: false, |
| | | editBtn: true, |
| | | addBtn: false, |
| | | selection: false, |
| | | check: false, |
| | | // 导出按钮 |
| | | // excelBtn: true, |
| | | // excelBtnText: "成绩导出", |
| | | checks: false, |
| | | selection: true, |
| | | reserveSelection: true, |
| | | tip: false, |
| | | viewBtn: true, |
| | | // title: '成绩', |
| | | align: "center", |
| | | height: "auto", |
| | | calcHeight: 80, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 4, |
| | | index: true, |
| | |
| | | { |
| | | label: "申请人所在单位", |
| | | prop: "applyUnitName", |
| | | search:true, |
| | | searchLabelWidth:120, |
| | | searchSpan:4, |
| | | search: true, |
| | | searchLabelWidth: 120, |
| | | searchSpan: 4, |
| | | slot: true, |
| | | // 表单新增时是否禁止 |
| | | addDisabled: false, |
| | |
| | | editDisplay: true, |
| | | // 表单编辑时是否为查看模式 |
| | | editDetail: false, |
| | | overHidden:true, |
| | | overHidden: true, |
| | | }, |
| | | { |
| | | label: "申请理由", |
| | |
| | | this.check = false; |
| | | } |
| | | } |
| | | //批量审批 |
| | | //判断是否为超级管理员 |
| | | if (this.userInfo.role_name == "administrator") { |
| | | this.checks = true; |
| | | this.questionBankOption.tip = true |
| | | } |
| | | }, |
| | | mounted() {}, |
| | | mounted() { |
| | | |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["userInfo", "permission"]), |
| | | permissionList() { |
| | |
| | | } |
| | | ); |
| | | }, |
| | | |
| | | //成绩修改批量审核 |
| | | handleBatchAudit() { |
| | | if (this.choiceList.length == 0) { |
| | | this.$message({ |
| | | message: "未选择考试的人员", |
| | | type: "warning", |
| | | }); |
| | | return; |
| | | } |
| | | this.dialogBatchAudit = true; |
| | | this.batchAudit.number = this.choiceList.length; |
| | | }, |
| | | selectionChange(list) { |
| | | // this.selectionList = list; |
| | | this.choiceList = []; |
| | | for (let k in list) { |
| | | this.choiceList.push({ |
| | | id: list[k].id, |
| | | }); |
| | | } |
| | | }, |
| | | questionBankOnLoad(page, params = {}) { |
| | | //判断角色,如果是保安公司管理员或保安,只能查看当前公司的考试成绩 |
| | | var that = this; |
| | |
| | | |
| | | questionBankSelectionClear() { |
| | | this.questionBankSelectionList = []; |
| | | this.$refs.questionBankCrud.toggleSelection(); |
| | | // this.$refs.questionBankCrud.toggleSelection(); |
| | | }, |
| | | questionBankSelectionChange(list) { |
| | | this.questionBankSelectionList = list; |
| | | }, |
| | | // questionBankSelectionChange(list) { |
| | | // this.questionBankSelectionList = list; |
| | | // }, |
| | | questionBankSearchChange(params, done) { |
| | | this.questionBankQuery = params; |
| | | this.questionBankPage.currentPage = 1; |
| | |
| | | } |
| | | ); |
| | | }, |
| | | |
| | | //批量审批 |
| | | submitBatchAudit(row, done, loading) { |
| | | var that = this; |
| | | let cho = this.choiceList; |
| | | let str = ""; |
| | | for (let k in cho) { |
| | | str += cho[k].id; |
| | | if (k != cho.length - 1) { |
| | | str += ","; |
| | | } |
| | | } |
| | | const data = { |
| | | ids: str, |
| | | status: row.status, |
| | | auditDetail: row.auditDetail, |
| | | auditUser: this.userInfo.Id, |
| | | }; |
| | | //提交申请 |
| | | batchAudit(data).then( |
| | | () => { |
| | | this.questionBankOnLoad(this.page); |
| | | that.$refs.formBatchAudit.resetFields(); |
| | | that.dialogBatchAudit = false; |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功", |
| | | }); |
| | | //清除选项 |
| | | that.$refs.questionBankCrud.toggleSelection(); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | }, |
| | | refreshChange() { |
| | | this.questionBankOnLoad(this.questionBankPage, this.questionBankQuery); |
| | | }, |