|
@@ -9,25 +9,25 @@ import { beforeUploadFile, splitUrl, companySearch, getTransferMode, getAchievem
|
|
|
import throttle from '../../throttle.js';
|
|
|
|
|
|
const KeyWordTagGroup = React.createClass({
|
|
|
- getInitialState() {
|
|
|
+ getInitialState () {
|
|
|
return {
|
|
|
tags: [],
|
|
|
inputVisible: false,
|
|
|
inputValue: ''
|
|
|
};
|
|
|
},
|
|
|
- handleClose(removedTag) {
|
|
|
+ handleClose (removedTag) {
|
|
|
const tags = this.state.tags.filter(tag => tag !== removedTag);
|
|
|
this.props.tagsArr(tags);
|
|
|
this.setState({ tags });
|
|
|
},
|
|
|
- showInput() {
|
|
|
+ showInput () {
|
|
|
this.setState({ inputVisible: true }, () => this.input.focus());
|
|
|
},
|
|
|
- handleInputChange(e) {
|
|
|
+ handleInputChange (e) {
|
|
|
this.setState({ inputValue: e.target.value });
|
|
|
},
|
|
|
- handleInputConfirm() {
|
|
|
+ handleInputConfirm () {
|
|
|
const state = this.state;
|
|
|
const inputValue = state.inputValue;
|
|
|
let tags = state.tags;
|
|
@@ -41,15 +41,15 @@ const KeyWordTagGroup = React.createClass({
|
|
|
inputValue: '',
|
|
|
});
|
|
|
},
|
|
|
- componentWillMount() {
|
|
|
+ componentWillMount () {
|
|
|
this.state.tags = this.props.keyWordArr;
|
|
|
},
|
|
|
- componentWillReceiveProps(nextProps) {
|
|
|
+ componentWillReceiveProps (nextProps) {
|
|
|
if (this.props.keyWordArr != nextProps.keyWordArr) {
|
|
|
this.state.tags = nextProps.keyWordArr;
|
|
|
};
|
|
|
},
|
|
|
- render() {
|
|
|
+ render () {
|
|
|
const { tags, inputVisible, inputValue } = this.state;
|
|
|
return (
|
|
|
<div className="keyWord-tips">
|
|
@@ -80,31 +80,31 @@ const KeyWordTagGroup = React.createClass({
|
|
|
});
|
|
|
|
|
|
const PicturesWall = React.createClass({
|
|
|
- getInitialState() {
|
|
|
+ getInitialState () {
|
|
|
return {
|
|
|
previewVisible: false,
|
|
|
previewImage: '',
|
|
|
fileList: [],
|
|
|
}
|
|
|
},
|
|
|
- handleCancel() {
|
|
|
+ handleCancel () {
|
|
|
this.setState({ previewVisible: false })
|
|
|
},
|
|
|
- handlePreview(file) {
|
|
|
+ handlePreview (file) {
|
|
|
this.setState({
|
|
|
previewImage: file.url || file.thumbUrl,
|
|
|
previewVisible: true,
|
|
|
});
|
|
|
},
|
|
|
- handleChange(info) {
|
|
|
+ handleChange (info) {
|
|
|
let fileList = info.fileList;
|
|
|
this.setState({ fileList });
|
|
|
this.props.fileList(fileList);
|
|
|
},
|
|
|
- componentWillReceiveProps(nextProps) {
|
|
|
+ componentWillReceiveProps (nextProps) {
|
|
|
this.state.fileList = nextProps.pictureUrl;
|
|
|
},
|
|
|
- render() {
|
|
|
+ render () {
|
|
|
const { previewVisible, previewImage, fileList } = this.state;
|
|
|
const uploadButton = (
|
|
|
<div>
|
|
@@ -132,7 +132,7 @@ const PicturesWall = React.createClass({
|
|
|
});
|
|
|
|
|
|
const AchievementDetailShow = Form.create()(React.createClass({
|
|
|
- getInitialState() {
|
|
|
+ getInitialState () {
|
|
|
return {
|
|
|
loading: false,
|
|
|
buttonLoading: false,
|
|
@@ -146,7 +146,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
|
|
|
businessPlanFileList: []
|
|
|
};
|
|
|
},
|
|
|
- loadData(id, detailApiUrl) {
|
|
|
+ loadData (id, detailApiUrl) {
|
|
|
this.setState({
|
|
|
loading: true
|
|
|
});
|
|
@@ -184,7 +184,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
|
|
|
});
|
|
|
}.bind(this));
|
|
|
},
|
|
|
- offShelf() {
|
|
|
+ offShelf () {
|
|
|
this.setState({
|
|
|
loading: true
|
|
|
});
|
|
@@ -207,7 +207,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
|
|
|
}
|
|
|
}.bind(this));
|
|
|
},
|
|
|
- modifyBroker() {
|
|
|
+ modifyBroker () {
|
|
|
this.props.form.validateFields((err, values) => {
|
|
|
if (!err) {
|
|
|
this.setState({
|
|
@@ -237,7 +237,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- formSubmit() {
|
|
|
+ formSubmit () {
|
|
|
this.props.form.validateFields((err, values) => {
|
|
|
if (values.auditStatus == 3 && !values.techBrokerId) {
|
|
|
message.warning('必须选择一个技术经纪人!');
|
|
@@ -275,7 +275,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- handleSubmit(e) {
|
|
|
+ handleSubmit (e) {
|
|
|
e.preventDefault();
|
|
|
this.props.form.validateFields((err, values) => {
|
|
|
if (values.auditStatus == 4) {
|
|
@@ -287,7 +287,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
|
|
|
};
|
|
|
});
|
|
|
},
|
|
|
- buildMatchList() {
|
|
|
+ buildMatchList () {
|
|
|
this.setState({
|
|
|
buttonLoading: true
|
|
|
});
|
|
@@ -310,7 +310,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
|
|
|
};
|
|
|
}.bind(this));
|
|
|
},
|
|
|
- getContactsList(theUid) {
|
|
|
+ getContactsList (theUid) {
|
|
|
$.ajax({
|
|
|
method: "get",
|
|
|
dataType: "json",
|
|
@@ -333,10 +333,10 @@ const AchievementDetailShow = Form.create()(React.createClass({
|
|
|
}.bind(this),
|
|
|
});
|
|
|
},
|
|
|
- componentWillMount() {
|
|
|
+ componentWillMount () {
|
|
|
this.loadData(this.props.data.id, this.props.detailApiUrl);
|
|
|
},
|
|
|
- componentWillReceiveProps(nextProps) {
|
|
|
+ componentWillReceiveProps (nextProps) {
|
|
|
if (!this.props.visible && nextProps.visible) {
|
|
|
this.loadData(nextProps.data.id, nextProps.detailApiUrl);
|
|
|
this.state.textFileList = [];
|
|
@@ -345,7 +345,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
|
|
|
this.props.form.resetFields();
|
|
|
};
|
|
|
},
|
|
|
- render() {
|
|
|
+ render () {
|
|
|
const theData = this.state.data || {};
|
|
|
const { getFieldDecorator } = this.props.form;
|
|
|
const FormItem = Form.Item
|
|
@@ -730,7 +730,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
|
|
|
}));
|
|
|
|
|
|
const AchievementDetailForm = Form.create()(React.createClass({
|
|
|
- getInitialState() {
|
|
|
+ getInitialState () {
|
|
|
return {
|
|
|
loading: false,
|
|
|
auditStatus: 0,
|
|
@@ -745,7 +745,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
|
|
|
dataSource: [],
|
|
|
};
|
|
|
},
|
|
|
- loadData(id, detailApiUrl) {
|
|
|
+ loadData (id, detailApiUrl) {
|
|
|
this.setState({
|
|
|
loading: true
|
|
|
});
|
|
@@ -784,7 +784,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
|
|
|
});
|
|
|
}.bind(this));
|
|
|
},
|
|
|
- getContactsList(theUid) {
|
|
|
+ getContactsList (theUid) {
|
|
|
$.ajax({
|
|
|
method: "get",
|
|
|
dataType: "json",
|
|
@@ -813,16 +813,16 @@ const AchievementDetailForm = Form.create()(React.createClass({
|
|
|
}.bind(this),
|
|
|
});
|
|
|
},
|
|
|
- getTagsArr(e) {
|
|
|
+ getTagsArr (e) {
|
|
|
this.setState({ tags: e });
|
|
|
},
|
|
|
- getMaturityPictureUrl(e) {
|
|
|
+ getMaturityPictureUrl (e) {
|
|
|
this.setState({ maturityPictureUrl: e });
|
|
|
},
|
|
|
- getTechnicalPictureUrl(e) {
|
|
|
+ getTechnicalPictureUrl (e) {
|
|
|
this.setState({ technicalPictureUrl: e });
|
|
|
},
|
|
|
- handleSearch(e) {
|
|
|
+ handleSearch (e) {
|
|
|
if (this.props.detailApiUrl.indexOf('org') != -1) {
|
|
|
$.ajax({
|
|
|
method: "get",
|
|
@@ -877,7 +877,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
|
|
|
});
|
|
|
};
|
|
|
},
|
|
|
- handleSubmit(e) {
|
|
|
+ handleSubmit (e) {
|
|
|
e.preventDefault();
|
|
|
this.props.form.validateFields((err, values) => {
|
|
|
//keyword长度判断
|
|
@@ -976,13 +976,13 @@ const AchievementDetailForm = Form.create()(React.createClass({
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- componentWillMount() {
|
|
|
+ componentWillMount () {
|
|
|
this.state.therottleSearch = throttle(this.handleSearch, 1000, { leading: false }).bind(this);
|
|
|
if (this.props.data && this.props.data.id) {
|
|
|
this.loadData(this.props.data.id, this.props.detailApiUrl);
|
|
|
};
|
|
|
},
|
|
|
- componentWillReceiveProps(nextProps) {
|
|
|
+ componentWillReceiveProps (nextProps) {
|
|
|
if (!this.props.visible && nextProps.visible) {
|
|
|
if (nextProps.data && nextProps.data.id) {
|
|
|
this.loadData(nextProps.data.id, nextProps.detailApiUrl);
|
|
@@ -998,7 +998,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
|
|
|
this.props.form.resetFields();
|
|
|
};
|
|
|
},
|
|
|
- render() {
|
|
|
+ render () {
|
|
|
const theData = this.state.data || {};
|
|
|
const { getFieldDecorator } = this.props.form;
|
|
|
const FormItem = Form.Item
|
|
@@ -1130,6 +1130,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
|
|
|
{...formItemLayout}
|
|
|
label="成熟度" >
|
|
|
{getFieldDecorator('maturity', {
|
|
|
+ rules: [{ type: 'string', required: true, message: '此项为必填项!' }],
|
|
|
initialValue: theData.maturity
|
|
|
})(
|
|
|
<Select placeholder="选择成熟度" style={{ width: 160 }} >
|
|
@@ -1496,7 +1497,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
|
|
|
}));
|
|
|
|
|
|
const AchievementDetail = React.createClass({
|
|
|
- getInitialState() {
|
|
|
+ getInitialState () {
|
|
|
return {
|
|
|
visible: false,
|
|
|
tabsKey: 1,
|
|
@@ -1550,7 +1551,7 @@ const AchievementDetail = React.createClass({
|
|
|
dataSource: [],
|
|
|
};
|
|
|
},
|
|
|
- getTechBrodersList() {
|
|
|
+ getTechBrodersList () {
|
|
|
this.setState({
|
|
|
loading: true
|
|
|
});
|
|
@@ -1583,7 +1584,7 @@ const AchievementDetail = React.createClass({
|
|
|
});
|
|
|
}.bind(this));
|
|
|
},
|
|
|
- getTableList() {
|
|
|
+ getTableList () {
|
|
|
this.setState({
|
|
|
loading: true
|
|
|
});
|
|
@@ -1626,31 +1627,31 @@ const AchievementDetail = React.createClass({
|
|
|
});
|
|
|
}.bind(this));
|
|
|
},
|
|
|
- tableRowClick(record, index) {
|
|
|
+ tableRowClick (record, index) {
|
|
|
window.open(globalConfig.context + '/portal/detail/demandDetail.html?id=' + record.id + '&type=' + record.dataCategory);
|
|
|
},
|
|
|
- handleCancel(e) {
|
|
|
+ handleCancel (e) {
|
|
|
this.setState({
|
|
|
visible: false,
|
|
|
});
|
|
|
this.props.closeDesc(false);
|
|
|
},
|
|
|
- handleOk(e) {
|
|
|
+ handleOk (e) {
|
|
|
this.setState({
|
|
|
visible: false,
|
|
|
});
|
|
|
this.props.closeDesc(false, true);
|
|
|
},
|
|
|
- componentWillMount() {
|
|
|
+ componentWillMount () {
|
|
|
this.getTechBrodersList();
|
|
|
},
|
|
|
- componentWillReceiveProps(nextProps) {
|
|
|
+ componentWillReceiveProps (nextProps) {
|
|
|
if (!this.state.visible && nextProps.showDesc) {
|
|
|
this.state.tabsKey = "1";
|
|
|
};
|
|
|
this.state.visible = nextProps.showDesc;
|
|
|
},
|
|
|
- render() {
|
|
|
+ render () {
|
|
|
if (this.props.data) {
|
|
|
return (
|
|
|
<div className="patent-desc">
|