import { queryMembraneList } from '@/services/SmartOps'; import { RightOutlined } from '@ant-design/icons'; import { history, useParams, useRequest } from '@umijs/max'; import styles from './PredictionAnalysis.less'; const UFList = [ { label: '超滤模组A (UF-4001A)' }, { label: '超滤模组A (UF-4001B)' }, { label: '超滤模组A (UF-4001C)' }, { label: '超滤模组A (UF-4001D)' }, ]; const PredictionAnalysis = () => { const { projectId } = useParams(); const { data: deviceList } = useRequest(queryMembraneList, { defaultParams: [{ project_id: projectId, type: 'uf' }], formatResult: (result) => { console.log(result.data.list); if (result?.data?.list) { return result.data.list; } }, }); const toDetail = (code) => { history.push(`/smart-ops/prediction/${projectId}?code=${code}`); }; return ( <>
超滤工艺单元
{deviceList?.map((item, index) => { return (
{ toDetail(item.device_code); }} >
{`${item.device_name}(${item.device_code})`}
预测分析
); })}
); }; export default PredictionAnalysis;