salary-management-front/pc4mobx/hrmSalary/components/importModal/modalStep3.js

64 lines
1.8 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import React from "react";
import successImg from "./success.svg";
import { Spin } from "antd";
import { WeaTable } from "ecCom";
export default class ModalStep3 extends React.Component {
componentWillMount() {
this.columns = [
{
title: "错误信息",
dataIndex: "message",
key: "message"
}
];
}
render() {
const { importResult } = this.props;
return (
<div
style={{
textAlign: "center",
marginTop: "10px",
overflow: "hidden",
height: "550px",
display: "flex",
flexFlow: "column"
}}>
<div style={{ flex: "1", display: "flex", flexFlow: "column" }}>
{importResult.successCount === undefined
? <div style={{ textAlign: "center", marginTop: "20px" }}>
<Spin/>
正在导入请稍后...
</div>
: <div style={{ marginTop: "20px" }}>
<img src={successImg} style={{ marginBottom: "10px" }} alt=""/>
<div style={{ fontSize: "20px", marginBottom: "10px" }}>
数据导入完成
</div>
<div>
已导入
<span style={{ color: "green" }}>
{importResult.successCount}{" "}
</span>
条数据失败<span style={{ color: "red" }}>
{importResult.errorCount}{" "}
</span>
</div>
</div>}
<div>
{
<WeaTable
columns={this.columns}
dataSource={importResult.errorData}
pagination={false}
/>
}
</div>
</div>
</div>
);
}
}