import React from "react"; import {Spin, Table, message, Modal, Tooltip} from "antd"; import $ from "jquery/src/ajax"; import moment from 'moment'; import './customer.less'; const ReminderLog = React.createClass({ getInitialState() { return { loading: false, colunmn: [ { title: "序号", dataIndex: "id", key: "id", width: 50, }, { title: "内容", dataIndex: "content", key: "content", width:700, render: (text,record) => { let arr = text.split(','); return ( {return (
{v}
)})} >
{text}
) } }, { title: "时间", dataIndex: "createTime", key: "createTime", width: 130, render: (text) => ( moment(text).format('YYYY-MM-DD HH:mm:ss') ) } ] }; }, loadData() { this.setState({ loading: true }); $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/patentNew/selectPatentNewLog", data: { id: this.props.id, }, success: function (data) { if (data.error.length || data.data.list == "") { if (data.error && data.error.length) { message.warning(data.error[0].message); } } else { this.setState({ dataSource: data.data, }); } }.bind(this), }).always( function () { this.setState({ loading: false, }); }.bind(this) ); }, componentWillMount() { this.loadData() }, render() { return ( ); }, }); export default ReminderLog;