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