13 files modified
2 files added
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | export const getList = (current, size, params, deptId) => { |
| | | return request({ |
| | | url: '/api/blade-user/page', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | deptId, |
| | | } |
| | | }) |
| | | return request({ |
| | | url: '/api/blade-user/page', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | deptId, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const remove = (ids) => { |
| | | return request({ |
| | | url: '/api/blade-user/remove', |
| | | method: 'post', |
| | | params: { |
| | | ids, |
| | | } |
| | | }) |
| | | return request({ |
| | | url: '/api/blade-user/remove', |
| | | method: 'post', |
| | | params: { |
| | | ids, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const add = (row) => { |
| | | return request({ |
| | | url: '/api/blade-user/submit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | return request({ |
| | | url: '/api/blade-user/submit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const update = (row) => { |
| | | return request({ |
| | | url: '/api/blade-user/update', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | return request({ |
| | | url: '/api/blade-user/update', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const updatePlatform = (userId, userType, userExt) => { |
| | | return request({ |
| | | url: '/api/blade-user/update-platform', |
| | | method: 'post', |
| | | params: { |
| | | userId, |
| | | userType, |
| | | userExt, |
| | | } |
| | | }) |
| | | return request({ |
| | | url: '/api/blade-user/update-platform', |
| | | method: 'post', |
| | | params: { |
| | | userId, |
| | | userType, |
| | | userExt, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const getApplyDetailList = (examId) => { |
| | | return request({ |
| | | url: '/api/apply/getApplyDetailList', |
| | | method: 'get', |
| | | params: { |
| | | examId, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const getUser = (id) => { |
| | | return request({ |
| | | url: '/api/blade-user/detail', |
| | | method: 'get', |
| | | params: { |
| | | id, |
| | | } |
| | | }) |
| | | return request({ |
| | | url: '/api/blade-user/detail', |
| | | method: 'get', |
| | | params: { |
| | | id, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const getUserPlatform = (id) => { |
| | | return request({ |
| | | url: '/api/blade-user/platform-detail', |
| | | method: 'get', |
| | | params: { |
| | | id, |
| | | } |
| | | }) |
| | | return request({ |
| | | url: '/api/blade-user/platform-detail', |
| | | method: 'get', |
| | | params: { |
| | | id, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const getUserInfo = () => { |
| | | return request({ |
| | | url: '/api/blade-user/info', |
| | | method: 'get', |
| | | }) |
| | | return request({ |
| | | url: '/api/blade-user/info', |
| | | method: 'get', |
| | | }) |
| | | } |
| | | |
| | | export const resetPassword = (userIds) => { |
| | | return request({ |
| | | url: '/api/blade-user/reset-password', |
| | | method: 'post', |
| | | params: { |
| | | userIds, |
| | | } |
| | | }) |
| | | return request({ |
| | | url: '/api/blade-user/reset-password', |
| | | method: 'post', |
| | | params: { |
| | | userIds, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const updatePassword = (oldPassword, newPassword, newPassword1) => { |
| | | return request({ |
| | | url: '/api/blade-user/update-password', |
| | | method: 'post', |
| | | params: { |
| | | oldPassword, |
| | | newPassword, |
| | | newPassword1, |
| | | } |
| | | }) |
| | | return request({ |
| | | url: '/api/blade-user/update-password', |
| | | method: 'post', |
| | | params: { |
| | | oldPassword, |
| | | newPassword, |
| | | newPassword1, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const updateInfo = (row) => { |
| | | return request({ |
| | | url: '/api/blade-user/update-info', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | return request({ |
| | | url: '/api/blade-user/update-info', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const grant = (userIds, roleIds) => { |
| | | return request({ |
| | | url: '/api/blade-user/grant', |
| | | method: 'post', |
| | | params: { |
| | | userIds, |
| | | roleIds, |
| | | } |
| | | }) |
| | | } |
| | | return request({ |
| | | url: '/api/blade-user/grant', |
| | | method: 'post', |
| | | params: { |
| | | userIds, |
| | | roleIds, |
| | | } |
| | | }) |
| | | } |
| New file |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | |
| | | export const getExamPaymentList = (current, size, params) => { |
| | | return request({ |
| | | url: '/api/examPayment/page', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | export const remove = (ids) => { |
| | | return request({ |
| | | url: '/api/examPayment/remove', |
| | | method: 'post', |
| | | params: { |
| | | ids, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const add = (row) => { |
| | | return request({ |
| | | url: '/api/examPayment/submit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const update = (row) => { |
| | | return request({ |
| | | url: '/api/examPayment/submit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | |
| | | export const getExamPayment = (id) => { |
| | | return request({ |
| | | url: '/api/examPayment/detail', |
| | | method: 'get', |
| | | params: { |
| | | id, |
| | | } |
| | | }) |
| | | } |
| | |
| | | type="warning" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-download" |
| | | icon="el-icon-position" |
| | | @click="handleImport1" |
| | | >报名清册生成 |
| | | </el-button> |
| | | <el-button |
| | | type="warning" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-receiving" |
| | | @click="handleExport" |
| | | >清册打印 |
| | | >报名清册打印 |
| | | </el-button> |
| | | <el-button |
| | | type="success" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-receiving" |
| | | icon="el-icon-upload2" |
| | | @click="handleImport" |
| | | >清册导入 |
| | | >报名清册附件上传 |
| | | </el-button> |
| | | </template> |
| | | |
| | |
| | | </template> |
| | | </avue-form> |
| | | </el-dialog> |
| | | <el-dialog |
| | | title="报名清册生成" |
| | | append-to-body |
| | | :visible.sync="excelBox1" |
| | | width="1200px" |
| | | > |
| | | <el-table |
| | | :data="tableData" |
| | | :span-method="arraySpanMethod" |
| | | border |
| | | style="width: 100%"> |
| | | |
| | | <template slot-scope="{ row }" slot="sex"> |
| | | {{row.sex==1?"男":row.sex==2?"女":row.sex==-1?'':row.sex}} |
| | | </template> |
| | | <el-table-column |
| | | prop="realName" |
| | | label="姓名"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="idCardNo" |
| | | label="身份证号"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="sex" |
| | | label="性别"> |
| | | <template slot-scope="scope"> |
| | | {{scope.row.sex==1?"男":scope.row.sex==2?"女":scope.row.sex==-1?'':scope.row.sex}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="candidateNo" |
| | | label="准考证号"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="deptName" |
| | | width="180" |
| | | label="单位名称"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="applyCard" |
| | | label="报考证件"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="applyTime" |
| | | label="报名时间"> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-dialog> |
| | | </div> |
| | | </el-card> |
| | | </el-col> |
| | |
| | | |
| | | <script> |
| | | import { getApplyList, addApply, remove } from "@/api/examapi/applyexam"; |
| | | import { getApplyDetailList } from "@/api/applyexam/applyexam"; |
| | | import { mapState } from "vuex"; |
| | | |
| | | var DIC = { |
| | |
| | | data() { |
| | | var examId = this.$route.query.id; |
| | | return { |
| | | tableData:[], |
| | | obj: { |
| | | name: "张三", |
| | | }, |
| | | excelBox: false, |
| | | excelBox1: false, |
| | | questionBankOption: { |
| | | // 操作栏多余按钮去除 |
| | | delBtn: false, |
| | |
| | | menu: true, |
| | | // 导出按钮 |
| | | // excelBtn: true, |
| | | // excelBtnText:"报名清册生成", |
| | | viewBtn: false, |
| | | |
| | | // title: '题库', |
| | |
| | | questionBankOnLoad(page, params = {}) { |
| | | // debugger; |
| | | params["examId"] = this.$route.query.id; |
| | | // params["applyStatus"] = 2; |
| | | params["applyStatus"] = 3; |
| | | this.questionBankLoading = false; |
| | | getApplyList( |
| | | page.currentPage, |
| | |
| | | }); |
| | | }, |
| | | |
| | | |
| | | handleImport() { |
| | | this.excelBox = true; |
| | | }, |
| | | handleImport1() { |
| | | this.excelBox1 = true; |
| | | //获取报名信息 |
| | | getApplyDetailList(this.$route.query.id).then((res)=>{ |
| | | // console.log(res.data,111452); |
| | | this.tableData = res.data.applyList; |
| | | this.tableData.push({ |
| | | realName:"总人数", |
| | | idCardNo:res.data.num |
| | | }) |
| | | }) |
| | | }, |
| | | arraySpanMethod({ rowIndex, columnIndex }) { |
| | | // console.log(rowIndex,columnIndex,333); |
| | | if(rowIndex == (this.tableData.length-1)){ |
| | | if (columnIndex === 0) { |
| | | return [1, 6]; |
| | | } |
| | | } |
| | | }, |
| | | handleTemplate() { |
| | | window.open(`/api/apply/export-template`); |
| | | }, |
| | |
| | | plain |
| | | icon="el-icon-folder-checked" |
| | | v-if="permission.applyexam_import" |
| | | @click="handleImport" |
| | | @click="handleImport" |
| | | >批量报名 |
| | | </el-button> |
| | | </template> |
| | |
| | | :type="type" |
| | | size="small" |
| | | icon="el-icon-receiving" |
| | | v-if="permission.applyexam_print && row.candidateNo!=''" |
| | | v-if="permission.applyexam_print && row.candidateNo != ''" |
| | | @click="handlePrint(row)" |
| | | >准考证打印 |
| | | </el-button> |
| | |
| | | import { mapState } from "vuex"; |
| | | import { mapGetters } from "vuex"; |
| | | import { getRoleDetail } from "@/api/system/role"; |
| | | import { getUserDetails } from "@/api/experience/experience" |
| | | var DIC = { |
| | | applyStatus: [ |
| | | { |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | obj:{ |
| | | userId:'' |
| | | }, |
| | | dialogFormVisible: false, |
| | | dialogExamFormVisible: false, |
| | | examPersission: false, |
| | |
| | | { |
| | | label: "考试人数", |
| | | prop: "number", |
| | | type: 'number', |
| | | type: "number", |
| | | span: 12, |
| | | precision:0, |
| | | step:50, |
| | | mock:{ |
| | | type:'number', |
| | | max:1000, |
| | | min:0, |
| | | precision:0 |
| | | precision: 0, |
| | | step: 50, |
| | | mock: { |
| | | type: "number", |
| | | max: 1000, |
| | | min: 0, |
| | | precision: 0, |
| | | }, |
| | | rules: [ |
| | | { |
| | |
| | | ], |
| | | minRows: 0, |
| | | maxRows: 1000, |
| | | value:50, |
| | | value: 50, |
| | | }, |
| | | { |
| | | label: "序号开始", |
| | | prop: "serialStart", |
| | | span: 6, |
| | | value:1, |
| | | mock:{ |
| | | type:'number', |
| | | max:1000, |
| | | min:1, |
| | | precision:0 |
| | | value: 1, |
| | | mock: { |
| | | type: "number", |
| | | max: 1000, |
| | | min: 1, |
| | | precision: 0, |
| | | }, |
| | | minRows: 1, |
| | | maxRows: 1000, |
| | | type:"number", |
| | | type: "number", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | label: "序号结束", |
| | | prop: "serialEnd", |
| | | span: 6, |
| | | value:50, |
| | | mock:{ |
| | | type:'number', |
| | | max:1000, |
| | | min:1, |
| | | precision:0 |
| | | value: 50, |
| | | mock: { |
| | | type: "number", |
| | | max: 1000, |
| | | min: 1, |
| | | precision: 0, |
| | | }, |
| | | minRows: 1, |
| | | maxRows: 1000, |
| | | type:"number", |
| | | type: "number", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | // 操作栏多余按钮去除 |
| | | delBtn: false, |
| | | editBtn: false, |
| | | addBtn: false, |
| | | addBtn: true, |
| | | addBtnText: "报名信息新增", |
| | | selection: false, |
| | | menu: true, |
| | | // 导出按钮 |
| | |
| | | defaultExpandAll: true, |
| | | // 操作栏宽度 |
| | | menuWidth: 250, |
| | | |
| | | column: [ |
| | | { |
| | | label: "报名时间", |
| | | prop: "releaseTimeRange", |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | searchRange: true, |
| | | searchSpan: 5, |
| | | hide: true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | search: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入时间", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "保安公司名称", |
| | | searchLabelWidth: "110", |
| | | labelWidth: 110, |
| | | cascaderItem: ["userId"], |
| | | prop: "deptId", |
| | | type: "tree", |
| | | hide: true, |
| | | viewDisabled:false, |
| | | viewDisplay:false, |
| | | dicUrl: |
| | | "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697", |
| | | props: { |
| | | label: "title", |
| | | value: "id", |
| | | }, |
| | | slot: true, |
| | | searchSpan: 4, |
| | | search: false, |
| | | width: 260, |
| | | }, |
| | | { |
| | | label: "保安姓名", |
| | | prop: "userId", |
| | | type: "tree", |
| | | dicUrl: "", |
| | | dicUrl: |
| | | "/api/blade-user/security-apply-tree?examType=1&deptId={{key}}", |
| | | hide: true, |
| | | slot: true, |
| | | searchSpan: 4, |
| | |
| | | // 表单编辑时是否为查看模式 |
| | | editDetail: false, |
| | | props: { |
| | | label: "title", |
| | | label: "name", |
| | | value: "id", |
| | | }, |
| | | rules: [ |
| | |
| | | prop: "age", |
| | | slot: true, |
| | | // 表单新增时是否禁止 |
| | | addDisabled: false, |
| | | addDisabled: true, |
| | | // 表单新增时是否可见 |
| | | addDisplay: false, |
| | | // 表单新增时是否为查看模式 |
| | | addDetail: false, |
| | | // 表单编辑时是否禁止 |
| | | editDisabled: false, |
| | | // 表单编辑时是否可见 |
| | | editDisplay: false, |
| | | // 表单编辑时是否为查看模式 |
| | | editDetail: false, |
| | | addDisplay: true, |
| | | viewDisplay: true, |
| | | }, |
| | | // { |
| | | // label: "考试名称", |
| | | // prop: "examName", |
| | | // type: "tree", |
| | | // dicUrl: "/api/exampaper/page-tree?examType=1", |
| | | // // 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, |
| | | searchSpan: 6, |
| | | // 表单新增时是否禁止 |
| | | 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", |
| | | }, |
| | | ], |
| | | width: 100, |
| | | }, |
| | | { |
| | | label: "身份证号", |
| | | prop: "idCardNo", |
| | | slot: true, |
| | | search: true, |
| | | searchSpan: 5, |
| | | // 表单新增时是否禁止 |
| | | addDisabled: false, |
| | | // 表单新增时是否可见 |
| | |
| | | width: 150, |
| | | }, |
| | | { |
| | | label: "报考证件", |
| | | prop: "applyCard", |
| | | slot: true, |
| | | label: "身份证号", |
| | | prop: "cardid", |
| | | searchSpan: 5, |
| | | // 表单新增时是否禁止 |
| | | addDisabled: false, |
| | | addDisabled: true, |
| | | // 表单新增时是否可见 |
| | | addDisplay: false, |
| | | // 表单新增时是否为查看模式 |
| | | addDetail: false, |
| | | // 表单编辑时是否禁止 |
| | | editDisabled: false, |
| | | // 表单编辑时是否可见 |
| | | editDisplay: true, |
| | | // 表单编辑时是否为查看模式 |
| | | editDetail: false, |
| | | addDisplay: true, |
| | | hide:true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | width: 150, |
| | | }, |
| | | { |
| | | label: "性别", |
| | | prop: "sex", |
| | | type: "select", |
| | | // 表单新增时是否禁止 |
| | | addDisabled: true, |
| | | // 表单新增时是否可见 |
| | | addDisplay: true, |
| | | dicData: [ |
| | | { |
| | | label: "男", |
| | | value: 1, |
| | | }, |
| | | { |
| | | label: "女", |
| | | value: 2, |
| | | }, |
| | | { |
| | | label: "未知", |
| | | value: 3, |
| | | }, |
| | | { |
| | | label: " ", |
| | | value: -1, |
| | | }, |
| | | ], |
| | | display: false, |
| | | }, |
| | | |
| | | { |
| | | label: "籍贯", |
| | | prop: "nativePlace", |
| | | // 表单新增时是否禁止 |
| | | addDisabled: true, |
| | | // 表单新增时是否可见 |
| | | addDisplay: true, |
| | | }, |
| | | { |
| | | label: "联系电话", |
| | | prop: "phone", |
| | | // 表单新增时是否禁止 |
| | | addDisabled: true, |
| | | // 表单新增时是否可见 |
| | | addDisplay: true, |
| | | }, |
| | | { |
| | | label: "保安公司名称", |
| | | labelWidth: "110", |
| | | addDisplay: false, |
| | | prop: "deptName", |
| | | width: 260, |
| | | }, |
| | | // { |
| | | // label: "试卷分数", |
| | | // prop: "paperScore", |
| | | // slot: true, |
| | | // // 表单新增时是否禁止 |
| | | // addDisabled: false, |
| | | // // 表单新增时是否可见 |
| | | // addDisplay: false, |
| | | // // 表单新增时是否为查看模式 |
| | | // addDetail: false, |
| | | // // 表单编辑时是否禁止 |
| | | // editDisabled: true, |
| | | // // 表单编辑时是否可见 |
| | | // editDisplay: true, |
| | | // // 表单编辑时是否为查看模式 |
| | | // editDetail: false |
| | | // label: "准考证号", |
| | | // prop: "candidateNo", |
| | | // slot: true, |
| | | // // 表单新增时是否禁止 |
| | | // addDisabled: false, |
| | | // // 表单新增时是否可见 |
| | | // addDisplay: false, |
| | | // // 表单新增时是否为查看模式 |
| | | // addDetail: false, |
| | | // // 表单编辑时是否禁止 |
| | | // editDisabled: false, |
| | | // // 表单编辑时是否可见 |
| | | // editDisplay: true, |
| | | // // 表单编辑时是否为查看模式 |
| | | // editDetail: false, |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "请选择准考证号", |
| | | // trigger: "blur", |
| | | // }, |
| | | // ], |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // label: "报考证件", |
| | | // prop: "applyCard", |
| | | // slot: true, |
| | | // // 表单新增时是否禁止 |
| | | // addDisabled: false, |
| | | // // 表单新增时是否可见 |
| | | // addDisplay: false, |
| | | // // 表单新增时是否为查看模式 |
| | | // addDetail: false, |
| | | // // 表单编辑时是否禁止 |
| | | // editDisabled: false, |
| | | // // 表单编辑时是否可见 |
| | | // editDisplay: true, |
| | | // // 表单编辑时是否为查看模式 |
| | | // editDetail: false, |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "请选择准考证号", |
| | | // trigger: "blur", |
| | | // }, |
| | | // ], |
| | | // }, |
| | | { |
| | | label: "报名时间", |
| | |
| | | |
| | | width: 150, |
| | | }, |
| | | // { |
| | | // 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: 150, |
| | | // }, |
| | | |
| | | // { |
| | | // label: "审查状态", |
| | | // prop: "examinationType", |
| | | // slot: true, |
| | | // searchSpan: 5, |
| | | // // 表单新增时是否禁止 |
| | | // addDisabled: false, |
| | | // // 表单新增时是否可见 |
| | | // addDisplay: false, |
| | | // // 表单新增时是否为查看模式 |
| | | // addDetail: false, |
| | | // // 表单编辑时是否禁止 |
| | | // editDisabled: false, |
| | | // // 表单编辑时是否可见 |
| | | // editDisplay: true, |
| | | // // 表单编辑时是否为查看模式 |
| | | // editDetail: false, |
| | | // dicData: [ |
| | | // { |
| | | // label: "正常", |
| | | // value: "1", |
| | | // }, |
| | | // { |
| | | // label: "异常", |
| | | // value: "2", |
| | | // }, |
| | | // ], |
| | | // search: true, |
| | | // type: "select", |
| | | // }, |
| | | // { |
| | | // label: "审查明细", |
| | | // prop: "examinationMx", |
| | | // slot: true, |
| | | // // 表单新增时是否禁止 |
| | | // addDisabled: false, |
| | | // // 表单新增时是否可见 |
| | | // addDisplay: false, |
| | | // // 表单新增时是否为查看模式 |
| | | // addDetail: false, |
| | | // // 表单编辑时是否禁止 |
| | | // editDisabled: false, |
| | | // // 表单编辑时是否可见 |
| | | // editDisplay: true, |
| | | // // 表单编辑时是否为查看模式 |
| | | // editDetail: false, |
| | | // overHidden: true, |
| | | // width: 150, |
| | | // }, |
| | | // { |
| | | // label: "报名状态", |
| | | // search: true, |
| | | // type: "select", |
| | | // searchSpan: 4, |
| | | // prop: "applyStatus", |
| | | // searchValue: 2, |
| | | // dicData: [{ |
| | | // label: '全部', |
| | | // value: 0, |
| | | // }, |
| | | // { |
| | | // label: '已报名', |
| | | // value: 2, |
| | | // }, |
| | | // { |
| | | // label: '已取消', |
| | | // value: 4, |
| | | // } |
| | | // ], |
| | | // props: { |
| | | // label: "label", |
| | | // value: "value" |
| | | // }, |
| | | // editDisplay: false, |
| | | // addDisplay: false, |
| | | // width: 100, |
| | | // }, |
| | | { |
| | | label: "报名状态", |
| | | prop: "applyStatus", |
| | | search: true, |
| | | searchSpan: 4, |
| | | type: "select", |
| | | // 表单新增时是否禁止 |
| | | addDisabled: false, |
| | | // 表单新增时是否可见 |
| | | addDisplay: false, |
| | | // 表单新增时是否为查看模式 |
| | | addDetail: false, |
| | | // 表单编辑时是否禁止 |
| | | editDisabled: true, |
| | | // 表单编辑时是否可见 |
| | | editDisplay: true, |
| | | // 表单编辑时是否为查看模式 |
| | | editDetail: false, |
| | | dicData: [ |
| | | { |
| | | label: "全部", |
| | | value: 1, |
| | | }, |
| | | { |
| | | label: "已报名", |
| | | value: 2, |
| | | }, |
| | | { |
| | | label: "已取消", |
| | | value: 4, |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | }, |
| | | questionBankSearch: {}, |
| | |
| | | }, |
| | | |
| | | watch: { |
| | | "form.examname": { |
| | | "obj.userId": { |
| | | // 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 |
| | | ); |
| | | } |
| | | if(val){ |
| | | //查询用户信息 |
| | | getUserDetails(this.userId).then((res)=>{ |
| | | var data = res.data.data; |
| | | this.obj.cardid = data.cardid; |
| | | this.obj.age = data.age; |
| | | this.obj.nativeplace = data.nativeplace; |
| | | this.obj.phone = data.phone; |
| | | }) |
| | | } |
| | | }, |
| | | immediate: true, |
| | |
| | | this.examPersission = true; |
| | | } |
| | | |
| | | this.questionBankSearch['applyStatus'] = 2; |
| | | this.questionBankSearch["applyStatus"] = 2; |
| | | }, |
| | | mounted() {}, |
| | | computed: { |
| | | ...mapState({ |
| | | userInfo: (state) => state.user.userInfo, |
| | | }), |
| | | |
| | | ...mapGetters(["userInfo", "permission"]), |
| | | |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(null, false), |
| | | addBtn: this.vaildData(this.permission.applyexam_add, false), |
| | | viewBtn: this.vaildData(this.permission.applyexam_view, false), |
| | | delBtn: this.vaildData(null, false), |
| | | editBtn: this.vaildData(null, false), |
| | |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | }, |
| | | userId() { |
| | | var d = this.obj.userId + ""; |
| | | return d; |
| | | }, |
| | | }, |
| | | methods: { |
| | |
| | | var roleIds = this.userInfo.role_id.split(","); |
| | | roleIds.forEach((roleId) => { |
| | | getRoleDetail(roleId).then((res) => { |
| | | var roleAlias = res.data.data.roleAlias; |
| | | if ( |
| | | roleAlias == "保安公司管理员" || |
| | | roleAlias == "保安" |
| | | ) { |
| | | //如果是保安公司管理员 |
| | | params["deptId"] = that.userInfo.dept_id; |
| | | } |
| | | 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(); |
| | | }); |
| | | }) |
| | | }) |
| | | var roleAlias = res.data.data.roleAlias; |
| | | if (roleAlias == "保安公司管理员" || roleAlias == "保安") { |
| | | //如果是保安公司管理员 |
| | | params["deptId"] = that.userInfo.dept_id; |
| | | } |
| | | |
| | | // const { releaseTimeRange } = this.questionBankSearch; |
| | | const { releaseTimeRange } = this.questionBankQuery; |
| | | |
| | | var values; |
| | | |
| | | // console.log(releaseTimeRange, 123); |
| | | if (releaseTimeRange) { |
| | | values = { |
| | | ...params, |
| | | beginTime: releaseTimeRange[0], |
| | | overTime: releaseTimeRange[1], |
| | | ...this.questionBankQuery, |
| | | }; |
| | | values.releaseTimeRange = null; |
| | | } else { |
| | | values = { |
| | | ...params, |
| | | ...this.questionBankQuery, |
| | | }; |
| | | } |
| | | getApplyList( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | // Object.assign(values, this.questionBankQuery) |
| | | values |
| | | ).then((res) => { |
| | | const data = res.data.data; |
| | | this.questionBankPage.total = data.total; |
| | | this.questionBankData = data.records; |
| | | this.questionBankLoading = false; |
| | | this.questionBankSelectionClear(); |
| | | }); |
| | | }); |
| | | }); |
| | | }, |
| | | questionBankSelectionClear() { |
| | | this.questionBankSelectionList = []; |
| | |
| | | done(); |
| | | }, |
| | | questionBankSearchReset() { |
| | | this.questionBankQuery = {}; |
| | | this.questionBankQuery = { |
| | | applyStatus:1, |
| | | }; |
| | | this.questionBankOnLoad(this.questionBankPage); |
| | | }, |
| | | questionBankCurrentChange(currentPage) { |
| | |
| | | // 新增 |
| | | questionBankRowSave(row, done, loading) { |
| | | // debugger; |
| | | addApply({ |
| | | userId: row.userId, |
| | | examId: row.examName, |
| | | applyTime: row.applyTime, |
| | | }).then( |
| | | console.log(row,11111); |
| | | addApply(row).then( |
| | | (res) => { |
| | | this.questionBankOnLoad(this.questionBankPage); |
| | | if (res.data.data == 201) { |
| | |
| | | var that = this; |
| | | row.startTime = row.startTime + ":00"; |
| | | row.endTime = row.endTime + ":00"; |
| | | if(row.number!=((row.serialEnd-row.serialStart)+1)){ |
| | | this.$message({ |
| | | type: "error", |
| | | message: "考试人数与序号不匹配!", |
| | | }); |
| | | done(); |
| | | return; |
| | | if (row.number != row.serialEnd - row.serialStart + 1) { |
| | | this.$message({ |
| | | type: "error", |
| | | message: "考试人数与序号不匹配!", |
| | | }); |
| | | done(); |
| | | return; |
| | | } |
| | | |
| | | var s = new Date(row.startTime); |
| | | var e = new Date(row.endTime); |
| | | if(s>e){ |
| | | if (s > e) { |
| | | this.$message({ |
| | | type: "error", |
| | | message: "截止时间不能早于考试考试开始时间!", |
| | | }); |
| | | done(); |
| | | return; |
| | | type: "error", |
| | | message: "截止时间不能早于考试考试开始时间!", |
| | | }); |
| | | done(); |
| | | return; |
| | | } |
| | | addExam(Object.assign(row, this.questionBankSearch)).then( |
| | | () => { |
| | |
| | | <!-- 自定义按钮 --> |
| | | <template slot="menuLeft"> |
| | | <el-button |
| | | style="display:none" |
| | | type="primary" |
| | | size="small" |
| | | plain |
| | |
| | | index: true, |
| | | stripe: true, |
| | | viewBtn: false, |
| | | addBtn: false, |
| | | addBtn: true, |
| | | selection: true, |
| | | excelBtn: false, |
| | | menuWidth: 230, |
| | |
| | | // 操作栏多余按钮去除 |
| | | delBtn: false, |
| | | editBtn: false, |
| | | addBtn: false, |
| | | addBtn: true, |
| | | selection: true, |
| | | menu: true, |
| | | // 导出按钮 |
| | | // excelBtn: true, |
| | | viewBtn: false, |
| | | |
| | | // title: '题库', |
| | | |
| | | addBtnText:"报名信息新增", |
| | | align: "center", |
| | | height: "auto", |
| | | calcHeight: 80, |
| | |
| | | |
| | | column: [ |
| | | { |
| | | label: "姓名", |
| | | label: "保安公司名称", |
| | | searchLabelWidth: "110", |
| | | // prop: "deptName", |
| | | prop: "deptId", |
| | | type: "tree", |
| | | hide:true, |
| | | dicUrl: |
| | | "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697", |
| | | props: { |
| | | label: "title", |
| | | value: "id", |
| | | }, |
| | | slot: true, |
| | | searchSpan: 4, |
| | | search: false, |
| | | width: 260, |
| | | }, |
| | | { |
| | | label: "保安员", |
| | | prop: "realName", |
| | | search: true, |
| | | searchSpan: 4, |
| | | searchLabelWidth: 50, |
| | | display: false, |
| | | searchLabelWidth: 100, |
| | | }, |
| | | { |
| | | label: "身份证号", |
| | | prop: "cardid", |
| | | width:150, |
| | | }, |
| | | { |
| | | label: "性别", |
| | |
| | | { |
| | | label: "籍贯", |
| | | prop: "nativeplace", |
| | | display: false, |
| | | }, |
| | | { |
| | | label: "联系电话", |
| | | prop: "phone", |
| | | display: false, |
| | | }, |
| | | { |
| | | label: "入职时间", |
| | | prop: "rtime", |
| | | display: false, |
| | | }, |
| | | { |
| | | label: "保安公司名称", |
| | | searchLabelWidth: "110", |
| | | // prop: "deptName", |
| | | prop: "deptId", |
| | | type: "tree", |
| | | dicUrl: |
| | | "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697", |
| | | props: { |
| | | label: "title", |
| | | value: "id", |
| | | }, |
| | | slot: true, |
| | | searchSpan: 4, |
| | | display: false, |
| | | search: false, |
| | | width: 260, |
| | | }, |
| | | |
| | | |
| | | { |
| | | label: "是否持证", |
| | | prop: "hold", |
| | |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "保安公司名称", |
| | | searchLabelWidth: "110", |
| | | prop: "deptName", |
| | | // prop: "deptId", |
| | | type: "tree", |
| | | // dicUrl: |
| | | // "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697", |
| | | // props: { |
| | | // label: "title", |
| | | // value: "id", |
| | | // }, |
| | | search: false, |
| | | width: 260, |
| | | }, |
| | | { |
| | | label: "在职状态", |
| | |
| | | ...mapGetters(["userInfo", "permission"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(null, false), |
| | | addBtn: this.vaildData(this.permission.company_add, false), |
| | | viewBtn: this.vaildData(null, false), |
| | | delBtn: this.vaildData(null, false), |
| | | editBtn: this.vaildData(null, false), |
| New file |
| | |
| | | /* |
| | | * @Author: Morpheus |
| | | * @Date: 2021-07-05 16:31:54 |
| | | * @Last Modified by: Morpheus |
| | | * @Last Modified time: 2021-07-18 19:44:47 |
| | | * menu-name 考试缴费管理 |
| | | */ |
| | | <template> |
| | | <el-row class="morpheus-box"> |
| | | <el-col :span="24" class="recruitmentManagement"> |
| | | <el-card> |
| | | <div class="exam-card-body"> |
| | | <avue-crud |
| | | v-model="obj" |
| | | class="company-box" |
| | | :option="questionBankOption" |
| | | :permission="permissionList" |
| | | :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-del="rowDel" |
| | | @row-update="questionBankRowUpdate" |
| | | > |
| | | <template slot-scope="{ row }" slot="sex"> |
| | | <el-tag v-if="row.sex == 1">男</el-tag> |
| | | <el-tag v-if="row.sex == 2">女</el-tag> |
| | | </template> |
| | | |
| | | <!-- 自定义按钮 --> |
| | | <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="success" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-upload2" |
| | | v-if="permission.performance_import" |
| | | @click="handleImport" |
| | | >缴费凭证批量上传 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="{ row }" slot="menu"> |
| | | <el-button |
| | | style="display:none" |
| | | type="text" |
| | | size="mini" |
| | | icon="el-icon-collection" |
| | | class="start-kaoshi" |
| | | v-if="permission.performance_print" |
| | | :disabled="row.qualified==1" |
| | | @click="securityPrint(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" |
| | | > |
| | | </avue-form> |
| | | </el-dialog> |
| | | </div> |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getExamPaymentList, update,remove } from "@/api/exam/examPayment"; |
| | | import { mapGetters } from "vuex"; |
| | | import { getRoleDetail } from "@/api/system/role"; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | obj: { |
| | | name: "张三", |
| | | }, |
| | | excelBox: false, |
| | | questionBankOption: { |
| | | // 操作栏多余按钮去除 |
| | | delBtn: true, |
| | | editBtn: false, |
| | | addBtn: false, |
| | | selection: false, |
| | | viewBtn: true, |
| | | // title: '成绩', |
| | | align: "center", |
| | | height: "auto", |
| | | calcHeight: 80, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 4, |
| | | index: true, |
| | | indexLabel: "序号", |
| | | dialogClickModal: false, |
| | | // 操作栏宽度 |
| | | menu: true, |
| | | menuWidth: 186, |
| | | labelWidth: 120, |
| | | |
| | | column: [ |
| | | // { |
| | | // label: "缴费类型", |
| | | // prop: "type", |
| | | // dicData:[ |
| | | // { |
| | | // label:"公司缴费", |
| | | // value: 1 |
| | | // }, |
| | | // { |
| | | // label:"个人缴费", |
| | | // value: 2 |
| | | // } |
| | | // ], |
| | | // searchSpan: 4, |
| | | // search: true, |
| | | // type: "select", |
| | | // }, |
| | | { |
| | | label: "缴费人", |
| | | prop: "realName", |
| | | search:true, |
| | | searchSpan:4, |
| | | }, |
| | | { |
| | | label: "身份证号", |
| | | prop: "idCardNo", |
| | | search:true, |
| | | searchSpan:4, |
| | | }, |
| | | { |
| | | label: "性别", |
| | | prop: "sex", |
| | | slot:true, |
| | | dicData: [ |
| | | { |
| | | label:"男", |
| | | value:1 |
| | | }, |
| | | { |
| | | label:"女", |
| | | value:2 |
| | | } |
| | | ], |
| | | }, |
| | | { |
| | | label: "联系方式", |
| | | prop: "phone", |
| | | }, |
| | | { |
| | | label: "所在单位", |
| | | prop: "deptName", |
| | | search:true, |
| | | searchSpan:6, |
| | | }, |
| | | // { |
| | | // label: "缴费状态", |
| | | // prop: "paymentStatus", |
| | | // searchSpan: 4, |
| | | // search: true, |
| | | // dicData: [ |
| | | // { |
| | | // label:"已缴费", |
| | | // value:1 |
| | | // }, |
| | | // { |
| | | // label:"未缴费", |
| | | // value:2 |
| | | // }, |
| | | // { |
| | | // label:"部分缴费", |
| | | // value:3 |
| | | // }, |
| | | // ], |
| | | // type: "select", |
| | | // }, |
| | | { |
| | | label: "缴费凭证", |
| | | prop: "certificateUrl", |
| | | overHidden: true, |
| | | type: "upload", |
| | | listType: "picture-img", |
| | | }, |
| | | { |
| | | label: "缴费时间", |
| | | prop: "paymentTime", |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | labelWidth: 120, |
| | | searchSpan: 4, |
| | | // search: true, |
| | | overHidden: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入时间", |
| | | trigger: "click", |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | }, |
| | | questionBankSearch: {}, |
| | | questionBankLoading: true, |
| | | questionBankData: [], |
| | | questionBankPage: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 16, |
| | | }, |
| | | questionBankQuery: {}, |
| | | questionBankSelectionList: [], |
| | | excelForm: {}, |
| | | excelOption: { |
| | | submitBtn: false, |
| | | emptyBtn: false, |
| | | column: [ |
| | | { |
| | | label: "模板上传", |
| | | prop: "excelFile", |
| | | type: "upload", |
| | | drag: true, |
| | | loadText: "模板上传中,请稍等", |
| | | span: 24, |
| | | propsHttp: { |
| | | res: "data", |
| | | }, |
| | | tip: "请上传 zip 压缩文件", |
| | | action: "/api/blade-resource/oss/endpoint/put-file-exam-payment-zip", |
| | | } |
| | | ], |
| | | }, |
| | | }; |
| | | }, |
| | | computed:{ |
| | | ...mapGetters(["userInfo", "permission"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(null, false), |
| | | viewBtn: this.vaildData(this.permission.notice_view, false), |
| | | delBtn: this.vaildData(this.permission.notice_delete, false), |
| | | editBtn: this.vaildData(this.permission.performance__edit, false), |
| | | excelBtn: this.vaildData(this.permission.performance_export, false), |
| | | }; |
| | | }, |
| | | }, |
| | | created() {}, |
| | | mounted() {}, |
| | | methods: { |
| | | questionBankOnLoad(page, params = {}) { |
| | | //判断角色,如果是保安公司管理员或保安,只能查看当前公司的考试成绩 |
| | | var that = this; |
| | | //获取当前登录人员的角色信息 |
| | | var roleIds = this.userInfo.role_id.split(","); |
| | | roleIds.forEach((roleId) => { |
| | | getRoleDetail(roleId).then((res) => { |
| | | var roleAlias = res.data.data.roleAlias; |
| | | if ( |
| | | roleAlias == "保安公司管理员" || |
| | | roleAlias == "保安" || |
| | | roleAlias == "未持证保安" |
| | | ) { |
| | | //如果是保安公司管理员 |
| | | params["deptId"] = that.userInfo.dept_id; |
| | | } |
| | | that.questionBankLoading = false; |
| | | params["examType"] = 1; |
| | | getExamPaymentList( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign(params, this.query) |
| | | ).then((res) => { |
| | | const data = res.data.data; |
| | | that.questionBankPage.total = data.total; |
| | | that.questionBankData = data.records; |
| | | that.questionBankLoading = false; |
| | | that.questionBankSelectionClear(); |
| | | }); |
| | | }) |
| | | }); |
| | | |
| | | }, |
| | | |
| | | rowDel(row) { |
| | | this.$confirm("确定删除当前缴费数据?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | }); |
| | | }, |
| | | 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; |
| | | }, |
| | | |
| | | questionBankRowUpdate(row, index, done, loading) { |
| | | // debugger; |
| | | update({ |
| | | theoryGrade: row.theoryGrade, |
| | | learnGrade: row.learnGrade, |
| | | examId: row.examId, |
| | | id: row.id, |
| | | }).then( |
| | | () => { |
| | | this.questionBankOnLoad(this.questionBankPage); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | }, |
| | | handleImport() { |
| | | this.excelBox = true; |
| | | }, |
| | | uploadAfter(res, done, loading, column) { |
| | | window.console.log(column); |
| | | this.excelBox = false; |
| | | this.refreshChange(); |
| | | done(); |
| | | }, |
| | | refreshChange() { |
| | | this.questionBankOnLoad(this.page, this.query); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | </style> |
| | |
| | | class="start-kaoshi" |
| | | v-if="permission.startexam_applyPapers" |
| | | @click="startExam(row)" |
| | | >报名清册 |
| | | >报名清册详情 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | |
| | | display: false, |
| | | }, |
| | | { |
| | | label: "备注", |
| | | prop: "remark", |
| | | label: "报名人数", |
| | | prop: "num", |
| | | span: 24, |
| | | slot: true, |
| | | // 表单新增时是否禁止 |
| | |
| | | cursor: pointer; |
| | | } |
| | | } |
| | | |
| | | .information-box { |
| | | .el-dialog { |
| | | position: fixed !important; |
| | | top: 0 !important; |
| | | left: 0 !important; |
| | | right: 0 !important; |
| | | bottom: 0 !important; |
| | | margin: auto !important; |
| | | height: 86% !important; |
| | | |
| | | .el-dialog__body { |
| | | padding: 10px 20px !important; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <basic-container> |
| | | <div class="securityUnit"> |
| | | <avue-crud |
| | | :option="option" |
| | | :data="data" |
| | | :page.sync="page" |
| | | ref="crudrec" |
| | | @on-load="onLoad" |
| | | :table-loading="loading" |
| | | @row-save="rowSave" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @row-update="rowUpdate" |
| | | @row-del="rowDel" |
| | | @selection-change="selectionChange" |
| | | @refresh-change="refreshChange" |
| | | @row-click="rowClick" |
| | | > |
| | | <template slot-scope="{ type, size, row }" slot="menu"> |
| | | <el-button |
| | | :size="size" |
| | | :type="type" |
| | | @click="handleUploadPage(row)" |
| | | icon="el-icon-circle-check" |
| | | >附件上传 |
| | | </el-button> |
| | | </template> |
| | | <template slot="menuLeft"> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-plus" |
| | | size="small" |
| | | plain |
| | | @click.stop="rowSave" |
| | | >新增</el-button |
| | | > |
| | | <el-button |
| | | type="danger" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-delete" |
| | | @click="handleDelete" |
| | | >删 除 |
| | | </el-button> |
| | | <el-button |
| | | type="success" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-upload2" |
| | | @click="handleImport1" |
| | | >批量导入 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | <div class="lod" v-show="forms != -1"> |
| | | <div class="lod-in"> |
| | | <!-- <el-col class="trees" v-if="forms == 0"> |
| | | <div class="box"> |
| | | <el-scrollbar> |
| | | <basic-container> |
| | | <avue-tree |
| | | :option="treeOption" |
| | | :data="treeData" |
| | | @node-click="nodeClick" |
| | | /> |
| | | </basic-container> |
| | | </el-scrollbar> |
| | | </div> |
| | | </el-col> --> |
| | | <avue-form |
| | | ref="form" |
| | | v-model="obj0" |
| | | :option="option0" |
| | | v-if="forms == 0" |
| | | > |
| | | <template slot="menuForm"> |
| | | <el-button type="primary" @click="tip0">下一页</el-button> |
| | | <el-button type="info" @click="tipover">取消</el-button> |
| | | </template> |
| | | </avue-form> |
| | | <avue-form |
| | | ref="form1" |
| | | v-model="obj1" |
| | | :option="option1" |
| | | v-else-if="forms == 1" |
| | | > |
| | | <template slot="menuForm"> |
| | | <el-button type="primary" @click="tip1up1">上一页</el-button> |
| | | <el-button type="primary" @click="tip1">下一页</el-button> |
| | | <el-button type="info" @click="tipover">取消</el-button> |
| | | </template> |
| | | </avue-form> |
| | | <avue-form |
| | | ref="form2" |
| | | v-model="obj2" |
| | | :option="option2" |
| | | v-else-if="forms == 2" |
| | | > |
| | | <template slot="menuForm"> |
| | | <el-button type="primary" @click="tip2up2">上一页</el-button> |
| | | <el-button type="primary" @click="tip2">提交</el-button> |
| | | <el-button type="info" @click="tipover">取消</el-button> |
| | | </template> |
| | | </avue-form> |
| | | <basic-container> |
| | | <div class="securityUnit"> |
| | | <avue-crud :option="option" |
| | | :data="data" |
| | | :page.sync="page" |
| | | ref="crudrec" |
| | | @on-load="onLoad" |
| | | :table-loading="loading" |
| | | @row-save="rowSave" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @row-update="rowUpdate" |
| | | @row-del="rowDel" |
| | | @selection-change="selectionChange" |
| | | @refresh-change="refreshChange" |
| | | @row-click="rowClick"> |
| | | <template slot-scope="{ type, size, row }" |
| | | slot="menu"> |
| | | <el-button :size="size" |
| | | :type="type" |
| | | @click="handleUploadPage(row)" |
| | | icon="el-icon-circle-check">附件上传 |
| | | </el-button> |
| | | </template> |
| | | <template slot="menuLeft"> |
| | | <el-button type="primary" |
| | | icon="el-icon-plus" |
| | | size="small" |
| | | plain |
| | | @click.stop="rowSave">信息登记</el-button> |
| | | <el-button type="danger" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-delete" |
| | | @click="handleDelete">删 除 |
| | | </el-button> |
| | | <el-button type="success" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-upload2" |
| | | @click="handleImport1">批量导入 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | |
| | | <el-dialog title="信息登记" |
| | | append-to-body |
| | | :visible.sync="forms" |
| | | :close-on-click-modal="false" |
| | | @close="tipover" |
| | | class="information-box" |
| | | width="60%"> |
| | | <el-tabs v-model="activeName" |
| | | @tab-click="handleClick"> |
| | | <el-tab-pane label="保安单位基本信息" |
| | | name="first"> |
| | | <avue-form ref="form" |
| | | v-model="obj0" |
| | | :option="option0"> |
| | | <template slot="menuForm" |
| | | align="center"> |
| | | <el-button type="primary" |
| | | @click="submitAdd">提交</el-button> |
| | | <el-button type="info" |
| | | @click="tipover">取消</el-button> |
| | | </template> |
| | | </avue-form> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="保安单位出资人员" |
| | | name="second"> |
| | | <avue-form ref="form1" |
| | | v-model="obj1" |
| | | :option="option1"> |
| | | <template slot="menuForm"> |
| | | <el-button type="primary" |
| | | @click="submitAdd">提交</el-button> |
| | | <el-button type="info" |
| | | @click="tipover">取消</el-button> |
| | | </template> |
| | | </avue-form> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="主要管理人员信息" |
| | | name="third"> |
| | | <avue-form ref="form2" |
| | | v-model="obj2" |
| | | :option="option2"> |
| | | <template slot="menuForm"> |
| | | <el-button type="primary" |
| | | @click="submitAdd">提交</el-button> |
| | | <el-button type="info" |
| | | @click="tipover">取消</el-button> |
| | | </template> |
| | | </avue-form> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </el-dialog> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <el-dialog |
| | | title="保安单位导入" |
| | | append-to-body |
| | | :visible.sync="excelBox1" |
| | | width="555px" |
| | | > |
| | | <avue-form |
| | | :option="excelOption1" |
| | | v-model="excelForm1" |
| | | :upload-after="uploadAfter1" |
| | | > |
| | | <template slot="excelTemplate"> |
| | | <el-button type="primary" @click="handleTemplate1"> |
| | | 点击下载<i class="el-icon-download el-icon--right"></i> |
| | | </el-button> |
| | | </template> |
| | | </avue-form> |
| | | </el-dialog> |
| | | </basic-container> |
| | | <el-dialog title="保安单位导入" |
| | | append-to-body |
| | | :visible.sync="excelBox1" |
| | | width="555px"> |
| | | <avue-form :option="excelOption1" |
| | | v-model="excelForm1" |
| | | :upload-after="uploadAfter1"> |
| | | <template slot="excelTemplate"> |
| | | <el-button type="primary" |
| | | @click="handleTemplate1"> |
| | | 点击下载<i class="el-icon-download el-icon--right"></i> |
| | | </el-button> |
| | | </template> |
| | | </avue-form> |
| | | </el-dialog> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import { column, column0, column1, column2 } from "./data"; |
| | | import { |
| | | getdata, |
| | | adddata, |
| | | update, |
| | | remove, |
| | | adddata1, |
| | | adddata2, |
| | | getDeptLazyTree, |
| | | getdata, |
| | | adddata, |
| | | update, |
| | | remove, |
| | | adddata1, |
| | | adddata2, |
| | | getDeptLazyTree, |
| | | } from "@/api/securityUnit/securityUnit"; |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | data() { |
| | | var w = 160, |
| | | s = 12; |
| | | return { |
| | | excelBox1: false, |
| | | excelForm1: {}, |
| | | excelOption1: { |
| | | submitBtn: false, |
| | | emptyBtn: false, |
| | | column: [ |
| | | { |
| | | label: "文件上传", |
| | | prop: "excelFile", |
| | | type: "upload", |
| | | drag: true, |
| | | loadText: "文件上传中,请稍等", |
| | | span: 24, |
| | | propsHttp: { |
| | | res: "data", |
| | | data () { |
| | | var w = 160, |
| | | s = 12; |
| | | return { |
| | | excelBox1: false, |
| | | excelForm1: {}, |
| | | excelOption1: { |
| | | submitBtn: false, |
| | | emptyBtn: false, |
| | | column: [ |
| | | { |
| | | label: "文件上传", |
| | | prop: "excelFile", |
| | | type: "upload", |
| | | drag: true, |
| | | loadText: "文件上传中,请稍等", |
| | | span: 24, |
| | | propsHttp: { |
| | | res: "data", |
| | | }, |
| | | tip: "请上传 .xls,.xlsx 标准格式文件", |
| | | action: "/api/information/import-informaton", |
| | | }, |
| | | { |
| | | label: "模板下载", |
| | | prop: "excelTemplate", |
| | | formslot: true, |
| | | span: 24, |
| | | }, |
| | | ], |
| | | }, |
| | | tip: "请上传 .xls,.xlsx 标准格式文件", |
| | | action: "/api/information/import-informaton", |
| | | }, |
| | | { |
| | | label: "模板下载", |
| | | prop: "excelTemplate", |
| | | formslot: true, |
| | | span: 24, |
| | | }, |
| | | ], |
| | | }, |
| | | |
| | | loading: true, //保安单位基本信息 |
| | | selectionList: [], |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | }, |
| | | |
| | | treeData: [], |
| | | treeOption: { |
| | | title: "我是标题", |
| | | filterText: "搜索关键字自定义", |
| | | defaultExpandAll: true, |
| | | addBtn: false, |
| | | menu: false, |
| | | size: "small", |
| | | formOption: { |
| | | labelWidth: 100, |
| | | column: [ |
| | | { |
| | | label: "自定义项", |
| | | prop: "label", |
| | | loading: true, //保安单位基本信息 |
| | | selectionList: [], |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | }, |
| | | ], |
| | | |
| | | treeData: [], |
| | | treeOption: { |
| | | title: "我是标题", |
| | | filterText: "搜索关键字自定义", |
| | | defaultExpandAll: true, |
| | | addBtn: false, |
| | | menu: false, |
| | | size: "small", |
| | | formOption: { |
| | | labelWidth: 100, |
| | | column: [ |
| | | { |
| | | label: "自定义项", |
| | | prop: "label", |
| | | }, |
| | | ], |
| | | }, |
| | | props: { |
| | | labelText: "标题", |
| | | label: "title", |
| | | value: "id", |
| | | children: "children", |
| | | }, |
| | | }, |
| | | // treeOption: { |
| | | // nodeKey: "id", |
| | | // // lazy: true, |
| | | // // treeLoad: function (node, resolve) { |
| | | // // // const parentId = node.level === 0 ? 0 : node.data.id; |
| | | // // getDeptLazyTree().then((res) => { |
| | | // // resolve( |
| | | // // res.data.data.map((item) => { |
| | | // // console.log({ |
| | | // // ...item, |
| | | // // leaf: !item.hasChildren, |
| | | // // }); |
| | | // // return { |
| | | // // ...item, |
| | | // // leaf: !item.hasChildren, |
| | | // // }; |
| | | // // }) |
| | | // // ); |
| | | // // }); |
| | | // // }, |
| | | // addBtn: false, |
| | | // menu: false, |
| | | // size: "small", |
| | | // props: { |
| | | // labelText: "标题", |
| | | // label: "title", |
| | | // value: "value", |
| | | // children: "children", |
| | | // }, |
| | | // }, |
| | | |
| | | obj0: { |
| | | creditcode: "", |
| | | jurisdiction: "", |
| | | stats: "", |
| | | enterprisename: "", |
| | | representative: "", |
| | | establishtime: "", |
| | | registeredcapital: "", |
| | | capital: "", |
| | | organizationcode: "", |
| | | registrationnumber: "", |
| | | identificationnumber: "", |
| | | enterprises: "", |
| | | address: "", |
| | | business: "", |
| | | region: "", |
| | | registration: "", |
| | | industry: "", |
| | | }, |
| | | obj1: { |
| | | creditcode: "", |
| | | shareholder: "", |
| | | shareholdingratio: "", |
| | | capital2: "", |
| | | capitaltime: "", |
| | | cardid: "", |
| | | cell: "", |
| | | }, |
| | | obj2: { |
| | | creditcode: "", |
| | | name: "", |
| | | post: "", |
| | | cardid2: "", |
| | | cell2: "", |
| | | }, |
| | | option0: { |
| | | emptyBtn: false, |
| | | submitBtn: false, |
| | | gutter: 30, |
| | | column: column0, |
| | | }, |
| | | |
| | | option1: { |
| | | emptyBtn: false, |
| | | submitBtn: false, |
| | | gutter: 30, |
| | | column: column1, |
| | | }, |
| | | |
| | | option2: { |
| | | emptyBtn: false, |
| | | submitBtn: false, |
| | | gutter: 30, |
| | | column: column2, |
| | | }, |
| | | |
| | | forms: false, |
| | | data0: {}, |
| | | data1: {}, |
| | | data2: {}, |
| | | b0: {}, |
| | | b1: {}, |
| | | b2: {}, |
| | | noshehuibianma: 0, |
| | | nobumen: 0, |
| | | |
| | | query: {}, |
| | | data: [], |
| | | option: { |
| | | index: true, |
| | | addBtn: false, |
| | | // card: true, |
| | | tip: false, |
| | | searchSize: "mini", |
| | | searchMenuSpan: 6, |
| | | height: 583, |
| | | menuWidth: 220, |
| | | align: "center", |
| | | selection: true, |
| | | column: column, |
| | | addTitle: "信息登记", |
| | | addBtnText: "信息登记", |
| | | }, |
| | | |
| | | activeName: "first", |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["userInfo"]), |
| | | ids () { |
| | | let ids = []; |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.creditcode); |
| | | }); |
| | | return ids.join(","); |
| | | }, |
| | | props: { |
| | | labelText: "标题", |
| | | label: "title", |
| | | value: "id", |
| | | children: "children", |
| | | ids1 () { |
| | | let ids1 = []; |
| | | this.selectionList1.forEach((ele) => { |
| | | ids1.push(ele.id); |
| | | }); |
| | | return ids1.join(","); |
| | | }, |
| | | }, |
| | | // treeOption: { |
| | | // nodeKey: "id", |
| | | // // lazy: true, |
| | | // // treeLoad: function (node, resolve) { |
| | | // // // const parentId = node.level === 0 ? 0 : node.data.id; |
| | | // // getDeptLazyTree().then((res) => { |
| | | // // resolve( |
| | | // // res.data.data.map((item) => { |
| | | // // console.log({ |
| | | // // ...item, |
| | | // // leaf: !item.hasChildren, |
| | | // // }); |
| | | // // return { |
| | | // // ...item, |
| | | // // leaf: !item.hasChildren, |
| | | // // }; |
| | | // // }) |
| | | // // ); |
| | | // // }); |
| | | // // }, |
| | | // addBtn: false, |
| | | // menu: false, |
| | | // size: "small", |
| | | // props: { |
| | | // labelText: "标题", |
| | | // label: "title", |
| | | // value: "value", |
| | | // children: "children", |
| | | // }, |
| | | // }, |
| | | |
| | | obj0: { |
| | | title0: "保安单位基本信息", |
| | | }, |
| | | option0: { |
| | | emptyBtn: false, |
| | | submitBtn: false, |
| | | gutter: 30, |
| | | column: column0, |
| | | }, |
| | | obj1: { |
| | | title1: "保安单位出资人员", |
| | | }, |
| | | option1: { |
| | | emptyBtn: false, |
| | | submitBtn: false, |
| | | gutter: 30, |
| | | column: column1, |
| | | }, |
| | | obj2: { |
| | | title2: "主要管理人员信息", |
| | | }, |
| | | option2: { |
| | | emptyBtn: false, |
| | | submitBtn: false, |
| | | gutter: 30, |
| | | column: column2, |
| | | }, |
| | | |
| | | forms: -1, |
| | | data0: {}, |
| | | data1: {}, |
| | | data2: {}, |
| | | b0: {}, |
| | | b1: {}, |
| | | b2: {}, |
| | | noshehuibianma: 0, |
| | | nobumen: 0, |
| | | |
| | | query: {}, |
| | | data: [], |
| | | option: { |
| | | index: true, |
| | | addBtn: false, |
| | | // card: true, |
| | | tip: false, |
| | | searchSize: "mini", |
| | | searchMenuSpan: 6, |
| | | height: 583, |
| | | menuWidth: 220, |
| | | align: "center", |
| | | selection: true, |
| | | column: column, |
| | | }, |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["userInfo"]), |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.creditcode); |
| | | }); |
| | | return ids.join(","); |
| | | }, |
| | | ids1() { |
| | | let ids1 = []; |
| | | this.selectionList1.forEach((ele) => { |
| | | ids1.push(ele.id); |
| | | }); |
| | | return ids1.join(","); |
| | | }, |
| | | ids2() { |
| | | let ids2 = []; |
| | | this.selectionList2.forEach((ele) => { |
| | | ids2.push(ele.id); |
| | | }); |
| | | return ids2.join(","); |
| | | }, |
| | | haveID() { |
| | | return this.obj0.creditcode; |
| | | }, |
| | | }, |
| | | methods: { |
| | | handleImport1() { |
| | | this.excelBox1 = true; |
| | | }, |
| | | uploadAfter1(res, done, loading, column) { |
| | | window.console.log(column); |
| | | this.excelBox1 = false; |
| | | // this.refreshChange(); |
| | | done(); |
| | | }, |
| | | handleTemplate1() { |
| | | window.open(`/api/examSubjectChoices/export-template`); |
| | | }, |
| | | |
| | | // handleChangeTABS(column) { |
| | | // this.typeTABS = column; |
| | | // // this.$message.success(JSON.stringify(column)); |
| | | // if (column.prop == "tab1") { |
| | | // this.loading1 = false; |
| | | // this.loading2 = false; |
| | | // this.onLoad(this.page); |
| | | // } else if (column.prop == "tab2") { |
| | | // this.loading = false; |
| | | // this.loading2 = false; |
| | | // this.onLoad1(this.page1); //第二个表格不会自动执行 |
| | | // } else if (column.prop == "tab3") { |
| | | // this.loading1 = false; |
| | | // this.loading = false; |
| | | // this.onLoad2(this.page2); //第二个表格不会自动执行 |
| | | // } |
| | | // }, |
| | | //保安单位基本信息 |
| | | sizeChange(val) { |
| | | this.page1.currentPage = 1; |
| | | this.page1.pageSize = val; |
| | | // this.getData(); |
| | | this.onLoad(this.page, this.query); |
| | | // this.$message.success("行数" + val); |
| | | }, |
| | | currentChange(val) { |
| | | this.page1.currentPage = val; |
| | | // this.getData(); |
| | | this.onLoad(this.page, this.query); |
| | | // this.$message.success("页码" + val); |
| | | }, |
| | | rowSave(form, done, loading) { |
| | | // console.log("save1"); |
| | | this.forms = 0; |
| | | var that = this; |
| | | //先获取部门接口 |
| | | getDeptLazyTree().then((res) => { |
| | | var d = res.data.data; |
| | | that.treeData = d; |
| | | // console.log(d); |
| | | }); |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | }, |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | delete row.tenantid; |
| | | delete row.regstsat; |
| | | console.log(row, 0); |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | ids2 () { |
| | | let ids2 = []; |
| | | this.selectionList2.forEach((ele) => { |
| | | ids2.push(ele.id); |
| | | }); |
| | | return ids2.join(","); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | haveID () { |
| | | return this.obj0.creditcode; |
| | | }, |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | console.log(row); |
| | | return remove(row.creditcode, row.departmentid); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | methods: { |
| | | handleImport1 () { |
| | | this.excelBox1 = true; |
| | | }, |
| | | uploadAfter1 (res, done, loading, column) { |
| | | window.console.log(column); |
| | | this.excelBox1 = false; |
| | | // this.refreshChange(); |
| | | done(); |
| | | }, |
| | | handleTemplate1 () { |
| | | window.open(`/api/examSubjectChoices/export-template`); |
| | | }, |
| | | |
| | | // handleChangeTABS(column) { |
| | | // this.typeTABS = column; |
| | | // // this.$message.success(JSON.stringify(column)); |
| | | // if (column.prop == "tab1") { |
| | | // this.loading1 = false; |
| | | // this.loading2 = false; |
| | | // this.onLoad(this.page); |
| | | // } else if (column.prop == "tab2") { |
| | | // this.loading = false; |
| | | // this.loading2 = false; |
| | | // this.onLoad1(this.page1); //第二个表格不会自动执行 |
| | | // } else if (column.prop == "tab3") { |
| | | // this.loading1 = false; |
| | | // this.loading = false; |
| | | // this.onLoad2(this.page2); //第二个表格不会自动执行 |
| | | // } |
| | | // }, |
| | | //保安单位基本信息 |
| | | sizeChange (val) { |
| | | this.page1.currentPage = 1; |
| | | this.page1.pageSize = val; |
| | | // this.getData(); |
| | | this.onLoad(this.page, this.query); |
| | | // this.$message.success("行数" + val); |
| | | }, |
| | | currentChange (val) { |
| | | this.page1.currentPage = val; |
| | | // this.getData(); |
| | | this.onLoad(this.page, this.query); |
| | | // this.$message.success("页码" + val); |
| | | }, |
| | | rowSave (form, done, loading) { |
| | | // console.log("save1"); |
| | | this.forms = true; |
| | | this.activeName = "first"; |
| | | var that = this; |
| | | //先获取部门接口 |
| | | getDeptLazyTree().then((res) => { |
| | | var d = res.data.data; |
| | | that.treeData = d; |
| | | // console.log(d); |
| | | }); |
| | | }, |
| | | searchChange (params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | }, |
| | | searchReset () { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | }, |
| | | rowUpdate (row, index, done, loading) { |
| | | delete row.tenantid; |
| | | delete row.regstsat; |
| | | console.log(row, 0); |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | }, |
| | | rowDel (row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | console.log(row); |
| | | return remove(row.creditcode, row.departmentid); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | }); |
| | | }, |
| | | selectionChange (list) { |
| | | this.selectionList = list; |
| | | }, |
| | | handleDelete () { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据"); |
| | | return; |
| | | } |
| | | this.$confirm("确定批量将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | console.log(this.ids); |
| | | // return remove(this.ids); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | this.$refs.crudrec.toggleSelection(); |
| | | }); |
| | | }, |
| | | refreshChange () { |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | rowClick (row) { |
| | | // console.log(row); |
| | | // row.identificationnumber; //统一社会信用代 码 |
| | | window.localStorage.setItem("danweidata", JSON.stringify(row)); |
| | | this.$router.push({ |
| | | path: "/securityUnitChild", |
| | | // redirect: { name: "foo" }, |
| | | query: { rowsecurity: "fromSecurity" }, |
| | | // params: { row: row.identificationnumber }, |
| | | }); |
| | | }, |
| | | //跳转到附近列表页面 |
| | | handleUploadPage (row) { |
| | | this.$router.push({ |
| | | path: `/resource/attachCopy`, |
| | | query: { |
| | | deptId: row.departmentid, |
| | | enterprisename: row.enterprisename, |
| | | }, |
| | | }); |
| | | }, |
| | | onLoad (page, params = {}) { |
| | | if (this.userInfo.role_id == "1414840172333842433") { |
| | | console.log("是公安add jurisdiction"); |
| | | params["jurisdiction"] = this.userInfo.jurisdiction; |
| | | } |
| | | this.loading = true; |
| | | getdata( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign(params, this.query) |
| | | ).then((res) => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | window.localStorage.setItem("danweidataS", JSON.stringify(this.data)); |
| | | console.log(this.data); |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // nodeClick(data) {//分局 不在这添加 |
| | | // // this.treeDeptId = data.id; |
| | | // // this.page.currentPage = 1; |
| | | // // this.onLoad(this.page); |
| | | // // this.$message.success(JSON.stringify(data)); |
| | | // this.obj0["departmentid"] = data.title; |
| | | // this.obj1["departmentid"] = data.title; |
| | | // this.obj2["departmentid"] = data.title; |
| | | // this.obj0["useid"] = data.id; |
| | | // this.obj1["useid"] = data.id; |
| | | // this.obj2["useid"] = data.id; |
| | | // this.nobumen = 1; |
| | | // }, |
| | | submitAdd () { |
| | | if (this.panduanmeiyouziduan()) { |
| | | return; |
| | | } |
| | | |
| | | var oneObj = {}; |
| | | |
| | | for (var k in this.obj0) { |
| | | for (var i in column0) { |
| | | if (k == column0[i].prop && k != "title0") { |
| | | oneObj[k] = this.obj0[k]; |
| | | } |
| | | |
| | | if (column0[i].prop == "creditcode") { |
| | | column1[1].value = column0[i].value; |
| | | } |
| | | } |
| | | } |
| | | |
| | | for (var key in oneObj) { |
| | | if (oneObj[key] == "" || oneObj[key] == undefined) { |
| | | console.log(key); |
| | | this.$message.warning("请检查表单是否填写完整!1"); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | this.data0 = oneObj; |
| | | |
| | | var twoObj = {}; |
| | | for (var twok in this.obj1) { |
| | | for (var twoi in column1) { |
| | | if (twok == column1[twoi].prop && twok != "title1") { |
| | | twoObj[twok] = this.obj1[twok]; |
| | | } |
| | | } |
| | | } |
| | | |
| | | twoObj["capital"] = twoObj["capital2"]; |
| | | delete twoObj["capital2"]; |
| | | // console.log(d); |
| | | for (var twokey in twoObj) { |
| | | if (twoObj[twokey] == "" || twoObj[twokey] == undefined) { |
| | | console.log(twokey); |
| | | this.$message.warning("请检查表单是否填写完整!2"); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | this.data1 = twoObj; |
| | | |
| | | var threeObj = {}; |
| | | for (var threek in this.obj2) { |
| | | for (var threei in column2) { |
| | | if (threek == column2[threei].prop && threek != "title2") { |
| | | threeObj[threek] = this.obj2[threek]; |
| | | } |
| | | } |
| | | } |
| | | |
| | | threeObj["cardid"] = threeObj["cardid2"]; |
| | | delete threeObj["cardid2"]; |
| | | threeObj["cell"] = threeObj["cell2"]; |
| | | delete threeObj["cell2"]; |
| | | // d["shareholdingratio"] = d["shareholdingratio2"]; |
| | | // delete d["shareholdingratio2"]; |
| | | for (var threekey in threeObj) { |
| | | if (threeObj[threekey] == "" || threeObj[threekey] == undefined) { |
| | | console.log(threekey); |
| | | this.$message.warning("请检查表单是否填写完整!3"); |
| | | return; |
| | | } |
| | | } |
| | | this.data2 = threeObj; |
| | | |
| | | // this.data0.departmentid = this.data0.useid; |
| | | // this.data1.departmentid = this.data1.useid; |
| | | // this.data2.departmentid = this.data2.useid; |
| | | // delete this.data0.useid; |
| | | // delete this.data1.useid; |
| | | // delete this.data2.useid; |
| | | |
| | | adddata(this.data0).then((res) => { |
| | | console.log(res, 0); |
| | | }); |
| | | adddata1(this.data1).then((res) => { |
| | | console.log(res, 1); |
| | | }); |
| | | adddata2(this.data2).then((res) => { |
| | | console.log(res, 2); |
| | | }); |
| | | var time = setTimeout(() => { |
| | | this.onLoad(this.page, this.query); |
| | | console.log(this.data0, this.data1, this.data2, "已刷新"); |
| | | }, 500); |
| | | this.tipover(); |
| | | }, |
| | | |
| | | tipover () { |
| | | this.forms = false; |
| | | this.obj0 = { |
| | | creditcode: "", |
| | | jurisdiction: "", |
| | | stats: "", |
| | | enterprisename: "", |
| | | representative: "", |
| | | establishtime: "", |
| | | registeredcapital: "", |
| | | capital: "", |
| | | organizationcode: "", |
| | | registrationnumber: "", |
| | | identificationnumber: "", |
| | | enterprises: "", |
| | | address: "", |
| | | business: "", |
| | | region: "", |
| | | registration: "", |
| | | industry: "", |
| | | }; |
| | | |
| | | this.obj1 = { |
| | | creditcode: "", |
| | | shareholder: "", |
| | | shareholdingratio: "", |
| | | capital2: "", |
| | | capitaltime: "", |
| | | cardid: "", |
| | | cell: "", |
| | | }; |
| | | this.obj2 = { |
| | | creditcode: "", |
| | | name: "", |
| | | post: "", |
| | | cardid2: "", |
| | | cell2: "", |
| | | }; |
| | | this.data0 = {}; |
| | | this.data1 = {}; |
| | | this.data2 = {}; |
| | | this.noshehuibianma = 0; |
| | | this.nobumen = 0; |
| | | }, |
| | | panduanmeiyouziduan () { |
| | | if (this.noshehuibianma == 0) { |
| | | this.$message.warning("请输入统一社会信用代码"); |
| | | return true; |
| | | } |
| | | if (this.nobumen == 0) { |
| | | return false; |
| | | this.$message.warning("请选则部门"); |
| | | } |
| | | return false; |
| | | }, |
| | | }, |
| | | watch: { |
| | | haveID () { |
| | | // console.log(this.haveID); |
| | | if (this.haveID != undefined) { |
| | | if (this.haveID.length > 5) { |
| | | //统一社会信用代码判断 |
| | | this.noshehuibianma = 1; |
| | | } else { |
| | | this.noshehuibianma = 0; |
| | | } |
| | | } |
| | | }, |
| | | havedata () { |
| | | console.log(this.havedata, "qqqqq"); |
| | | }, |
| | | }, |
| | | mounted () { |
| | | var that = this; |
| | | |
| | | this.option0.column.forEach((item) => { |
| | | if (item.prop == "creditcode") { |
| | | item.change = function (e) { |
| | | that.obj1.creditcode = e.value; |
| | | that.obj2.creditcode = e.value; |
| | | }; |
| | | } |
| | | }); |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据"); |
| | | return; |
| | | } |
| | | this.$confirm("确定批量将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | console.log(this.ids); |
| | | // return remove(this.ids); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | this.$refs.crudrec.toggleSelection(); |
| | | }); |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | rowClick(row) { |
| | | // console.log(row); |
| | | // row.identificationnumber; //统一社会信用代 码 |
| | | window.localStorage.setItem("danweidata", JSON.stringify(row)); |
| | | this.$router.push({ |
| | | path: "/securityUnitChild", |
| | | // redirect: { name: "foo" }, |
| | | query: { rowsecurity: "fromSecurity" }, |
| | | // params: { row: row.identificationnumber }, |
| | | }); |
| | | }, |
| | | //跳转到附近列表页面 |
| | | handleUploadPage(row) { |
| | | this.$router.push({ |
| | | path: `/resource/attachCopy`, |
| | | query: { |
| | | deptId: row.departmentid, |
| | | enterprisename: row.enterprisename, |
| | | }, |
| | | }); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | if (this.userInfo.role_id == "1414840172333842433") { |
| | | console.log("是公安add jurisdiction"); |
| | | params["jurisdiction"] = this.userInfo.jurisdiction; |
| | | } |
| | | this.loading = true; |
| | | getdata( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign(params, this.query) |
| | | ).then((res) => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | window.localStorage.setItem("danweidataS", JSON.stringify(this.data)); |
| | | console.log(this.data); |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // nodeClick(data) {//分局 不在这添加 |
| | | // // this.treeDeptId = data.id; |
| | | // // this.page.currentPage = 1; |
| | | // // this.onLoad(this.page); |
| | | // // this.$message.success(JSON.stringify(data)); |
| | | // this.obj0["departmentid"] = data.title; |
| | | // this.obj1["departmentid"] = data.title; |
| | | // this.obj2["departmentid"] = data.title; |
| | | // this.obj0["useid"] = data.id; |
| | | // this.obj1["useid"] = data.id; |
| | | // this.obj2["useid"] = data.id; |
| | | // this.nobumen = 1; |
| | | // }, |
| | | tip0() { |
| | | if (this.panduanmeiyouziduan()) { |
| | | return; |
| | | } |
| | | var d = {}; |
| | | for (var k in this.obj0) { |
| | | for (var i in column0) { |
| | | if (k == column0[i].prop && k != "title0") { |
| | | d[k] = this.obj0[k]; |
| | | } |
| | | } |
| | | } |
| | | console.log(d); |
| | | for (var k in d) { |
| | | if (d[k] == "" || d[k] == undefined) { |
| | | console.log(k); |
| | | this.$message.warning("请检查表单是否填写完整!"); |
| | | return; |
| | | } |
| | | } |
| | | console.log(d, 0); |
| | | this.data0 = d; |
| | | this.forms = 1; |
| | | }, |
| | | tip1() { |
| | | if (this.panduanmeiyouziduan()) { |
| | | return; |
| | | } |
| | | var d = {}; |
| | | for (var k in this.obj1) { |
| | | for (var i in column1) { |
| | | if (k == column1[i].prop && k != "title1") { |
| | | d[k] = this.obj1[k]; |
| | | } |
| | | } |
| | | } |
| | | d["capital"] = d["capital2"]; |
| | | delete d["capital2"]; |
| | | // console.log(d); |
| | | for (var k in d) { |
| | | if (d[k] == "" || d[k] == undefined) { |
| | | console.log(k); |
| | | this.$message.warning("请检查表单是否填写完整!"); |
| | | return; |
| | | } |
| | | } |
| | | console.log(d, 1); |
| | | this.data1 = d; |
| | | this.forms = 2; |
| | | }, |
| | | tip2() { |
| | | if (this.panduanmeiyouziduan()) { |
| | | return; |
| | | } |
| | | var d = {}; |
| | | for (var k in this.obj2) { |
| | | for (var i in column2) { |
| | | if (k == column2[i].prop && k != "title2") { |
| | | d[k] = this.obj2[k]; |
| | | } |
| | | } |
| | | } |
| | | console.log(d); |
| | | d["cardid"] = d["cardid2"]; |
| | | delete d["cardid2"]; |
| | | d["cell"] = d["cell2"]; |
| | | delete d["cell2"]; |
| | | // d["shareholdingratio"] = d["shareholdingratio2"]; |
| | | // delete d["shareholdingratio2"]; |
| | | for (var k in d) { |
| | | if (d[k] == "" || d[k] == undefined) { |
| | | console.log(k); |
| | | this.$message.warning("请检查表单是否填写完整!"); |
| | | return; |
| | | } |
| | | } |
| | | console.log(d, 2); |
| | | this.data2 = d; |
| | | |
| | | // this.data0.departmentid = this.data0.useid; |
| | | // this.data1.departmentid = this.data1.useid; |
| | | // this.data2.departmentid = this.data2.useid; |
| | | // delete this.data0.useid; |
| | | // delete this.data1.useid; |
| | | // delete this.data2.useid; |
| | | |
| | | adddata(this.data0).then((res) => { |
| | | console.log(res, 0); |
| | | }); |
| | | adddata1(this.data1).then((res) => { |
| | | console.log(res, 1); |
| | | }); |
| | | adddata2(this.data2).then((res) => { |
| | | console.log(res, 2); |
| | | }); |
| | | var time = setTimeout(() => { |
| | | this.onLoad(this.page, this.query); |
| | | console.log(this.data0, this.data1, this.data2, "已刷新"); |
| | | }, 500); |
| | | this.tipover(); |
| | | }, |
| | | tip1up1() { |
| | | this.forms = 0; |
| | | }, |
| | | tip2up2() { |
| | | this.forms = 1; |
| | | }, |
| | | tipover() { |
| | | this.forms = -1; |
| | | this.obj0 = { |
| | | title0: "保安单位基本信息", |
| | | }; |
| | | this.obj1 = { |
| | | title1: "保安单位出资人员", |
| | | }; |
| | | this.obj2 = { |
| | | title2: "主要管理人员信息", |
| | | }; |
| | | this.data0 = {}; |
| | | this.data1 = {}; |
| | | this.data2 = {}; |
| | | this.noshehuibianma = 0; |
| | | this.nobumen = 0; |
| | | }, |
| | | panduanmeiyouziduan() { |
| | | if (this.noshehuibianma == 0) { |
| | | this.$message.warning("请输入统一社会信用代码"); |
| | | return true; |
| | | } |
| | | if (this.nobumen == 0) { |
| | | return false; |
| | | this.$message.warning("请选则部门"); |
| | | } |
| | | return false; |
| | | }, |
| | | }, |
| | | watch: { |
| | | haveID() { |
| | | // console.log(this.haveID); |
| | | if (this.haveID != undefined) { |
| | | if (this.haveID.length > 5) { |
| | | //统一社会信用代码判断 |
| | | this.noshehuibianma = 1; |
| | | } else { |
| | | this.noshehuibianma = 0; |
| | | } |
| | | } |
| | | }, |
| | | havedata() { |
| | | console.log(this.havedata, "qqqqq"); |
| | | }, |
| | | }, |
| | | mounted() {}, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .securityUnit { |
| | | width: 100%; |
| | | height: 100%; |
| | | // border: 1px solid #000; |
| | | box-sizing: border-box; |
| | | width: 100%; |
| | | height: 100%; |
| | | // border: 1px solid #000; |
| | | box-sizing: border-box; |
| | | } |
| | | // .el-card__body { |
| | | // padding-bottom: 5px !important; |
| | |
| | | // padding: 0 !important; |
| | | // } |
| | | |
| | | .lod { |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | width: 100%; |
| | | height: 100%; |
| | | background-color: rgba($color: #000000, $alpha: 0.5); |
| | | padding: 100px 0 0 0; |
| | | z-index: 500 !important; |
| | | display: flex; |
| | | // align-items: center; |
| | | justify-content: center; |
| | | .trees { |
| | | z-index: 501 !important; |
| | | position: absolute; |
| | | width: 15%; |
| | | top: 100px; |
| | | left: 0; |
| | | // display: none; |
| | | } |
| | | .lod-in { |
| | | width: 70%; |
| | | height: auto; |
| | | background-color: transparent; |
| | | |
| | | // padding: 10px 0 0 0; |
| | | } |
| | | |
| | | .el-collapse-item { |
| | | padding-top: 15px !important; |
| | | } |
| | | } |
| | | .el-collapse { |
| | | border-top: 1px solid transparent !important; |
| | | border-top: 1px solid transparent !important; |
| | | } |
| | | |
| | | .information-box { |
| | | .el-dialog { |
| | | position: fixed !important; |
| | | top: 0 !important; |
| | | left: 0 !important; |
| | | right: 0 !important; |
| | | bottom: 0 !important; |
| | | margin: auto !important; |
| | | height: 86% !important; |
| | | |
| | | .el-dialog__body { |
| | | padding: 10px 20px !important; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | .el-collapse { |
| | | border-top: 1px solid transparent !important; |
| | | } |
| | | |
| | | .information-box { |
| | | .el-dialog { |
| | | position: fixed !important; |
| | | top: 0 !important; |
| | | left: 0 !important; |
| | | right: 0 !important; |
| | | bottom: 0 !important; |
| | | margin: auto !important; |
| | | height: 86% !important; |
| | | |
| | | .el-dialog__body { |
| | | padding: 10px 20px !important; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | .el-collapse { |
| | | border-top: 1px solid transparent !important; |
| | | } |
| | | |
| | | .information-box { |
| | | .el-dialog { |
| | | position: fixed !important; |
| | | top: 0 !important; |
| | | left: 0 !important; |
| | | right: 0 !important; |
| | | bottom: 0 !important; |
| | | margin: auto !important; |
| | | height: 86% !important; |
| | | |
| | | .el-dialog__body { |
| | | padding: 10px 20px !important; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | .el-collapse { |
| | | border-top: 1px solid transparent !important; |
| | | } |
| | | |
| | | .information-box { |
| | | .el-dialog { |
| | | position: fixed !important; |
| | | top: 0 !important; |
| | | left: 0 !important; |
| | | right: 0 !important; |
| | | bottom: 0 !important; |
| | | margin: auto !important; |
| | | height: 86% !important; |
| | | |
| | | .el-dialog__body { |
| | | padding: 10px 20px !important; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | |
| | | var w = 160, |
| | | s = 12; |
| | | export var column = [{ |
| | | export var column1 = [{ |
| | | label: "培训公司名称", |
| | | prop: "trainingUnitId", |
| | | dicUrl: "/api/blade-system/dept/lazy-tree-type?parentId=1418458374477549569", |
| | |
| | | // width: 160 |
| | | // } |
| | | |
| | | ] |
| | | |
| | | |
| | | export var column = [{ |
| | | label: "报名时间", |
| | | prop: "releaseTimeRange", |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | searchRange: true, |
| | | searchSpan: 5, |
| | | hide: true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | search: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入时间", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | { |
| | | label: "保安公司名称", |
| | | searchLabelWidth: "110", |
| | | labelWidth: 110, |
| | | cascaderItem: ["userId"], |
| | | prop: "deptId", |
| | | type: "tree", |
| | | hide: true, |
| | | viewDisabled: false, |
| | | viewDisplay: false, |
| | | dicUrl: "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697", |
| | | props: { |
| | | label: "title", |
| | | value: "id", |
| | | }, |
| | | slot: true, |
| | | searchSpan: 4, |
| | | search: false, |
| | | width: 260, |
| | | }, |
| | | { |
| | | label: "保安姓名", |
| | | prop: "userId", |
| | | type: "tree", |
| | | dicUrl: "/api/blade-user/security-apply-tree?examType=1&deptId={{key}}", |
| | | hide: true, |
| | | slot: true, |
| | | searchSpan: 4, |
| | | // 表单新增时是否禁止 |
| | | addDisabled: false, |
| | | // 表单新增时是否可见 |
| | | addDisplay: true, |
| | | // 表单新增时是否为查看模式 |
| | | addDetail: false, |
| | | // 表单编辑时是否禁止 |
| | | editDisabled: true, |
| | | viewDisabled: false, |
| | | // 表单编辑时是否可见 |
| | | editDisplay: true, |
| | | viewDisplay: false, |
| | | // 表单编辑时是否为查看模式 |
| | | editDetail: false, |
| | | props: { |
| | | label: "name", |
| | | value: "id", |
| | | }, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择保安姓名", |
| | | trigger: "blur", |
| | | }, ], |
| | | width: 80, |
| | | }, |
| | | { |
| | | label: "保安姓名", |
| | | prop: "realName", |
| | | searchSpan: 4, |
| | | search: true, |
| | | // 表单新增时是否禁止 |
| | | 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: "age", |
| | | slot: true, |
| | | // 表单新增时是否禁止 |
| | | addDisabled: true, |
| | | // 表单新增时是否可见 |
| | | addDisplay: true, |
| | | viewDisplay: true, |
| | | }, |
| | | { |
| | | label: "身份证号", |
| | | prop: "idCardNo", |
| | | slot: true, |
| | | search: true, |
| | | searchSpan: 5, |
| | | // 表单新增时是否禁止 |
| | | addDisabled: false, |
| | | // 表单新增时是否可见 |
| | | addDisplay: false, |
| | | // 表单新增时是否为查看模式 |
| | | addDetail: false, |
| | | // 表单编辑时是否禁止 |
| | | editDisabled: false, |
| | | // 表单编辑时是否可见 |
| | | editDisplay: true, |
| | | // 表单编辑时是否为查看模式 |
| | | editDetail: false, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择准考证号", |
| | | trigger: "blur", |
| | | }, ], |
| | | width: 150, |
| | | }, |
| | | { |
| | | label: "身份证号", |
| | | prop: "cardid", |
| | | searchSpan: 5, |
| | | // 表单新增时是否禁止 |
| | | addDisabled: true, |
| | | // 表单新增时是否可见 |
| | | addDisplay: true, |
| | | hide: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择准考证号", |
| | | trigger: "blur", |
| | | }, ], |
| | | width: 150, |
| | | }, |
| | | { |
| | | label: "性别", |
| | | prop: "sex", |
| | | type: "select", |
| | | // 表单新增时是否禁止 |
| | | addDisabled: true, |
| | | // 表单新增时是否可见 |
| | | addDisplay: true, |
| | | dicData: [{ |
| | | label: "男", |
| | | value: 1, |
| | | }, |
| | | { |
| | | label: "女", |
| | | value: 2, |
| | | }, |
| | | { |
| | | label: "未知", |
| | | value: 3, |
| | | }, |
| | | { |
| | | label: " ", |
| | | value: -1, |
| | | }, |
| | | ], |
| | | display: false, |
| | | }, |
| | | |
| | | { |
| | | label: "籍贯", |
| | | prop: "nativePlace", |
| | | // 表单新增时是否禁止 |
| | | addDisabled: true, |
| | | // 表单新增时是否可见 |
| | | addDisplay: true, |
| | | }, |
| | | { |
| | | label: "联系电话", |
| | | prop: "phone", |
| | | // 表单新增时是否禁止 |
| | | addDisabled: true, |
| | | // 表单新增时是否可见 |
| | | addDisplay: true, |
| | | }, |
| | | { |
| | | label: "保安公司名称", |
| | | labelWidth: "110", |
| | | addDisplay: false, |
| | | prop: "deptName", |
| | | width: 260, |
| | | }, |
| | | // { |
| | | // label: "准考证号", |
| | | // prop: "candidateNo", |
| | | // slot: true, |
| | | // // 表单新增时是否禁止 |
| | | // addDisabled: false, |
| | | // // 表单新增时是否可见 |
| | | // addDisplay: false, |
| | | // // 表单新增时是否为查看模式 |
| | | // addDetail: false, |
| | | // // 表单编辑时是否禁止 |
| | | // editDisabled: false, |
| | | // // 表单编辑时是否可见 |
| | | // editDisplay: true, |
| | | // // 表单编辑时是否为查看模式 |
| | | // editDetail: false, |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "请选择准考证号", |
| | | // trigger: "blur", |
| | | // }, |
| | | // ], |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // 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: "applyTime", |
| | | type: "datetime", |
| | | // span: 24, |
| | | format: "yyyy-MM-dd HH:mm:ss", |
| | | valueFormat: "yyyy-MM-dd HH:mm:ss", |
| | | // 表单新增时是否禁止 |
| | | addDisabled: true, |
| | | // 表单新增时是否可见 |
| | | addDisplay: false, |
| | | // 表单新增时是否为查看模式 |
| | | 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: 150, |
| | | }, |
| | | { |
| | | label: "报名状态", |
| | | prop: "applyStatus", |
| | | search: true, |
| | | searchSpan: 4, |
| | | type: "select", |
| | | // 表单新增时是否禁止 |
| | | addDisabled: false, |
| | | // 表单新增时是否可见 |
| | | addDisplay: false, |
| | | // 表单新增时是否为查看模式 |
| | | addDetail: false, |
| | | // 表单编辑时是否禁止 |
| | | editDisabled: true, |
| | | // 表单编辑时是否可见 |
| | | editDisplay: true, |
| | | // 表单编辑时是否为查看模式 |
| | | editDetail: false, |
| | | dicData: [{ |
| | | label: "全部", |
| | | value: 1, |
| | | }, |
| | | { |
| | | label: "已报名", |
| | | value: 2, |
| | | }, |
| | | { |
| | | label: "已取消", |
| | | value: 4, |
| | | }, |
| | | ], |
| | | }, |
| | | ] |
| | |
| | | /* |
| | | * @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> |
| | | <basic-container> |
| | | <avue-crud |
| | | :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page.sync="page" |
| | | :search.sync="search" |
| | | ref="crud" |
| | | @row-del="rowDel" |
| | | v-model="form" |
| | | :permission="permissionList" |
| | | @row-update="rowUpdate" |
| | | @row-save="rowSave" |
| | | :before-open="beforeOpen" |
| | | @filter="filterChange" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad" |
| | | > |
| | | <template slot="menuLeft"> |
| | | <el-button |
| | | style="display: none" |
| | | type="danger" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-delete" |
| | | @click="handleDelete" |
| | | >删 除 |
| | | </el-button> |
| | | <el-button |
| | | type="primary" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-folder-checked" |
| | | @click="handleBatchExam" |
| | | v-if="permission.trainingRegistration_exam" |
| | | >考试申请 |
| | | </el-button> |
| | | <el-button |
| | | type="primary" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-folder-checked" |
| | | v-if="permission.trainingRegistration_import" |
| | | @click="handleImport" |
| | | >批量导入 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{ type, size, row }" slot="menu"> |
| | | <el-button |
| | | icon="el-icon-refresh-right" |
| | | @click="revoke(row)" |
| | | :size="size" |
| | | :type="type" |
| | | v-if="permission.trainingRegistration_cancel" |
| | | :disabled="row.cancel==2" |
| | | >取消报名</el-button |
| | | > |
| | | <el-button |
| | | :type="type" |
| | | size="small" |
| | | icon="el-icon-receiving" |
| | | v-if="permission.trainingRegistration_print" |
| | | :disabled="row.candidateNo == '' || row.cancel==2" |
| | | @click="handlePrint(row)" |
| | | >准考证打印 |
| | | </el-button> |
| | | <el-button |
| | | icon="el-icon-folder-checked" |
| | | style="display: none" |
| | | @click="affirmApply(row)" |
| | | :size="size" |
| | | :type="type" |
| | | >确认报名</el-button |
| | | > |
| | | </template> |
| | | </avue-crud> |
| | | <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="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="danger" |
| | | size="mini" |
| | | icon="el-icon-delete" |
| | | plain |
| | | @click="handleDelete">导出 |
| | | </el-button> |
| | | </template> --> |
| | | |
| | | <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> |
| | | <!-- <template slot="menuLeft"> |
| | | <el-button type="danger" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | @click="questionBankHandleDelete">删 除 |
| | | </el-button> |
| | | </template> --> |
| | | <!-- 自定义按钮 --> |
| | | <template slot="menuLeft"> |
| | | <el-button |
| | | type="primary" |
| | | style="display:none" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-folder-checked" |
| | | @click="handleBatchExam" |
| | | v-if="permission.applyexam_exam" |
| | | >生成考试 |
| | | </el-button> |
| | | <!-- v-if="examPersission" --> |
| | | <el-button |
| | | style="display:none" |
| | | type="primary" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-folder-checked" |
| | | v-if="permission.applyexam_import" |
| | | @click="handleImport" |
| | | >批量报名 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <el-dialog |
| | | title="考试申请" |
| | | append-to-body |
| | | :visible.sync="dialogExamFormVisible" |
| | | width="1000px" |
| | | @close="closeDialog" |
| | | > |
| | | <avue-form |
| | | ref="formExamApply" |
| | | v-model="examApply" |
| | | :option="optionExamApply" |
| | | @reset-change="emptytChange" |
| | | @submit="submitExamApply" |
| | | ></avue-form> |
| | | </el-dialog> |
| | | </basic-container> |
| | | <template slot-scope="{ type, row }" slot="menu"> |
| | | <el-button |
| | | :type="type" |
| | | size="small" |
| | | icon="el-icon-refresh-left" |
| | | v-if="permission.applyexam_cancel" |
| | | :disabled="row.cancel == 2" |
| | | @click="handleCancel(row)" |
| | | >取消报名 |
| | | </el-button> |
| | | <el-button |
| | | style="display: none" |
| | | :type="type" |
| | | size="small" |
| | | icon="el-icon-folder-checked" |
| | | :disabled="row.cancel == 2" |
| | | @click="handleAudit(row)" |
| | | >审核 |
| | | </el-button> |
| | | <el-button |
| | | :type="type" |
| | | size="small" |
| | | icon="el-icon-receiving" |
| | | v-if="permission.applyexam_print && row.candidateNo != ''" |
| | | @click="handlePrint(row)" |
| | | >准考证打印 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="{ row }" slot="age"> |
| | | {{ row.age == -1 ? "" : row.age }} |
| | | </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> |
| | | |
| | | <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> |
| | | |
| | | <el-dialog |
| | | title="考试生成" |
| | | append-to-body |
| | | :visible.sync="dialogExamFormVisible" |
| | | width="900px" |
| | | @close="closeDialog" |
| | | > |
| | | <avue-form |
| | | ref="formExamApply" |
| | | v-model="examApply" |
| | | :option="optionExamApply" |
| | | @reset-change="emptytChange" |
| | | @submit="submitExamApply" |
| | | ></avue-form> |
| | | </el-dialog> |
| | | </div> |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | </template> |
| | | |
| | | <script> |
| | | import { column } from "./data"; |
| | | import { |
| | | getdata, |
| | | adddata, |
| | |
| | | cancelTrain, |
| | | addExam, |
| | | } from "@/api/trainingRegistration/trainingRegistration"; |
| | | import { mapState } from "vuex"; |
| | | import { mapGetters } from "vuex"; |
| | | import { getRoleDetail } from "@/api/system/role"; |
| | | import { getUserDetails } from "@/api/experience/experience" |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | loading: true, |
| | | excelBox: false, |
| | | obj:{ |
| | | userId:'' |
| | | }, |
| | | dialogFormVisible: false, |
| | | dialogExamFormVisible: false, |
| | | search:{}, |
| | | examPersission: false, |
| | | applyExport: false, |
| | | excelBox: false, |
| | | Audit: {}, |
| | | 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/apply/import-apply", |
| | | }, |
| | | { |
| | | label: "模板下载", |
| | | prop: "excelTemplate", |
| | | formslot: true, |
| | | span: 24, |
| | | }, |
| | | ], |
| | | }, |
| | | optionAudit: { |
| | | height: "auto", |
| | | calcHeight: 30, |
| | | dialogWidth: 1000, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: true, //liu |
| | | index: true, |
| | | stripe: true, |
| | | viewBtn: true, |
| | | addBtn: true, |
| | | selection: true, |
| | | excelBtn: false, |
| | | menuWidth: 230, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | label: "审核状态", |
| | | search: true, |
| | | searchSpan: 5, |
| | | span: 24, |
| | | prop: "auditStatus", |
| | | slot: true, |
| | | editDisplay: false, |
| | | addDisplay: false, |
| | | type: "select", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择审核类型", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | dicData: [ |
| | | { |
| | | label: "审核通过", |
| | | value: 2, |
| | | }, |
| | | { |
| | | label: "不通过", |
| | | value: 3, |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "审核明细", |
| | | span: 24, |
| | | type: "textarea", |
| | | prop: "auditDetail", |
| | | }, |
| | | ], |
| | | }, |
| | | optionExamApply: { |
| | | height: "auto", |
| | | filterBtn: true, |
| | |
| | | index: true, |
| | | stripe: true, |
| | | viewBtn: true, |
| | | selection: false, |
| | | selection: true, |
| | | excelBtn: false, |
| | | menuWidth: 380, |
| | | dialogClickModal: false, |
| | |
| | | { |
| | | label: "考试人数", |
| | | prop: "number", |
| | | type: 'number', |
| | | type: "number", |
| | | span: 12, |
| | | precision:0, |
| | | step:50, |
| | | mock:{ |
| | | type:'number', |
| | | max:1000, |
| | | min:0, |
| | | precision:0 |
| | | precision: 0, |
| | | step: 50, |
| | | mock: { |
| | | type: "number", |
| | | max: 1000, |
| | | min: 0, |
| | | precision: 0, |
| | | }, |
| | | rules: [ |
| | | { |
| | |
| | | ], |
| | | minRows: 0, |
| | | maxRows: 1000, |
| | | value:50, |
| | | value: 50, |
| | | }, |
| | | { |
| | | label: "序号开始", |
| | | prop: "serialStart", |
| | | span: 6, |
| | | value:1, |
| | | mock:{ |
| | | type:'number', |
| | | max:1000, |
| | | min:1, |
| | | precision:0 |
| | | value: 1, |
| | | mock: { |
| | | type: "number", |
| | | max: 1000, |
| | | min: 1, |
| | | precision: 0, |
| | | }, |
| | | minRows: 1, |
| | | maxRows: 1000, |
| | | type:"number", |
| | | type: "number", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | label: "序号结束", |
| | | prop: "serialEnd", |
| | | span: 6, |
| | | value:50, |
| | | mock:{ |
| | | type:'number', |
| | | max:1000, |
| | | min:1, |
| | | precision:0 |
| | | value: 50, |
| | | mock: { |
| | | type: "number", |
| | | max: 1000, |
| | | min: 1, |
| | | precision: 0, |
| | | }, |
| | | minRows: 1, |
| | | maxRows: 1000, |
| | | type:"number", |
| | | type: "number", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | }, |
| | | ], |
| | | }, |
| | | excelForm: {}, |
| | | excelOption: { |
| | | submitBtn: false, |
| | | emptyBtn: false, |
| | | questionBankOption: { |
| | | // 操作栏多余按钮去除 |
| | | delBtn: false, |
| | | editBtn: false, |
| | | addBtn: true, |
| | | addBtnText: "报名新增", |
| | | selection: false, |
| | | menu: true, |
| | | // 导出按钮 |
| | | // excelBtn: true, |
| | | viewBtn: true, |
| | | |
| | | // title: '题库', |
| | | |
| | | align: "center", |
| | | height: "auto", |
| | | calcHeight: 80, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 4, |
| | | index: true, |
| | | indexLabel: "#", |
| | | //dialogType: 'drawer', |
| | | dialogClickModal: false, |
| | | //tree 默认展开 |
| | | defaultExpandAll: true, |
| | | // 操作栏宽度 |
| | | menuWidth: 250, |
| | | column: [ |
| | | { |
| | | label: "模板上传", |
| | | prop: "excelFile", |
| | | type: "upload", |
| | | drag: true, |
| | | loadText: "模板上传中,请稍等", |
| | | span: 24, |
| | | propsHttp: { |
| | | res: "data", |
| | | }, |
| | | tip: "请上传 .xls,.xlsx 标准格式文件", |
| | | action: "/api/trainingRegistration/import-trainingRegistration", |
| | | label: "报名时间", |
| | | prop: "releaseTimeRange", |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | searchRange: true, |
| | | searchSpan: 5, |
| | | hide: true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | search: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入时间", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "模板下载", |
| | | prop: "excelTemplate", |
| | | formslot: true, |
| | | span: 24, |
| | | label: "保安单位名称", |
| | | searchLabelWidth: "110", |
| | | labelWidth: 110, |
| | | cascaderItem: ["userId"], |
| | | prop: "deptId", |
| | | type: "tree", |
| | | hide: true, |
| | | viewDisabled:false, |
| | | viewDisplay:false, |
| | | dicUrl: |
| | | "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697", |
| | | props: { |
| | | label: "title", |
| | | value: "id", |
| | | }, |
| | | slot: true, |
| | | searchSpan: 4, |
| | | search: false, |
| | | width: 260, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "保安单位", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "保安姓名", |
| | | prop: "userId", |
| | | type: "tree", |
| | | dicUrl: |
| | | "/api/blade-user/security-apply-tree?examType=2&deptId={{key}}", |
| | | hide: true, |
| | | slot: true, |
| | | searchSpan: 4, |
| | | // 表单新增时是否禁止 |
| | | addDisabled: false, |
| | | // 表单新增时是否可见 |
| | | addDisplay: true, |
| | | // 表单新增时是否为查看模式 |
| | | addDetail: false, |
| | | // 表单编辑时是否禁止 |
| | | editDisabled: true, |
| | | viewDisabled: false, |
| | | // 表单编辑时是否可见 |
| | | editDisplay: true, |
| | | viewDisplay: false, |
| | | // 表单编辑时是否为查看模式 |
| | | editDetail: false, |
| | | props: { |
| | | label: "name", |
| | | value: "id", |
| | | }, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择保安姓名", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | width: 80, |
| | | }, |
| | | { |
| | | label: "培训机构名称", |
| | | prop: "trainingUnitId", |
| | | type: "select", |
| | | labelWidth:110, |
| | | dicUrl: |
| | | "/api/information/train-unit-tree", |
| | | hide: true, |
| | | slot: true, |
| | | searchSpan: 4, |
| | | // 表单新增时是否禁止 |
| | | addDisabled: false, |
| | | // 表单新增时是否可见 |
| | | addDisplay: true, |
| | | // 表单新增时是否为查看模式 |
| | | addDetail: false, |
| | | // 表单编辑时是否禁止 |
| | | editDisabled: true, |
| | | viewDisabled: false, |
| | | // 表单编辑时是否可见 |
| | | editDisplay: true, |
| | | viewDisplay: false, |
| | | // 表单编辑时是否为查看模式 |
| | | editDetail: false, |
| | | props: { |
| | | label: "deptName", |
| | | value: "departmentid", |
| | | }, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择保安姓名", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | width: 80, |
| | | }, |
| | | { |
| | | label: "保安姓名", |
| | | prop: "realName", |
| | | searchSpan: 4, |
| | | search: true, |
| | | // 表单新增时是否禁止 |
| | | 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: "age", |
| | | slot: true, |
| | | // 表单新增时是否禁止 |
| | | addDisabled: true, |
| | | // 表单新增时是否可见 |
| | | addDisplay: true, |
| | | viewDisplay: true, |
| | | }, |
| | | { |
| | | label: "身份证号", |
| | | prop: "idCardNo", |
| | | slot: true, |
| | | search: true, |
| | | searchSpan: 5, |
| | | // 表单新增时是否禁止 |
| | | addDisabled: false, |
| | | // 表单新增时是否可见 |
| | | addDisplay: false, |
| | | // 表单新增时是否为查看模式 |
| | | addDetail: false, |
| | | // 表单编辑时是否禁止 |
| | | editDisabled: false, |
| | | // 表单编辑时是否可见 |
| | | editDisplay: true, |
| | | // 表单编辑时是否为查看模式 |
| | | editDetail: false, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择准考证号", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | width: 150, |
| | | }, |
| | | { |
| | | label: "身份证号", |
| | | prop: "cardid", |
| | | searchSpan: 5, |
| | | // 表单新增时是否禁止 |
| | | addDisabled: true, |
| | | // 表单新增时是否可见 |
| | | addDisplay: true, |
| | | hide:true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择准考证号", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | width: 150, |
| | | }, |
| | | { |
| | | label: "性别", |
| | | prop: "sex", |
| | | type: "select", |
| | | // 表单新增时是否禁止 |
| | | addDisabled: true, |
| | | // 表单新增时是否可见 |
| | | addDisplay: true, |
| | | dicData: [ |
| | | { |
| | | label: "男", |
| | | value: 1, |
| | | }, |
| | | { |
| | | label: "女", |
| | | value: 2, |
| | | }, |
| | | { |
| | | label: "未知", |
| | | value: 3, |
| | | }, |
| | | { |
| | | label: " ", |
| | | value: -1, |
| | | }, |
| | | ], |
| | | display: false, |
| | | }, |
| | | |
| | | { |
| | | label: "籍贯", |
| | | prop: "nativePlace", |
| | | // 表单新增时是否禁止 |
| | | addDisabled: true, |
| | | // 表单新增时是否可见 |
| | | addDisplay: true, |
| | | }, |
| | | { |
| | | label: "联系电话", |
| | | prop: "phone", |
| | | // 表单新增时是否禁止 |
| | | addDisabled: true, |
| | | // 表单新增时是否可见 |
| | | addDisplay: true, |
| | | }, |
| | | { |
| | | label: "所属保安单位", |
| | | labelWidth: "110", |
| | | addDisplay: false, |
| | | prop: "deptName", |
| | | width: 260, |
| | | }, |
| | | // { |
| | | // label: "准考证号", |
| | | // prop: "candidateNo", |
| | | // slot: true, |
| | | // // 表单新增时是否禁止 |
| | | // addDisabled: false, |
| | | // // 表单新增时是否可见 |
| | | // addDisplay: false, |
| | | // // 表单新增时是否为查看模式 |
| | | // addDetail: false, |
| | | // // 表单编辑时是否禁止 |
| | | // editDisabled: false, |
| | | // // 表单编辑时是否可见 |
| | | // editDisplay: true, |
| | | // // 表单编辑时是否为查看模式 |
| | | // editDetail: false, |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "请选择准考证号", |
| | | // trigger: "blur", |
| | | // }, |
| | | // ], |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // 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: "trainingTime", |
| | | type: "datetime", |
| | | // span: 24, |
| | | format: "yyyy-MM-dd HH:mm:ss", |
| | | valueFormat: "yyyy-MM-dd HH:mm:ss", |
| | | // 表单新增时是否禁止 |
| | | addDisabled: true, |
| | | // 表单新增时是否可见 |
| | | addDisplay: false, |
| | | // 表单新增时是否为查看模式 |
| | | 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: 150, |
| | | }, |
| | | { |
| | | label: "报名状态", |
| | | prop: "cancel", |
| | | search: true, |
| | | searchSpan: 4, |
| | | type: "select", |
| | | // 表单新增时是否禁止 |
| | | addDisabled: false, |
| | | // 表单新增时是否可见 |
| | | addDisplay: false, |
| | | // 表单新增时是否为查看模式 |
| | | addDetail: false, |
| | | // 表单编辑时是否禁止 |
| | | editDisabled: true, |
| | | // 表单编辑时是否可见 |
| | | editDisplay: true, |
| | | // 表单编辑时是否为查看模式 |
| | | editDetail: false, |
| | | dicData: [ |
| | | { |
| | | label: "全部", |
| | | value: 11, |
| | | }, |
| | | { |
| | | label: "已报名", |
| | | value: 1, |
| | | }, |
| | | { |
| | | label: "已取消", |
| | | value: 2, |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | }, |
| | | selectionList: [], |
| | | page: { |
| | | questionBankSearch: {}, |
| | | questionBankLoading: true, |
| | | questionBankData: [], |
| | | questionBankPage: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | total: 16, |
| | | }, |
| | | query: {}, |
| | | data: [], |
| | | option: { |
| | | // card: true, |
| | | tip: false, |
| | | // searchSize: "mini", |
| | | searchMenuSpan: 6, |
| | | height: 583, |
| | | index: true, |
| | | labelWidth: "120", |
| | | menuWidth: 200, |
| | | align: "center", |
| | | selection: false, |
| | | column: column, |
| | | delBtn: false, |
| | | editBtn: false, |
| | | addBtn: false, |
| | | }, |
| | | questionBankQuery: {}, |
| | | questionBankSelectionList: [], |
| | | }; |
| | | }, |
| | | |
| | | watch: { |
| | | "obj.userId": { |
| | | // form是表单或者表格绑定的数据集,v-model='form' |
| | | handler(val) { |
| | | if(val){ |
| | | //查询用户信息 |
| | | getUserDetails(this.userId).then((res)=>{ |
| | | var data = res.data.data; |
| | | this.obj.cardid = data.cardid; |
| | | this.obj.age = data.age; |
| | | this.obj.nativeplace = data.nativeplace; |
| | | this.obj.phone = data.phone; |
| | | }) |
| | | } |
| | | }, |
| | | immediate: true, |
| | | }, |
| | | }, |
| | | created() { |
| | | console.log(this.userInfo); |
| | | |
| | | if (this.userInfo.role_name.indexOf("ksxtadmin") != -1) { |
| | | this.examPersission = true; |
| | | } |
| | | |
| | | this.questionBankSearch["cancel"] = 1; |
| | | }, |
| | | mounted() {}, |
| | | computed: { |
| | | ...mapState({ |
| | | userInfo: (state) => state.user.userInfo, |
| | | }), |
| | | |
| | | ...mapGetters(["userInfo", "permission"]), |
| | | |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.applyexam_add, false), |
| | | viewBtn: this.vaildData(this.permission.applyexam_view, false), |
| | | delBtn: this.vaildData(null, false), |
| | | editBtn: this.vaildData(null, false), |
| | | }; |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach((ele) => { |
| | | this.questionBankSelectionList.forEach((ele) => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | }, |
| | | ...mapGetters(["userInfo", "permission"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.notice_add, false), |
| | | viewBtn: this.vaildData(this.permission.notice_view, false), |
| | | delBtn: this.vaildData(this.permission.notice_delete, false), |
| | | editBtn: this.vaildData(this.permission.notice_edit, false), |
| | | }; |
| | | userId() { |
| | | var d = this.obj.userId + ""; |
| | | return d; |
| | | }, |
| | | |
| | | }, |
| | | created(){ |
| | | this.search['cancel'] = 1; |
| | | this.search['auditStatus'] = 4; |
| | | }, |
| | | methods: { |
| | | //准考证查看 |
| | |
| | | query: obj, |
| | | }); |
| | | }, |
| | | sizeChange(val) { |
| | | this.page.pageSize = val; |
| | | this.getData(); |
| | | }, |
| | | currentChange(val) { |
| | | this.page.currentPage = val; |
| | | this.getData(); |
| | | }, |
| | | rowSave(form, done, loading) { |
| | | questionBankOnLoad(page, params = {}) { |
| | | params = this.questionBankSearch; |
| | | this.questionBankLoading = false; |
| | | this.loading = true; |
| | | //判断角色,如果是保安公司管理员或保安,只能查看当前公司的报名信息 |
| | | var that = this; |
| | | adddata(form).then( |
| | | //获取当前登录人员的角色信息 |
| | | var roleIds = this.userInfo.role_id.split(","); |
| | | roleIds.forEach((roleId) => { |
| | | getRoleDetail(roleId).then((res) => { |
| | | var roleAlias = res.data.data.roleAlias; |
| | | if (roleAlias == "保安公司管理员" || roleAlias == "保安") { |
| | | //如果是保安公司管理员 |
| | | params["deptId"] = that.userInfo.dept_id; |
| | | } |
| | | |
| | | // const { releaseTimeRange } = this.questionBankSearch; |
| | | const { releaseTimeRange } = this.questionBankQuery; |
| | | |
| | | var values; |
| | | |
| | | // console.log(releaseTimeRange, 123); |
| | | if (releaseTimeRange) { |
| | | values = { |
| | | ...params, |
| | | beginTime: releaseTimeRange[0], |
| | | overTime: releaseTimeRange[1], |
| | | ...this.questionBankQuery, |
| | | }; |
| | | values.releaseTimeRange = null; |
| | | } else { |
| | | values = { |
| | | ...params, |
| | | ...this.questionBankQuery, |
| | | }; |
| | | } |
| | | getdata( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | // Object.assign(values, this.questionBankQuery) |
| | | values |
| | | ).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 = { |
| | | cancel:11, |
| | | }; |
| | | this.questionBankOnLoad(this.questionBankPage); |
| | | }, |
| | | questionBankCurrentChange(currentPage) { |
| | | this.questionBankPage.currentPage = currentPage; |
| | | }, |
| | | questionBankSizeChange(pageSize) { |
| | | this.questionBankPage.pageSize = pageSize; |
| | | }, |
| | | |
| | | // 新增 |
| | | questionBankRowSave(row, done, loading) { |
| | | // debugger; |
| | | console.log(row,11111); |
| | | adddata(row).then( |
| | | (res) => { |
| | | this.onLoad(this.page); |
| | | this.questionBankOnLoad(this.questionBankPage); |
| | | if (res.data.data == 201) { |
| | | this.$message({ |
| | | type: "warning", |
| | |
| | | } |
| | | ); |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | }, |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | }, |
| | | //确认报名 |
| | | affirmApply(row, done, loading) { |
| | | this.$confirm("确认报名?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | row.cancel = 3; |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "确认报名成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | }); |
| | | }, |
| | | revoke(row, done, loading) { |
| | | this.$confirm("确定取消报名?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | row.cancel = 2; |
| | | cancelTrain(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "取消报名成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | }); |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | }); |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据"); |
| | | return; |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | this.$refs.crudrec.toggleSelection(); |
| | | }); |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | //判断角色,如果是保安公司管理员或保安,只能查看当前公司的考试成绩 |
| | | var that = this; |
| | | //获取当前登录人员的角色信息 |
| | | var roleIds = this.userInfo.role_id.split(","); |
| | | params = this.search; |
| | | roleIds.forEach((roleId) => { |
| | | getRoleDetail(roleId).then((res) => { |
| | | var roleAlias = res.data.data.roleAlias; |
| | | if ( |
| | | roleAlias == "保安公司管理员" || |
| | | roleAlias == "保安" |
| | | ) { |
| | | //如果是保安公司管理员 |
| | | params["deptId"] = that.userInfo.dept_id; |
| | | } |
| | | if ( |
| | | roleAlias == "培训公司管理员" |
| | | ) { |
| | | //如果是培训公司管理员 |
| | | params["trainingUnitId"] = that.userInfo.dept_id; |
| | | } |
| | | getdata( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign(params, this.query) |
| | | ).then((res) => { |
| | | // console.log(res); |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | console.log(this.data); |
| | | this.loading = false; |
| | | }); |
| | | }) |
| | | }) |
| | | }, |
| | | handleImport() { |
| | | this.excelBox = true; |
| | | }, |
| | | |
| | | handleTemplate() { |
| | | window.open(`/api/trainingRegistration/export-template`); |
| | | }, |
| | | uploadAfter(res, done, loading, column) { |
| | | window.console.log(column); |
| | | this.excelBox = false; |
| | | this.refreshChange(); |
| | | done(); |
| | | }, |
| | | |
| | | //生成考试弹窗 |
| | | handleBatchExam() { |
| | | this.dialogExamFormVisible = true; |
| | | if (this.selectionList.length === 0) { |
| | | if (this.questionBankSelectionList.length === 0) { |
| | | this.ids = ""; |
| | | } |
| | | }, |
| | |
| | | var that = this; |
| | | row.startTime = row.startTime + ":00"; |
| | | row.endTime = row.endTime + ":00"; |
| | | if(row.number!=((row.serialEnd-row.serialStart)+1)){ |
| | | this.$message({ |
| | | type: "error", |
| | | message: "考试人数与序号不匹配!", |
| | | }); |
| | | done(); |
| | | return; |
| | | if (row.number != row.serialEnd - row.serialStart + 1) { |
| | | this.$message({ |
| | | type: "error", |
| | | message: "考试人数与序号不匹配!", |
| | | }); |
| | | done(); |
| | | return; |
| | | } |
| | | |
| | | var s = new Date(row.startTime); |
| | | var e = new Date(row.endTime); |
| | | if(s>e){ |
| | | if (s > e) { |
| | | this.$message({ |
| | | type: "error", |
| | | message: "截止时间不能早于考试考试开始时间!", |
| | | }); |
| | | done(); |
| | | return; |
| | | type: "error", |
| | | message: "截止时间不能早于考试考试开始时间!", |
| | | }); |
| | | done(); |
| | | return; |
| | | } |
| | | |
| | | addExam(Object.assign(row, this.search)).then( |
| | | addExam(Object.assign(row, this.questionBankSearch)).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | that.$refs.formExamApply.resetFields(); |
| | | that.dialogExamFormVisible = false; |
| | | this.questionBankOnLoad(this.questionBankPage); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功", |
| | | message: "操作成功!", |
| | | }); |
| | | that.$refs.formExamApply.resetFields(); |
| | | that.dialogExamFormVisible = false; |
| | | done(); |
| | | }, |
| | | (error) => { |
| | |
| | | closeDialog() { |
| | | this.$refs.formExamApply.resetFields(); |
| | | }, |
| | | |
| | | questionBankRowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | | }) |
| | | .then(() => { |
| | | this.questionBankOnLoad(this.questionBankPage); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | //取消报名 |
| | | handleCancel(row) { |
| | | this.$confirm("确定取消报名?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | row.cancel = 2; |
| | | row['isExam'] = 1; |
| | | return cancelTrain(row); |
| | | }) |
| | | .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(); |
| | | }); |
| | | }, |
| | | handleAudit(row) { |
| | | this.dialogFormVisible = true; |
| | | this.Audit = row; |
| | | }, |
| | | |
| | | handleImport() { |
| | | this.excelBox = true; |
| | | }, |
| | | |
| | | handleTemplate() { |
| | | window.open(`/api/apply/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> |
| | | |
| | | <style> |
| | | <style lang="scss" scoped> |
| | | </style> |
| | |
| | | // target: 'http://localhost:83', |
| | | // target: 'http://192.168.0.114:83',//钟日健W |
| | | // target: 'http://192.168.0.106:83',//曾杭W |
| | | // target: 'http://localhost:81', |
| | | // target: 'http://192.168.0.115:83',//钟日健W |
| | | // target: 'http://localhost:81', //原W |
| | | // target: 'http://192.168.0.115:83',//原W |
| | | // target: 'http://192.168.0.107:83',//唐N |
| | |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | }; |