feat: 右上角活动告警数
This commit is contained in:
@@ -8,10 +8,11 @@ import {
|
||||
import RightContent from './components/RightContent.vue';
|
||||
import Tabs from './components/Tabs.vue';
|
||||
import { scriptUrl } from '@/assets/js/icon_font_8d5l8fzk5b87iudi';
|
||||
import { computed, reactive, ref, watch } from 'vue';
|
||||
import { computed, reactive, watch } from 'vue';
|
||||
import useLayoutStore from '@/store/modules/layout';
|
||||
import useRouterStore from '@/store/modules/router';
|
||||
import useTabsStore from '@/store/modules/tabs';
|
||||
import useAlarmStore from '@/store/modules/alarm';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { MENU_PATH_INLINE } from '@/constants/menu-constants';
|
||||
const { proConfig, waterMarkContent } = useLayoutStore();
|
||||
@@ -120,6 +121,7 @@ tabsStore.clear();
|
||||
//
|
||||
onMounted(() => {
|
||||
fnGetServerTime();
|
||||
useAlarmStore().fnGetActiveAlarmInfo()
|
||||
});
|
||||
|
||||
// ==== 服务器时间显示 start
|
||||
@@ -164,6 +166,7 @@ document.addEventListener('visibilitychange', function () {
|
||||
if (document.visibilityState == 'visible') {
|
||||
//切换到该页面时执行
|
||||
fnGetServerTime();
|
||||
useAlarmStore().fnGetActiveAlarmInfo()
|
||||
}
|
||||
});
|
||||
// ==== 服务器时间显示 end
|
||||
|
||||
@@ -4,6 +4,7 @@ import { useRouter } from 'vue-router';
|
||||
import { toggle, isFullscreen } from '@/utils/fullscreen-utils';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import useAlarmStore from '@/store/modules/alarm';
|
||||
const { t, changeLocale } = useI18n();
|
||||
const userStore = useUserStore();
|
||||
const router = useRouter();
|
||||
@@ -31,45 +32,14 @@ function fnChangeLocale(e: any) {
|
||||
|
||||
<template>
|
||||
<a-space :size="12" align="center">
|
||||
<a-popover
|
||||
overlayClassName="head-notice"
|
||||
placement="bottomRight"
|
||||
:trigger="['click']"
|
||||
>
|
||||
<a-button type="text">
|
||||
<template #icon>
|
||||
<a-badge :count="123" :overflow-count="99">
|
||||
<BellOutlined :style="{ fontSize: '20px' }" />
|
||||
</a-badge>
|
||||
</template>
|
||||
</a-button>
|
||||
<template #content :style="{ padding: 0 }">
|
||||
<a-tabs centered :tabBarStyle="{ width: '336px' }">
|
||||
<a-tab-pane key="1" tab="通知(41)">
|
||||
Content of Tab 通知
|
||||
<a-button type="link" block>查看更多</a-button>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="2" tab="消息(231)">
|
||||
Content of Tab 消息
|
||||
<a-button type="link" block>查看更多</a-button>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="3" tab="待办(1)">
|
||||
Content of Tab 待办
|
||||
<a-button type="link" block>查看更多</a-button>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
<a-button type="text">
|
||||
<template #icon>
|
||||
<a-badge :count="useAlarmStore().activeAlarmTotal" :overflow-count="99" status="warning">
|
||||
<BellOutlined />
|
||||
</a-badge>
|
||||
</template>
|
||||
</a-popover>
|
||||
|
||||
<!-- <a-tooltip>
|
||||
<template #title>开源仓库</template>
|
||||
<a-button type="text" href="https://gitee.com/TsMask" target="_blank">
|
||||
<template #icon>
|
||||
<GithubOutlined :style="{ fontSize: '20px' }" />
|
||||
</template>
|
||||
</a-button>
|
||||
</a-tooltip> -->
|
||||
|
||||
</a-button>
|
||||
|
||||
<a-tooltip>
|
||||
<template #title>全屏显示</template>
|
||||
<a-button type="text" @click="toggle">
|
||||
|
||||
Reference in New Issue
Block a user