Commit f38802ff authored by 陈龙's avatar 陈龙

feat: 提交AssemblyScroll变更

parent e0af2891
......@@ -13,6 +13,7 @@ import 'swiper/swiper.min.css';
import 'swiper/components/pagination/pagination.min.css';
import 'swiper/components/navigation/navigation.min.css';
import SwiperCore, {Autoplay, Pagination, Navigation} from 'swiper/core';
import {isFunction, isString} from "../../BasicReport/src/ReportsManage/utils/utils";
SwiperCore.use([Autoplay, Pagination, Navigation]);
/*
......@@ -95,7 +96,11 @@ const AlarmScrollAssembly = (props) => {
}, []);
return (
<>
{realTimeDataList && realTimeDataList.length ? <div
{realTimeDataList && realTimeDataList.length ? <>
{
props.prefix ? <span>{props.prefix}</span> : ''
}
<div
className={classnames(styles.alarScrollAssembly, (realTimeDataList?.length > 1000 ? styles.moreThan1000 : styles.lessThan1000))}
id={'alarmListDiv'}>
<Swiper
......@@ -146,14 +151,17 @@ const AlarmScrollAssembly = (props) => {
/>
</Modal>
)}
</div> : ''}
</div>
</> : ''}
</>
);
};
AlarmScrollAssembly.defaultProps = {
deviceType: '二供泵房,二供机组',
prefix: ''
};
AlarmScrollAssembly.propTypes = {
deviceType: PropTypes.string,
prefix: PropTypes.string
};
export default AlarmScrollAssembly;
......@@ -10,6 +10,9 @@ const isNumber = (num) => {
const isArray = (arr) => {
return Object.prototype.toString.call(arr) === '[object Array]';
};
const isFunction = (obj) => {
return Object.prototype.toString.call(obj) === '[object Function]';
}
const hasMoney = (configItems) => {
if (!configItems) return false;
let _items = configItems.split('|');
......@@ -148,6 +151,7 @@ export {
isNumber,
hasMoney,
isArray,
isFunction,
returnHandledNumber,
returnDefaultValueOrConfigs,
downloadFunc,
......
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