|
|
|
@ -1,15 +1,19 @@
|
|
|
|
|
import React, { Component } from "react";
|
|
|
|
|
import { message, Icon, Input, Form, Upload} from "antd";
|
|
|
|
|
import { message, Icon, Input, Form, Upload,Radio ,Tooltip} from "antd";
|
|
|
|
|
import axios from 'axios'
|
|
|
|
|
import ModalWrapper from "../../courses/common/ModalWrapper"
|
|
|
|
|
import { City, getUploadActionUrl, getImageUrl, ImageLayer2, getUploadActionUrlOfAuth } from 'educoder'
|
|
|
|
|
import { City, getUploadActionUrl, getImageUrl, ImageLayer2, getUploadActionUrlOfAuth ,ConditionToolTip } from 'educoder'
|
|
|
|
|
import '../account/common.css'
|
|
|
|
|
import AccountBasicEditItem from '../account/AccountBasicEditItem'
|
|
|
|
|
import ApplyForAddOrgModal from './ApplyForAddOrgModal'
|
|
|
|
|
import ApplyForAddChildOrgModal from './ApplyForAddChildOrgModal'
|
|
|
|
|
|
|
|
|
|
import authImg from '../../../images/account/auth.png'
|
|
|
|
|
import jobImg from '../../../images/account/job.png'
|
|
|
|
|
|
|
|
|
|
const { TextArea } = Input;
|
|
|
|
|
const RadioGroup = Radio.Group;
|
|
|
|
|
const Dragger = Upload.Dragger;
|
|
|
|
|
const MAX_NAME_LENGTH = 10
|
|
|
|
|
function getBase64(img, callback) {
|
|
|
|
|
const reader = new FileReader();
|
|
|
|
|
reader.addEventListener('load', () => callback(reader.result));
|
|
|
|
@ -26,16 +30,232 @@ function beforeUpload(file) {
|
|
|
|
|
}
|
|
|
|
|
return isJPG && isLt2M;
|
|
|
|
|
}
|
|
|
|
|
export function getHiddenName(name) {
|
|
|
|
|
if (!name) return ''
|
|
|
|
|
let len=parseInt(name.length)-1;
|
|
|
|
|
let str="";
|
|
|
|
|
for(var i = 0; i < len; i++){ str += "*"; }
|
|
|
|
|
const newName = name.substr(0,1)+str;
|
|
|
|
|
return newName
|
|
|
|
|
}
|
|
|
|
|
class RealNameCertificationModal extends Component{
|
|
|
|
|
constructor(props){
|
|
|
|
|
super(props);
|
|
|
|
|
this.state={
|
|
|
|
|
identity:"teacher",
|
|
|
|
|
departmentsName:undefined,
|
|
|
|
|
filterSchoolList:undefined,
|
|
|
|
|
filterDepartments :undefined,
|
|
|
|
|
school:undefined,
|
|
|
|
|
school_id:undefined,
|
|
|
|
|
department_id:undefined,
|
|
|
|
|
schoolList:undefined,
|
|
|
|
|
departments:undefined,
|
|
|
|
|
showRealName:true,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
componentDidMount() {
|
|
|
|
|
console.log("RealNameCertificationModal");
|
|
|
|
|
console.log(this.props.basicInfo);
|
|
|
|
|
if(this.props.basicInfo){
|
|
|
|
|
this.setValue(this.props.basicInfo);
|
|
|
|
|
this.getSchoolList(this.props.basicInfo);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
setValue=(basicInfo)=>{
|
|
|
|
|
if(basicInfo){
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
nickname:basicInfo.nickname,
|
|
|
|
|
name:!basicInfo.show_realname ? this.hideRealName(basicInfo.name) : basicInfo.name,
|
|
|
|
|
sex:String(basicInfo.gender),
|
|
|
|
|
job:basicInfo.identity,
|
|
|
|
|
org:basicInfo.school_name,
|
|
|
|
|
|
|
|
|
|
// city:[basicInfo.location,basicInfo.location_city]
|
|
|
|
|
})
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
// 等显示后再set
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
job:basicInfo.identity,
|
|
|
|
|
student_No:basicInfo.student_id,
|
|
|
|
|
org2:basicInfo.department_name,
|
|
|
|
|
job1:basicInfo && basicInfo.identity=="teacher" ? basicInfo.technical_title:"教授",
|
|
|
|
|
job2:basicInfo && basicInfo.identity=="professional" ? basicInfo.technical_title:"企业管理者",
|
|
|
|
|
})
|
|
|
|
|
}, 100)
|
|
|
|
|
//if(basicInfo.nickname){
|
|
|
|
|
this.setState({
|
|
|
|
|
forDisable: true,
|
|
|
|
|
nameLength:basicInfo.nickname?basicInfo.nickname.length:0,
|
|
|
|
|
showRealName:basicInfo.show_realname,
|
|
|
|
|
realName: basicInfo.name,
|
|
|
|
|
identity:basicInfo.identity,
|
|
|
|
|
school_id:basicInfo.school_id,
|
|
|
|
|
department_id:basicInfo.department_id
|
|
|
|
|
})
|
|
|
|
|
//}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getSchoolList=(basicInfo, selectedName)=>{
|
|
|
|
|
let url=`/schools/for_option.json`;
|
|
|
|
|
axios.get(url).then((result)=>{
|
|
|
|
|
if(result){
|
|
|
|
|
this.setState({
|
|
|
|
|
schoolList:result.data.schools
|
|
|
|
|
})
|
|
|
|
|
if (selectedName) {
|
|
|
|
|
let school_id
|
|
|
|
|
result.data.schools.reverse().some( item => {
|
|
|
|
|
if (item.name == selectedName) {
|
|
|
|
|
school_id = item.id
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
org: selectedName
|
|
|
|
|
})
|
|
|
|
|
this.setState({
|
|
|
|
|
school_id,
|
|
|
|
|
school: selectedName
|
|
|
|
|
}, () => {
|
|
|
|
|
this.filterList(selectedName)
|
|
|
|
|
})
|
|
|
|
|
} else if(basicInfo && basicInfo.school_name){
|
|
|
|
|
this.setState({
|
|
|
|
|
school:basicInfo.school_name,
|
|
|
|
|
filterSchoolList:this.state.schoolList.filter(function(item){
|
|
|
|
|
return item.name.indexOf(basicInfo.school_name)>-1;
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
this.getDepartments(basicInfo.school_name,false);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}).catch((error)=>{
|
|
|
|
|
console.log(error);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 将名字隐藏起来
|
|
|
|
|
hideRealName=(name)=>{
|
|
|
|
|
this.setState({ realName: name })
|
|
|
|
|
const newName = getHiddenName(name)
|
|
|
|
|
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
name: newName
|
|
|
|
|
})
|
|
|
|
|
return newName
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getDepartments=(e,flag)=>{
|
|
|
|
|
let arr=this.state.schoolList.filter(function(item){
|
|
|
|
|
if(item.name.indexOf(e) > -1){
|
|
|
|
|
return item.name;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
if (!arr[0]) {
|
|
|
|
|
if (!e) {
|
|
|
|
|
this.setState({
|
|
|
|
|
filterSchoolList: []
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// 没找到学校,清空部门
|
|
|
|
|
this.setState({
|
|
|
|
|
departments: [],
|
|
|
|
|
filterDepartments: [],
|
|
|
|
|
departmentsName: '',
|
|
|
|
|
school_id: '',
|
|
|
|
|
department_id: '',
|
|
|
|
|
})
|
|
|
|
|
this.this_school_id = ''
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
org2: ''
|
|
|
|
|
})
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
org: arr[0].name
|
|
|
|
|
})
|
|
|
|
|
this.filterList(e)
|
|
|
|
|
// 保存选择的学校id
|
|
|
|
|
this.this_school_id = arr[0].id
|
|
|
|
|
this.setState({
|
|
|
|
|
school_id: arr[0].id,
|
|
|
|
|
school:e,
|
|
|
|
|
})
|
|
|
|
|
this._getDepartments(arr[0].id, flag)
|
|
|
|
|
}
|
|
|
|
|
_getDepartments = (schoolId, flag, selectedName) => {
|
|
|
|
|
let url=`/schools/${schoolId || this.state.school_id}/departments/for_option.json`;
|
|
|
|
|
axios.get(url).then((result)=>{
|
|
|
|
|
if(result){
|
|
|
|
|
this.setState({
|
|
|
|
|
departments:result.data.departments,
|
|
|
|
|
filterDepartments:result.data.departments
|
|
|
|
|
})
|
|
|
|
|
if (selectedName) {
|
|
|
|
|
let department_id
|
|
|
|
|
result.data.departments.reverse().some( item => {
|
|
|
|
|
if (item.name == selectedName) {
|
|
|
|
|
department_id = item.id
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
org2: selectedName
|
|
|
|
|
})
|
|
|
|
|
this.setState({
|
|
|
|
|
department_id,
|
|
|
|
|
// school: selectedName
|
|
|
|
|
})
|
|
|
|
|
} else if(result.data.departments && result.data.departments.length>0 && flag==true){
|
|
|
|
|
// 切换学校后,部门默认选择第一个
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
org2:result.data.departments[0].name
|
|
|
|
|
})
|
|
|
|
|
this.setState({
|
|
|
|
|
department_id: result.data.departments[0].id
|
|
|
|
|
})
|
|
|
|
|
}else if(result.data.departments && result.data.departments.length == 0 && flag==true){
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
org2:''
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}).catch((error)=>{
|
|
|
|
|
console.log(error);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
filterList =(e)=>{
|
|
|
|
|
const inputVal = e.trim()
|
|
|
|
|
let arr=[];
|
|
|
|
|
if(inputVal){
|
|
|
|
|
arr= this.state.schoolList.filter(function(item){
|
|
|
|
|
return item.name.indexOf(inputVal)>-1;
|
|
|
|
|
});
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
org: inputVal
|
|
|
|
|
})
|
|
|
|
|
this.setState({
|
|
|
|
|
school: inputVal,
|
|
|
|
|
filterSchoolList: arr
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.setState({
|
|
|
|
|
school: '',
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// else{
|
|
|
|
|
// let {school}=this.state;
|
|
|
|
|
// arr= this.state.schoolList.filter(function(item){
|
|
|
|
|
// return item.name.indexOf(school)>-1;
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
setVisible = (visible) => {
|
|
|
|
|
this.refs.modalWrapper.setVisible(visible)
|
|
|
|
|
}
|
|
|
|
@ -53,29 +273,51 @@ class RealNameCertificationModal extends Component{
|
|
|
|
|
let url = `/users/accounts/${current_user && current_user.login}/authentication_apply.json`
|
|
|
|
|
axios.post((url),{
|
|
|
|
|
name:basicInfo.name,
|
|
|
|
|
gender:parseInt(values.sex),
|
|
|
|
|
id_number:values.credentials
|
|
|
|
|
}).then((result)=>{
|
|
|
|
|
if(result){
|
|
|
|
|
this.props.showNotification("申请已提交,请等待审核!");
|
|
|
|
|
try {
|
|
|
|
|
this.props.getBasicInfo();
|
|
|
|
|
} catch (e) {
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
this.props.Getdata();
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
this.setVisible(false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}).catch((error)=>{
|
|
|
|
|
console.log(error);
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
// 职业认证
|
|
|
|
|
// console.log(values.job == "student" ? values.student_No : values.job == "teacher" ? values.job1 : values.job2);
|
|
|
|
|
let url = `/users/accounts/${current_user && current_user.login}/professional_auth_apply.json`
|
|
|
|
|
axios.post((url),{
|
|
|
|
|
school_id:basicInfo && basicInfo.school_id,
|
|
|
|
|
department_id:basicInfo && basicInfo.department_id,
|
|
|
|
|
identity:basicInfo && basicInfo.identity,
|
|
|
|
|
extra:basicInfo && basicInfo.identity == "student" ? basicInfo.student_id:basicInfo.technical_title
|
|
|
|
|
school_id:this.state.school_id,
|
|
|
|
|
department_id:this.state.department_id,
|
|
|
|
|
identity:this.state.identity,
|
|
|
|
|
extra: values.job == "student" ? values.student_No : values.job == "teacher" ? values.job1 : values.job2
|
|
|
|
|
}).then((result)=>{
|
|
|
|
|
if(result){
|
|
|
|
|
this.props.showNotification("申请已提交,请等待审核!");
|
|
|
|
|
try {
|
|
|
|
|
this.props.getBasicInfo();
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
this.props.Getdata();
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
this.setVisible(false);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}).catch((error)=>{
|
|
|
|
|
console.log(error);
|
|
|
|
@ -119,16 +361,102 @@ class RealNameCertificationModal extends Component{
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 切换职称
|
|
|
|
|
changeJob=(e)=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
identity:e
|
|
|
|
|
})
|
|
|
|
|
let {basicInfo}=this.props;
|
|
|
|
|
if(basicInfo){
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
job1:basicInfo && basicInfo.identity=="teacher" ? basicInfo.technical_title:"教授",
|
|
|
|
|
job2:basicInfo && basicInfo.identity=="professional" ? basicInfo.technical_title:"企业管理者",
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 选择学校(获取对应学校的学院、部门)
|
|
|
|
|
changeList=(e)=>{
|
|
|
|
|
this.getDepartments(e.trim(),true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
showApplyForAddOrgModal = () => {
|
|
|
|
|
this.applyForAddOrgForm.setVisible(true)
|
|
|
|
|
}
|
|
|
|
|
showApplyForAddChildOrgModal = () => {
|
|
|
|
|
let{school,schoolList}=this.state;
|
|
|
|
|
let arr=schoolList.filter(function(item){
|
|
|
|
|
return item.name == school;
|
|
|
|
|
});
|
|
|
|
|
if(arr.length > 0){
|
|
|
|
|
this.applyForAddChildOrgForm.setVisible(true)
|
|
|
|
|
}else{
|
|
|
|
|
this.props.showNotification("请先选择正确的单位或者学校!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
addOrgSuccess = (name) => {
|
|
|
|
|
// const schoolList = this.state.schoolList.slice(0)
|
|
|
|
|
// schoolList.push({ id: schoolList.length + 2000, name: name})
|
|
|
|
|
// this.setState({ schoolList })
|
|
|
|
|
|
|
|
|
|
this.getSchoolList(this.props.basicInfo, name);
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
org: name
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
addChildOrgSuccess = (deptName) => {
|
|
|
|
|
|
|
|
|
|
this._getDepartments(this.state.school_id, false, deptName);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 隐藏或显示真实姓名
|
|
|
|
|
showOrHide=(flag)=>{
|
|
|
|
|
const name = this.props.form.getFieldsValue().name || this.props.basicInfo.name
|
|
|
|
|
this.setState({
|
|
|
|
|
showRealName:flag==true?false:true
|
|
|
|
|
})
|
|
|
|
|
if(flag==true){ // 隐藏真实姓名
|
|
|
|
|
this.hideRealName(name);
|
|
|
|
|
}else{ // 显示
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
name: this.state.realName
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render(){
|
|
|
|
|
const { course_lists, checkBoxValues, searchValue, loading, imageUrl, imageUrl2 } = this.state
|
|
|
|
|
const { course_lists, checkBoxValues, searchValue, loading, imageUrl, imageUrl2,
|
|
|
|
|
identity,
|
|
|
|
|
departmentsName ,
|
|
|
|
|
filterSchoolList ,
|
|
|
|
|
filterDepartments ,
|
|
|
|
|
school,
|
|
|
|
|
department_id,
|
|
|
|
|
departments,
|
|
|
|
|
school_id,
|
|
|
|
|
|
|
|
|
|
showRealName
|
|
|
|
|
} = this.state
|
|
|
|
|
const { moduleName } = this.props
|
|
|
|
|
const { getFieldDecorator } = this.props.form;
|
|
|
|
|
let {certification}=this.props;
|
|
|
|
|
// /api/users/accounts/${this.props.current_user.login}/auth_attachment.json
|
|
|
|
|
|
|
|
|
|
// 已职业认证的账户不能修改职业,学校/单位,院系/部门(true为disable)
|
|
|
|
|
const professionalFlag = basicInfo && basicInfo.professional_certification == "certified" ;
|
|
|
|
|
|
|
|
|
|
let{ basicInfo }=this.props
|
|
|
|
|
let common={
|
|
|
|
|
changeJob:this.changeJob,
|
|
|
|
|
filterList:this.filterList,
|
|
|
|
|
changeList:this.changeList,
|
|
|
|
|
showApplyForAddOrgModal:this.showApplyForAddOrgModal,
|
|
|
|
|
showApplyForAddChildOrgModal:this.showApplyForAddChildOrgModal
|
|
|
|
|
}
|
|
|
|
|
const uploadProps2 = {
|
|
|
|
|
name: 'image',
|
|
|
|
|
data:{type:certification == 1 ? "real_name" : "professional"},
|
|
|
|
|
data: {type: certification == 1 ? "real_name" : "professional"},
|
|
|
|
|
multiple: true,
|
|
|
|
|
showUploadList: false,
|
|
|
|
|
// https://newweb.educoder.net
|
|
|
|
@ -136,18 +464,33 @@ class RealNameCertificationModal extends Component{
|
|
|
|
|
className: 'idPic-uploader',
|
|
|
|
|
onChange: this.handleChange2,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// form合并了
|
|
|
|
|
const propsWithoutForm = Object.assign({}, this.props)
|
|
|
|
|
delete propsWithoutForm.form
|
|
|
|
|
return(
|
|
|
|
|
<div>
|
|
|
|
|
<ApplyForAddOrgModal ref="applyForAddOrgModal" wrappedComponentRef={(form) => this.applyForAddOrgForm = form} schoolName={school}
|
|
|
|
|
{...propsWithoutForm} addOrgSuccess={this.addOrgSuccess}
|
|
|
|
|
></ApplyForAddOrgModal>
|
|
|
|
|
<ApplyForAddChildOrgModal ref="applyForAddChildOrgModal" schoolName={school} schoolId={school_id} departmentName={departmentsName}
|
|
|
|
|
{...propsWithoutForm}
|
|
|
|
|
wrappedComponentRef={(form) => this.applyForAddChildOrgForm = form}
|
|
|
|
|
addChildOrgSuccess={this.addChildOrgSuccess}
|
|
|
|
|
></ApplyForAddChildOrgModal>
|
|
|
|
|
<ModalWrapper
|
|
|
|
|
ref="modalWrapper"
|
|
|
|
|
title={
|
|
|
|
|
certification && certification==1?
|
|
|
|
|
certification && certification == 1 ?
|
|
|
|
|
<span><i className="iconfont icon-shenfenrenzheng font-18 color-blue mr5" style={{fontWeight:"normal"}}></i>实名认证</span>:
|
|
|
|
|
<span><i className="iconfont icon-zhiyerenzheng font-18 color-blue mr5" style={{fontWeight:"normal"}}></i>职业认证</span>
|
|
|
|
|
}
|
|
|
|
|
{...this.props }
|
|
|
|
|
{...this.state}
|
|
|
|
|
onOk={this.onOk}
|
|
|
|
|
okText="保存"
|
|
|
|
|
className="applyForModal certificationModal courseNormalForm"
|
|
|
|
|
width="660px"
|
|
|
|
|
bottomRender={
|
|
|
|
|
certification && certification == 1?
|
|
|
|
|
<div className="bottomRender">
|
|
|
|
@ -202,9 +545,9 @@ class RealNameCertificationModal extends Component{
|
|
|
|
|
.certificationModal .ant-modal-body{
|
|
|
|
|
padding:20px;
|
|
|
|
|
}
|
|
|
|
|
.certificationModal .formItemInline .ant-form-item-control-wrapper {
|
|
|
|
|
width: 448px;
|
|
|
|
|
}
|
|
|
|
|
// .certificationModal .formItemInline .ant-form-item-control-wrapper {
|
|
|
|
|
// width: 448px;
|
|
|
|
|
// }
|
|
|
|
|
span.idPic-uploader {
|
|
|
|
|
margin-right:20px;
|
|
|
|
|
height:110px;
|
|
|
|
@ -255,16 +598,77 @@ class RealNameCertificationModal extends Component{
|
|
|
|
|
align-items: center;
|
|
|
|
|
display: -webkit-flex;
|
|
|
|
|
}
|
|
|
|
|
.formItemInline.ant-form-item {
|
|
|
|
|
display: -ms-flexbox;
|
|
|
|
|
display: flex;
|
|
|
|
|
}
|
|
|
|
|
.formItemInline {
|
|
|
|
|
display: flex;
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
position: relative;
|
|
|
|
|
}
|
|
|
|
|
.formItemInline .ant-form-explain{
|
|
|
|
|
position:absolute;
|
|
|
|
|
bottom:-20px;
|
|
|
|
|
left:0px;
|
|
|
|
|
width:100%;
|
|
|
|
|
}
|
|
|
|
|
.yslgraduainputedit{
|
|
|
|
|
width:295px;
|
|
|
|
|
}
|
|
|
|
|
`}</style>
|
|
|
|
|
|
|
|
|
|
<Form onSubmit={this.handleSubmit}>
|
|
|
|
|
{
|
|
|
|
|
certification && certification ==1 &&
|
|
|
|
|
{certification && certification == 1 ?
|
|
|
|
|
<div>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label="姓名"
|
|
|
|
|
className="formItemInline"
|
|
|
|
|
>
|
|
|
|
|
{basicInfo && basicInfo.authentication == 'uncertified' ? <React.Fragment>{getFieldDecorator('name', {
|
|
|
|
|
rules: [{
|
|
|
|
|
// initialValue: this.state.cityDefaultValue,
|
|
|
|
|
required: true,
|
|
|
|
|
message: `请输入真实姓名,最大限制${MAX_NAME_LENGTH}个字符`,
|
|
|
|
|
validator: this.checkNameLength
|
|
|
|
|
}],
|
|
|
|
|
})(
|
|
|
|
|
<Input placeholder={`请输入真实姓名,最大限制${MAX_NAME_LENGTH}个字符`} className="yslgraduainputedit" disabled={!showRealName && this.state.forDisable == true } addonAfter={
|
|
|
|
|
<i className={showRealName?"iconfont icon-xianshi font-18 color-blue":"iconfont icon-yincang font-18 color-blue"}
|
|
|
|
|
onClick={()=>this.showOrHide(showRealName)}></i>
|
|
|
|
|
}></Input>
|
|
|
|
|
)}
|
|
|
|
|
<span>{ showRealName ? '(显示:平台将显示您的真实姓名)' : '(隐藏:平台将显示你的昵称)' }</span>
|
|
|
|
|
</React.Fragment> :
|
|
|
|
|
<div className="df" style={{}}>
|
|
|
|
|
<Tooltip title="已完成实名认证,不能修改">
|
|
|
|
|
<span className="mr8" >{showRealName ? this.props.basicInfo.name : getHiddenName(this.props.basicInfo.name)}</span>
|
|
|
|
|
</Tooltip>
|
|
|
|
|
<i className={showRealName?"iconfont icon-xianshi font-18 color-blue":"iconfont icon-yincang font-18 color-blue"}
|
|
|
|
|
onClick={()=>this.showOrHide(showRealName)}></i>
|
|
|
|
|
<span>{ showRealName ? '(显示:平台将显示您的真实姓名)' : '(隐藏:平台将显示你的昵称)' }</span>
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
</Form.Item>
|
|
|
|
|
|
|
|
|
|
<Form.Item
|
|
|
|
|
label="性别"
|
|
|
|
|
className="formItemInline resetSexStyle"
|
|
|
|
|
>
|
|
|
|
|
{getFieldDecorator('sex', {
|
|
|
|
|
rules: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请选择性别',
|
|
|
|
|
}],
|
|
|
|
|
})(
|
|
|
|
|
<RadioGroup>
|
|
|
|
|
<ConditionToolTip title="已完成实名认证,不能修改" condition={basicInfo.authentication != 'uncertified'} >
|
|
|
|
|
<Radio value="0" disabled={basicInfo.authentication != 'uncertified'}>男</Radio>
|
|
|
|
|
<Radio value="1" disabled={basicInfo.authentication != 'uncertified'}>女</Radio>
|
|
|
|
|
</ConditionToolTip>
|
|
|
|
|
</RadioGroup>
|
|
|
|
|
)}
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label="证件号:"
|
|
|
|
|
className="formItemInline"
|
|
|
|
@ -279,14 +683,29 @@ class RealNameCertificationModal extends Component{
|
|
|
|
|
<Input placeholder="请输入证件号" ></Input>
|
|
|
|
|
)}
|
|
|
|
|
</Form.Item>
|
|
|
|
|
}
|
|
|
|
|
<div style={{ marginLeft: '18px' }}>
|
|
|
|
|
<div>
|
|
|
|
|
<span style={{color: '#999999'}}>{ certification && certification == 1 ? "身份证(人像面)上传":"职业证照片上传" }</span>
|
|
|
|
|
<span style={{color: '#FF6800'}}>(png/jpg/bmp格式,不超过2MB)</span>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="df mt20" style={{ justifyContent: 'center' }} >
|
|
|
|
|
:
|
|
|
|
|
<AccountBasicEditItem
|
|
|
|
|
identity={identity}
|
|
|
|
|
getFieldDecorator={getFieldDecorator}
|
|
|
|
|
professionalFlag={professionalFlag}
|
|
|
|
|
basicInfo={basicInfo}
|
|
|
|
|
{...this.props}
|
|
|
|
|
{...this.state}
|
|
|
|
|
{...common}
|
|
|
|
|
form={this.props.form}
|
|
|
|
|
filterSchoolList={filterSchoolList}
|
|
|
|
|
filterDepartments={filterDepartments}
|
|
|
|
|
departmentsName={departmentsName}
|
|
|
|
|
school={school}
|
|
|
|
|
department_id={department_id}
|
|
|
|
|
departments={departments}
|
|
|
|
|
></AccountBasicEditItem>
|
|
|
|
|
}
|
|
|
|
|
<div className="mt15" style={{ marginLeft: '18px' }}>
|
|
|
|
|
<div className="df">
|
|
|
|
|
<span style={{color: '#999999'}}>{ certification && certification == 1 ? "身份证上传:":"职业证上传:" }</span>
|
|
|
|
|
<div className="df ml10" style={{ justifyContent: 'center' }} >
|
|
|
|
|
<span className="idPic-uploader demoImg">
|
|
|
|
|
<img src={`${certification == 1 ? authImg : jobImg}`} alt="avatar" style={{ maxHeight: '110px'}}/>
|
|
|
|
|
</span>
|
|
|
|
@ -305,21 +724,25 @@ class RealNameCertificationModal extends Component{
|
|
|
|
|
}
|
|
|
|
|
</Dragger>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="df mt10 color-grey-9" style={{ justifyContent: 'center' }} >
|
|
|
|
|
<span className="fl mr20 edu-txt-center" style={{width:"160px"}}>示例图片</span>
|
|
|
|
|
<span className="fl edu-txt-center mr20" style={{width:"160px"}}>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="df mt10 color-grey-9">
|
|
|
|
|
<span className="fl edu-txt-center" style={{width:"200px",marginLeft:"65px"}}>
|
|
|
|
|
<p>示例图片</p>
|
|
|
|
|
<p className="font-12" style={{color: '#FF6800'}}>(png/jpg/bmp格式,不超过2MB)</p>
|
|
|
|
|
</span>
|
|
|
|
|
<span className="fl edu-txt-center" style={{width:"160px"}}>
|
|
|
|
|
<ImageLayer2 parentSel={'#imageLayerBtn'} parentSel={'#imageLayerBtn'}
|
|
|
|
|
></ImageLayer2>
|
|
|
|
|
<a href="javascript:void(0)" id="imageLayerBtn" src={imageUrl || imageUrl2} className="color-orange" style={{borderBottom:"1px solid #ff6800"}}>查看大图</a>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</Form>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</ModalWrapper>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|