diff --git a/README.md b/README.md index 9410e416..c1f1c8a0 100644 --- a/README.md +++ b/README.md @@ -261,7 +261,6 @@ continew-admin-ui # 前端项目 │ │ │ └─ online # 在线用户 │ │ ├─ setting # 设置 │ │ │ ├─ profile # 账号管理 -│ │ │ └─ security # 安全设置 │ │ ├─ tool # 系统工具 │ │ │ └─ generator # 代码生成 │ │ └─ system # 系统管理 diff --git a/src/apis/auth/type.ts b/src/apis/auth/type.ts index 45b5a2c9..29d08791 100644 --- a/src/apis/auth/type.ts +++ b/src/apis/auth/type.ts @@ -8,6 +8,7 @@ export interface UserInfo { phone: string avatar: string pwdResetTime: string + passwordExpired: boolean registrationDate: string deptName: string roles: string[] diff --git a/src/apis/system/type.ts b/src/apis/system/type.ts index f34e2513..f1264a33 100644 --- a/src/apis/system/type.ts +++ b/src/apis/system/type.ts @@ -251,6 +251,16 @@ export interface BasicConfigResp { site_copyright: string } +/** 安全配置类型 */ +export interface SecurityConfigResp { + password_contain_name: OptionResp + password_error_count: OptionResp + password_lock_minutes: OptionResp + password_min_length: OptionResp + password_special_char: OptionResp + password_update_interval: OptionResp +} + /** 绑定三方账号信息*/ export interface BindSocialAccountRes { source: string diff --git a/src/layout/components/HeaderRightBar/index.vue b/src/layout/components/HeaderRightBar/index.vue index 62da6381..3e6e1572 100644 --- a/src/layout/components/HeaderRightBar/index.vue +++ b/src/layout/components/HeaderRightBar/index.vue @@ -53,9 +53,6 @@ 账号管理 - - 安全设置 - 退出登录 @@ -111,10 +108,12 @@ const logout = () => { .user { cursor: pointer; color: var(--color-text-1); + .username { margin-left: 10px; white-space: nowrap; } + .arco-icon-down { transition: all 0.3s; margin-left: 2px; diff --git a/src/router/index.ts b/src/router/index.ts index d2fdaf6a..6a4233b9 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -62,12 +62,6 @@ export const constantRoutes: RouteRecordRaw[] = [ name: 'SettingProfile', component: () => import('@/views/setting/profile/index.vue'), meta: { title: '账号管理', showInTabs: false } - }, - { - path: '/setting/security', - name: 'SettingSecurity', - component: () => import('@/views/setting/security/index.vue'), - meta: { title: '安全设置', showInTabs: false } } ] } @@ -88,7 +82,7 @@ export function resetRouter() { router.getRoutes().forEach((route) => { const { name } = route // console.log('name', name, path) - if (name && !['Home', 'Setting', 'SettingProfile', 'SettingSecurity'].includes(name.toString())) { + if (name && !['Home', 'Setting', 'SettingProfile'].includes(name.toString())) { router.hasRoute(name) && router.removeRoute(name) } }) diff --git a/src/stores/modules/user.ts b/src/stores/modules/user.ts index 45c30813..5c1727b2 100644 --- a/src/stores/modules/user.ts +++ b/src/stores/modules/user.ts @@ -27,6 +27,7 @@ const storeSetup = () => { phone: '', avatar: '', pwdResetTime: '', + passwordExpired: false, registrationDate: '', deptName: '', roles: [], diff --git a/src/views/login/components/account/index.vue b/src/views/login/components/account/index.vue index db1e650f..e446334f 100644 --- a/src/views/login/components/account/index.vue +++ b/src/views/login/components/account/index.vue @@ -31,7 +31,9 @@ - 立即登录 + 立即登录 + @@ -39,7 +41,7 @@ diff --git a/src/views/setting/profile/index.vue b/src/views/setting/profile/index.vue index 725d177d..e7682582 100644 --- a/src/views/setting/profile/index.vue +++ b/src/views/setting/profile/index.vue @@ -1,11 +1,16 @@ - + - + + + + + + @@ -14,6 +19,7 @@ diff --git a/src/views/setting/security/AccountProtection.vue b/src/views/setting/security/AccountProtection.vue deleted file mode 100644 index 6517d9d2..00000000 --- a/src/views/setting/security/AccountProtection.vue +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - {{ item.title }} - - - - {{ - item.status ? '已开启' : '未开启' - }} - - - - {{ item.subtitle }} - - - - - - - - - - - - - diff --git a/src/views/setting/security/BasicsSetting.vue b/src/views/setting/security/BasicsSetting.vue deleted file mode 100644 index 8652e7e8..00000000 --- a/src/views/setting/security/BasicsSetting.vue +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - {{ item.title }} - - - - {{ - item.status ? '已绑定' : '未绑定' - }} - - - - {{ item.value }} - {{ item.subtitle }} - - - - - {{ item.status ? '修改' : '绑定' }} - - - - - - - - - - - diff --git a/src/views/setting/security/SessionSetting.vue b/src/views/setting/security/SessionSetting.vue deleted file mode 100644 index 7a883ab9..00000000 --- a/src/views/setting/security/SessionSetting.vue +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - 登录态保持时间设置 - - 保持登录状态的限制 - - - - - 无操作登录会话保持30分钟,超时登录会话将失效 - 登录会话最大保持0天,超时登录会话将失效 - 修改规则(未开放) - - - - - - - - diff --git a/src/views/setting/security/index.vue b/src/views/setting/security/index.vue deleted file mode 100644 index 8298e33d..00000000 --- a/src/views/setting/security/index.vue +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/system/config/components/SecuritySetting.vue b/src/views/system/config/components/SecuritySetting.vue new file mode 100644 index 00000000..5aba5a3a --- /dev/null +++ b/src/views/system/config/components/SecuritySetting.vue @@ -0,0 +1,167 @@ + + + + + + + 天 + + + + + + + + + + + + 分钟 + + + + + + + + + + + + 分钟 + + + + + + + + + + + + + + + + + + + + 恢复默认 + + + + + + 修改 + + + + + + 保存 + + + + + + 重置 + + + + + + 取消 + + + + + + + + + + diff --git a/src/views/system/config/index.vue b/src/views/system/config/index.vue index 2eda5c18..0814d507 100644 --- a/src/views/system/config/index.vue +++ b/src/views/system/config/index.vue @@ -6,6 +6,9 @@ + + + @@ -13,6 +16,7 @@