diff --git a/backend-fastapi/db_init.json b/backend-fastapi/db_init.json index 4f4f208..77bfd97 100644 --- a/backend-fastapi/db_init.json +++ b/backend-fastapi/db_init.json @@ -6806,7 +6806,7 @@ "badgeVariants": null, "id": "ys46Xxzw3B4lMj83oaUUx", "sort": 0, - "is_deleted": false, + "is_deleted": true, "sys_create_datetime": "2026-01-02T04:03:16.317341", "sys_update_datetime": "2026-01-02T04:04:55.264446", "sys_creator_id": null, @@ -35640,4 +35640,4 @@ "sys_dept_id": null } } -] \ No newline at end of file +] diff --git a/web/apps/web-ele/src/api/core/api-token.ts b/web/apps/web-ele/src/api/core/api-token.ts deleted file mode 100644 index 5663a1e..0000000 --- a/web/apps/web-ele/src/api/core/api-token.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * API Token (Personal Access Token) 管理 - */ -import { requestClient } from '#/api/request'; - -export namespace ApiTokenApi { - export interface TokenItem { - id: string; - name: string; - token_prefix: string; - expires_at?: null | string; - last_used_at?: null | string; - description?: null | string; - is_active: boolean; - sys_create_datetime?: null | string; - } - - export interface CreateTokenRequest { - name: string; - expires_at?: null | string; - description?: string; - } - - export interface CreateTokenResponse { - id: string; - name: string; - token: string; - token_prefix: string; - expires_at?: null | string; - description?: null | string; - sys_create_datetime?: null | string; - } -} - -export async function getApiTokenListApi() { - return requestClient.get('/api/core/api-tokens'); -} - -export async function createApiTokenApi(data: ApiTokenApi.CreateTokenRequest) { - return requestClient.post( - '/api/core/api-tokens', - data, - ); -} - -export async function revokeApiTokenApi(tokenId: string) { - return requestClient.delete(`/api/core/api-tokens/${tokenId}`); -} diff --git a/web/apps/web-ele/src/api/core/device.ts b/web/apps/web-ele/src/api/core/device.ts deleted file mode 100644 index e4e925a..0000000 --- a/web/apps/web-ele/src/api/core/device.ts +++ /dev/null @@ -1,77 +0,0 @@ -/** - * 设备管理 API - */ -import { requestClient } from '#/api/request'; - -export namespace DeviceApi { - /** 设备信息 */ - export interface DeviceInfo { - device_id: string; - device_name?: string; - device_type?: string; - browser_type?: string; - os_type?: string; - ip_address?: string; - last_active_time?: string; - is_current: boolean; - is_online: boolean; - } - - /** 设备列表响应 */ - export interface DeviceListResponse { - current_device?: DeviceInfo; - online_devices: DeviceInfo[]; - total_count: number; - } - - /** 设备重命名请求 */ - export interface DeviceRenameRequest { - device_name: string; - } - - /** 统计信息响应 */ - export interface StatisticsResponse { - online_count: number; - total_count: number; - } -} - -/** - * 获取设备列表 - */ -export async function getDeviceListApi() { - return requestClient.get('/api/core/devices'); -} - -/** - * 强制登出指定设备 - */ -export async function logoutDeviceApi(deviceId: string) { - return requestClient.delete(`/api/core/devices/${deviceId}`); -} - -/** - * 登出其他所有设备 - */ -export async function logoutOtherDevicesApi() { - return requestClient.delete('/api/core/devices/logout-others'); -} - -/** - * 重命名设备 - */ -export async function renameDeviceApi( - deviceId: string, - data: DeviceApi.DeviceRenameRequest, -) { - return requestClient.post(`/api/core/devices/${deviceId}/rename`, data); -} - -/** - * 获取设备统计信息 - */ -export async function getDeviceStatisticsApi() { - return requestClient.get( - '/api/core/devices/statistics', - ); -} diff --git a/web/apps/web-ele/src/api/core/index.ts b/web/apps/web-ele/src/api/core/index.ts index 4705db2..d84e26d 100644 --- a/web/apps/web-ele/src/api/core/index.ts +++ b/web/apps/web-ele/src/api/core/index.ts @@ -1,5 +1,4 @@ export * from './announcement'; -export * from './api-token'; export * from './application'; export * from './auth'; export * from './data-source'; diff --git a/web/apps/web-ele/src/locales/index.ts b/web/apps/web-ele/src/locales/index.ts index 748e22f..65d9118 100644 --- a/web/apps/web-ele/src/locales/index.ts +++ b/web/apps/web-ele/src/locales/index.ts @@ -23,7 +23,6 @@ const modules = import.meta.glob([ './langs/*/about.json', './langs/*/ai-platform.json', './langs/*/announcement.json', - './langs/*/apiToken.json', './langs/*/authentication.json', './langs/*/common.json', './langs/*/menu.json', diff --git a/web/apps/web-ele/src/locales/langs/en-US/account-settings.json b/web/apps/web-ele/src/locales/langs/en-US/account-settings.json deleted file mode 100644 index a384512..0000000 --- a/web/apps/web-ele/src/locales/langs/en-US/account-settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "passwordLengthHint": "Password length must be 6-20 characters" -} diff --git a/web/apps/web-ele/src/locales/langs/en-US/apiToken.json b/web/apps/web-ele/src/locales/langs/en-US/apiToken.json deleted file mode 100644 index 4e326c1..0000000 --- a/web/apps/web-ele/src/locales/langs/en-US/apiToken.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "title": "API Token", - "deviceManagement": "Device Management", - "description": "API Tokens can be used to access system resources via API. Please keep your tokens secure.", - "createToken": "Create Token", - "tokenName": "Token Name", - "tokenNamePlaceholder": "Enter token name, e.g., CI/CD Deployment", - "expirationDate": "Expiration Date", - "neverExpiresHint": "Leave empty for no expiration", - "tokenDescription": "Description", - "tokenDescriptionPlaceholder": "Optional, describe the purpose of this token", - "neverExpires": "Never expires", - "expired": "Expired", - "expiresSoon": "Expires in {0} days", - "createdAt": "Created", - "lastUsed": "Last used", - "revokeToken": "Revoke Token", - "revokeTitle": "Revoke Token", - "revokeConfirm": "Are you sure you want to revoke token \"{0}\"? This action cannot be undone.", - "confirmRevoke": "Confirm Revoke", - "revokeSuccess": "Token revoked", - "tokenCreated": "Token Created Successfully", - "tokenWarning": "Please copy your token now. You won't be able to see it again after closing this dialog.", - "copy": "Copy", - "copied": "Copied", - "copySuccess": "Token copied to clipboard", - "copyError": "Copy failed, please copy manually", - "empty": "No API Tokens yet. Click \"Create Token\" to generate your first token.", - "nameRequired": "Please enter a token name", - "loadError": "Failed to load token list", - "createError": "Failed to create token", - "days7": "7 days", - "days30": "30 days", - "days60": "60 days", - "days90": "90 days", - "days365": "1 year" -} diff --git a/web/apps/web-ele/src/locales/langs/en-US/menu-title.json b/web/apps/web-ele/src/locales/langs/en-US/menu-title.json index 23d70d1..4cea2db 100644 --- a/web/apps/web-ele/src/locales/langs/en-US/menu-title.json +++ b/web/apps/web-ele/src/locales/langs/en-US/menu-title.json @@ -12,7 +12,6 @@ "roleManagement": "Role Permission", "userCenter": "User Center", "loginLog": "Login Log", - "accountSettings": "Account Settings", "databaseManagement": "Database Management", "dbManagement": "DB Management", "databaseConnection": "Database Connections", diff --git a/web/apps/web-ele/src/locales/langs/en-US/user.json b/web/apps/web-ele/src/locales/langs/en-US/user.json index 2696ea8..2f13f67 100644 --- a/web/apps/web-ele/src/locales/langs/en-US/user.json +++ b/web/apps/web-ele/src/locales/langs/en-US/user.json @@ -51,7 +51,6 @@ "resetPasswordConfirm": "Are you sure to reset password for user \"{0}\"?\nThe password will be reset to: admin123", "resetPasswordSuccess": "Password reset successfully for user \"{0}\"", "resetPasswordError": "Failed to reset password", - "accountSettings": "Account Settings", "basicInfo": "Basic Information", "changePassword": "Change Password", "oldPassword": "Current Password", diff --git a/web/apps/web-ele/src/locales/langs/zh-CN/account-settings.json b/web/apps/web-ele/src/locales/langs/zh-CN/account-settings.json deleted file mode 100644 index cb1ab9a..0000000 --- a/web/apps/web-ele/src/locales/langs/zh-CN/account-settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "passwordLengthHint": "密码长度为 6-20 个字符" -} diff --git a/web/apps/web-ele/src/locales/langs/zh-CN/apiToken.json b/web/apps/web-ele/src/locales/langs/zh-CN/apiToken.json deleted file mode 100644 index e38843e..0000000 --- a/web/apps/web-ele/src/locales/langs/zh-CN/apiToken.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "title": "API Token", - "deviceManagement": "设备管理", - "description": "API Token 可用于通过 API 访问系统资源,请妥善保管你的令牌。", - "createToken": "创建令牌", - "tokenName": "令牌名称", - "tokenNamePlaceholder": "请输入令牌名称,例如:CI/CD 部署", - "expirationDate": "过期时间", - "neverExpiresHint": "不选择则永不过期", - "tokenDescription": "描述", - "tokenDescriptionPlaceholder": "可选,描述该令牌的用途", - "neverExpires": "永不过期", - "expired": "已过期", - "expiresSoon": "{0} 天后过期", - "createdAt": "创建时间", - "lastUsed": "最后使用", - "revokeToken": "撤销令牌", - "revokeTitle": "撤销令牌", - "revokeConfirm": "确定要撤销令牌「{0}」吗?撤销后将无法恢复。", - "confirmRevoke": "确定撤销", - "revokeSuccess": "令牌已撤销", - "tokenCreated": "令牌创建成功", - "tokenWarning": "请立即复制你的令牌,此令牌仅显示一次,关闭后将无法再次查看。", - "copy": "复制", - "copied": "已复制", - "copySuccess": "令牌已复制到剪贴板", - "copyError": "复制失败,请手动复制", - "empty": "暂无 API Token,点击「创建令牌」生成你的第一个令牌", - "nameRequired": "请输入令牌名称", - "loadError": "加载令牌列表失败", - "createError": "创建令牌失败", - "days7": "7 天", - "days30": "30 天", - "days60": "60 天", - "days90": "90 天", - "days365": "1 年" -} diff --git a/web/apps/web-ele/src/locales/langs/zh-CN/menu-title.json b/web/apps/web-ele/src/locales/langs/zh-CN/menu-title.json index 26376fa..c462e95 100644 --- a/web/apps/web-ele/src/locales/langs/zh-CN/menu-title.json +++ b/web/apps/web-ele/src/locales/langs/zh-CN/menu-title.json @@ -12,7 +12,6 @@ "roleManagement": "角色权限", "userCenter": "用户中心", "loginLog": "登录日志", - "accountSettings": "账号设置", "databaseManagement": "数据库管理", "dbManagement": "DB管理", "databaseConnection": "数据库连接", diff --git a/web/apps/web-ele/src/locales/langs/zh-CN/user.json b/web/apps/web-ele/src/locales/langs/zh-CN/user.json index 7f20a3f..0b78bd4 100644 --- a/web/apps/web-ele/src/locales/langs/zh-CN/user.json +++ b/web/apps/web-ele/src/locales/langs/zh-CN/user.json @@ -51,7 +51,6 @@ "resetPasswordConfirm": "确定要重置用户{0}的密码吗?\n密码将重置为:admin123", "resetPasswordSuccess": "用户{0}的密码重置成功", "resetPasswordError": "重置密码失败", - "accountSettings": "账号设置", "basicInfo": "基本信息", "changePassword": "修改密码", "oldPassword": "当前密码", diff --git a/web/apps/web-ele/src/locales/langs/zh-TW/account-settings.json b/web/apps/web-ele/src/locales/langs/zh-TW/account-settings.json deleted file mode 100644 index 4939a76..0000000 --- a/web/apps/web-ele/src/locales/langs/zh-TW/account-settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "passwordLengthHint": "密碼長度為 6-20 個字符" -} diff --git a/web/apps/web-ele/src/locales/langs/zh-TW/apiToken.json b/web/apps/web-ele/src/locales/langs/zh-TW/apiToken.json deleted file mode 100644 index 191e4a0..0000000 --- a/web/apps/web-ele/src/locales/langs/zh-TW/apiToken.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "title": "API Token", - "deviceManagement": "設備管理", - "description": "API Token 可用於通過 API 訪問系統資源,請妥善保管你的令牌。", - "createToken": "建立令牌", - "tokenName": "令牌名稱", - "tokenNamePlaceholder": "請輸入令牌名稱,例如:CI/CD 部署", - "expirationDate": "過期時間", - "neverExpiresHint": "不選擇則永不過期", - "tokenDescription": "描述", - "tokenDescriptionPlaceholder": "可選,描述該令牌的用途", - "neverExpires": "永不過期", - "expired": "已過期", - "expiresSoon": "{0} 天後過期", - "createdAt": "建立時間", - "lastUsed": "最後使用", - "revokeToken": "撤銷令牌", - "revokeTitle": "撤銷令牌", - "revokeConfirm": "確定要撤銷令牌「{0}」嗎?撤銷後將無法恢復。", - "confirmRevoke": "確定撤銷", - "revokeSuccess": "令牌已撤銷", - "tokenCreated": "令牌建立成功", - "tokenWarning": "請立即複製你的令牌,此令牌僅顯示一次,關閉後將無法再次查看。", - "copy": "複製", - "copied": "已複製", - "copySuccess": "令牌已複製到剪貼簿", - "copyError": "複製失敗,請手動複製", - "empty": "暫無 API Token,點擊「建立令牌」生成你的第一個令牌", - "nameRequired": "請輸入令牌名稱", - "loadError": "載入令牌列表失敗", - "createError": "建立令牌失敗", - "days7": "7 天", - "days30": "30 天", - "days60": "60 天", - "days90": "90 天", - "days365": "1 年" -} diff --git a/web/apps/web-ele/src/locales/langs/zh-TW/menu-title.json b/web/apps/web-ele/src/locales/langs/zh-TW/menu-title.json index 0ff915b..3d8915c 100644 --- a/web/apps/web-ele/src/locales/langs/zh-TW/menu-title.json +++ b/web/apps/web-ele/src/locales/langs/zh-TW/menu-title.json @@ -12,7 +12,6 @@ "roleManagement": "角色權限", "userCenter": "用戶中心", "loginLog": "登錄日誌", - "accountSettings": "賬號設置", "databaseManagement": "數據庫管理", "dbManagement": "DB管理", "databaseConnection": "資料庫連接", diff --git a/web/apps/web-ele/src/locales/langs/zh-TW/user.json b/web/apps/web-ele/src/locales/langs/zh-TW/user.json index 112dd51..d1dc452 100644 --- a/web/apps/web-ele/src/locales/langs/zh-TW/user.json +++ b/web/apps/web-ele/src/locales/langs/zh-TW/user.json @@ -51,7 +51,6 @@ "resetPasswordConfirm": "確定要重置用戶 \"{0}\" 的密碼嗎?\n密碼將重置為:admin123", "resetPasswordSuccess": "用戶 \"{0}\" 的密碼重置成功", "resetPasswordError": "重置密碼失敗", - "accountSettings": "賬號設置", "basicInfo": "基本信息", "changePassword": "修改密碼", "oldPassword": "當前密碼", diff --git a/web/apps/web-ele/src/views/_core/account-settings/api-token-management.vue b/web/apps/web-ele/src/views/_core/account-settings/api-token-management.vue deleted file mode 100644 index cd7072d..0000000 --- a/web/apps/web-ele/src/views/_core/account-settings/api-token-management.vue +++ /dev/null @@ -1,330 +0,0 @@ - - - diff --git a/web/apps/web-ele/src/views/_core/account-settings/data.ts b/web/apps/web-ele/src/views/_core/account-settings/data.ts deleted file mode 100644 index 5886178..0000000 --- a/web/apps/web-ele/src/views/_core/account-settings/data.ts +++ /dev/null @@ -1,165 +0,0 @@ -import type { VbenFormSchema } from '#/adapter/form'; - -import { $t } from '@vben/locales'; - -import { z } from '#/adapter/form'; - -/** - * 获取性别选项 - */ -export function getGenderOptions() { - return [ - { label: $t('user.unknown'), value: 0 }, - { label: $t('user.male'), value: 1 }, - { label: $t('user.female'), value: 2 }, - ]; -} - -/** - * 获取基本信息表单配置 - */ -export function getProfileFormSchema(): VbenFormSchema[] { - return [ - { - component: 'Input', - fieldName: 'name', - label: $t('user.userName'), - rules: z - .string() - .min(2, $t('ui.formRules.minLength', [$t('user.userName'), 2])) - .max(64, $t('ui.formRules.maxLength', [$t('user.userName'), 64])) - .optional() - .or(z.literal('')), - }, - { - component: 'ImageSelector', - componentProps: { - enableCrop: true, - cropShape: 'circle', - maxSize: 2, - placeholder: $t('user.selectAvatar'), - }, - fieldName: 'avatar', - label: $t('user.avatar'), - help: $t('user.avatarHelp'), - }, - { - component: 'Input', - fieldName: 'email', - label: $t('user.email'), - rules: z - .string() - .email($t('user.emailFormatError')) - .max(255, $t('ui.formRules.maxLength', [$t('user.email'), 255])) - .optional() - .or(z.literal('')), - }, - { - component: 'Input', - fieldName: 'mobile', - label: $t('user.mobile'), - rules: z - .string() - .regex(/^1[3-9]\d{9}$/, $t('user.mobileFormatError')) - .optional() - .or(z.literal('')), - }, - { - component: 'RadioGroup', - componentProps: { - buttonStyle: 'solid', - options: getGenderOptions(), - isButton: true, - }, - defaultValue: 0, - fieldName: 'gender', - label: $t('user.gender'), - }, - { - component: 'DatePicker', - componentProps: { - placeholder: $t('user.selectBirthday'), - valueFormat: 'YYYY-MM-DD', - }, - fieldName: 'birthday', - label: $t('user.birthday'), - }, - { - component: 'Input', - fieldName: 'city', - label: $t('user.city'), - rules: z - .string() - .max(100, $t('ui.formRules.maxLength', [$t('user.city'), 100])) - .optional() - .or(z.literal('')), - }, - { - component: 'Input', - fieldName: 'address', - label: $t('user.address'), - rules: z - .string() - .max(200, $t('ui.formRules.maxLength', [$t('user.address'), 200])) - .optional() - .or(z.literal('')), - }, - { - component: 'Textarea', - componentProps: { - placeholder: $t('user.bioPlaceholder'), - rows: 3, - }, - fieldName: 'bio', - label: $t('user.bio'), - }, - ]; -} - -/** - * 获取密码修改表单配置 - */ -export function getPasswordFormSchema(): VbenFormSchema[] { - return [ - { - component: 'Input', - componentProps: { - type: 'password', - showPassword: true, - placeholder: $t('user.oldPasswordPlaceholder'), - }, - fieldName: 'old_password', - label: $t('user.oldPassword'), - rules: z - .string() - .min(1, $t('ui.formRules.required', [$t('user.oldPassword')])), - }, - { - component: 'Input', - componentProps: { - type: 'password', - showPassword: true, - placeholder: $t('user.newPasswordPlaceholder'), - }, - fieldName: 'new_password', - label: $t('user.newPassword'), - rules: z - .string() - .min(6, $t('ui.formRules.minLength', [$t('user.newPassword'), 6])) - .max(20, $t('ui.formRules.maxLength', [$t('user.newPassword'), 20])), - }, - { - component: 'Input', - componentProps: { - type: 'password', - showPassword: true, - placeholder: $t('user.confirmPasswordPlaceholder'), - }, - fieldName: 'confirm_password', - label: $t('user.confirmPassword'), - rules: z - .string() - .min(1, $t('ui.formRules.required', [$t('user.confirmPassword')])), - }, - ]; -} diff --git a/web/apps/web-ele/src/views/_core/account-settings/device-item.vue b/web/apps/web-ele/src/views/_core/account-settings/device-item.vue deleted file mode 100644 index 5973798..0000000 --- a/web/apps/web-ele/src/views/_core/account-settings/device-item.vue +++ /dev/null @@ -1,137 +0,0 @@ - - - - - diff --git a/web/apps/web-ele/src/views/_core/account-settings/device-management.vue b/web/apps/web-ele/src/views/_core/account-settings/device-management.vue deleted file mode 100644 index 571d579..0000000 --- a/web/apps/web-ele/src/views/_core/account-settings/device-management.vue +++ /dev/null @@ -1,229 +0,0 @@ - - - - - diff --git a/web/apps/web-ele/src/views/_core/account-settings/index.vue b/web/apps/web-ele/src/views/_core/account-settings/index.vue deleted file mode 100644 index 2eb2fb2..0000000 --- a/web/apps/web-ele/src/views/_core/account-settings/index.vue +++ /dev/null @@ -1,184 +0,0 @@ - - - - - diff --git a/web/apps/web-ele/src/views/_core/account-settings/modules/password-form.vue b/web/apps/web-ele/src/views/_core/account-settings/modules/password-form.vue deleted file mode 100644 index 61dc6f2..0000000 --- a/web/apps/web-ele/src/views/_core/account-settings/modules/password-form.vue +++ /dev/null @@ -1,168 +0,0 @@ - - - diff --git a/web/apps/web-ele/src/views/_core/account-settings/modules/profile-form.vue b/web/apps/web-ele/src/views/_core/account-settings/modules/profile-form.vue deleted file mode 100644 index c379ebc..0000000 --- a/web/apps/web-ele/src/views/_core/account-settings/modules/profile-form.vue +++ /dev/null @@ -1,293 +0,0 @@ - - -