import { MyPageContainer } from '@/common'; import { Apis } from '@/gen/Apis'; import { useNavigate, useParams, useSearchParams } from '@umijs/max'; import { Space, Tabs, TabsProps } from 'antd'; import { useEffect, useState } from 'react'; import MyArchivingLogs from './components/ArchivingLogs'; import MyContractBillObjects from './components/ContractBillObjects'; import MyContractBills from './components/ContractBills'; import ContractDisputeRecords from './components/ContractDisputeRecords'; import ContractsAdd from './components/ContractsAdd'; import MyContractsInfo from './components/ContractsInfo'; import MyUsedLogs from './components/UsedLogs'; export default function Index({ title = '合同详情' }) { const navigate = useNavigate(); const { id } = useParams<{ id: string }>(); const [showData, setDataShow] = useState({}); const [searchParams] = useSearchParams(); const activeKey = searchParams?.get('key') || '1'; const items: TabsProps['items'] = [ { key: '1', label: '基本信息', children: , }, { key: '2', label: '用印记录', children: , }, { key: '4', label: '合同账单', children: , }, { key: '3', label: '合同标的', children: , }, { key: '5', label: '归档记录', children: , }, { key: '6', label: '争议处理记录', children: , }, { key: '7', label: '补充协议', children: , }, ]; const loadShow = () => { Apis.Contract.Contracts.Show({ id: Number(id) }).then((res) => { setDataShow(res?.data); }); }; useEffect(() => { loadShow(); }, [id]); return ( { navigate(-1); }} > {/* */} {title} } enableTabs={false} tabKey="charge-standards-create" tabLabel={title} > ); }