Commit e59b377c authored by mayongxin's avatar mayongxin
parents 226960fd f6b8e1e3
......@@ -364,6 +364,7 @@ const SiteManage = () => {
</div>
{treeData && treeData.length > 0 && (
<Tree
style={{ overflowY: 'scroll', height: '48rem' }}
// showLine={{ showLeafIcon: false }}
showIcon
onSelect={handleTreeSelect}
......
......@@ -3,7 +3,7 @@
max-height: calc(100vh - 74px);
overflow-y: scroll;
// overflow: auto;
overflow-x: hidden;
overflow: hidden;
width: 300px;
left: 0;
top: 0;
......
......@@ -224,12 +224,12 @@ const SiteManageV2 = () => {
//获取当前站点所有已经勾选的用户新接口
const getAllCheckListNew = () => {
getStationUsers({
stationId:currentStation
stationId: currentStation
}).then(
res => {
let list = []
if (res.data.length > 0) {
res.data.map((item, index) => {
list.push({
GroupId: +item.OUID,
......@@ -238,7 +238,7 @@ const SiteManageV2 = () => {
userID: item.userID,
});
})
}
setSelectList(lodash.cloneDeep(list));
setUpdatePageUser(updatePageUser + 1)
......@@ -487,6 +487,7 @@ const SiteManageV2 = () => {
autoExpandParent
selectedKeys={[currentStation]}
onSelect={onSelect}
height={treeData.length && treeData.length > 30 ? treeData.length * 14 : 900}
treeData={treeData.map(t => mapTree(t))}
/>
)}
......@@ -576,30 +577,10 @@ const SiteManageV2 = () => {
})}
>
{/* <Checkbox className={styles.siteAll}>全选/反选</Checkbox> */}
<Spin spinning={visibleParams.loading}>
{dataList.map((item, index) => (
<Panels
{...item}
index={index}
key={item.GroupId}
handleChangeCollpase={handleChangeCollpase}
handleChangeAll={handleChangeAll}
handleChangeSignel={handleChangeSignel}
/>
))}
</Spin>
{dataList.length > 0 && !visibleParams.loading ? (
<>
<div style={{ textAlign: 'right' }}>
<Pagination
size="small"
total={total}
current={page.pageNum}
defaultPageSize="5"
onChange={handleChangePage}
pageSizeOptions={['5']}
/>
</div>
<p className={styles.siteline}>已选择列表:</p>
<div className={styles.siteSelectList}>
<ul className={styles.siteSelectUl}>
......@@ -617,7 +598,31 @@ const SiteManageV2 = () => {
) : (
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />
)}
<Spin spinning={visibleParams.loading}>
{dataList.map((item, index) => (
<Panels
{...item}
index={index}
key={item.GroupId}
handleChangeCollpase={handleChangeCollpase}
handleChangeAll={handleChangeAll}
handleChangeSignel={handleChangeSignel}
/>
))}
</Spin>
</Card>
{dataList.length > 0 && !visibleParams.loading ? (
<div style={{ textAlign: 'right' }}>
<Pagination
size="small"
total={total}
current={page.pageNum}
defaultPageSize="5"
onChange={handleChangePage}
pageSizeOptions={['5']}
/>
</div>) : ''
}
<div className={styles.siteBtn}>
<Button
type="primary"
......@@ -641,6 +646,7 @@ const Panels = React.memo(props => {
let { index, GroupId, GroupName, Users, isChecked, isShow, color } = props;
return (
<div className={styles.sitePanel} key={GroupId} id={`siteId${GroupId}`}>
{/* onClick={() => props.handleChangeCollpase(GroupId, isShow)} */}
<div className={styles.sitePanelHead}>
{/* {isShow ? (
......@@ -651,16 +657,17 @@ const Panels = React.memo(props => {
{/* <UpOutlined className={styles.siteIcon} /> */}
<UserOutlined className={styles.siteIcon} />
<p style={{ color }}>{GroupName}</p>
</div>
<div className={styles.sitePanelCon}>
<Checkbox
key="0"
className={styles.siteList}
className={styles.siteListTitle}
checked={isChecked}
onClick={e => props.handleChangeAll(e, index)}
>
全选
</Checkbox>
</div>
<div className={styles.sitePanelCon}>
{Users.length > 0 &&
Users.map((v, vIndex) => (
<CheckBoxRow
......
......@@ -122,7 +122,7 @@
width: 280px;
left: 0;
top: 0;
overflow-x: hidden;
overflow: hidden;
margin-right: 10px;
position: relative;
transition-property: width, left;
......@@ -259,7 +259,14 @@
white-space: nowrap;
text-overflow: ellipsis;
}
.siteListTitle {
width: 199px;
// margin:0 0 15px 0;
padding: 0 0 0 15px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.sitePanel {
margin: 0 0 10px 0;
}
......@@ -269,11 +276,13 @@
padding: 8px 10px;
cursor: pointer;
display: flex;
align-items: center;
flex-direction: row;
}
.sitePanelHead p {
margin: 0;
margin-right: 0.6rem;
}
.sitePanelCon {
......@@ -346,7 +355,7 @@
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
justify-content: center;
}
.ant-modal-root {
......
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