|
@@ -648,9 +648,9 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
|
};
|
|
|
//url转化
|
|
|
let thePictureUrl = [];
|
|
|
- if (this.props.pictureUrl.length) {
|
|
|
+ if (this.state.pictureUrl.length) {
|
|
|
let picArr = [];
|
|
|
- this.props.pictureUrl.map(function (item) {
|
|
|
+ this.state.pictureUrl.map(function (item) {
|
|
|
picArr.push(item.response.data);
|
|
|
});
|
|
|
thePictureUrl = picArr.join(",");
|
|
@@ -711,11 +711,15 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
|
});
|
|
|
},
|
|
|
componentWillMount() {
|
|
|
- this.loadData(this.props.id, this.props.detailApiUrl);
|
|
|
+ if (this.props.data && this.props.data.id) {
|
|
|
+ this.loadData(this.props.data.id, this.props.detailApiUrl);
|
|
|
+ };
|
|
|
},
|
|
|
componentWillReceiveProps(nextProps) {
|
|
|
if (!this.props.visible && nextProps.visible) {
|
|
|
- this.loadData(nextProps.id, nextProps.detailApiUrl);
|
|
|
+ if (nextProps.data && nextProps.data.id) {
|
|
|
+ this.loadData(nextProps.data.id, nextProps.detailApiUrl);
|
|
|
+ };
|
|
|
this.state.textFileList = [];
|
|
|
this.state.videoFileList = [];
|
|
|
this.state.textFileUrl = undefined;
|
|
@@ -769,7 +773,7 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
|
onSelect={(e, n) => {
|
|
|
theData.uid = e;
|
|
|
if (this.props.detailApiUrl.indexOf('org') >= 0) {
|
|
|
- this.props.getContactsList(e);
|
|
|
+ this.getContactsList(e);
|
|
|
};
|
|
|
}}>
|
|
|
{this.props.detailApiUrl.indexOf('org') >= 0 ? this.props.companyOption : this.props.userOption}
|
|
@@ -787,7 +791,7 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
|
notFoundContent="未获取到联系人列表"
|
|
|
showSearch
|
|
|
filterOption={companySearch}>
|
|
|
- {this.props.contactsOption}
|
|
|
+ {this.state.contactsOption}
|
|
|
</Select>
|
|
|
)}
|
|
|
</FormItem> : <div></div>}
|