Commit 54c4e101 authored by 皮倩雯's avatar 皮倩雯

修改站点管理搜索高亮

parent b3f5d06e
Pipeline #38294 skipped with stages
......@@ -510,6 +510,7 @@ const SiteManageV2 = () => {
// 模糊查询匹配的样式
const searchStyle = val => {
console.log(showSearchStyle)
console.log(name)
let n;
if (showSearchStyle) {
......@@ -524,6 +525,47 @@ const SiteManageV2 = () => {
return <div dangerouslySetInnerHTML={{ __html: n }} />;
};
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 ? (
<UpOutlined className={styles.siteIcon} />
) : (
<DownOutlined className={styles.siteIcon} />
)} */}
{/* <UpOutlined className={styles.siteIcon} /> */}
<ApartmentOutlined className={styles.siteIcon} />
{searchStyle(GroupName)}
<Checkbox
key="0"
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
{...v}
index={index}
vIndex={vIndex}
key={v.userID}
handleChangeSignel={props.handleChangeSignel}
/>
))}
</div>
</div>
);
});
return (
<PageContainer className={styles.siteManageContainer}>
<div className={styles.contentContainer}>
......@@ -647,7 +689,7 @@ const SiteManageV2 = () => {
key={`${item.userName}${item.GroupId}${index}`}
onClick={() => handleDel(index)}
>
{`${item.userName}(${searchStyle(item.GroupName)})`}
{`${item.userName}(${item.GroupName})`}
</li>
))}
</ul>
......@@ -700,46 +742,7 @@ const SiteManageV2 = () => {
}
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 ? (
<UpOutlined className={styles.siteIcon} />
) : (
<DownOutlined className={styles.siteIcon} />
)} */}
{/* <UpOutlined className={styles.siteIcon} /> */}
<ApartmentOutlined className={styles.siteIcon} />
<p style={{ color }}>{GroupName}</p>
<Checkbox
key="0"
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
{...v}
index={index}
vIndex={vIndex}
key={v.userID}
handleChangeSignel={props.handleChangeSignel}
/>
))}
</div>
</div>
);
});
const CheckBoxRow = React.memo(props => {
let { vIndex, index, isChecked, userName } = props;
......
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