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,7 +224,7 @@ const SiteManageV2 = () => { ...@@ -224,7 +224,7 @@ const SiteManageV2 = () => {
//获取当前站点所有已经勾选的用户新接口 //获取当前站点所有已经勾选的用户新接口
const getAllCheckListNew = () => { const getAllCheckListNew = () => {
getStationUsers({ getStationUsers({
stationId:currentStation stationId: currentStation
}).then( }).then(
res => { res => {
let list = [] let list = []
...@@ -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,6 +577,27 @@ const SiteManageV2 = () => { ...@@ -576,6 +577,27 @@ const SiteManageV2 = () => {
})} })}
> >
{/* <Checkbox className={styles.siteAll}>全选/反选</Checkbox> */} {/* <Checkbox className={styles.siteAll}>全选/反选</Checkbox> */}
{dataList.length > 0 && !visibleParams.loading ? (
<>
<p className={styles.siteline}>已选择列表:</p>
<div className={styles.siteSelectList}>
<ul className={styles.siteSelectUl}>
{selectList.map((item, index) => (
<li
key={`${item.userName}${item.GroupId}${index}`}
onClick={() => handleDel(index)}
>
{`${item.userName}(${item.GroupName})`}
</li>
))}
</ul>
</div>
</>
) : (
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />
)}
<Spin spinning={visibleParams.loading}> <Spin spinning={visibleParams.loading}>
{dataList.map((item, index) => ( {dataList.map((item, index) => (
<Panels <Panels
...@@ -588,8 +610,8 @@ const SiteManageV2 = () => { ...@@ -588,8 +610,8 @@ const SiteManageV2 = () => {
/> />
))} ))}
</Spin> </Spin>
</Card>
{dataList.length > 0 && !visibleParams.loading ? ( {dataList.length > 0 && !visibleParams.loading ? (
<>
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
<Pagination <Pagination
size="small" size="small"
...@@ -599,25 +621,8 @@ const SiteManageV2 = () => { ...@@ -599,25 +621,8 @@ const SiteManageV2 = () => {
onChange={handleChangePage} onChange={handleChangePage}
pageSizeOptions={['5']} pageSizeOptions={['5']}
/> />
</div> </div>) : ''
<p className={styles.siteline}>已选择列表:</p> }
<div className={styles.siteSelectList}>
<ul className={styles.siteSelectUl}>
{selectList.map((item, index) => (
<li
key={`${item.userName}${item.GroupId}${index}`}
onClick={() => handleDel(index)}
>
{`${item.userName}(${item.GroupName})`}
</li>
))}
</ul>
</div>
</>
) : (
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />
)}
</Card>
<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