index.js 839 Bytes
Newer Older
1
import React, {useState} from 'react';
2
import AlarmScrollAssembly from '../index';
3
import {Button} from "antd";
4

5
window.globalConfig = {
6
    userInfo: {OID: 1},
7
};
8
export default () => {
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
    const [deviceType, setDeviceType] = useState('二供泵房,二供机组');

    return (<>
            <AlarmScrollAssembly
                deviceType={deviceType}
                prefix={'报警信息:'}
                showTotal={false}
                interval={0.1}
                userAccess={true}
            />
            <Button onClick={() => {
                if (deviceType === '二供泵房') {
                    setDeviceType('二供泵房,二供机组')
                } else {
                    setDeviceType('二供泵房')
                }
            }}>点击切换</Button>
        </>

    ); // 最小宽度930px
29
};