Commit 8ca2d5c6 authored by tianfen's avatar tianfen

pref:修改站点管理

parent cb023e75
Pipeline #21961 skipped with stages
......@@ -15,7 +15,7 @@ import {
Pagination,
message,
} from 'antd';
import lodash from 'lodash';
import lodash, { clone } from 'lodash';
import {
DoubleLeftOutlined,
DoubleRightOutlined,
......@@ -105,8 +105,12 @@ const SiteManage = props => {
useEffect(() => {
if (!currentStation.stationID) return;
handleShowModal('loading', true);
// setSelectList(lodash.cloneDeep([]));
getList();
}, [currentStation, page.pageNum]);
}, [currentStation]);
useEffect(() => {
getList();
}, [page.pageNum]);
const getList = name => {
let params = {
stationId: +currentStation.stationID,
......@@ -136,7 +140,7 @@ const SiteManage = props => {
});
}
handleShowModal('loading', false);
setdataList(list);
setdataList(lodash.cloneDeep(list));
setTotal(res.data.TotalCount);
}
});
......@@ -190,6 +194,7 @@ const SiteManage = props => {
items.map(t => (
<List.Item
onClick={() => {
setSelectList(lodash.cloneDeep([]));
setCurrentStation(t);
}}
key={t.id}
......@@ -510,7 +515,10 @@ const SiteManage = props => {
<div className={styles.siteSelectList}>
<ul className={styles.siteSelectUl}>
{selectList.map((item, index) => (
<li key={item.userName} onClick={() => handleDel(index)}>
<li
key={`${item.userName}${item.GroupId}`}
onClick={() => handleDel(index)}
>
{`${item.userName}(${item.GroupName})`}
</li>
))}
......@@ -538,10 +546,8 @@ const Panels = React.memo(props => {
let { index, GroupId, GroupName, Users, isChecked, isShow, color } = props;
return (
<div className={styles.sitePanel} key={GroupId} id={`siteId${GroupId}`}>
<div
className={styles.sitePanelHead}
onClick={() => props.handleChangeCollpase(GroupId, isShow)}
>
{/* onClick={() => props.handleChangeCollpase(GroupId, isShow)} */}
<div className={styles.sitePanelHead}>
{/* {isShow ? (
<UpOutlined className={styles.siteIcon} />
) : (
......
......@@ -143,7 +143,8 @@
}
.siteSelectList{
border:1px solid #f5f5f5;
min-height: 200px;
height: 200px;
overflow: auto;
.siteSelectUl{
margin: 0;
padding: 15px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment