From 375f236e320620efe01dc00cd7614fcfff692735 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Wed, 12 Jun 2024 14:35:07 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=87=8D=E6=9E=84=E9=94=81=E5=B1=8F?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/GlobalMask/index.vue | 138 ++++++++ src/components/LockScreen/index.vue | 230 ------------ src/constants/cache-keys-constants.ts | 7 +- src/i18n/locales/en-US.ts | 6 +- src/i18n/locales/zh-CN.ts | 4 +- src/layouts/BasicLayout.vue | 14 +- src/layouts/components/RightContent.vue | 61 +++- src/plugins/auth-token.ts | 7 +- src/store/modules/locked.ts | 59 ---- src/store/modules/mask.ts | 70 ++++ src/views/configManage/neManage/index.vue | 6 +- .../configManage/softwareManage/index.vue | 6 +- src/views/ne/neInfo/hooks/useNeOptions.ts | 6 +- src/views/ne/neVersion/index.vue | 6 +- .../setting/components/system-reset.vue | 10 +- src/views/tool/lockScreen/index.vue | 331 ++++++++---------- 16 files changed, 452 insertions(+), 509 deletions(-) create mode 100644 src/components/GlobalMask/index.vue delete mode 100644 src/components/LockScreen/index.vue delete mode 100644 src/store/modules/locked.ts create mode 100644 src/store/modules/mask.ts diff --git a/src/components/GlobalMask/index.vue b/src/components/GlobalMask/index.vue new file mode 100644 index 00000000..9948332d --- /dev/null +++ b/src/components/GlobalMask/index.vue @@ -0,0 +1,138 @@ + + + + + + diff --git a/src/components/LockScreen/index.vue b/src/components/LockScreen/index.vue deleted file mode 100644 index 078b01a5..00000000 --- a/src/components/LockScreen/index.vue +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - diff --git a/src/constants/cache-keys-constants.ts b/src/constants/cache-keys-constants.ts index e1e8393d..94e02304 100644 --- a/src/constants/cache-keys-constants.ts +++ b/src/constants/cache-keys-constants.ts @@ -10,8 +10,11 @@ export const CACHE_LOCAL_PRIMARY_COLOR = 'cache:local:primaryColor'; /**本地缓存-多语言 */ export const CACHE_LOCAL_I18N = 'cache:local:i18n'; -/**本地缓存-锁屏设置 */ -export const CACHE_LOCAL_LOCK = 'cache:local:Lock'; +/**本地缓存-遮罩设置 */ +export const CACHE_LOCAL_MASK = 'cache:local:mask'; + +/**本地缓存-锁屏密码 */ +export const CACHE_LOCAL_LOCK_PASSWD = 'cache:local:lock:passwd'; /**数据缓存表-表格排序 */ export const CACHE_DB_TABLE_DND = 'tbl_dnd'; diff --git a/src/i18n/locales/en-US.ts b/src/i18n/locales/en-US.ts index 49ef62b8..3d249bca 100644 --- a/src/i18n/locales/en-US.ts +++ b/src/i18n/locales/en-US.ts @@ -130,7 +130,7 @@ export default { onlyAllow:'Only supports upload file formats', }, LockScreen: { - inputPlacePwd:'Please enter login password', + inputPlacePwd:'Please enter the lock screen password', validSucc:'Validation Passed', validError:'Validation Failure', backLogin:'Logout to Relogin', @@ -186,7 +186,9 @@ export default { }, rightContent: { lock: "Lock Screen", - lockTip: "Confirmed to perform a lock screen?", + lockTip: "Confirmation of the lock screen?", + lockPasswd: "Unlock Password", + lockPasswdTip: "No password can be set", helpDoc: "System User Documentation", fullscreen: "Full Screen", logout: "Logout", diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts index 486fdb67..96236c4e 100644 --- a/src/i18n/locales/zh-CN.ts +++ b/src/i18n/locales/zh-CN.ts @@ -130,7 +130,7 @@ export default { onlyAllow:'只支持上传文件格式', }, LockScreen: { - inputPlacePwd:'请输入登录密码', + inputPlacePwd:'请输入锁屏密码', validSucc:'校验通过', validError:'校验失败', backLogin:'退出并重新登录', @@ -187,6 +187,8 @@ export default { rightContent: { lock: "锁屏", lockTip: "确认要进行锁屏吗?", + lockPasswd: "解锁密码", + lockPasswdTip: "可不设置密码", helpDoc: "系统使用文档", fullscreen: "全屏显示", logout: "退出登录", diff --git a/src/layouts/BasicLayout.vue b/src/layouts/BasicLayout.vue index c35a736f..f6226867 100644 --- a/src/layouts/BasicLayout.vue +++ b/src/layouts/BasicLayout.vue @@ -8,6 +8,7 @@ import { } from 'antdv-pro-layout'; import RightContent from './components/RightContent.vue'; import Tabs from './components/Tabs.vue'; +import GlobalMask from '@/components/GlobalMask/index.vue'; import { scriptUrl } from '@/assets/js/icon_font_8d5l8fzk5b87iudi'; import { computed, reactive, watch, onMounted, onUnmounted } from 'vue'; import useLayoutStore from '@/store/modules/layout'; @@ -21,6 +22,7 @@ const { proConfig, waterMarkContent } = useLayoutStore(); import useI18n from '@/hooks/useI18n'; import { getServerTime } from '@/api'; import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; + import { parseDateToStr } from '@/utils/date-utils'; import { parseUrlPath } from '@/plugins/file-static-url'; const { t, currentLocale } = useI18n(); @@ -224,10 +226,10 @@ onUnmounted(() => { v-model:selectedKeys="layoutState.selectedKeys" v-model:openKeys="layoutState.openKeys" :menu-data="menuData" - :breadcrumb="{ routes: breadcrumb } as any" + :breadcrumb="{ routes: breadcrumb }" v-bind="proConfig" - :iconfont-url="scriptUrl" - :locale="(fnLocale as any)" + :iconfont-url="scriptUrl" + :locale="fnLocale" > diff --git a/src/layouts/components/RightContent.vue b/src/layouts/components/RightContent.vue index 59b70627..e9a25a7a 100644 --- a/src/layouts/components/RightContent.vue +++ b/src/layouts/components/RightContent.vue @@ -1,19 +1,20 @@