Your Name e831095ca0
All checks were successful
Build and Push Docker Image / build (push) Successful in 4m40s
fix:更新金刚区
2026-01-28 18:25:03 +08:00

43 lines
1.0 KiB
TypeScript

import { MyPageContainer } from '@/common';
import { useSearchParams } from '@umijs/max';
import type { TabsProps } from 'antd';
import { Tabs } from 'antd';
import { useEffect, useState } from 'react';
import IsVisited from './components/IsVisited';
import NoVisited from './components/NoVisited';
export default function Index({ title = '工单回访' }) {
const [searchParams] = useSearchParams();
const [activeKey, setActiveKey] = useState('1');
const items: TabsProps['items'] = [
{
key: 'NoVisited',
label: '未回访工单',
children: <NoVisited />,
},
{
key: 'IsVisited',
label: '已回访工单',
children: <IsVisited />,
},
];
useEffect(() => {
if (searchParams?.get('key')) {
setActiveKey(searchParams?.get('key') || '1');
}
}, []);
return (
<MyPageContainer
title={title}
enableTabs={true}
tabKey="visited"
tabLabel={title}
>
<Tabs defaultActiveKey={activeKey} items={items} type="card" />
</MyPageContainer>
);
}