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

65 lines
1.8 KiB
JavaScript
Raw Normal View History

2022-06-17 16:53:27 +08:00
import React from "react";
import successImg from "./success.svg";
import { Spin } from "antd";
2022-06-17 16:53:27 +08:00
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" }}>
2022-09-08 17:04:36 +08:00
<Spin/>
正在导入请稍后...
</div>
2022-06-17 16:53:27 +08:00
: <div style={{ marginTop: "20px" }}>
<img src={successImg} style={{ marginBottom: "10px" }} alt=""/>
2022-09-08 17:04:36 +08:00
<div style={{ fontSize: "20px", marginBottom: "10px" }}>
数据导入完成
</div>
<div>
已导入
<span style={{ color: "green" }}>
{importResult.successCount}{" "}
</span>
条数据失败<span style={{ color: "red" }}>
{importResult.errorCount}{" "}
2022-06-17 16:53:27 +08:00
</span>
2022-09-08 17:04:36 +08:00
</div>
</div>}
<div>
2022-06-17 16:53:27 +08:00
{
<WeaTable
columns={this.columns}
dataSource={importResult.errorData}
pagination={false}
scroll={{ y: `calc(100vh - 387px)` }}
2022-06-17 16:53:27 +08:00
/>
}
</div>
</div>
</div>
);
}
}