import React, { FC } from 'react'; import { Tooltip } from 'antd'; import Icon from '@sensoro/library/lib/components/icon-font'; import classnames from '@pansy/classnames'; import SensorIcon from '@sensoro/library/lib/components/sensor-icon'; import { ORIENTATIONS } from '../../../common/constant/alarm-type'; import { getTextByList } from '../../../utils'; import AlarmMarker from './alarm-marker'; import styles from './index.less'; interface DeviceMarkerProps { icon?: string; sensorIcon?: string; orientations?: number; // 朝向 offline?: boolean; noBorder?: boolean; // name name?: string; alarm?: boolean; } // 设备标记点 const DeviceMarker: FC = props => { const { icon, sensorIcon, orientations, noBorder, offline, name, alarm, } = props; // 摄像机朝向 if (orientations) { return (
{name ? ( ) : ( )}
); } if (name) { return (
); } if (sensorIcon) { if (alarm) { return ; } return (
); } return noBorder ? ( ) : (
); }; export default DeviceMarker;