2022-06-17 16:53:27 +08:00
|
|
|
|
import React from "react";
|
|
|
|
|
|
import successImg from "./success.svg";
|
2022-09-13 16:39:15 +08:00
|
|
|
|
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" }}>
|
2022-09-13 16:39:15 +08:00
|
|
|
|
<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>}
|
2022-09-13 16:39:15 +08:00
|
|
|
|
<div>
|
2022-06-17 16:53:27 +08:00
|
|
|
|
{
|
|
|
|
|
|
<WeaTable
|
|
|
|
|
|
columns={this.columns}
|
|
|
|
|
|
dataSource={importResult.errorData}
|
|
|
|
|
|
pagination={false}
|
2022-10-17 10:03:01 +08:00
|
|
|
|
scroll={{ y: `calc(100vh - 387px)` }}
|
2022-06-17 16:53:27 +08:00
|
|
|
|
/>
|
|
|
|
|
|
}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|