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

66 lines
2.0 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";
2023-04-14 13:29:21 +08:00
import { WeaLocaleProvider, WeaTable } from "ecCom";
2022-03-07 19:33:56 +08:00
2023-04-14 13:29:21 +08:00
const getLabel = WeaLocaleProvider.getLabel;
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 = [
{
2023-06-08 18:13:37 +08:00
title: getLabel(25700, "错误信息"),
2022-06-17 16:53:27 +08:00
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/>
2023-06-08 18:13:37 +08:00
{`${getLabel(543227, "正在导入请稍后")}...`}
2022-09-08 17:04:36 +08:00
</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" }}>
2023-06-08 18:13:37 +08:00
{getLabel(543228, "数据导入完成")}
2022-09-08 17:04:36 +08:00
</div>
<div>
2023-06-08 18:13:37 +08:00
{getLabel(389249, "已导入")}
2022-09-08 17:04:36 +08:00
<span style={{ color: "green" }}>
{importResult.successCount}{" "}
</span>
2023-06-08 18:13:37 +08:00
{`${getLabel(30690, "条数据")},${getLabel(25009, "失败")}`}<span style={{ color: "red" }}>
2022-09-08 17:04:36 +08:00
{importResult.errorCount}{" "}
2023-06-08 18:13:37 +08:00
</span>{getLabel(30690, "")}
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>
);
}
}