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