| | |
| | | import request from '@/utils/request' |
| | | |
| | | // 数据分页 |
| | | export function getTeacherPage(query) { |
| | | export function getTeacherPage(queryParams) { |
| | | return request({ |
| | | url: '/teacherManage/page', |
| | | url: `/teacherManage/pageByCondition?pageNum=${queryParams.pageNum}&pageSize=${queryParams.pageSize}&operateTypeId=${queryParams.operateTypeId}&isCm=${queryParams.isCm}`, |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | |
| | | <i class="el-icon-caret-bottom" /> |
| | | </div> |
| | | <el-dropdown-menu slot="dropdown"> |
| | | <!-- <router-link to="/user/profile">--> |
| | | <!-- <el-dropdown-item>个人中心</el-dropdown-item>--> |
| | | <!-- </router-link>--> |
| | | <router-link to="/user/profile"> |
| | | <el-dropdown-item>个人中心</el-dropdown-item> |
| | | </router-link> |
| | | <el-dropdown-item @click.native="setting = true"> |
| | | <span>布局设置</span> |
| | | </el-dropdown-item> |
| | |
| | | return reg.test(url) |
| | | } |
| | | |
| | | export function verifyPwd(val) { |
| | | // false: 强密码不正确 |
| | | if (!/^(?![a-zA-Z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)(?![a-zA-Z\d]+$)(?![a-zA-Z!@#$%^&\.*]+$)(?![\d!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*\-_]{6,16}$/.test(val)) return false; |
| | | // true: 强密码正确 |
| | | else return true; |
| | | } |
| | | |
| | | /** |
| | | * @param {string} str |
| | | * @returns {Boolean} |
| | |
| | | </el-table-column> |
| | | <el-table-column label="证件照片" align="center" prop="photoPath"> |
| | | <template #default="scope"> |
| | | <el-button type="text" @click="viewFile(scope.row.photoAttachment)">预览</el-button> |
| | | <el-button type="text" v-if="scope.row.photoAttachment && scope.row.photoAttachment.fileUrl !==''" @click="viewFile(scope.row.photoAttachment)">预览</el-button> |
| | | <span type="text" v-else>暂无</span> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column label="个人履历" align="center">--> |
| | |
| | | }, |
| | | viewFile(file){ |
| | | const t = this |
| | | axios.get(process.env.VUE_APP_BASE_API + file.fileUrl,{headers:{'Content-Type': 'application/json','Authorization': "Bearer " + getToken()},responseType: 'blob'}).then(res=>{ |
| | | axios.get(process.env.VUE_APP_BASE_API + file.fileUrl,{headers:{'Content-Type': 'application/json','Authorization': "Bearer " + getToken()},responseType: 'blob',timeout: 3000}).then(res=>{ |
| | | if (res && res.data) { |
| | | const link = document.createElement('a') |
| | | let blob = new Blob([res.data],{type: res.data.type}) |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <!-- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">--> |
| | | <!-- <el-form-item label="用户姓名" prop="userName">--> |
| | | <!-- <el-input--> |
| | | <!-- v-model="queryParams.userName"--> |
| | | <!-- placeholder="请输入用户姓名"--> |
| | | <!-- clearable--> |
| | | <!-- @keyup.enter.native="handleQuery"--> |
| | | <!-- />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="身份证号" prop="idCard">--> |
| | | <!-- <el-input--> |
| | | <!-- v-model="queryParams.idCard"--> |
| | | <!-- placeholder="请输入身份证号"--> |
| | | <!-- clearable--> |
| | | <!-- @keyup.enter.native="handleQuery"--> |
| | | <!-- />--> |
| | | <!-- <el-form-item label="工种类型" prop="userName">--> |
| | | <!-- <el-cascader--> |
| | | <!-- v-model="queryParams.operate"--> |
| | | <!-- :options="typeList"--> |
| | | <!-- style="width: 100%"--> |
| | | <!-- :props="{ expandTrigger: 'hover', value: 'id',label: 'name'}"></el-cascader>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item>--> |
| | | <!-- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>--> |
| | |
| | | |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-upload" |
| | | size="mini" |
| | | @click="openUpload" |
| | | v-hasPermi="['system:experts:add']" |
| | | >导入</el-button> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | |
| | | {{ scope.row.sex == 0?'男':'女' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="身份证号" align="center" prop="code" /> |
| | | <el-table-column label="身份证号" align="center" prop="code"> |
| | | <template #default="scope"> |
| | | {{scope.row.code | peridcardtm}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="手机号" align="center" prop="mobilePhone" /> |
| | | <el-table-column label="最高学历" align="center" prop="eduLevel"> |
| | | <template #default="scope"> |
| | | {{getDegreeName(scope.row.eduLevel)}} |
| | |
| | | import axios from "axios"; |
| | | import {getToken} from "@/utils/auth"; |
| | | import {delPeople} from "@/api/coalMine/people"; |
| | | import {getOperatePage} from "@/api/coalMine/operateType"; |
| | | |
| | | export default { |
| | | name: "cTeacherManage", |
| | |
| | | created() { |
| | | const t = this |
| | | t.getPage() |
| | | t.getList() |
| | | }, |
| | | methods: { |
| | | async getPage(){ |
| | |
| | | } |
| | | this.loading = false |
| | | }, |
| | | |
| | | async getList() { |
| | | this.loading = true; |
| | | const res = await getOperatePage({name: ''}) |
| | | if(res.code == 200){ |
| | | this.typeList = this.handleTree(res.data, "id"); |
| | | }else{ |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: res.msg |
| | | }); |
| | | } |
| | | this.loading = false; |
| | | }, |
| | | openDialog(data,type){ |
| | | this.$refs.reviewerDialog.openDialog(data,type) |
| | | }, |
| | |
| | | |
| | | }, |
| | | handleQuery(){ |
| | | |
| | | this.queryParams.pageNum = 1 |
| | | this.getPage() |
| | | }, |
| | | resetQuery(){ |
| | | this.queryParams = { |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <!-- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">--> |
| | | <!-- <el-form-item label="用户姓名" prop="userName">--> |
| | | <!-- <el-input--> |
| | | <!-- v-model="queryParams.userName"--> |
| | | <!-- placeholder="请输入用户姓名"--> |
| | | <!-- clearable--> |
| | | <!-- @keyup.enter.native="handleQuery"--> |
| | | <!-- />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="身份证号" prop="idCard">--> |
| | | <!-- <el-input--> |
| | | <!-- v-model="queryParams.idCard"--> |
| | | <!-- placeholder="请输入身份证号"--> |
| | | <!-- clearable--> |
| | | <!-- @keyup.enter.native="handleQuery"--> |
| | | <!-- />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item>--> |
| | | <!-- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>--> |
| | | <!-- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- </el-form>--> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="工种类型" prop="userName"> |
| | | <el-cascader |
| | | v-model="queryParams.operateTypeId " |
| | | :options="typeList" |
| | | style="width: 100%" |
| | | :props="{ expandTrigger: 'hover', value: 'id',label: 'name',emitPath: false,checkStrictly: true}"></el-cascader> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-upload" |
| | | size="mini" |
| | | @click="openUpload" |
| | | v-hasPermi="['system:experts:add']" |
| | | >导入</el-button> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | |
| | | {{ scope.row.sex == 0?'男':'女' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="身份证号" align="center" prop="code" /> |
| | | <el-table-column label="身份证号" align="center" prop="code"> |
| | | <template #default="scope"> |
| | | {{scope.row.code | peridcardtm}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="手机号" align="center" prop="mobilePhone" /> |
| | | <el-table-column label="最高学历" align="center" prop="eduLevel"> |
| | | <template #default="scope"> |
| | | {{getDegreeName(scope.row.eduLevel)}} |
| | |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="queryParams.pageIndex" |
| | | :page.sync="queryParams.pageNum" |
| | | :limit.sync="queryParams.pageSize" |
| | | @pagination="getPage" |
| | | /> |
| | |
| | | import axios from "axios"; |
| | | import {getToken} from "@/utils/auth"; |
| | | import {delPeople} from "@/api/coalMine/people"; |
| | | import {getOperatePage} from "@/api/coalMine/operateType"; |
| | | |
| | | export default { |
| | | name: "cTeacherManage", |
| | |
| | | typeVisible: false, |
| | | workType: [], |
| | | dataList: [], |
| | | typeList: [], |
| | | total: 0, |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | operateTypeId: 0, |
| | | isCm: '1' |
| | | } |
| | | }; |
| | |
| | | created() { |
| | | const t = this |
| | | t.getPage() |
| | | t.getList() |
| | | }, |
| | | methods: { |
| | | async getPage(){ |
| | |
| | | } |
| | | this.loading = false |
| | | }, |
| | | |
| | | async getList() { |
| | | this.loading = true; |
| | | const res = await getOperatePage({name: ''}) |
| | | if(res.code == 200){ |
| | | this.typeList = this.handleTree(res.data, "id"); |
| | | }else{ |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: res.msg |
| | | }); |
| | | } |
| | | this.loading = false; |
| | | }, |
| | | openDialog(data,type){ |
| | | this.$refs.teacherDialog.openDialog(data,type) |
| | | }, |
| | | openUpload(){ |
| | | this.$message.error('请联系开发人员规范导入') |
| | | }, |
| | | openWorkType(row){ |
| | | this.workType = row.operateTypes |
| | |
| | | |
| | | }, |
| | | handleQuery(){ |
| | | |
| | | this.queryParams.pageNum = 1 |
| | | this.getPage() |
| | | }, |
| | | resetQuery(){ |
| | | this.queryParams = { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | operateTypeId: 0, |
| | | isCm: 1 |
| | | } |
| | | this.getPage() |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | <!-- 底部 --> |
| | | <div class="el-login-footer"> |
| | | <span>技术支持:中国科学院</span> |
| | | </div> |
| | | <!-- <div class="el-login-footer">--> |
| | | <!-- <span>技术支持:中国科学院</span>--> |
| | | <!-- </div>--> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | |
| | | <el-row> |
| | | <el-col :span="20"> |
| | | <el-form-item label="图片查看" prop="imgPath"> |
| | | <el-image |
| | | style="width: 100px; height: 100px" |
| | | :src="imgPath" |
| | | fit="fill"></el-image> |
| | | <!-- <el-form-item label="图片查看" prop="imgPath">--> |
| | | <!-- <el-image--> |
| | | <!-- style="width: 100px; height: 100px"--> |
| | | <!-- src="http://inspurtestcx.saws.org.cn/zwfile/zwdownload?filePath=QRCODE/2020/12/01/QRCODE362421197712217718_A12000036320030846.jpg"--> |
| | | <!-- fit="fill"></el-image>--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="图片查看"> |
| | | <el-link type="primary" style="margin-right: 20px" @click="downloadFile(form.imgPath)" target="_blank">点击查看</el-link> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <script> |
| | | // import {getExpertTypes,addExpertInfo,uploadFile} from '@/api/system/form' |
| | | // import { verifySimplePhone, verifyIdCard } from "@/utils/validate"; |
| | | import axios from "axios"; |
| | | export default { |
| | | name: "nCertificateDialog", |
| | | dicts: ['sys_nation_code'], |
| | |
| | | }, |
| | | changeSource(num){ |
| | | this.form.source = num |
| | | }, |
| | | |
| | | downloadFile(file){ |
| | | const t = this |
| | | axios.get(file,{headers:{'Content-Type': 'application/json','Authorization': "Bearer " + getToken()},responseType: 'blob'}).then(res=>{ |
| | | if (res) { |
| | | const link = document.createElement('a') |
| | | let blob = new Blob([res.data],{type: res.data.type}) |
| | | link.style.display = "none"; |
| | | link.href = URL.createObjectURL(blob); // 创建URL |
| | | window.open(link.href) |
| | | // link.setAttribute("download", file.name); |
| | | // document.body.appendChild(link); |
| | | // link.click(); |
| | | // document.body.removeChild(link); |
| | | } else { |
| | | this.$message.error('获取文件失败') |
| | | } |
| | | }) |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
对比新文件 |
| | |
| | | <template> |
| | | <el-dialog title="资格证书" :visible.sync="open" width="50%" append-to-body> |
| | | <div class="app-container home"> |
| | | <el-row :gutter="10" class="mb8"> |
| | | <!-- <el-col :span="1.5">--> |
| | | <!-- <el-button--> |
| | | <!-- type="primary"--> |
| | | <!-- plain--> |
| | | <!-- icon="el-icon-plus"--> |
| | | <!-- size="mini"--> |
| | | <!-- @click="openEdit({},'add')"--> |
| | | <!-- v-hasPermi="['system:experts:add']"--> |
| | | <!-- >新增</el-button>--> |
| | | <!-- </el-col>--> |
| | | <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>--> |
| | | </el-row> |
| | | <el-table v-loading="loading" :data="dataList"> |
| | | <el-table-column type="index" label="序号" width="55" align="center" /> |
| | | <el-table-column label="证书编号" align="center" prop="certNum"/> |
| | | <el-table-column label="资格类型" align="center" prop="personTypeName" /> |
| | | <el-table-column label="作业类别" align="center" prop="jobTypeName" /> |
| | | <el-table-column label="操作项目" align="center" prop="operItemName" /> |
| | | <el-table-column label="有效期至" align="center" prop="validEndDate"/> |
| | | <el-table-column label="有效期至" align="center" prop="validEndDate"/> |
| | | <!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">--> |
| | | <!-- <template #default="scope">--> |
| | | <!-- <el-button--> |
| | | <!-- size="mini"--> |
| | | <!-- type="text"--> |
| | | <!-- icon="el-icon-edit"--> |
| | | <!-- @click="openEdit(scope.row,'edit')"--> |
| | | <!-- >编辑</el-button>--> |
| | | <!-- <el-button--> |
| | | <!-- size="mini"--> |
| | | <!-- type="text"--> |
| | | <!-- style="color: #f56c6c"--> |
| | | <!-- icon="el-icon-delete"--> |
| | | <!-- @click="handleDelete(scope.row,scope.index)"--> |
| | | <!-- v-hasPermi="['system:experts:remove']"--> |
| | | <!-- >删除</el-button>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | </el-table> |
| | | <el-dialog :title="title" :visible.sync="dialogVisible" width="50%" append-to-body> |
| | | <el-form :model="form" :rules="rules" ref="ruleForm" label-width="200px"> |
| | | <el-row> |
| | | <el-col :span="20"> |
| | | <el-form-item label="证书名称" prop="name"> |
| | | <el-input v-model="form.name"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="20"> |
| | | <el-form-item label="资格类型" prop="operateTypeId"> |
| | | <el-cascader |
| | | v-model="form.operateTypeId" |
| | | :options="typeList" |
| | | style="width: 100%" |
| | | :props="{ expandTrigger: 'hover', value: 'id',label: 'name',emitPath: false}" |
| | | @change="handleChange"></el-cascader> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="20"> |
| | | <el-form-item label="过期时间" prop="expiredTime"> |
| | | <el-date-picker |
| | | v-model="form.expiredTime" |
| | | value-format="yyyy-MM-dd" |
| | | style="width: 100%"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <div style="width: 100%;padding-bottom: 30px;display: flex;justify-content: center"> |
| | | <el-button type="primary" @click="submit()">提交</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | // import { verifySimplePhone, verifyIdCard } from "@/utils/validate"; |
| | | import {addCert, editCert, delCert} from "@/api/coalMine/people"; |
| | | import {getOperatePage} from "@/api/coalMine/operateType"; |
| | | |
| | | export default { |
| | | name: "certDialog", |
| | | dicts: [], |
| | | components: { }, |
| | | data() { |
| | | return { |
| | | open: false, |
| | | id: null, |
| | | dialogVisible: false, |
| | | title: '新增证书', |
| | | loading: false, |
| | | dataList: [], |
| | | typeList: [], |
| | | form: { |
| | | name: '', |
| | | id: null, |
| | | staffId: null, |
| | | expiredTime: '', |
| | | operateTypeId: null |
| | | }, |
| | | rules: { |
| | | name: [{ required: true, message: "请填写证书名称", trigger: "blur" }], |
| | | expiredTime: [{ required: true, message: "请选择过期时间", trigger: "blur" }], |
| | | operateTypeId: [{ required: true, message: "请选择资格类型", trigger: "blur" }] |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | methods: { |
| | | openDialog(data){ |
| | | this.dataList = data.certList |
| | | this.id = data.id |
| | | this.getList() |
| | | this.open = true |
| | | }, |
| | | |
| | | async getList() { |
| | | this.loading = true; |
| | | const res = await getOperatePage({name: ''}) |
| | | if(res.code == 200){ |
| | | this.typeList = this.handleTree(res.data, "id"); |
| | | }else{ |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: res.msg |
| | | }); |
| | | } |
| | | this.loading = false; |
| | | }, |
| | | |
| | | openEdit(data,type){ |
| | | this.dialogVisible = true |
| | | if(type == 'add'){ |
| | | this.title='新增证书' |
| | | this.form = { |
| | | name: '', |
| | | id: null, |
| | | staffId: this.id, |
| | | expiredTime: '', |
| | | operateTypeId: null |
| | | } |
| | | }else { |
| | | this.title='编辑证书' |
| | | for(let i in data){ |
| | | if(this.isKey(i,this.form)){ |
| | | this.form[i] = data[i] |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | isKey(key,obj){ |
| | | return key in obj |
| | | }, |
| | | handleDelete(row,index){ |
| | | this.$confirm('此操作将永久删除该条数据, 是否继续?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(async () => { |
| | | const res = await delCert(row.id) |
| | | if(res.code == 200){ |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '删除成功!' |
| | | }); |
| | | this.dialogVisible = false |
| | | this.open = false |
| | | this.$emit('closeDialog') |
| | | }else{ |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: res.msg |
| | | }); |
| | | } |
| | | }).catch(() => { |
| | | |
| | | }); |
| | | }, |
| | | async submit(){ |
| | | this.$refs["ruleForm"].validate(async(valid) =>{ |
| | | if(valid) { |
| | | const obj = JSON.parse(JSON.stringify(this.form)) |
| | | // console.log(obj.qualification[1],'obj',this.findNameById(this.typeList,obj.qualification[1])) |
| | | // if(obj.qualification.length == 2){ |
| | | // obj.qualificationType = this.findNameById(this.typeList,obj.qualification[0]) |
| | | // obj.jobCategory = this.findNameById(this.typeList,obj.qualification[1]) |
| | | // obj.operateTypeId = this.obj.qualification[1] |
| | | // } |
| | | // if(obj.qualification.length == 3){ |
| | | // obj.qualificationType = this.findNameById(this.typeList,obj.qualification[0]) |
| | | // obj.jobCategory = this.findNameById(this.typeList,obj.qualification[1]) |
| | | // obj.operationItems = this.findNameById(this.typeList,obj.qualification[2]) |
| | | // obj.operateTypeId = obj.qualification[2] |
| | | // } |
| | | if(this.title == '新增证书'){ |
| | | const {id,...data} = obj |
| | | const res = await addCert(data) |
| | | if(res.code == 200){ |
| | | this.$message({ |
| | | type:'success', |
| | | message: res.msg |
| | | }) |
| | | this.dialogVisible = false |
| | | this.open = false |
| | | this.$emit('closeDialog') |
| | | }else{ |
| | | this.$message({ |
| | | type:'warning', |
| | | message: res.msg |
| | | }) |
| | | } |
| | | }else{ |
| | | const res= await editCert(obj) |
| | | if(res.code == 200){ |
| | | this.$message({ |
| | | type:'success', |
| | | message: res.msg |
| | | }) |
| | | this.dialogVisible = false |
| | | this.open = false |
| | | this.$emit('closeDialog') |
| | | }else{ |
| | | this.$message({ |
| | | type:'warning', |
| | | message: res.msg |
| | | }) |
| | | } |
| | | } |
| | | }else{ |
| | | this.$message({ |
| | | type:'warning', |
| | | message:'请完善必填信息' |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | findNameById(data,id){ |
| | | for(const node of data){ |
| | | if(node.id == id){ |
| | | return node.name |
| | | } |
| | | if(node.children){ |
| | | const foundName = this.findNameById(node.children,id) |
| | | if(foundName){ |
| | | return foundName |
| | | } |
| | | } |
| | | } |
| | | return null |
| | | }, |
| | | |
| | | handleChange(){ |
| | | |
| | | }, |
| | | handleQuery(){ |
| | | |
| | | }, |
| | | resetQuery(){ |
| | | |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .home {} |
| | | </style> |
| | | |
| | |
| | | <el-col :span="24"> |
| | | <el-form-item label="违章记录"> |
| | | <el-table :data="form.violationList" border> |
| | | <el-table-column label="时间" align="center"> |
| | | <template #default="scope"> |
| | | {{scope.row.startTime + '--' + scope.row.endTime}} |
| | | </template> |
| | | <el-table-column label="时间" align="center" prop="violationTime"> |
| | | <!-- <template #default="scope">--> |
| | | <!-- {{scope.row.startTime + '--' + scope.row.endTime}}--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="单位" align="center" prop="unit"/> |
| | | </el-table> |
| | |
| | | <el-table :data="form.trainList" border> |
| | | <el-table-column label="培训时间" align="center"> |
| | | <template #default="scope"> |
| | | {{scope.row.startTime + '--' + scope.row.endTime}} |
| | | {{scope.row.startTime | formatDate }}--{{scope.row.endTime | formatDate}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="培训单位" align="center" prop="trainInstitutionName"/> |
| | |
| | | <el-col :span="24"> |
| | | <el-form-item label="考试经历"> |
| | | <el-table :data="form.examineeList" border> |
| | | <el-table-column label="考试时间" align="center"> |
| | | <template #default="scope"> |
| | | {{scope.row.startTime + '--' + scope.row.endTime}} |
| | | </template> |
| | | <el-table-column label="考试时间" align="center" prop="examTime"> |
| | | </el-table-column> |
| | | <el-table-column label="考试中心" align="center" prop="trainInstitutionName"/> |
| | | <el-table-column label="考试中心" align="center" prop="examCenter"/> |
| | | <el-table-column label="科目" align="center" prop="subject"/> |
| | | <el-table-column label="考试结果" align="center" prop="trainInstitutionName"/> |
| | | <el-table-column label="考试结果" align="center" prop="result"/> |
| | | </el-table> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | this.title = '查看人员' |
| | | this.disable = true |
| | | } |
| | | // this.form = val |
| | | for(let i in val){ |
| | | if(this.isValidKey(i,this.form)){ |
| | | this.form[i] = val[i] |
| | | } |
| | | } |
| | | this.form = val |
| | | // for(let i in val){ |
| | | // if(this.isValidKey(i,this.form)){ |
| | | // this.form[i] = val[i] |
| | | // } |
| | | // } |
| | | this.form.sex = Number(this.form.sex) |
| | | } |
| | | this.open = true |
| | |
| | | <el-table-column label="最高学历" align="center" prop="highestEducation"/> |
| | | <el-table-column label="作业证书" align="center" prop="certCount"> |
| | | <template #default="scope"> |
| | | <el-button v-if="scope.row.certCount>0" type="text">{{ scope.row.certCount }}</el-button> |
| | | <el-button v-if="scope.row.certCount>0" type="text" @click="openCert(scope.row)">{{ scope.row.certCount }}</el-button> |
| | | <span v-else>{{scope.row.certCount}}</span> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <el-table-column label="违章次数" align="center" prop="violationCount"/> |
| | | <el-table-column label="证件照片" align="center" prop="photoPath"> |
| | | <template #default="scope"> |
| | | <el-button type="text" @click="viewFile(scope.row.photoPath)">预览</el-button> |
| | | <el-button type="text" v-if="scope.row.photoPath && scope.row.photoPath !==''" @click="viewFile(scope.row.photoPath)">预览</el-button> |
| | | <span type="text" v-else>暂无</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
| | |
| | | @pagination="getPage" |
| | | /> |
| | | <peopleDialog ref="peopleDialog"></peopleDialog> |
| | | <certDialog ref="certDialog" @closeDialog="resetQuery"></certDialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import peopleDialog from "./components/peopleDialog"; |
| | | import axios from "axios"; |
| | | import {getToken} from "@/utils/auth"; |
| | | |
| | | import certDialog from "@/views/notCoalMine/nPeopleManage/components/certDialog" |
| | | export default { |
| | | name: "nPeopleManage", |
| | | dicts: ['sys_nation_code'], |
| | | components: { peopleDialog }, |
| | | components: { peopleDialog, certDialog }, |
| | | data() { |
| | | return { |
| | | loading: false, |
| | |
| | | }, |
| | | viewFile(file){ |
| | | const t = this |
| | | axios.get(process.env.VUE_APP_BASE_API + file,{headers:{'Content-Type': 'application/json','Authorization': "Bearer " + getToken()},responseType: 'blob'}).then(res=>{ |
| | | if(file.substring(0, 1) !== '/'){ |
| | | t.$message.error('无效的图片地址') |
| | | return |
| | | } |
| | | axios.get(process.env.VUE_APP_BASE_API + file,{headers:{'Content-Type': 'application/json','Authorization': "Bearer " + getToken()},responseType: 'blob',timeout: 3000}).then(res=>{ |
| | | if (res) { |
| | | const link = document.createElement('a') |
| | | let blob = new Blob([res.data],{type: res.data.type}) |
| | |
| | | t.$message.error('获取文件失败') |
| | | } |
| | | }).catch(function(err){ |
| | | if(err == 'Error: Network Error'){ |
| | | t.$message.error('获取文件失败') |
| | | } |
| | | if(err == 'Error: Request failed with status code 404'){ |
| | | t.$message.error('获取文件失败') |
| | | } |
| | | // if(err == 'Error: Network Error'){ |
| | | // t.$message.error('获取文件失败') |
| | | // }else if(err == 'Error: Request failed with status code 404'){ |
| | | // t.$message.error('获取文件失败') |
| | | // }else{ |
| | | t.$message.error(err) |
| | | // } |
| | | }) |
| | | } |
| | | }, |
| | | openCert(data){ |
| | | this.$refs.certDialog.openDialog(data) |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <!-- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">--> |
| | | <!-- <el-form-item label="用户姓名" prop="userName">--> |
| | | <!-- <el-input--> |
| | | <!-- v-model="queryParams.userName"--> |
| | | <!-- placeholder="请输入用户姓名"--> |
| | | <!-- clearable--> |
| | | <!-- @keyup.enter.native="handleQuery"--> |
| | | <!-- />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="身份证号" prop="idCard">--> |
| | | <!-- <el-input--> |
| | | <!-- v-model="queryParams.idCard"--> |
| | | <!-- placeholder="请输入身份证号"--> |
| | | <!-- clearable--> |
| | | <!-- @keyup.enter.native="handleQuery"--> |
| | | <!-- />--> |
| | | <!-- <el-form-item label="工种类型" prop="userName">--> |
| | | <!-- <el-cascader--> |
| | | <!-- v-model="queryParams.operate"--> |
| | | <!-- :options="typeList"--> |
| | | <!-- style="width: 100%"--> |
| | | <!-- :props="{ expandTrigger: 'hover', value: 'id',label: 'name'}"></el-cascader>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item>--> |
| | | <!-- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>--> |
| | |
| | | |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-upload" |
| | | size="mini" |
| | | @click="openUpload" |
| | | v-hasPermi="['system:experts:add']" |
| | | >导入</el-button> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | |
| | | {{ scope.row.sex == 0?'男':'女' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="身份证号" align="center" prop="code" /> |
| | | <el-table-column label="身份证号" align="center" prop="code"> |
| | | <template #default="scope"> |
| | | {{scope.row.code | peridcardtm}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="手机号" align="center" prop="mobilePhone" /> |
| | | <el-table-column label="最高学历" align="center" prop="eduLevel"> |
| | | <template #default="scope"> |
| | | {{getDegreeName(scope.row.eduLevel)}} |
| | |
| | | import axios from "axios"; |
| | | import {getToken} from "@/utils/auth"; |
| | | import {delPeople} from "@/api/coalMine/people"; |
| | | import {getOperatePage} from "@/api/coalMine/operateType"; |
| | | |
| | | export default { |
| | | name: "nReviewerManage", |
| | |
| | | created() { |
| | | const t = this |
| | | t.getPage() |
| | | t.getList() |
| | | }, |
| | | methods: { |
| | | async getPage(){ |
| | |
| | | } |
| | | this.loading = false |
| | | }, |
| | | |
| | | async getList() { |
| | | this.loading = true; |
| | | const res = await getOperatePage({name: ''}) |
| | | if(res.code == 200){ |
| | | this.typeList = this.handleTree(res.data, "id"); |
| | | }else{ |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: res.msg |
| | | }); |
| | | } |
| | | this.loading = false; |
| | | }, |
| | | openUpload(){ |
| | | this.$message.error('请联系开发人员规范导入') |
| | | }, |
| | | openDialog(data,type){ |
| | | this.$refs.teacherDialog.openDialog(data,type) |
| | | }, |
| | |
| | | |
| | | }, |
| | | handleQuery(){ |
| | | |
| | | this.queryParams.pageNum = 1 |
| | | this.getPage() |
| | | }, |
| | | resetQuery(){ |
| | | this.queryParams = { |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <!-- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">--> |
| | | <!-- <el-form-item label="用户姓名" prop="userName">--> |
| | | <!-- <el-input--> |
| | | <!-- v-model="queryParams.userName"--> |
| | | <!-- placeholder="请输入用户姓名"--> |
| | | <!-- clearable--> |
| | | <!-- @keyup.enter.native="handleQuery"--> |
| | | <!-- />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="身份证号" prop="idCard">--> |
| | | <!-- <el-input--> |
| | | <!-- v-model="queryParams.idCard"--> |
| | | <!-- placeholder="请输入身份证号"--> |
| | | <!-- clearable--> |
| | | <!-- @keyup.enter.native="handleQuery"--> |
| | | <!-- />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item>--> |
| | | <!-- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>--> |
| | | <!-- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- </el-form>--> |
| | | |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="工种类型" prop="userName"> |
| | | <el-cascader |
| | | v-model="queryParams.operateTypeId" |
| | | :options="typeList" |
| | | style="width: 100%" |
| | | :props="{ expandTrigger: 'hover', value: 'id',label: 'name',emitPath: false}"></el-cascader> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-upload" |
| | | size="mini" |
| | | @click="openUpload" |
| | | v-hasPermi="['system:experts:add']" |
| | | >导入</el-button> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | |
| | | {{ scope.row.sex == 0?'男':'女' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="身份证号" align="center" prop="code" /> |
| | | <el-table-column label="身份证号" align="center" prop="code"> |
| | | <template #default="scope"> |
| | | {{scope.row.code | peridcardtm}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="手机号" align="center" prop="mobilePhone" /> |
| | | <el-table-column label="最高学历" align="center" prop="eduLevel"> |
| | | <template #default="scope"> |
| | | {{getDegreeName(scope.row.eduLevel)}} |
| | |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="queryParams.pageIndex" |
| | | :page.sync="queryParams.pageNum" |
| | | :limit.sync="queryParams.pageSize" |
| | | @pagination="getPage" |
| | | /> |
| | |
| | | import axios from "axios"; |
| | | import {getToken} from "@/utils/auth"; |
| | | import {delPeople} from "@/api/coalMine/people"; |
| | | import {getOperatePage} from "@/api/coalMine/operateType"; |
| | | |
| | | export default { |
| | | name: "nTeacherManage", |
| | |
| | | typeVisible: false, |
| | | workType: [], |
| | | dataList: [], |
| | | typeList: [], |
| | | total: 0, |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | operateTypeId: 0, |
| | | isCm: '0' |
| | | } |
| | | }; |
| | |
| | | created() { |
| | | const t = this |
| | | t.getPage() |
| | | t.getList() |
| | | }, |
| | | methods: { |
| | | async getPage(){ |
| | |
| | | } |
| | | this.loading = false |
| | | }, |
| | | |
| | | async getList() { |
| | | this.loading = true; |
| | | const res = await getOperatePage({name: ''}) |
| | | if(res.code == 200){ |
| | | this.typeList = this.handleTree(res.data, "id"); |
| | | }else{ |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: res.msg |
| | | }); |
| | | } |
| | | this.loading = false; |
| | | }, |
| | | openDialog(data,type){ |
| | | this.$refs.teacherDialog.openDialog(data,type) |
| | | }, |
| | | openUpload(){ |
| | | this.$message.error('请联系开发人员规范导入') |
| | | }, |
| | | openWorkType(row){ |
| | | this.workType = row.operateTypes |
| | |
| | | |
| | | }, |
| | | handleQuery(){ |
| | | |
| | | this.queryParams.pageNum = 1 |
| | | this.getPage() |
| | | }, |
| | | resetQuery(){ |
| | | this.queryParams = { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | operateTypeId: 0, |
| | | isCm: '0' |
| | | } |
| | | this.getPage() |
| | |
| | | |
| | | <script> |
| | | import { getCodeImg, register } from "@/api/login"; |
| | | import {verifyPwd} from "@/utils/validate"; |
| | | |
| | | export default { |
| | | name: "Register", |
| | | data() { |
| | | let validatePwd = (rule, value, callback)=>{ |
| | | if(value === ''){ |
| | | callback(new Error('请输入密码')) |
| | | }else{ |
| | | if(!verifyPwd(value)){ |
| | | callback(new Error('密码须包含字母、数字、特殊字符,长度在6-16之间')) |
| | | }else{ |
| | | callback() |
| | | } |
| | | } |
| | | } |
| | | const equalToPassword = (rule, value, callback) => { |
| | | if (this.registerForm.password !== value) { |
| | | callback(new Error("两次输入的密码不一致")); |
| | |
| | | { min: 2, max: 20, message: '用户账号长度必须介于 2 和 20 之间', trigger: 'blur' } |
| | | ], |
| | | password: [ |
| | | { required: true, trigger: "blur", message: "请输入您的密码" }, |
| | | { min: 5, max: 20, message: '用户密码长度必须介于 5 和 20 之间', trigger: 'blur' } |
| | | { required: true, validator: validatePwd, trigger: 'blur' } |
| | | ], |
| | | confirmPassword: [ |
| | | { required: true, trigger: "blur", message: "请再次输入您的密码" }, |
| | |
| | | ], |
| | | password: [ |
| | | { required: true, message: "用户密码不能为空", trigger: "blur" }, |
| | | { min: 5, max: 20, message: '用户密码长度必须介于 5 和 20 之间', trigger: 'blur' } |
| | | { pattern: /^(?![a-zA-Z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)(?![a-zA-Z\d]+$)(?![a-zA-Z!@#$%^&\.*]+$)(?![\d!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*\-_]{6,16}$/, message: "用户密码必须包含同时包含字母、数字和特殊字符,长度介于 6 和 16 之间", trigger: 'blur' } |
| | | ], |
| | | email: [ |
| | | { |
| | |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | closeOnClickModal: false, |
| | | inputPattern: /^.{5,20}$/, |
| | | inputErrorMessage: "用户密码长度必须介于 5 和 20 之间" |
| | | inputPattern: /^(?![a-zA-Z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)(?![a-zA-Z\d]+$)(?![a-zA-Z!@#$%^&\.*]+$)(?![\d!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*\-_]{6,16}$/, |
| | | inputErrorMessage: "用户密码必须包含同时包含字母、数字和特殊字符,长度介于 6 和 16 之间" |
| | | }).then(({ value }) => { |
| | | resetUserPwd(row.userId, value).then(response => { |
| | | this.$modal.msgSuccess("修改成功,新密码是:" + value); |
| | |
| | | <svg-icon icon-class="email" />用户邮箱 |
| | | <div class="pull-right">{{ user.email }}</div> |
| | | </li> |
| | | <li class="list-group-item"> |
| | | <svg-icon icon-class="tree" />所属部门 |
| | | <div class="pull-right" v-if="user.dept">{{ user.dept.deptName }} / {{ postGroup }}</div> |
| | | </li> |
| | | <!-- <li class="list-group-item">--> |
| | | <!-- <svg-icon icon-class="tree" />所属部门--> |
| | | <!-- <div class="pull-right" v-if="user.dept">{{ user.dept.deptName }} / {{ postGroup }}</div>--> |
| | | <!-- </li>--> |
| | | <li class="list-group-item"> |
| | | <svg-icon icon-class="peoples" />所属角色 |
| | | <div class="pull-right">{{ roleGroup }}</div> |
| | |
| | | |
| | | <script> |
| | | import { updateUserPwd } from "@/api/system/user"; |
| | | import {verifyPwd} from "@/utils/validate"; |
| | | |
| | | export default { |
| | | data() { |
| | | let validatePwd = (rule, value, callback)=>{ |
| | | if(value === ''){ |
| | | callback(new Error('请输入密码')) |
| | | }else{ |
| | | if(!verifyPwd(value)){ |
| | | callback(new Error('密码须包含字母、数字、特殊字符,长度在6-16之间')) |
| | | }else{ |
| | | callback() |
| | | } |
| | | } |
| | | } |
| | | const equalToPassword = (rule, value, callback) => { |
| | | if (this.user.newPassword !== value) { |
| | | callback(new Error("两次输入的密码不一致")); |
| | |
| | | { required: true, message: "旧密码不能为空", trigger: "blur" } |
| | | ], |
| | | newPassword: [ |
| | | { required: true, message: "新密码不能为空", trigger: "blur" }, |
| | | { min: 6, max: 20, message: "长度在 6 到 20 个字符", trigger: "blur" } |
| | | { required: true, validator: validatePwd, trigger: 'blur' } |
| | | ], |
| | | confirmPassword: [ |
| | | { required: true, message: "确认密码不能为空", trigger: "blur" }, |