|
@@ -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
|
|
@@ -386,7 +386,19 @@ const AchievementDetailShow = Form.create()(React.createClass({
|
|
|
label="类型" >
|
|
|
<span>{getAchievementCategory(theData.category)}</span>
|
|
|
</FormItem>
|
|
|
- </div>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="军民融合" >
|
|
|
+ {(() => {
|
|
|
+ switch (theData.jmrhFlag) {
|
|
|
+ case "0":
|
|
|
+ return <span>否</span>;
|
|
|
+ case "1":
|
|
|
+ return <span>是</span>;
|
|
|
+ }
|
|
|
+ })()}
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
<div className="clearfix">
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
@@ -730,7 +742,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
|
|
|
}));
|
|
|
|
|
|
const AchievementDetailForm = Form.create()(React.createClass({
|
|
|
- getInitialState () {
|
|
|
+ getInitialState() {
|
|
|
return {
|
|
|
loading: false,
|
|
|
auditStatus: 0,
|
|
@@ -745,7 +757,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
|
|
|
dataSource: [],
|
|
|
};
|
|
|
},
|
|
|
- loadData (id, detailApiUrl) {
|
|
|
+ loadData(id, detailApiUrl) {
|
|
|
this.setState({
|
|
|
loading: true
|
|
|
});
|
|
@@ -784,7 +796,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
|
|
|
});
|
|
|
}.bind(this));
|
|
|
},
|
|
|
- getContactsList (theUid) {
|
|
|
+ getContactsList(theUid) {
|
|
|
$.ajax({
|
|
|
method: "get",
|
|
|
dataType: "json",
|
|
@@ -813,16 +825,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 +889,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
|
|
|
});
|
|
|
};
|
|
|
},
|
|
|
- handleSubmit (e) {
|
|
|
+ handleSubmit(e) {
|
|
|
e.preventDefault();
|
|
|
this.props.form.validateFields((err, values) => {
|
|
|
//keyword长度判断
|
|
@@ -959,7 +971,8 @@ const AchievementDetailForm = Form.create()(React.createClass({
|
|
|
releaseStatus: values.releaseStatus,
|
|
|
techPlanUrl: this.state.techPlanUrl,
|
|
|
businessPlanUrl: this.state.businessPlanUrl,
|
|
|
- auditStatus: this.state.auditStatus
|
|
|
+ auditStatus: this.state.auditStatus,
|
|
|
+ jmrhFlag: values.jmrhFlag,
|
|
|
}
|
|
|
}).done(function (data) {
|
|
|
this.state.auditStatus = 0;
|
|
@@ -976,13 +989,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 +1011,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
|
|
@@ -1051,6 +1064,18 @@ const AchievementDetailForm = Form.create()(React.createClass({
|
|
|
</Select>
|
|
|
)}
|
|
|
</FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="军民融合" >
|
|
|
+ {getFieldDecorator('jmrhFlag', {
|
|
|
+ initialValue: theData.jmrhFlag
|
|
|
+ })(
|
|
|
+ <Radio.Group>
|
|
|
+ <Radio value="0">否</Radio>
|
|
|
+ <Radio value="1">是</Radio>
|
|
|
+ </Radio.Group>
|
|
|
+ )}
|
|
|
+ </FormItem>
|
|
|
<div className="clearfix">
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
@@ -1130,7 +1155,6 @@ const AchievementDetailForm = Form.create()(React.createClass({
|
|
|
{...formItemLayout}
|
|
|
label="成熟度" >
|
|
|
{getFieldDecorator('maturity', {
|
|
|
- rules: [{ type: 'string', required: true, message: '此项为必填项!' }],
|
|
|
initialValue: theData.maturity
|
|
|
})(
|
|
|
<Select placeholder="选择成熟度" style={{ width: 160 }} >
|
|
@@ -1497,7 +1521,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
|
|
|
}));
|
|
|
|
|
|
const AchievementDetail = React.createClass({
|
|
|
- getInitialState () {
|
|
|
+ getInitialState() {
|
|
|
return {
|
|
|
visible: false,
|
|
|
tabsKey: 1,
|
|
@@ -1551,7 +1575,7 @@ const AchievementDetail = React.createClass({
|
|
|
dataSource: [],
|
|
|
};
|
|
|
},
|
|
|
- getTechBrodersList () {
|
|
|
+ getTechBrodersList() {
|
|
|
this.setState({
|
|
|
loading: true
|
|
|
});
|
|
@@ -1584,7 +1608,7 @@ const AchievementDetail = React.createClass({
|
|
|
});
|
|
|
}.bind(this));
|
|
|
},
|
|
|
- getTableList () {
|
|
|
+ getTableList() {
|
|
|
this.setState({
|
|
|
loading: true
|
|
|
});
|
|
@@ -1627,31 +1651,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">
|