Commit f0be5103 authored by tianfen's avatar tianfen

fix:修改站点管理

parent cfea14c6
Pipeline #22298 skipped with stages
...@@ -66,6 +66,7 @@ const SiteManage = props => { ...@@ -66,6 +66,7 @@ const SiteManage = props => {
const [page, setPage] = useState({ pageNum: 1, pageSize: 5 }); const [page, setPage] = useState({ pageNum: 1, pageSize: 5 });
const [update, setUpdate] = useState(1); const [update, setUpdate] = useState(1);
const [update1, setUpdate1] = useState(1); const [update1, setUpdate1] = useState(1);
const [name, setName] = useState('');
// 侧边栏站点 // 侧边栏站点
useEffect(() => { useEffect(() => {
handleShowModal('spinLoading', true); handleShowModal('spinLoading', true);
...@@ -109,9 +110,10 @@ const SiteManage = props => { ...@@ -109,9 +110,10 @@ const SiteManage = props => {
if (!currentStation.stationID) return; if (!currentStation.stationID) return;
handleShowModal('loading', true); handleShowModal('loading', true);
getList(); getList();
}, [update]); }, [update, name]);
useEffect(() => { useEffect(() => {
if (!currentStation.stationID) return; if (!currentStation.stationID) return;
handleShowModal('loading', true);
getAllcheckList(); getAllcheckList();
}, [currentStation, update1]); }, [currentStation, update1]);
const getAllcheckList = async () => { const getAllcheckList = async () => {
...@@ -148,7 +150,7 @@ const SiteManage = props => { ...@@ -148,7 +150,7 @@ const SiteManage = props => {
setUpdate(update + 1); setUpdate(update + 1);
} }
}; };
const getList = name => { const getList = () => {
let params = { let params = {
stationId: +currentStation.stationID || '', stationId: +currentStation.stationID || '',
PageIndex: +page.pageNum, PageIndex: +page.pageNum,
...@@ -189,7 +191,8 @@ const SiteManage = props => { ...@@ -189,7 +191,8 @@ const SiteManage = props => {
}; };
// 获取搜索框的值 // 获取搜索框的值
const handleSearch = value => { const handleSearch = value => {
getList(value); setName(value);
// getList(value);
}; };
const confirmModal = e => { const confirmModal = e => {
handleShowModal('modalVisible', false); handleShowModal('modalVisible', false);
...@@ -210,7 +213,7 @@ const SiteManage = props => { ...@@ -210,7 +213,7 @@ const SiteManage = props => {
items.map(t => ( items.map(t => (
<List.Item <List.Item
onClick={() => { onClick={() => {
setSelectList(lodash.cloneDeep([])); // setSelectList(lodash.cloneDeep([]));
setPage({ pageNum: 1, pageSize: 5 }); setPage({ pageNum: 1, pageSize: 5 });
setCurrentStation(t); setCurrentStation(t);
}} }}
...@@ -528,7 +531,7 @@ const SiteManage = props => { ...@@ -528,7 +531,7 @@ const SiteManage = props => {
/> />
))} ))}
</Spin> </Spin>
{dataList.length > 0 ? ( {dataList.length > 0 && !visibleParams.loading ? (
<> <>
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
<Pagination <Pagination
...@@ -540,7 +543,7 @@ const SiteManage = props => { ...@@ -540,7 +543,7 @@ const SiteManage = props => {
pageSizeOptions={['5']} pageSizeOptions={['5']}
/> />
</div> </div>
<p>已选择列表:</p> <p className={styles.siteline}>已选择列表:</p>
<div className={styles.siteSelectList}> <div className={styles.siteSelectList}>
<ul className={styles.siteSelectUl}> <ul className={styles.siteSelectUl}>
{selectList.map((item, index) => ( {selectList.map((item, index) => (
......
...@@ -106,6 +106,9 @@ ...@@ -106,6 +106,9 @@
width:199px; width:199px;
// margin:0 0 15px 0; // margin:0 0 15px 0;
padding:0 0 15px 0; padding:0 0 15px 0;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
} }
.sitePanel{ .sitePanel{
margin: 0 0 10px 0; margin: 0 0 10px 0;
...@@ -124,7 +127,9 @@ ...@@ -124,7 +127,9 @@
border:1px solid #f5f5f5; border:1px solid #f5f5f5;
padding:20px; padding:20px;
padding-bottom: 0; padding-bottom: 0;
border-top:0 border-top:0;
max-height: 200px;
overflow: auto;
} }
.sitePanel .ant-checkbox-wrapper + .ant-checkbox-wrapper{ .sitePanel .ant-checkbox-wrapper + .ant-checkbox-wrapper{
margin:0 margin:0
...@@ -168,6 +173,11 @@ ...@@ -168,6 +173,11 @@
} }
} }
} }
.siteline{
border-top: 1px solid #eee;
padding-top: 15px;
margin-top: 20px;
}
.siteBtn{ .siteBtn{
width:98%; width:98%;
display: flex; display: flex;
......
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