Commit f0be5103 authored by tianfen's avatar tianfen

fix:修改站点管理

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