feat: 右上角活动告警数

This commit is contained in:
TsMask
2023-10-19 16:10:37 +08:00
parent a746d14c48
commit 820eca7bbe
4 changed files with 70 additions and 40 deletions

View File

@@ -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