|
@@ -2,7 +2,7 @@ import PageContent from '@/components/PageContent';
|
|
|
import TabsContent from '@/components/TabsContent';
|
|
|
import { getNotificationList } from '@/services/message';
|
|
|
import { UnityAction } from '@/utils/utils';
|
|
|
-import { useParams, useRequest } from '@umijs/max';
|
|
|
+import { useParams, useRequest, useSearchParams } from '@umijs/max';
|
|
|
import { Button, Spin } from 'antd';
|
|
|
import dayjs from 'dayjs';
|
|
|
import { useState } from 'react';
|
|
@@ -13,6 +13,7 @@ const icon3 = require('@/assets/message/warning.png');
|
|
|
|
|
|
const MessageCenter = () => {
|
|
|
const { projectId } = useParams();
|
|
|
+ const [searchParams] = useSearchParams();
|
|
|
const [tab, setTab] = useState('2');
|
|
|
//, msgType: 工况:11, 自检:12, 预警:13
|
|
|
const { data, run, loading } = useRequest(() =>
|
|
@@ -107,7 +108,7 @@ const MessageCenter = () => {
|
|
|
<PageContent tabs>
|
|
|
<TabsContent
|
|
|
center={false}
|
|
|
- defaultActiveKey="2"
|
|
|
+ defaultActiveKey={searchParams.get('type') || '2'}
|
|
|
onChange={handleTabsChange}
|
|
|
items={[
|
|
|
{
|