|
@@ -1,42 +1,29 @@
|
|
|
import React, { useState } from 'react';
|
|
|
-import { Button } from 'antd';
|
|
|
-import Modal from 'antd';
|
|
|
-import importIcon from '@/assets/images/page-person-import/import-icon.svg';
|
|
|
+import { Modal, Button } from 'antd';
|
|
|
+import Icon from '@/tenants-ui/SgIcon';
|
|
|
import styles from './index.less';
|
|
|
+const importTitleIcon = require('@/assets/images/page-person-import/import-icon.svg');
|
|
|
|
|
|
export default ({ info, onClose }) => {
|
|
|
const [token] = useState(() => {
|
|
|
return localStorage.getItem('token');
|
|
|
});
|
|
|
+ console.log('info==', info);
|
|
|
|
|
|
return (
|
|
|
- <Modal
|
|
|
- title={
|
|
|
- <div className={styles.header}>
|
|
|
- <img src={importIcon} />
|
|
|
+ <Modal open width={760} className={styles.importError} onClose={onClose}>
|
|
|
+ <div className={styles.header}>
|
|
|
+ <div
|
|
|
+ className={styles.close}
|
|
|
+ onClick={() => {
|
|
|
+ onClose();
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <Icon type="close" />
|
|
|
</div>
|
|
|
- }
|
|
|
- width={760}
|
|
|
- onClose={onClose}
|
|
|
- footer={
|
|
|
- <div className={styles.footer}>
|
|
|
- <div>
|
|
|
- 您可以
|
|
|
- <a href={`/api/manage/downloadFailRecords?token=${token}&fileId=${info.failFileId}`}>
|
|
|
- 下载错误报告
|
|
|
- </a>
|
|
|
- ,修改后重新导入
|
|
|
- </div>
|
|
|
- <Button type="primary" size="large" onClick={() => onClose(true)}>
|
|
|
- 重新导入
|
|
|
- </Button>
|
|
|
- </div>
|
|
|
- }
|
|
|
- >
|
|
|
+ </div>
|
|
|
<div className={styles.listW}>
|
|
|
- <div className={styles.info}>
|
|
|
- 成功导入 {info.successRecord} 条数据,有 {info.failedRecord} 条数据导入失败:
|
|
|
- </div>
|
|
|
+ <div className={styles.info}>{info.message}</div>
|
|
|
<div className={styles.list}>
|
|
|
<div className={styles.row}>
|
|
|
<div className={styles.col1}>姓名</div>
|
|
@@ -45,16 +32,18 @@ export default ({ info, onClose }) => {
|
|
|
<div className={styles.col4}>职务</div>
|
|
|
<div className={styles.col5}>原因</div>
|
|
|
</div>
|
|
|
- {(info.failData || []).map((item, itemIndex) => {
|
|
|
+ {(info.data || []).map((item, itemIndex) => {
|
|
|
return (
|
|
|
// eslint-disable-next-line react/no-array-index-key
|
|
|
<div className={styles.row} key={itemIndex}>
|
|
|
- <div className={styles.col1}>{item.userName}</div>
|
|
|
+ <div className={styles.col1}>{item.name}</div>
|
|
|
<div className={styles.col2}>{item.manageUserType}</div>
|
|
|
<div className={styles.col3}>{item.phone}</div>
|
|
|
<div className={styles.col4}>{item.job}</div>
|
|
|
<div className={styles.col5}>
|
|
|
- <div>{item.failedReason}</div>
|
|
|
+ {(Array.from(item.remark) || []).map((remark) => {
|
|
|
+ <div>{remark}</div>;
|
|
|
+ })}
|
|
|
</div>
|
|
|
</div>
|
|
|
);
|