|
@@ -8,6 +8,7 @@ import Search from '@/sagacare_components/Search';
|
|
|
import Table from '@/sagacare_components/Table';
|
|
|
import Empty from './components/Empty';
|
|
|
import PersonModal from './components/personModal';
|
|
|
+import ImportModal from './components/importModal';
|
|
|
import { EllipsisOutlined } from '@ant-design/icons';
|
|
|
|
|
|
import {
|
|
@@ -20,6 +21,7 @@ const Member: React.FC = () => {
|
|
|
const { initialState } = useModel('@@initialState');
|
|
|
|
|
|
const [perVisible, setPerVisible] = useState(false); //人员对话框显示
|
|
|
+ const [importVisible, setImportVisible] = useState(false); //人员对话框显示
|
|
|
const [temporary, setTemporary] = useState(false); //是否是临时成员添加
|
|
|
const [invalidSign, setInvalidSign] = useState(false); //显示作废
|
|
|
const [spaceMap, setSpaceMap] = useState<any>();
|
|
@@ -36,11 +38,17 @@ const Member: React.FC = () => {
|
|
|
const [checkUser, setCheckUser] = useState({}); //查看的人
|
|
|
const [checkSign, setCheckSign] = useState('add'); // 三种状态 查看 编辑 新增
|
|
|
const [refreshNum, setRefreshNum] = useState(0); //刷新列表
|
|
|
- const statusArr = {
|
|
|
- 2: '正常',
|
|
|
- 3: '待激活',
|
|
|
- 5: '已作废',
|
|
|
+ // const statusArr = {
|
|
|
+ // 2: '正常',
|
|
|
+ // 3: '待激活',
|
|
|
+ // 5: '已作废',
|
|
|
+ // };
|
|
|
+ const userTpeyArr = {
|
|
|
+ 1: '普通成员',
|
|
|
+ 2: '临时成员',
|
|
|
+ 3: '管理员',
|
|
|
};
|
|
|
+
|
|
|
const [sorter, setSorter] = useState<any>({
|
|
|
updateDate: 'DESC', //'ASC' : 'DESC'
|
|
|
});
|
|
@@ -57,10 +65,13 @@ const Member: React.FC = () => {
|
|
|
filteredValue: [],
|
|
|
single: true,
|
|
|
filters: [
|
|
|
- { value: '1', label: '正式成员' },
|
|
|
+ { value: '1', label: '普通成员' },
|
|
|
{ value: '2', label: '临时成员' },
|
|
|
{ value: '3', label: '管理员' },
|
|
|
],
|
|
|
+ render: function (content, item, index) {
|
|
|
+ return <span>{userTpeyArr[content]}</span>;
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
title: '手机号',
|
|
@@ -96,11 +107,10 @@ const Member: React.FC = () => {
|
|
|
<div>
|
|
|
<span
|
|
|
className={cx(styles.circle, {
|
|
|
- [styles.activated]: content == '3',
|
|
|
- [styles.invalid]: content == '5',
|
|
|
+ [styles.activated]: content == '待激活',
|
|
|
})}
|
|
|
></span>
|
|
|
- <span>{statusArr[content]}</span>
|
|
|
+ <span>{content}</span>
|
|
|
</div>
|
|
|
);
|
|
|
},
|
|
@@ -165,16 +175,23 @@ const Member: React.FC = () => {
|
|
|
const refreshList = () => {
|
|
|
setRefreshNum(refreshNum + 1);
|
|
|
};
|
|
|
- const onClose = (param) => {
|
|
|
+ const onClose = () => {
|
|
|
setPerVisible(false);
|
|
|
};
|
|
|
|
|
|
+ const onImClose = () => {
|
|
|
+ setImportVisible(false);
|
|
|
+ };
|
|
|
+ const showImport = () => {
|
|
|
+ setImportVisible(true);
|
|
|
+ };
|
|
|
useEffect(() => {
|
|
|
var paramObj = {
|
|
|
criteria: {
|
|
|
param: searchStr,
|
|
|
status: 1,
|
|
|
companyId: initialState?.currentUser?.companyId,
|
|
|
+ // manageUserType: [],
|
|
|
},
|
|
|
page: page.pageNum,
|
|
|
size: page.pageSize,
|
|
@@ -283,7 +300,9 @@ const Member: React.FC = () => {
|
|
|
</>
|
|
|
) : (
|
|
|
<>
|
|
|
- <div className={styles.allIn}>批量导入</div>
|
|
|
+ <div className={styles.allIn} onClick={showImport}>
|
|
|
+ 批量导入
|
|
|
+ </div>
|
|
|
<div
|
|
|
className={styles.invalid}
|
|
|
onClick={() => {
|
|
@@ -333,12 +352,12 @@ const Member: React.FC = () => {
|
|
|
checkSign={checkSign}
|
|
|
onClose={onClose}
|
|
|
setCheckSign={setCheckSign}
|
|
|
- statusArr={statusArr}
|
|
|
setInvalidSign={setInvalidSign}
|
|
|
spaceMap={spaceMap}
|
|
|
refreshList={refreshList}
|
|
|
></PersonModal>
|
|
|
)}
|
|
|
+ {importVisible && <ImportModal onClose={onImClose}></ImportModal>}
|
|
|
</div>
|
|
|
);
|
|
|
};
|