| | |
| | | <script lang="ts" setup> |
| | | import type { NotificationItem } from '../packages/effects/layouts/src'; |
| | | import type { NotificationItem } from '@vben/layouts'; |
| | | |
| | | import type { SystemTenantApi } from '#/api/system/tenant'; |
| | | |
| | | import { computed, onMounted, ref, watch } from 'vue'; |
| | | |
| | | import { useAccess } from '../packages/effects/access/src'; |
| | | import { AuthenticationLoginExpiredModal, useVbenModal } from '../packages/effects/common-ui/src'; |
| | | import { VBEN_DOC_URL, VBEN_GITHUB_URL } from '../packages/constants/src'; |
| | | import { isTenantEnable, useTabs, useWatermark } from '../packages/effects/hooks/src'; |
| | | import { useAccess } from '@vben/access'; |
| | | import { AuthenticationLoginExpiredModal, useVbenModal } from '@vben/common-ui'; |
| | | import { VBEN_DOC_URL, VBEN_GITHUB_URL } from '@vben/constants'; |
| | | import { isTenantEnable, useTabs, useWatermark } from '@vben/hooks'; |
| | | import { |
| | | AntdProfileOutlined, |
| | | BookOpenText, |
| | | CircleHelp, |
| | | IconifyIcon, |
| | | SvgGithubIcon, |
| | | } from '../packages/icons/src'; |
| | | } from '@vben/icons'; |
| | | import { |
| | | BasicLayout, |
| | | Help, |
| | |
| | | Notification, |
| | | TenantDropdown, |
| | | UserDropdown, |
| | | } from '../packages/effects/layouts/src'; |
| | | import { preferences, usePreferences } from '../packages/preferences/src'; |
| | | import { useAccessStore, useUserStore } from '../packages/stores/src'; |
| | | import { formatDateTime, openWindow } from '../packages/utils/src'; |
| | | } from '@vben/layouts'; |
| | | import { preferences, usePreferences } from '@vben/preferences'; |
| | | import { useAccessStore, useUserStore } from '@vben/stores'; |
| | | import { formatDateTime, openWindow } from '@vben/utils'; |
| | | |
| | | import { message, Tooltip } from 'ant-design-vue'; |
| | | import { message } from 'ant-design-vue'; |
| | | |
| | | import { |
| | | getUnreadNotifyMessageCount, |
| | |
| | | icon: AntdProfileOutlined, |
| | | text: $t('ui.widgets.profile'), |
| | | }, |
| | | { |
| | | handler: () => { |
| | | openWindow(VBEN_DOC_URL, { |
| | | target: '_blank', |
| | | }); |
| | | }, |
| | | icon: BookOpenText, |
| | | text: $t('ui.widgets.document'), |
| | | }, |
| | | { |
| | | handler: () => { |
| | | openWindow(VBEN_GITHUB_URL, { |
| | | target: '_blank', |
| | | }); |
| | | }, |
| | | icon: SvgGithubIcon, |
| | | text: 'GitHub', |
| | | }, |
| | | { |
| | | handler: () => { |
| | | helpModalApi.open(); |
| | | }, |
| | | icon: CircleHelp, |
| | | text: $t('ui.widgets.qa'), |
| | | }, |
| | | // { |
| | | // handler: () => { |
| | | // openWindow(VBEN_DOC_URL, { |
| | | // target: '_blank', |
| | | // }); |
| | | // }, |
| | | // icon: BookOpenText, |
| | | // text: $t('ui.widgets.document'), |
| | | // }, |
| | | // { |
| | | // handler: () => { |
| | | // openWindow(VBEN_GITHUB_URL, { |
| | | // target: '_blank', |
| | | // }); |
| | | // }, |
| | | // icon: SvgGithubIcon, |
| | | // text: 'GitHub', |
| | | // }, |
| | | // { |
| | | // handler: () => { |
| | | // helpModalApi.open(); |
| | | // }, |
| | | // icon: CircleHelp, |
| | | // text: $t('ui.widgets.qa'), |
| | | // }, |
| | | ]); |
| | | |
| | | const avatar = computed(() => { |
| | |
| | | } |
| | | handleNotificationGetList(); |
| | | handleNotificationGetUnreadCount(); |
| | | } |
| | | |
| | | /** 打开 IM 聊天 */ |
| | | function handleOpenImHome() { |
| | | const { href } = router.resolve({ name: 'ImHome' }); |
| | | window.open(href, '_blank'); |
| | | } |
| | | |
| | | // 租户列表 |
| | |
| | | @on-click="handleClick" |
| | | /> |
| | | </template> |
| | | <template #header-right-1> |
| | | <!-- <template #header-right-1> |
| | | <div v-if="tenantEnable"> |
| | | <TenantDropdown |
| | | class="mr-2" |
| | |
| | | @success="handleTenantChange" |
| | | /> |
| | | </div> |
| | | </template> |
| | | <template #header-right-900> |
| | | <Tooltip title="IM 聊天"> |
| | | <button |
| | | class="hover:bg-accent hover:text-accent-foreground mr-1 inline-flex size-8 items-center justify-center rounded-md transition-colors" |
| | | type="button" |
| | | @click="handleOpenImHome" |
| | | > |
| | | <IconifyIcon class="size-4" icon="lucide:message-circle" /> |
| | | </button> |
| | | </Tooltip> |
| | | </template> --> |
| | | <template #header-right-170> |
| | | <button |
| | | type="button" |
| | | class="flex cursor-pointer items-center gap-1.5 rounded-md border-none bg-primary/15 px-3 py-1.5 text-sm font-medium text-primary transition-colors hover:bg-primary/25" |
| | | @click="router.push({ name: 'MesWorkbench' })" |
| | | > |
| | | <IconifyIcon icon="lucide:factory" class="size-4" /> |
| | | <span>工作台</span> |
| | | </button> |
| | | </template> |
| | | <template #extra> |
| | | <AuthenticationLoginExpiredModal |