| | |
| | | login(username, password, code, uuid, identity).then( async res => { |
| | | setToken(res.data.token) |
| | | Cookies.set('userInfo',JSON.stringify(res.data)) |
| | | await getUserById({userId:res.data.id}).then(res => { |
| | | Cookies.set('userState',JSON.stringify(res.data.state)) |
| | | await getUserById({userId:res.data.id}).then(ress => { |
| | | Cookies.set('userState',JSON.stringify(ress.data.state)) |
| | | if(res.data.identity === 1){ |
| | | Cookies.set('attribute',JSON.stringify(ress.data.agency.attribute)) |
| | | } |
| | | }) |
| | | this.token = res.data.token |
| | | resolve() |
| | |
| | | } |
| | | return Promise.reject('无效的会话,或者会话已过期,请重新登录。') |
| | | } else if (code === 500) { |
| | | if(msg === '文件不存在'){ |
| | | |
| | | }else { |
| | | ElMessage({ message: msg, type: 'error' }) |
| | | if(msg === 'Token已失效,请重新登录!' || msg === 'token非法无效!'){ |
| | | ElMessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(() => { |
| | |
| | | }).catch(() => { |
| | | }); |
| | | } |
| | | } |
| | | |
| | | |
| | | return Promise.reject(new Error(msg)) |
| | | } else if (code === 601) { |
| | |
| | | state.content = res.data |
| | | if(state.content.updateTime){state.content.updateTime.substring(0.,16)} |
| | | state.content.createTime = state.content.createTime.substring(0.,16) |
| | | state.content.pubDate = state.content.pubDate.substring(0,10) |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | |
| | | width="900px" |
| | | :before-close="handleClose" |
| | | > |
| | | <el-form :model="state.form" size="default" ref="superRef" :rules="state.formRules" label-width="150px" > |
| | | <el-form :model="state.form" size="default" ref="superRef" :rules="state.formRulesOut" label-width="150px" > |
| | | <el-row :gutter="22"> |
| | | <el-col :span="11"> |
| | | <el-form-item label="姓名:" prop="name" v-if="state.title !== '修改密码'"> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | |
| | | <el-form-item> |
| | | <div style="margin-left: -50px"><span style="font-size: 16px;color: #ed5565;">提示:疆外企业无需上传社保、医保、工资清单,疆内企业需每季度进行更新。</span></div> |
| | | </el-form-item> |
| | | <el-form-item prop="socialAttach" label="社保:" v-if="state.title !== '修改密码'"> |
| | | <el-upload |
| | | accept="image/*" |
| | |
| | | medicalList: [], |
| | | salaryList: [], |
| | | photoList: [], |
| | | formRules:{ |
| | | formRulesIn:{ |
| | | name: [{ required: true, message: '请输入姓名', trigger: 'blur' }], |
| | | username: [{ required: true, validator: validateUsername, trigger: 'blur' }], |
| | | password: [{ required: true, validator: validatePwd, trigger: 'blur' }], |
| | |
| | | socialAttach: [{required: true, trigger: "blur", message: "请上传社保图片"}], |
| | | medicalAttach: [{required: true, trigger: "blur", message: "请上传医保图片"}], |
| | | salaryAttach: [{required: true, trigger: "blur", message: "请上传工资清单"}], |
| | | idPhoto: [{required: true, trigger: "blur", message: "请上传近期证件照"}], |
| | | }, |
| | | formRulesOut:{ |
| | | name: [{ required: true, message: '请输入姓名', trigger: 'blur' }], |
| | | username: [{ required: true, validator: validateUsername, trigger: 'blur' }], |
| | | password: [{ required: true, validator: validatePwd, trigger: 'blur' }], |
| | | confirmPassword: [{ required: true, validator: equalToPassword, trigger: 'blur' }], |
| | | phone: [{ required: true, validator: validateUserPhone, trigger: 'blur' }], |
| | | post: [{ required: true, message: '请选择职务', trigger: 'change' }], |
| | | jobTitle:[{ required: true, message: '请输入职称', trigger: 'blur' }], |
| | | level: [{ required: true, message: '请选择评价师等级', trigger: 'change' }], |
| | | majorShow:[{ required: true, message: '请选择专业方向', trigger: 'change' }], |
| | | agencyId: [{ required: true, message: '请选择所属机构', trigger: 'change' }], |
| | | // socialAttach: [{required: true, trigger: "blur", message: "请上传社保图片"}], |
| | | // medicalAttach: [{required: true, trigger: "blur", message: "请上传医保图片"}], |
| | | // salaryAttach: [{required: true, trigger: "blur", message: "请上传工资清单"}], |
| | | idPhoto: [{required: true, trigger: "blur", message: "请上传近期证件照"}], |
| | | }, |
| | | areaList: [], |
| | |
| | | |
| | | }) |
| | | |
| | | const attribute = ref(null); |
| | | const getUserInfoAgency = () => { |
| | | const userInfo = JSON.parse(Cookies.get('userInfo')) |
| | | if(userInfo.identity === 1){ |
| | | state.agencyName = userInfo.agentName; |
| | | state.form.agencyId = userInfo.agentId; |
| | | isAgency.value = true; |
| | | attribute.value = JSON.parse(Cookies.get('attribute')) |
| | | console.log("attribute", attribute.value) |
| | | |
| | | }else { |
| | | getAgency() |
| | | } |
| | | console.log("userinfo",userInfo) |
| | | } |
| | | |
| | | |
| | |
| | | const res = await getUserById(param); |
| | | if(res.code == 200){ |
| | | state.form = res.data |
| | | // debugger |
| | | state.socialList = res.data.socialAttach.map(url => { |
| | | return { |
| | | url: import.meta.env.VITE_APP_BASE_API +'/'+url.path, |
| | |
| | | } |
| | | |
| | | const handlePhotoRemove = async (file) => { |
| | | console.log("fileD",file) |
| | | // state.form.idPhoto = '' |
| | | |
| | | let path = "" |
| | | if(file.response && file.response.data){ |
| | | path = file.response.data.path |
| | |
| | | const base = import.meta.env.VITE_APP_BASE_API |
| | | path = file.url.substring(base.length+1,file.url.length ) |
| | | } |
| | | const res = await delPic({path: path}) |
| | | await delPic({path: path}).then(res => { |
| | | if(res.code == 200){ |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '文件已删除' |
| | | }) |
| | | // ElMessage({ |
| | | // type: 'success', |
| | | // message: '文件已删除' |
| | | // }) |
| | | state.form.idPhoto = '' |
| | | }else{ |
| | | ElMessage({ |
| | |
| | | message: res.message |
| | | }) |
| | | } |
| | | }).catch(() => { |
| | | state.form.idPhoto = '' |
| | | }); |
| | | |
| | | |
| | | // const res = await delPic({path: path}) |
| | | // if(res.code == 200){ |
| | | // ElMessage({ |
| | | // type: 'success', |
| | | // message: '文件已删除' |
| | | // }) |
| | | // state.form.idPhoto = '' |
| | | // }else{ |
| | | // ElMessage({ |
| | | // type: 'warning', |
| | | // message: res.message |
| | | // }) |
| | | // } |
| | | } |
| | | |
| | | |
| | |
| | | path = file.response.data.path |
| | | } |
| | | |
| | | const res = await delPic({path: path}) |
| | | await delPic({path: path}).then(res => { |
| | | if(res.code == 200){ |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '文件已删除' |
| | | }) |
| | | // ElMessage({ |
| | | // type: 'success', |
| | | // message: '文件已删除' |
| | | // }) |
| | | }else{ |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.message |
| | | }) |
| | | } |
| | | }).catch(() => { |
| | | if(type === 1){ |
| | | state.form.socialAttach = state.form.socialAttach.filter(item => item.path !== path) |
| | | }else if(type === 2){ |
| | | state.form.medicalAttach = state.form.medicalAttach.filter(item => item.path !== path) |
| | | }else { |
| | | state.form.salaryAttach = state.form.salaryAttach.filter(item => item.path !== path) |
| | | } |
| | | }); |
| | | |
| | | if(type === 1){ |
| | | state.form.socialAttach = state.form.socialAttach.filter(item => item.path !== path) |
| | | }else if(type === 2){ |
| | |
| | | @click="openDialog('add',{})" |
| | | >新增</el-button> |
| | | </div> |
| | | <div style="margin-top: 15px;margin-bottom: 15px"> |
| | | <div style="margin-top: 15px;margin-bottom: 15px;"> |
| | | <el-radio-group v-model="queryParams.expertType"> |
| | | <el-radio-button label="">全部</el-radio-button> |
| | | <el-radio-button label="1">安全评价</el-radio-button> |
| | | <el-radio-button label="2">检验检测</el-radio-button> |
| | | </el-radio-group> |
| | | |
| | | </div> |
| | | <div style="margin-bottom: 20px"><span style="font-size: 16px;color: #ed5565;">提示:疆外企业无需上传社保、医保、工资清单,疆内企业需每季度进行更新。</span></div> |
| | | <div style="margin-bottom: 15px; display: flex;align-items: center"> |
| | | <el-input |
| | | v-model="queryParams.name" |
| | |
| | | import {getDictList} from "@/api/backManage/evaluate"; |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | import projectDialog from "./components/projectDialog.vue"; |
| | | import noPic from '@/assets/images/noPic.png' |
| | | import Cookies from "js-cookie"; |
| | | import {delMonitor, getExpertList, getMonitorList} from "@/api/sysUsers"; |
| | | const { proxy } = getCurrentInstance(); |
| | |
| | | data.dataList = res.data.list.map(item => { |
| | | return{ |
| | | ...item, |
| | | socialAttach: item.socialAttach.map(s => { return import.meta.env.VITE_APP_BASE_API + '/' + s.path}), |
| | | medicalAttach: item.medicalAttach.map(s => { return import.meta.env.VITE_APP_BASE_API + '/' + s.path}), |
| | | salaryAttach: item.salaryAttach.map(s => { return import.meta.env.VITE_APP_BASE_API + '/' + s.path}), |
| | | idPhoto: item.idPhoto ? [import.meta.env.VITE_APP_BASE_API + '/' + item.idPhoto ] : [], |
| | | socialAttach: item.socialAttach.length >0 ?item.socialAttach.map(s => { return import.meta.env.VITE_APP_BASE_API + '/' + s.path}): [noPic], |
| | | medicalAttach: item.medicalAttach.length > 0 ?item.medicalAttach.map(s => { return import.meta.env.VITE_APP_BASE_API + '/' + s.path}):[noPic], |
| | | salaryAttach: item.salaryAttach.length > 0 ? item.salaryAttach.map(s => { return import.meta.env.VITE_APP_BASE_API + '/' + s.path}):[noPic], |
| | | idPhoto: item.idPhoto ? [import.meta.env.VITE_APP_BASE_API + '/' + item.idPhoto ] : [noPic], |
| | | lastEstimateTime: item.personProjectVO ? item.personProjectVO.lastEstimateTime.slice(0,10) : '', |
| | | projectCount: item.personProjectVO ? item.personProjectVO.projectCount : '' |
| | | } |