|
@@ -28,7 +28,7 @@ import { socialAttribute, industry, adviserType, lawType } from '@/dataDic.js';
|
|
import { splitUrl, getAuthState, getAdviserType, getSocialAttribute } from '@/tools.js';
|
|
import { splitUrl, getAuthState, getAdviserType, getSocialAttribute } from '@/tools.js';
|
|
const FormItem = Form.Item;
|
|
const FormItem = Form.Item;
|
|
const monthFormat = 'YYYY/MM';
|
|
const monthFormat = 'YYYY/MM';
|
|
-
|
|
|
|
|
|
+import Crop from '@/crop/cropBlock';
|
|
//图片组件
|
|
//图片组件
|
|
|
|
|
|
const PicturesWall = React.createClass({
|
|
const PicturesWall = React.createClass({
|
|
@@ -94,7 +94,7 @@ const Expert = React.createClass({
|
|
loading: false,
|
|
loading: false,
|
|
orgCodeUrl: [],
|
|
orgCodeUrl: [],
|
|
companyLogoUrl: [],
|
|
companyLogoUrl: [],
|
|
- headPortraitUrl: [],
|
|
|
|
|
|
+ headPortraitUrl:[],
|
|
lawState: false,
|
|
lawState: false,
|
|
adviserUrl: [],
|
|
adviserUrl: [],
|
|
positiveIdUrl: [],
|
|
positiveIdUrl: [],
|
|
@@ -146,6 +146,7 @@ const Expert = React.createClass({
|
|
headPortraitUrl: thisData.headPortraitUrl //专家照片
|
|
headPortraitUrl: thisData.headPortraitUrl //专家照片
|
|
? splitUrl(thisData.headPortraitUrl, ',', globalConfig.avatarHost + '/upload')
|
|
? splitUrl(thisData.headPortraitUrl, ',', globalConfig.avatarHost + '/upload')
|
|
: [],
|
|
: [],
|
|
|
|
+ companyLogoUrl:thisData.headPortraitUrl?thisData.headPortraitUrl.split(','):[],
|
|
adviserUrl: thisData.adviserUrl //顾问照片
|
|
adviserUrl: thisData.adviserUrl //顾问照片
|
|
? splitUrl(thisData.adviserUrl, ',', globalConfig.avatarHost + '/upload')
|
|
? splitUrl(thisData.adviserUrl, ',', globalConfig.avatarHost + '/upload')
|
|
: [],
|
|
: [],
|
|
@@ -196,16 +197,6 @@ const Expert = React.createClass({
|
|
//基本信息提交
|
|
//基本信息提交
|
|
newSubmit(values = {}) {
|
|
newSubmit(values = {}) {
|
|
this.state.data = [];
|
|
this.state.data = [];
|
|
- let theorgCodeUrl = [];
|
|
|
|
- if (this.state.headPortraitUrl.length) {
|
|
|
|
- let picArr = [];
|
|
|
|
- this.state.headPortraitUrl.map(function(item) {
|
|
|
|
- if (item.response && item.response.data && item.response.data.length) {
|
|
|
|
- picArr.push(item.response.data);
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- theorgCodeUrl = picArr.join(',');
|
|
|
|
- }
|
|
|
|
let thecompanyLogoUrl = [];
|
|
let thecompanyLogoUrl = [];
|
|
if (this.state.positiveIdUrl.length) {
|
|
if (this.state.positiveIdUrl.length) {
|
|
let picArr = [];
|
|
let picArr = [];
|
|
@@ -277,7 +268,7 @@ const Expert = React.createClass({
|
|
dataList.qualification = values.qualification;
|
|
dataList.qualification = values.qualification;
|
|
dataList.majorCategory = values.majorCategory;
|
|
dataList.majorCategory = values.majorCategory;
|
|
dataList.graduateSchool = values.graduateSchool;
|
|
dataList.graduateSchool = values.graduateSchool;
|
|
- dataList.headPortraitUrl = theorgCodeUrl.length != 0 ? theorgCodeUrl : '';
|
|
|
|
|
|
+ dataList.headPortraitUrl = this.state.companyLogoUrl.length>0?(this.state.companyLogoUrl).join(','):[];
|
|
dataList.positiveIdUrl = thecompanyLogoUrl.length != 0 ? thecompanyLogoUrl : '';
|
|
dataList.positiveIdUrl = thecompanyLogoUrl.length != 0 ? thecompanyLogoUrl : '';
|
|
dataList.oppositeIdUrl = thecompanyLogoUrls.length != 0 ? thecompanyLogoUrls : '';
|
|
dataList.oppositeIdUrl = thecompanyLogoUrls.length != 0 ? thecompanyLogoUrls : '';
|
|
} else if (this.state.authenticationState == '1') {
|
|
} else if (this.state.authenticationState == '1') {
|
|
@@ -288,7 +279,7 @@ const Expert = React.createClass({
|
|
dataList.goodAtIndustry = values.adviserType == '4' ? values.goodAtIndustry : '';
|
|
dataList.goodAtIndustry = values.adviserType == '4' ? values.goodAtIndustry : '';
|
|
dataList.consultantCertificateUrl = values.adviserType == '4' && lawUrls.length != 0 ? lawUrls : ''; //法律职业资格证
|
|
dataList.consultantCertificateUrl = values.adviserType == '4' && lawUrls.length != 0 ? lawUrls : ''; //法律职业资格证
|
|
dataList.consultantType = values.adviserType; //顾问类型
|
|
dataList.consultantType = values.adviserType; //顾问类型
|
|
- dataList.headPortraitUrl = theorgCodeUrl.length != 0 ? theorgCodeUrl : ''; //顾问照片
|
|
|
|
|
|
+ dataList.headPortraitUrl = this.state.companyLogoUrl.length>0?(this.state.companyLogoUrl).join(','):[];
|
|
dataList.positiveIdUrl = thecompanyLogoUrl.length != 0 ? thecompanyLogoUrl : '';
|
|
dataList.positiveIdUrl = thecompanyLogoUrl.length != 0 ? thecompanyLogoUrl : '';
|
|
dataList.oppositeIdUrl = thecompanyLogoUrls.length != 0 ? thecompanyLogoUrls : '';
|
|
dataList.oppositeIdUrl = thecompanyLogoUrls.length != 0 ? thecompanyLogoUrls : '';
|
|
}
|
|
}
|
|
@@ -306,7 +297,7 @@ const Expert = React.createClass({
|
|
//认证状态判定说明
|
|
//认证状态判定说明
|
|
message.success(
|
|
message.success(
|
|
(this.state.auditStatus == '0' || this.state.auditStatus == '3') &&
|
|
(this.state.auditStatus == '0' || this.state.auditStatus == '3') &&
|
|
- this.state.headPortraitUrl.length
|
|
|
|
|
|
+ this.state.companyLogoUrl.length
|
|
? '认证审核提交成功,请耐心等待。'
|
|
? '认证审核提交成功,请耐心等待。'
|
|
: '保存成功'
|
|
: '保存成功'
|
|
);
|
|
);
|
|
@@ -322,7 +313,7 @@ const Expert = React.createClass({
|
|
this.props.form.validateFields((err, values) => {
|
|
this.props.form.validateFields((err, values) => {
|
|
if (!err) {
|
|
if (!err) {
|
|
if (this.state.authenticationState == '0' || this.state.authenticationState == '1') {
|
|
if (this.state.authenticationState == '0' || this.state.authenticationState == '1') {
|
|
- if ((this.state.headPortraitUrl.length)<1) {
|
|
|
|
|
|
+ if ((this.state.companyLogoUrl.length)<1) {
|
|
message.warning(this.state.authenticationState == '1' ? '请上传顾问照片!' : '请上传专家照片');
|
|
message.warning(this.state.authenticationState == '1' ? '请上传顾问照片!' : '请上传专家照片');
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -368,7 +359,7 @@ const Expert = React.createClass({
|
|
}
|
|
}
|
|
},
|
|
},
|
|
getHeadPortraitUrl(e) {
|
|
getHeadPortraitUrl(e) {
|
|
- this.setState({ headPortraitUrl: e });
|
|
|
|
|
|
+ this.setState({ companyLogoUrl: e });
|
|
},
|
|
},
|
|
getPositiveIdUrl(e) {
|
|
getPositiveIdUrl(e) {
|
|
this.setState({ positiveIdUrl: e });
|
|
this.setState({ positiveIdUrl: e });
|
|
@@ -387,6 +378,12 @@ const Expert = React.createClass({
|
|
this.loadInformation();
|
|
this.loadInformation();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ //logo图片获取
|
|
|
|
+ getAllImg(imgArr){
|
|
|
|
+ this.setState({
|
|
|
|
+ companyLogoUrl:imgArr
|
|
|
|
+ })
|
|
|
|
+ },
|
|
componentWillReceiveProps(nextProps) {},
|
|
componentWillReceiveProps(nextProps) {},
|
|
render() {
|
|
render() {
|
|
const { getFieldDecorator } = this.props.form;
|
|
const { getFieldDecorator } = this.props.form;
|
|
@@ -677,9 +674,13 @@ const Expert = React.createClass({
|
|
</span>
|
|
</span>
|
|
}
|
|
}
|
|
>
|
|
>
|
|
- <PicturesWall
|
|
|
|
- fileList={this.getHeadPortraitUrl}
|
|
|
|
- pictureUrl={this.state.headPortraitUrl}
|
|
|
|
|
|
+ <Crop
|
|
|
|
+ getAllImg={this.getAllImg}
|
|
|
|
+ number = {1}
|
|
|
|
+ aspectRatio = {1/1}
|
|
|
|
+ url ={globalConfig.context + '/api/user/uploadPicture64'}
|
|
|
|
+ uploadData = {{sign:'user_picture'}}
|
|
|
|
+ urlArr = {this.state.companyLogoUrl}
|
|
/>
|
|
/>
|
|
<p>建议:图片要清晰。</p>
|
|
<p>建议:图片要清晰。</p>
|
|
</FormItem>
|
|
</FormItem>
|