import React from 'react';
import { Icon, Button, Select, Spin, Table, message } from 'antd';
import { companySearch, getTechnologyState } from '../../tools.js';
import { getProvince } from '../../NewDicProvinceList'
import ajax from 'jquery/src/ajax/xhr.js';
import $ from 'jquery/src/ajax';
import './technology.less';
import ApplyAdd from './technologyAdd.jsx';
import ApplyChange from './technologyChange.jsx';
const Technology = React.createClass({
loadData(pageNo) {
this.state.data = [];
this.setState({
loading: true
});
$.ajax({
method: "get",
dataType: "json",
crossDomain: false,
url: globalConfig.context + "/api/user/techproject/listClientTechProject",
data: {
pageNo: pageNo || 1,
pageSize: this.state.pagination.pageSize,
},
success: function (data) {
if (data.error.length || !data.data || !data.data.list) {
message.warning(data.error[0].message);
return;
}
for (let i = 0; i < data.data.list.length; i++) {
let thisdata = data.data.list[i];
switch (thisdata.contacts) {
case 1:
thisdata.contacts = thisdata.firstContacts;
break;
case 2:
thisdata.contacts = thisdata.secondContacts;
break;
case 3:
thisdata.contacts = thisdata.thirdContacts;
break;
}
this.state.data.push({
key: i,
pid: thisdata.id,
uid: thisdata.uid,
serialNumber: thisdata.serialNumber,
province: thisdata.province,
unitName: thisdata.unitName,
contacts: thisdata.contacts,
projectName: thisdata.projectName,
projectCatagory: thisdata.projectCatagory,
techField: thisdata.techField,
state: thisdata.state,
createTime: thisdata.createTimeFormattedDate,
consultant: thisdata.consultant
});
};
this.state.pagination.current = data.data.pageNo;
this.state.pagination.total = data.data.totalCount;
this.setState({
dataSource: this.state.data,
pagination: this.state.pagination
});
}.bind(this),
}).always(function () {
this.setState({
loading: false
});
}.bind(this));
},
getAuthorList() {
this.setState({
loading: true
});
$.ajax({
method: "get",
dataType: "json",
crossDomain: false,
url: globalConfig.context + "/api/user/patent/getAdmin",
success: function (data) {
let theOption = [];
if (data.error && data.error.length) {
message.error(data.error[0].message);
} else {
for (var item in data.data) {
theOption.push(