
2、调整水印 <br/> 3、调整了默认租户的显示排序及显示,可以更方便进入默认租户 <br/> 4、屏蔽了国际化选项 <br/> 5、按需求增加用户身份证号,并校验唯一性 <br/> 6、按需求增加用户是否营销人员,并校验营销号唯一性 <br/> 7、按需求增加,经办人员录入时,录入的营销人员信息位系统提供选择,防止误录,demo见private-ebank-new-operate-drawer.vue <br/> 以上,代码工具和demo表结构暂时没改,初步测试大概率无误,先不改了
67 lines
1.8 KiB
Vue
67 lines
1.8 KiB
Vue
<script setup lang="ts">
|
|
import { computed } from 'vue';
|
|
import { NConfigProvider, darkTheme } from 'naive-ui';
|
|
import type { WatermarkProps } from 'naive-ui';
|
|
import { useAppStore } from './store/modules/app';
|
|
import { useThemeStore } from './store/modules/theme';
|
|
import { useAuthStore } from './store/modules/auth';
|
|
import { naiveDateLocales, naiveLocales } from './locales/naive';
|
|
|
|
defineOptions({
|
|
name: 'App'
|
|
});
|
|
|
|
const appStore = useAppStore();
|
|
const themeStore = useThemeStore();
|
|
const { userInfo } = useAuthStore();
|
|
|
|
const naiveDarkTheme = computed(() => (themeStore.darkMode ? darkTheme : undefined));
|
|
|
|
const naiveLocale = computed(() => {
|
|
return naiveLocales[appStore.locale];
|
|
});
|
|
|
|
const naiveDateLocale = computed(() => {
|
|
return naiveDateLocales[appStore.locale];
|
|
});
|
|
|
|
const watermarkProps = computed<WatermarkProps>(() => {
|
|
const appTitle = import.meta.env.VITE_APP_TITLE || '全员营销计价';
|
|
const content =
|
|
themeStore.watermark.enableUserName && userInfo.user?.userName
|
|
? `${userInfo.user?.nickName}@${appTitle} ${userInfo.user?.userName}`
|
|
: appTitle;
|
|
return {
|
|
content,
|
|
cross: true,
|
|
fullscreen: true,
|
|
fontSize: 14,
|
|
fontColor: themeStore.darkMode ? 'rgb(67,61,61)' : 'rgba(28,25,25,0.2)',
|
|
lineHeight: 14,
|
|
width: 260,
|
|
height: 300,
|
|
xOffset: 12,
|
|
yOffset: 60,
|
|
rotate: -18,
|
|
zIndex: 9999
|
|
};
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<NConfigProvider
|
|
:theme="naiveDarkTheme"
|
|
:theme-overrides="themeStore.naiveTheme"
|
|
:locale="naiveLocale"
|
|
:date-locale="naiveDateLocale"
|
|
class="h-full"
|
|
>
|
|
<AppProvider>
|
|
<RouterView class="bg-layout" />
|
|
<NWatermark v-if="themeStore.watermark.visible" v-bind="watermarkProps" />
|
|
</AppProvider>
|
|
</NConfigProvider>
|
|
</template>
|
|
|
|
<style scoped></style>
|