|
@@ -1,6 +1,6 @@
|
|
|
import React from 'react';
|
|
|
import { Icon, Modal, message, Spin, Timeline, Button, Popconfirm } from 'antd';
|
|
|
-import { getPatentType, getPatentState, getTime, getPatentField, newDownloadFile, getStepList } from '../../tools.js';
|
|
|
+import { getPatentType, getPatentState, getTime, getPatentField, newDownloadFile } from '../../tools.js';
|
|
|
import './patent.less';
|
|
|
import ajax from 'jquery/src/ajax/xhr.js';
|
|
|
import $ from 'jquery/src/ajax';
|
|
@@ -48,10 +48,43 @@ const PatentDesc = React.createClass({
|
|
|
}.bind(this),
|
|
|
});
|
|
|
},
|
|
|
+ getStepList(thepid) {
|
|
|
+ $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + '/api/user/patent/patentProcess',
|
|
|
+ data: {
|
|
|
+ pid: thepid || this.props.pid
|
|
|
+ },
|
|
|
+ success: function (data) {
|
|
|
+ let theArr = [];
|
|
|
+ if (!data.data) {
|
|
|
+ if (data.error && data.error.length) {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ for (var item in data.data) {
|
|
|
+ theArr.push(
|
|
|
+ <Timeline.Item key={item}>
|
|
|
+ <span>{getPatentState(data.data[item].state)}</span>
|
|
|
+ {data.data[item].recordTimeFormattedDate}
|
|
|
+ </Timeline.Item>
|
|
|
+ )
|
|
|
+ };
|
|
|
+ };
|
|
|
+ this.setState({
|
|
|
+ stepList: theArr
|
|
|
+ });
|
|
|
+ }.bind(this),
|
|
|
+ });
|
|
|
+ },
|
|
|
componentWillReceiveProps(nextProps) {
|
|
|
- if (nextProps.data && nextProps.data.pid !== null && !this.state.visible && nextProps.showDesc) {
|
|
|
- this.state.stepList = getStepList(nextProps.data.pid, '/api/user/patent/patentProcess');
|
|
|
- this.getPatentInfo(nextProps.data.pid);
|
|
|
+ if (!this.state.visible && nextProps.showDesc) {
|
|
|
+ if (nextProps.data && nextProps.data.pid) {
|
|
|
+ this.getStepList(nextProps.data.pid);
|
|
|
+ this.getPatentInfo(nextProps.data.pid);
|
|
|
+ };
|
|
|
};
|
|
|
this.state.visible = nextProps.showDesc;
|
|
|
},
|
|
@@ -149,13 +182,13 @@ const PatentDesc = React.createClass({
|
|
|
}
|
|
|
</div>
|
|
|
<div>
|
|
|
- <span>专利申请日:</span>{theData.startTime}
|
|
|
+ <span>专利申请日:</span>{theData.patentApplicationFormattedDate}
|
|
|
</div>
|
|
|
<div>
|
|
|
- <span>专利授权日:</span>{theData.authorizedTime}
|
|
|
+ <span>专利授权日:</span>{theData.authorizedFormattedDate}
|
|
|
</div>
|
|
|
<div>
|
|
|
- <span>每年年费缴费截止日:</span>{theData.endTime}
|
|
|
+ <span>每年年费缴费截止日:</span>{getTime(theData.authorizedDate, 12)}
|
|
|
</div>
|
|
|
<div>
|
|
|
<p>第一发明人:</p>
|