import React, { Component } from "react"; import { Modal, Table, Button, message, Spin } from "antd"; import $ from "jquery/src/ajax"; import "./table.less"; // import ReactToPrint from "react-to-print"; const status = [ { value: "0", key: "发起" }, { value: "1", key: "审核中" }, { value: "2", key: "通过" }, { value: "3", key: "驳回" } ]; const getStatus = function(e) { if (e || e == 0) { let str = e.toString(); let theType = ""; status.map(function(item) { if (item.value == str) { theType = item.key; } }); return theType; } }; class Rizhi extends Component { constructor(props) { super(props); this.state = { visible: false, dataSource: [], loading: false, columns: [ { title: "创建时间", dataIndex: "createTimes", key: "createTimes", width: 180 }, { title: "操作人名称", dataIndex: "aname", key: "aname", width: 150 }, { title: "状态", dataIndex: "status", key: "status", width: 150, render: text => { return getStatus(text); } }, { title: "备注", dataIndex: "remarks", key: "remarks", render: text => { return