|
@@ -19,7 +19,6 @@
|
|
|
<LayoutBreadcrumb v-if="getShowContent && getShowBread" :theme="getHeaderTheme" />
|
|
|
</div>
|
|
|
<!-- left end -->
|
|
|
-
|
|
|
<!-- menu start -->
|
|
|
<div :class="`${prefixCls}-menu`" v-if="getShowTopMenu && !getIsMobile">
|
|
|
<LayoutMenu
|
|
@@ -33,6 +32,9 @@
|
|
|
|
|
|
<!-- action -->
|
|
|
<div :class="`${prefixCls}-action`">
|
|
|
+ <div v-if="expire">
|
|
|
+ <Tag color="pink">已过期</Tag>
|
|
|
+ </div>
|
|
|
<!-- <AppSearch :class="`${prefixCls}-action__item `" v-if="getShowSearch" /> -->
|
|
|
|
|
|
<!-- <ErrorAction v-if="getUseErrorHandle" :class="`${prefixCls}-action__item error-action`" /> -->
|
|
@@ -63,8 +65,10 @@
|
|
|
import { AppLogo } from '/@/components/Application';
|
|
|
import LayoutMenu from '../menu/index.vue';
|
|
|
import LayoutTrigger from '../trigger/index.vue';
|
|
|
+ import dayjs from 'dayjs';
|
|
|
|
|
|
// import { AppSearch } from '/@/components/Application';
|
|
|
+ import { Tag } from 'ant-design-vue';
|
|
|
|
|
|
import { useHeaderSetting } from '/@/hooks/setting/useHeaderSetting';
|
|
|
import { useMenuSetting } from '/@/hooks/setting/useMenuSetting';
|
|
@@ -80,6 +84,7 @@
|
|
|
|
|
|
import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent';
|
|
|
import { useLocale } from '/@/locales/useLocale';
|
|
|
+ import { useUserStore } from '/@/store/modules/user';
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'LayoutHeader',
|
|
@@ -92,6 +97,7 @@
|
|
|
UserDropDown,
|
|
|
AppLocalePicker,
|
|
|
FullScreen,
|
|
|
+ Tag,
|
|
|
// Notify,
|
|
|
// AppSearch,
|
|
|
// ErrorAction,
|
|
@@ -104,6 +110,7 @@
|
|
|
},
|
|
|
setup(props) {
|
|
|
const { prefixCls } = useDesign('layout-header');
|
|
|
+ const userStore = useUserStore();
|
|
|
const {
|
|
|
getShowTopMenu,
|
|
|
getShowHeaderTrigger,
|
|
@@ -130,6 +137,16 @@
|
|
|
|
|
|
const { getIsMobile } = useAppInject();
|
|
|
|
|
|
+ const userinfo = computed(() => userStore.getUserInfo);
|
|
|
+ const expire = computed(() => {
|
|
|
+ let expireTime = userinfo.value?.companyExpirationTime;
|
|
|
+ if (expireTime && dayjs(expireTime) < dayjs()) {
|
|
|
+ return true;
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ console.log('userinfo', userinfo.value);
|
|
|
const getHeaderClass = computed(() => {
|
|
|
const theme = unref(getHeaderTheme);
|
|
|
return [
|
|
@@ -192,6 +209,8 @@
|
|
|
getShowSettingButton,
|
|
|
getShowSetting,
|
|
|
getShowSearch,
|
|
|
+ userinfo,
|
|
|
+ expire,
|
|
|
};
|
|
|
},
|
|
|
});
|