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

77 lines
2.2 KiB
JavaScript
Raw Normal View History

2022-06-17 16:53:27 +08:00
import React from "react";
import successImg from "./success.svg";
import { Button, Table, Spin } from "antd";
import { WeaTable } from "ecCom";
2022-03-07 19:33:56 +08:00
export default class ModalStep3 extends React.Component {
2022-06-17 16:53:27 +08:00
componentWillMount() {
this.columns = [
{
title: "错误信息",
dataIndex: "message",
key: "message"
}
];
}
2022-03-10 16:28:49 +08:00
2022-06-17 16:53:27 +08:00
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" }} />
<div style={{ fontSize: "20px", marginBottom: "10px" }}>
数据导入完成
2022-03-07 19:33:56 +08:00
</div>
2022-06-17 16:53:27 +08:00
<div>
已导入{" "}
<span style={{ color: "green" }}>
{" "}{importResult.successCount}{" "}
</span>{" "}
条数据失败<span style={{ color: "red" }}>
{" "}{importResult.errorCount}{" "}
</span>
2022-03-07 19:33:56 +08:00
</div>
2022-06-17 16:53:27 +08:00
</div>}
<div
style={{
marginTop: "20px",
maxHeight: "300px",
overflowY: "scroll"
}}>
{
<WeaTable
columns={this.columns}
dataSource={importResult.errorData}
pagination={false}
/>
}
</div>
</div>
<div className="footerBtnWrapper" style={{ height: "30px" }}>
<Button
type="primary"
style={{ float: "right" }}
onClick={this.props.onFinish}>
完成
</Button>
</div>
</div>
);
}
}