// 项目暂停重启日志弹窗
import React, { Component } from "react";
import { Button, message, Modal, Spin, Table } from "antd";
import { ShowModal } from "../../tools";
import $ from "jquery/src/ajax";
class MySuspendLog extends Component {
constructor(props) {
super(props);
this.state = {
loading: false,
visible: false,
columnsDate: [
{
title: "操作人",
dataIndex: "createName",
key: "createName",
width: 150,
},
{
title: "操作",
dataIndex: "status",
key: "status",
width: 150,
render: (text, record) => {
return (
{this.props.stopType == 0 ? "项目暂停" : "项目重启"}
{" " + ["【发起】", "【通过】", "【拒绝】"][text] + " "}
);
},
},
{
title: "操作时间",
dataIndex: "createTimes",
key: "createTimes",
width: 150,
},
{
title: "备注",
dataIndex: "reason",
key: "reason",
},
],
recordData: [],
};
}
componentDidMount() { }
// 日志
getData() {
this.setState({
loading: true,
});
$.ajax({
method: "get",
dataType: "json",
crossDomain: false,
url: globalConfig.context + "/api/admin/orderProject/projectStopList",
data: {
taskStopId: this.props.id,
},
success: function (data) {
ShowModal(this);
if (!data.data) {
if (data.error && data.error.length) {
message.warning(data.error[0].message);
}
} else {
this.setState({
recordData: data.data,
});
}
}.bind(this),
}).always(
function () {
this.setState({
loading: false,
});
}.bind(this)
);
}
render() {
return (
{
this.setState({
visible: false,
});
}}
style={{ zIndex: 10 }}
>
);
}
}
export default MySuspendLog;