|
@@ -14,7 +14,7 @@ const icon3 = require('@/assets/message/warning.png');
|
|
|
const MessageCenter = () => {
|
|
|
const { projectId } = useParams();
|
|
|
const [searchParams] = useSearchParams();
|
|
|
- const [tab, setTab] = useState('2');
|
|
|
+ const [tab, setTab] = useState(searchParams.get('type') || '2');
|
|
|
//, msgType: 工况:11, 自检:12, 预警:13
|
|
|
const { data, run, loading } = useRequest(() =>
|
|
|
getNotificationList({ projectId, msgType: 11 }, { manual: true }),
|
|
@@ -106,7 +106,7 @@ const MessageCenter = () => {
|
|
|
<PageContent tabs>
|
|
|
<TabsContent
|
|
|
center={false}
|
|
|
- defaultActiveKey={searchParams.get('type') || '2'}
|
|
|
+ defaultActiveKey={tab}
|
|
|
onChange={handleTabsChange}
|
|
|
items={[
|
|
|
{
|