| | |
| | | <template> |
| | | <div class="app-container home"> |
| | | <div class="main-title">专家信息录入</div> |
| | | <!-- <el-divider>专家信息录入</el-divider>--> |
| | | <div class="main_form"> |
| | | <el-form :model="form" :rules="rules" ref="ruleForm" label-width="200px"> |
| | | <el-form :model="form" :rules="rules" ref="ruleForm" label-width="200px" :label-position="labelPosition"> |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <el-col :span="20"> |
| | | <el-form-item label="专业类别" prop="profession"> |
| | | <el-cascader |
| | | style="width: 100%" |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <!-- <el-row>--> |
| | | <!-- <el-col :span="16">--> |
| | | <!-- <el-col :span="20">--> |
| | | <!-- <el-form-item label="填报日期" prop="date">--> |
| | | <!-- <el-date-picker--> |
| | | <!-- style="width: 100%"--> |
| | |
| | | <!-- </el-col>--> |
| | | <!-- </el-row>--> |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <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="16"> |
| | | <el-col :span="20"> |
| | | <el-form-item label="性别" prop="sex"> |
| | | <el-radio-group v-model="form.sex"> |
| | | <el-radio :label="0">男</el-radio> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <el-col :span="20"> |
| | | <el-form-item label="出生日期" prop="birthday"> |
| | | <el-date-picker |
| | | style="width: 100%" |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <el-col :span="20"> |
| | | <el-form-item label="联系电话" prop="phone"> |
| | | <el-input v-model="form.phone"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <el-col :span="20"> |
| | | <el-form-item label="职称" prop="title"> |
| | | <!-- <el-select v-model="form.title" placeholder="请选择" style="width: 100%">--> |
| | | <!-- <el-option--> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <el-col :span="20"> |
| | | <el-form-item label="证件照" prop="electronicPhoto"> |
| | | <el-upload |
| | | action="" |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <el-col :span="20"> |
| | | <el-form-item label="身份证号" prop="idCard"> |
| | | <el-input v-model="form.idCard"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <el-col :span="20"> |
| | | <el-form-item label="在岗情况" prop="dutyStatus"> |
| | | <el-radio-group v-model="form.dutyStatus"> |
| | | <el-radio :label="0">在岗</el-radio> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <el-col :span="20"> |
| | | <el-form-item label="单位全称" prop="companyName"> |
| | | <el-input v-model="form.companyName"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <el-col :span="20"> |
| | | <el-form-item label="单位地址"> |
| | | <el-input v-model="form.companyAddress"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <el-col :span="20"> |
| | | <el-form-item label="所在部门"> |
| | | <el-input v-model="form.deptName"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <el-col :span="20"> |
| | | <el-form-item label="职务"> |
| | | <el-input v-model="form.job"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <el-col :span="20"> |
| | | <el-form-item label="单位电话"> |
| | | <el-input v-model="form.companyTelephone"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <el-col :span="20"> |
| | | <el-form-item label="传真号码"> |
| | | <el-input v-model="form.faxNum"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <el-col :span="20"> |
| | | <el-form-item label="电子邮箱"> |
| | | <el-input v-model="form.email"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <el-col :span="20"> |
| | | <el-form-item label="毕业学校"> |
| | | <el-input v-model="form.graduationSchool"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <el-col :span="20"> |
| | | <el-form-item label="最高学历" prop="degree"> |
| | | <el-input v-model="form.degree"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <el-col :span="20"> |
| | | <el-form-item label="所学专业"> |
| | | <el-input v-model="form.speciality"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <el-col :span="20"> |
| | | <el-form-item label="现从事的专业及方向"> |
| | | <el-input v-model="form.currentProfession"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <el-col :span="20"> |
| | | <el-form-item label="支撑方向_安全生产" prop="supportDirectionSafety"> |
| | | <!-- <el-radio-group v-model="form.supportDirectionSafety">--> |
| | | <!-- <el-radio v-for="item in directionList" :label="item.value" :key="item.value">{{ item.label }}</el-radio>--> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <el-col :span="20"> |
| | | <el-form-item label="支撑方向_防灾减灾救灾" prop="supportDirectionPrevention"> |
| | | <!-- <el-radio-group v-model="form.supportDirectionPrevention">--> |
| | | <!-- <el-radio v-for="item in directionList" :label="item.value" :key="item.value">{{ item.label }}</el-radio>--> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <el-col :span="20"> |
| | | <el-form-item label="支撑方向_应急救援" prop="supportDirectionEmergency"> |
| | | <!-- <el-radio-group v-model="form.supportDirectionEmergency">--> |
| | | <!-- <el-radio v-for="item in directionList" :label="item.value" :key="item.value">{{ item.label }}</el-radio>--> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <el-col :span="20"> |
| | | <el-form-item label="工作简历"> |
| | | <el-upload |
| | | action="#" |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <el-col :span="20"> |
| | | <el-form-item label="发明、著作、学术论文情况(何时、何地出版或发表)"> |
| | | <el-upload |
| | | action="" |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <el-col :span="20"> |
| | | <el-form-item label="受过何种奖励"> |
| | | <el-upload |
| | | action="" |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <el-col :span="20"> |
| | | <el-form-item label="应急管理相关工作主要业绩及研究成果"> |
| | | <el-upload |
| | | action="" |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <el-col :span="20"> |
| | | <el-form-item label="专家本人意见"> |
| | | <el-upload |
| | | action="" |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <el-col :span="20"> |
| | | <el-form-item label="推荐单位意见"> |
| | | <el-upload |
| | | action="" |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <el-col :span="20"> |
| | | <el-form-item label="补充说明"> |
| | | <el-input v-model="form.remark" type="textarea" :autosize="{ minRows: 2}"></el-input> |
| | | </el-form-item> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {expertsTree,addExpertInfo,uploadFile} from '@/api/system/form' |
| | | import {getExpertTypes,addExpertInfo,uploadFile} from '@/api/system/form' |
| | | import { verifySimplePhone, verifyIdCard } from "@/utils/validate"; |
| | | export default { |
| | | name: "Index", |
| | | data() { |
| | | var validatePass = (rule, value, callback) => { |
| | | console.log(this.form,this.fileList,'校验') |
| | | if (this.fileList.length == 0) { |
| | | callback(new Error('请上传证件照')); |
| | | } else { |
| | | callback(); |
| | | } |
| | | }; |
| | | } |
| | | let validatePhone = (rule, value, callback)=>{ |
| | | if(value === ''){ |
| | | callback(new Error('请输入手机号')) |
| | | }else{ |
| | | if(!verifySimplePhone(value)){ |
| | | callback(new Error('手机号格式有误')) |
| | | }else{ |
| | | callback() |
| | | } |
| | | } |
| | | } |
| | | let verifyId = (rule, value, callback)=>{ |
| | | if(value === ''){ |
| | | callback(new Error('请输入身份证号')) |
| | | }else{ |
| | | if(!verifyIdCard(value)){ |
| | | callback(new Error('身份证号格式有误')) |
| | | }else{ |
| | | callback() |
| | | } |
| | | } |
| | | } |
| | | return { |
| | | labelPosition: 'right', |
| | | form:{ |
| | | name:'', |
| | | sex:'', |
| | |
| | | achievementKey: '', |
| | | personalOpinionKey: '', |
| | | recommendUnitOpinionKey: '', |
| | | remark: '' |
| | | remark: '', |
| | | source: 1 |
| | | }, |
| | | expertsType: [], |
| | | directionList: [ |
| | |
| | | sex:[{ required: true, message: '请选择性别', trigger: 'blur' }], |
| | | profession: [{ required: true, message: '请选择专业类别', trigger: 'blur' }], |
| | | birthday: [{ required: true, message: '请选择出生日期', trigger: 'blur' }], |
| | | phone:[{ required: true, message: '请填写联系电话', trigger: 'blur' }], |
| | | phone:[{ required: true, validator: validatePhone, trigger: 'blur' }], |
| | | title: [{ required: true, message: '请填写职称', trigger: 'blur' }], |
| | | electronicPhoto: [{ required: true,validator: validatePass, trigger: 'blur' }], |
| | | idCard: [{ required: true, message: '请填写身份证号', trigger: 'blur' }], |
| | | idCard: [{ required: true, validator: verifyId, trigger: 'blur' }], |
| | | dutyStatus: [{ required: true, message: '请选择在岗情况', trigger: 'blur' }], |
| | | companyName: [{ required: true, message: '请填写单位全称', trigger: 'blur' }], |
| | | degree: [{ required: true, message: '请填写最高学历', trigger: 'blur' }], |
| | |
| | | }, |
| | | created() { |
| | | const t = this |
| | | const width = document.documentElement.clientWidth |
| | | if(width < 750){t.labelPosition = 'top'} |
| | | t.getExpertsType() |
| | | }, |
| | | methods: { |
| | | async getExpertsType(){ |
| | | const res = await expertsTree() |
| | | console.log(res) |
| | | const res = await getExpertTypes() |
| | | if(res.code == 200){ |
| | | this.expertsType = res.data |
| | | }else{ |
| | |
| | | } |
| | | }) |
| | | }, |
| | | changeSource(num){ |
| | | this.form.source = num |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .home { |
| | | .main-title{ |
| | | font-size: 24px; |
| | | font-weight: bolder; |
| | | text-align: center; |
| | | margin-bottom: 20px; |
| | | color: #333; |
| | | } |
| | | blockquote { |
| | | padding: 10px 20px; |
| | | margin: 0 0 20px; |