对比新文件 |
| | |
| | | <template> |
| | | <el-dialog |
| | | :title="title" |
| | | :visible.sync="open" |
| | | append-to-body |
| | | width="50%" |
| | | :before-close="handleClose" |
| | | > |
| | | <el-form ref="ruleForm" :model="form" :rules="rules" label-position="right" label-width="150px" style="padding-right: 50px" element-loading-text="保存中..."> |
| | | <el-form-item label="姓名:" prop="name"> |
| | | <el-input v-model.trim="form.name" /> |
| | | </el-form-item> |
| | | <el-form-item label="身份证:" prop="idCard"> |
| | | <el-input v-model.trim="form.idCard" type="number" /> |
| | | </el-form-item> |
| | | <el-form-item label="科目:" prop="subjectId"> |
| | | <el-cascader |
| | | ref="cascaderRef" |
| | | v-model="form.subjectId" |
| | | :options="dataList" |
| | | style="width: 100%" |
| | | :props="{ expandTrigger: 'hover', value: 'id',label: 'name',emitPath: false, checkStrictly: true }" |
| | | @change="getArriveListName" |
| | | ></el-cascader> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="queryGrade">确认查询</el-button> |
| | | <el-button @click="handleClose">取消</el-button> |
| | | </span> |
| | | <query-grade-dialog ref="queryGradeDialog"></query-grade-dialog> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script > |
| | | import {addExamApply, editExamApply, getExamSite} from "@/api/commonMod/examApply"; |
| | | import {getTrainPage} from "@/api/coalMine/placeManage/train"; |
| | | import queryGradeDialog from '@/views/commonMod/examApply/components/queryGradeDialog.vue' |
| | | import store from "@/store"; |
| | | import { getOperatePage } from '@/api/coalMine/operateType' |
| | | |
| | | export default { |
| | | name: 'examApplyDialog', |
| | | components: { |
| | | queryGradeDialog |
| | | }, |
| | | props: ['typeList'], |
| | | data() { |
| | | return { |
| | | disable: false, |
| | | title: '成绩查询', |
| | | open: false, |
| | | form:{}, |
| | | rules:{ |
| | | name: [{ required: true, message: '请填写姓名', trigger: 'blur' }], |
| | | idCard:[{ required: true, message: '请填写身份证号', trigger: 'blur' }], |
| | | subjectId: [{ required: true, message: '请选择科目', trigger: 'change' }], |
| | | }, |
| | | isAdmin: false, |
| | | dataList: [] |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | methods: { |
| | | openDialog() { |
| | | const t = this |
| | | const roles = store.getters && store.getters.roles |
| | | if (roles.includes('admin')) { |
| | | t.isAdmin = true |
| | | } else { |
| | | t.isAdmin = false |
| | | } |
| | | if (roles.includes('company')) { |
| | | t.form.isCm = 0 |
| | | } |
| | | if (roles.includes('mk')) { |
| | | t.form.isCm = 1 |
| | | } |
| | | const userInfo = store.getters && store.getters.userInfo |
| | | t.open = true |
| | | t.reset() |
| | | t.getSubjects() |
| | | }, |
| | | isValidKey(key, obj) { |
| | | return key in obj |
| | | }, |
| | | |
| | | handleClose() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | |
| | | |
| | | async getSubjects() { |
| | | const res = await getOperatePage({name: ''}) |
| | | if(res.code == 200){ |
| | | this.dataList = this.handleTree(res.data, "id"); |
| | | console.log(this.dataList,'data') |
| | | }else{ |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: res.msg |
| | | }); |
| | | } |
| | | }, |
| | | getArriveListName () { |
| | | this.form.subjectName = this.$refs.cascaderRef.getCheckedNodes()[0].pathLabels.join('/') |
| | | }, |
| | | queryGrade() { |
| | | this.$refs["ruleForm"].validate(async(valid) =>{ |
| | | if(valid) { |
| | | this.form.grade = '92' |
| | | this.$refs.queryGradeDialog.openDialog(this.form); |
| | | }else{ |
| | | this.$message({ |
| | | type:'warning', |
| | | message:'请完善必填信息' |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | // 表单重置 |
| | | reset() { |
| | | this.form = { |
| | | name: '', |
| | | idCard: '', |
| | | subjectId: null, |
| | | subjectName: '' |
| | | } |
| | | }, |
| | | |
| | | } |
| | | } |
| | | |
| | | </script> |
| | | <style scoped> |
| | | |
| | | </style> |
对比新文件 |
| | |
| | | <template> |
| | | <el-dialog |
| | | :title="title" |
| | | :visible.sync="open" |
| | | append-to-body |
| | | width="50%" |
| | | :before-close="handleClose" |
| | | > |
| | | <el-form ref="ruleForm" :model="form" :rules="rules" label-position="right" label-width="150px" style="padding-right: 50px" element-loading-text="保存中..."> |
| | | <el-form-item label="姓名:" > |
| | | <span>{{ form.name}}</span> |
| | | </el-form-item> |
| | | <el-form-item label="性别:" > |
| | | <span>{{ form.sex}}</span> |
| | | </el-form-item> |
| | | <el-form-item label="身份证:" prop="idCard"> |
| | | <el-input v-model.trim="form.idCard" type="number" /> |
| | | </el-form-item> |
| | | <el-form-item label="选择报名类型:" prop="isCm"> |
| | | <el-radio-group v-model="form.isCm" style="width: 100%;" :disabled="!isAdmin" @change="clearOptions"> |
| | | <el-radio :label="0">非煤</el-radio> |
| | | <el-radio :label="1">煤矿</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="选择考试计划:" prop="planId"> |
| | | <el-select v-model="form.planId" placeholder="请选择考试计划" style="width: 100%" @focus="getSections"> |
| | | <el-option |
| | | v-for="item in examPlanList" |
| | | :key="item.id" |
| | | :label="item.value" |
| | | :value="item.id" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submit">确认报名</el-button> |
| | | <el-button @click="handleClose">取消</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script > |
| | | import {addExamApply, editExamApply, getExamSite} from "@/api/commonMod/examApply"; |
| | | import {getTrainPage} from "@/api/coalMine/placeManage/train"; |
| | | import store from "@/store"; |
| | | |
| | | export default { |
| | | name: 'examApplyDialog', |
| | | components: { |
| | | }, |
| | | props: ['typeList'], |
| | | data() { |
| | | return { |
| | | disable: false, |
| | | title: '考试报名', |
| | | open: false, |
| | | form:{}, |
| | | rules:{ |
| | | idCard:[{ required: true, message: '请填写身份证号', trigger: 'blur' }], |
| | | isCm: [{ required: true, message: '请选择类别', trigger: 'blur' }], |
| | | planId: [{ required: true, message: '请选择考试计划', trigger: 'change' }], |
| | | }, |
| | | isAdmin: false, |
| | | examPlanList: [ |
| | | { |
| | | id: '1', |
| | | value: 'xxx' |
| | | } |
| | | ] |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | openDialog(val) { |
| | | const t = this |
| | | const roles = store.getters && store.getters.roles |
| | | if (roles.includes('admin')) { |
| | | t.isAdmin = true |
| | | } else { |
| | | t.isAdmin = false |
| | | } |
| | | if (roles.includes('company')) { |
| | | t.form.isCm = 0 |
| | | } |
| | | if (roles.includes('mk')) { |
| | | t.form.isCm = 1 |
| | | } |
| | | console.log('444',val) |
| | | t.open = true |
| | | |
| | | t.reset() |
| | | if(val){ |
| | | for(let i in val){ |
| | | if(t.isValidKey(i,this.form)){ |
| | | t.form[i] = val[i] |
| | | } |
| | | } |
| | | } |
| | | t.getPlans() |
| | | }, |
| | | isValidKey(key, obj) { |
| | | return key in obj |
| | | }, |
| | | |
| | | handleClose() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | |
| | | getSections() { |
| | | if (this.form.isCm == 0 || this.form.isCm == 1) { |
| | | this.getPlans() |
| | | } else { |
| | | this.$message({ |
| | | message: '请先选择类别', |
| | | type: 'warning' |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | async getPlans() { |
| | | }, |
| | | |
| | | clearOptions() { |
| | | this.form.planId = null |
| | | }, |
| | | |
| | | // 表单重置 |
| | | reset() { |
| | | this.form = { |
| | | name: '', |
| | | sex: '', |
| | | idCard: '', |
| | | isCm: null, |
| | | planId: null, |
| | | } |
| | | }, |
| | | async submit(){ |
| | | this.$refs["ruleForm"].validate(async(valid) =>{ |
| | | if(valid) { |
| | | this.handleClose() |
| | | }else{ |
| | | this.$message({ |
| | | type:'warning', |
| | | message:'请完善必填信息' |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | |
| | | </script> |
| | | <style scoped> |
| | | |
| | | </style> |
对比新文件 |
| | |
| | | <template> |
| | | <el-dialog |
| | | :title="title" |
| | | :visible.sync="open" |
| | | append-to-body |
| | | width="50%" |
| | | :before-close="handleClose" |
| | | > |
| | | <el-table v-loading="loading" :data="dataList"> |
| | | <el-table-column label="姓名" align="center" prop="name"/> |
| | | <el-table-column label="身份证号" align="center" prop="idCard"/> |
| | | <el-table-column label="科目" align="center" prop="subjectName"/> |
| | | <el-table-column label="成绩" align="center" prop="grade"/> |
| | | </el-table> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="handleClose">取消</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script > |
| | | import {addExamApply, editExamApply, getExamSite} from "@/api/commonMod/examApply"; |
| | | import {getTrainPage} from "@/api/coalMine/placeManage/train"; |
| | | import store from "@/store"; |
| | | import { getOperatePage } from '@/api/coalMine/operateType' |
| | | |
| | | export default { |
| | | name: 'examApplyDialog', |
| | | components: { |
| | | }, |
| | | props: ['typeList'], |
| | | data() { |
| | | return { |
| | | disable: false, |
| | | title: '成绩', |
| | | open: false, |
| | | loading: false, |
| | | dataList: [] |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | methods: { |
| | | openDialog(val) { |
| | | const t = this |
| | | console.log('val',val); |
| | | t.dataList.push(val) |
| | | t.open = true |
| | | |
| | | }, |
| | | handleClose() { |
| | | this.open = false; |
| | | this.dataList = []; |
| | | }, |
| | | } |
| | | } |
| | | |
| | | </script> |
| | | <style scoped> |
| | | |
| | | </style> |
| | |
| | | @click="openExamApply({},'add')" |
| | | v-hasPermi="['system:experts:add']" |
| | | >考试计划申请</el-button> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | size="mini" |
| | | @click="openExamRegist()" |
| | | >考试报名</el-button> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | size="mini" |
| | | @click="openGrades()" |
| | | >成绩查询</el-button> |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | |
| | | @pagination="getList" |
| | | /> |
| | | <examApply-dialog ref="examApplyDialog" @getList="getList" :typeList="typeList"></examApply-dialog> |
| | | <exam-regist-dialog ref="examRegistDialog" @getList="getList" :typeList="typeList"></exam-regist-dialog> |
| | | <exam-grades-dialog ref="examGradesDialog" @getList="getList" :typeList="typeList"></exam-grades-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import examApplyDialog from "@/views/commonMod/examApply/components/examApplyDialog"; |
| | | import examRegistDialog from '@/views/commonMod/examApply/components/examRegistDialog.vue' |
| | | import examGradesDialog from '@/views/commonMod/examApply/components/examGradesDialog.vue' |
| | | import {getOperatePage} from "@/api/coalMine/operateType"; |
| | | import {delExamApply, getExamPage} from "@/api/commonMod/examApply"; |
| | | import {getAreaList} from "@/api/coalMine/placeManage/train"; |
| | | import store from '@/store' |
| | | export default { |
| | | name: "examApply", |
| | | dicts: [], |
| | | components: { |
| | | examApplyDialog |
| | | examApplyDialog, |
| | | examRegistDialog, |
| | | examGradesDialog |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | openExamApply(data,type){ |
| | | this.$refs.examApplyDialog.openDialog(data,type); |
| | | }, |
| | | openExamRegist() { |
| | | const data = {} |
| | | const userInfo = store.getters && store.getters.userInfo |
| | | data.name = userInfo.nickName |
| | | data.sex = userInfo.sex == 0 ? '男':'女' |
| | | |
| | | this.$refs.examRegistDialog.openDialog(data); |
| | | }, |
| | | openGrades() { |
| | | this.$refs.examGradesDialog.openDialog(); |
| | | }, |
| | | alpop(value){ |
| | | alert(value) |
| | | } |