Commit 16c6a2ff authored by 陈龙's avatar 陈龙

feat: 报警滚动条增加prefix参数

parent f38802ff
......@@ -5,5 +5,5 @@ window.globalConfig = {
userInfo: { OID: 1 },
};
export default () => {
return <AlarmScrollAssembly deviceType={'二供泵房,二供机组'} />; // 最小宽度930px
return <AlarmScrollAssembly deviceType={'二供泵房,二供机组'} prefix={'报警信息:'} />; // 最小宽度930px
};
......@@ -95,13 +95,14 @@ const AlarmScrollAssembly = (props) => {
getData();
}, []);
return (
<>
{realTimeDataList && realTimeDataList.length ? <>
<div className={styles.alarmScrollAssemblyWrapper}>
{realTimeDataList && realTimeDataList.length ? <div className={styles.content} style={{display: 'flex'}}>
{
props.prefix ? <span>{props.prefix}</span> : ''
props.prefix ?
<span style={{...props.style, flex: 'none', marginRight: 10}}>{props.prefix}</span> : ''
}
<div
className={classnames(styles.alarScrollAssembly, (realTimeDataList?.length > 1000 ? styles.moreThan1000 : styles.lessThan1000))}
className={classnames(styles.alarmScrollAssembly, (realTimeDataList?.length > 1000 ? styles.moreThan1000 : styles.lessThan1000))}
id={'alarmListDiv'}>
<Swiper
slidesPerView={1}
......@@ -152,8 +153,8 @@ const AlarmScrollAssembly = (props) => {
</Modal>
)}
</div>
</> : ''}
</>
</div> : ''}
</div>
);
};
AlarmScrollAssembly.defaultProps = {
......
.alarScrollAssembly {
.alarmScrollAssemblyWrapper {
width: 100%;
.content {
display: flex;
align-items: center;
.alarmScrollAssembly {
&.moreThan1000 {
:global {
.swiper-container {
......@@ -35,6 +42,7 @@
}
}
}
&.lessThan1000 {
:global {
.swiper-container {
......@@ -71,13 +79,14 @@
}
}
}
display: flex;
flex-direction: column;
gap: 8px;
width: 100%;
//width: 100%;
min-width: 930px;
height: 42px;
overflow-y: scroll;
//overflow-y: scroll;
.warningWrapper {
display: flex;
......@@ -170,4 +179,6 @@
white-space: nowrap;
text-overflow: ellipsis;
}
}
}
}
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