diff --git a/src/components/core/layouts/art-header-bar/index.vue b/src/components/core/layouts/art-header-bar/index.vue
index c66a28b..0f4c68c 100644
--- a/src/components/core/layouts/art-header-bar/index.vue
+++ b/src/components/core/layouts/art-header-bar/index.vue
@@ -194,8 +194,6 @@
import { mittBus } from '@/utils/sys'
import { useMenuStore } from '@/store/modules/menu'
import { useNotificationStore } from '@/store/modules/notification'
- import { useAuth } from '@/composables/useAuth'
- import { NOTIFICATION_PERMISSIONS } from '@/config/constants/notification'
import AppConfig from '@/config'
const isWindows = navigator.userAgent.includes('Windows')
const { locale } = useI18n()
@@ -203,7 +201,6 @@
const settingStore = useSettingStore()
const userStore = useUserStore()
const notificationStore = useNotificationStore()
- const { hasAuth } = useAuth()
const router = useRouter()
const {
@@ -262,12 +259,10 @@
onMounted(() => {
initLanguage()
- if (hasAuth(NOTIFICATION_PERMISSIONS.page)) {
+ void notificationStore.refreshUnreadCount().catch(() => undefined)
+ unreadTimer = window.setInterval(() => {
void notificationStore.refreshUnreadCount().catch(() => undefined)
- unreadTimer = window.setInterval(() => {
- void notificationStore.refreshUnreadCount().catch(() => undefined)
- }, 30_000)
- }
+ }, 30_000)
})
let unreadTimer: number | undefined
diff --git a/src/components/core/layouts/art-notification/index.vue b/src/components/core/layouts/art-notification/index.vue
index 1eca133..dace245 100644
--- a/src/components/core/layouts/art-notification/index.vue
+++ b/src/components/core/layouts/art-notification/index.vue
@@ -3,12 +3,7 @@
@@ -62,8 +57,6 @@
import { NotificationService } from '@/api/modules'
import type { NotificationCategory, NotificationItem } from '@/types/api'
import { useNotificationStore } from '@/store/modules/notification'
- import { useAuth } from '@/composables/useAuth'
- import { NOTIFICATION_PERMISSIONS } from '@/config/constants/notification'
import { navigateNotificationTarget } from '@/utils/business/notificationNavigation'
import { formatDateTime } from '@/utils/business/format'
@@ -72,7 +65,6 @@
const router = useRouter()
const notificationStore = useNotificationStore()
- const { hasAuth } = useAuth()
const activeCategory = ref<'all' | NotificationCategory>('all')
const visible = computed(() => props.modelValue)
@@ -116,10 +108,6 @@
}
const handleNotificationClick = async (item: NotificationItem) => {
- if (!hasAuth(NOTIFICATION_PERMISSIONS.read)) {
- ElMessage.warning('您没有标记通知已读的权限')
- return
- }
try {
const targetResponse = await NotificationService.getTarget(item.id)
const readResponse = await notificationStore.markRead(item.id)
diff --git a/src/config/constants/notification.ts b/src/config/constants/notification.ts
deleted file mode 100644
index 56e21fc..0000000
--- a/src/config/constants/notification.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-export const NOTIFICATION_PERMISSIONS = {
- page: 'notifications:view',
- read: 'notifications:read',
- readAll: 'notifications:read_all'
-} as const
diff --git a/src/views/asset-management/expiring-assets/index.vue b/src/views/asset-management/expiring-assets/index.vue
index 647d8f5..e8aa39a 100644
--- a/src/views/asset-management/expiring-assets/index.vue
+++ b/src/views/asset-management/expiring-assets/index.vue
@@ -33,8 +33,6 @@
:pageSize="pagination.pageSize"
:total="pagination.total"
:marginTop="10"
- :actions="getActions"
- :actionsWidth="140"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
>
@@ -50,7 +48,7 @@