/* * @Author: donghao donghao@supervision.ltd * @Date: 2024-04-08 16:57:30 * @LastEditors: donghao donghao@supervision.ltd * @LastEditTime: 2024-05-11 09:33:08 * @FilePath: \general-ai-manage\src\pages\Business\BusinessState\components\deviceStateCard.tsx * @Description: 设备状态项卡片 */ import { AnimatePic } from '@/components/Animate'; import TableActionCard, { actionsProps } from '@/components/TableActionCard'; import { deviceStateEnums } from '@/enums/device'; import { Progress } from 'antd'; import json01 from '../../../../../public/animate/device/01.json'; //引入下载的动效json type DeviceStateCardProps = { info: Record; renderActions: actionsProps[]; fetchDetail: () => void; }; const DeviceStateCard: React.FC = ({ info, renderActions, fetchDetail }) => { const formatStateByVal = (record: string): DICTENUM.DICT_TAB_ITEM => { return deviceStateEnums.find((item: DICTENUM.DICT_TAB_ITEM) => item.key === record); }; return (
{ console.log('服务器详情展示'); fetchDetail(); }} className={`bs_card_box ${formatStateByVal(info?.state)?.className}`} >
{info?.name}
{formatStateByVal(info?.state)?.label}
    {info?.progressData?.map((v, k) => { return (
  • {v.label}
  • ); })}
); }; export default DeviceStateCard;