From 0193a408c70643bda9dba872a0f140af76e6723c Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 20 Dec 2025 22:13:42 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E3=80=90system=E3=80=91=E3=80=90i?= =?UTF-8?q?nfra=E3=80=91=E6=96=B0=E5=A2=9E=E7=A7=9F=E6=88=B7=E3=80=81?= =?UTF-8?q?=E7=A7=9F=E6=88=B7=E5=A5=97=E9=A4=90=E3=80=81=E7=A4=BE=E4=BA=A4?= =?UTF-8?q?=E3=80=81OAuth2=E3=80=81=E5=8F=82=E6=95=B0=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E3=80=81=E6=95=B0=E6=8D=AE=E6=BA=90=E9=85=8D=E7=BD=AE=E7=AD=89?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E9=A1=B5=E9=9D=A2=E5=8F=8A=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=20API=20=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/infra/config/index.ts | 45 ++++ src/api/infra/data-source-config/index.ts | 36 +++ src/api/system/oauth2/client/index.ts | 48 ++++ src/api/system/oauth2/token/index.ts | 24 ++ src/api/system/social/client/index.ts | 41 ++++ src/api/system/social/user/index.ts | 28 +++ src/api/system/tenant-package/index.ts | 42 ++++ src/api/system/tenant/index.ts | 46 ++++ .../config/components/search-form.vue | 169 ++++++++++++++ src/pages-infra/config/detail/index.vue | 133 +++++++++++ src/pages-infra/config/form/index.vue | 166 ++++++++++++++ src/pages-infra/config/index.vue | 171 ++++++++++++++ .../data-source-config/detail/index.vue | 124 ++++++++++ .../data-source-config/form/index.vue | 68 ++++++ src/pages-infra/data-source-config/index.vue | 122 ++++++++++ .../oauth2/client/detail/index.vue | 133 +++++++++++ src/pages-system/oauth2/client/form/index.vue | 187 +++++++++++++++ .../oauth2/components/client-list.vue | 147 ++++++++++++ .../oauth2/components/client-search-form.vue | 94 ++++++++ .../oauth2/components/token-list.vue | 155 +++++++++++++ .../oauth2/components/token-search-form.vue | 110 +++++++++ src/pages-system/oauth2/index.vue | 53 +++++ .../social/client/detail/index.vue | 135 +++++++++++ src/pages-system/social/client/form/index.vue | 181 +++++++++++++++ .../social/components/client-list.vue | 143 ++++++++++++ .../social/components/client-search-form.vue | 140 ++++++++++++ .../social/components/user-list.vue | 121 ++++++++++ .../social/components/user-search-form.vue | 110 +++++++++ src/pages-system/social/index.vue | 53 +++++ src/pages-system/social/user/detail/index.vue | 81 +++++++ .../tenant/components/package-list.vue | 139 ++++++++++++ .../tenant/components/package-search-form.vue | 153 +++++++++++++ .../tenant/components/tenant-list.vue | 147 ++++++++++++ .../tenant/components/tenant-search-form.vue | 185 +++++++++++++++ src/pages-system/tenant/index.vue | 53 +++++ .../tenant/package/detail/index.vue | 127 +++++++++++ .../tenant/package/form/index.vue | 139 ++++++++++++ .../tenant/tenant/detail/index.vue | 150 +++++++++++++ src/pages-system/tenant/tenant/form/index.vue | 212 ++++++++++++++++++ 39 files changed, 4411 insertions(+) create mode 100644 src/api/infra/config/index.ts create mode 100644 src/api/infra/data-source-config/index.ts create mode 100644 src/api/system/oauth2/client/index.ts create mode 100644 src/api/system/oauth2/token/index.ts create mode 100644 src/api/system/social/client/index.ts create mode 100644 src/api/system/social/user/index.ts create mode 100644 src/api/system/tenant-package/index.ts create mode 100644 src/api/system/tenant/index.ts create mode 100644 src/pages-infra/config/components/search-form.vue create mode 100644 src/pages-infra/config/detail/index.vue create mode 100644 src/pages-infra/config/form/index.vue create mode 100644 src/pages-infra/config/index.vue create mode 100644 src/pages-infra/data-source-config/detail/index.vue create mode 100644 src/pages-infra/data-source-config/form/index.vue create mode 100644 src/pages-infra/data-source-config/index.vue create mode 100644 src/pages-system/oauth2/client/detail/index.vue create mode 100644 src/pages-system/oauth2/client/form/index.vue create mode 100644 src/pages-system/oauth2/components/client-list.vue create mode 100644 src/pages-system/oauth2/components/client-search-form.vue create mode 100644 src/pages-system/oauth2/components/token-list.vue create mode 100644 src/pages-system/oauth2/components/token-search-form.vue create mode 100644 src/pages-system/oauth2/index.vue create mode 100644 src/pages-system/social/client/detail/index.vue create mode 100644 src/pages-system/social/client/form/index.vue create mode 100644 src/pages-system/social/components/client-list.vue create mode 100644 src/pages-system/social/components/client-search-form.vue create mode 100644 src/pages-system/social/components/user-list.vue create mode 100644 src/pages-system/social/components/user-search-form.vue create mode 100644 src/pages-system/social/index.vue create mode 100644 src/pages-system/social/user/detail/index.vue create mode 100644 src/pages-system/tenant/components/package-list.vue create mode 100644 src/pages-system/tenant/components/package-search-form.vue create mode 100644 src/pages-system/tenant/components/tenant-list.vue create mode 100644 src/pages-system/tenant/components/tenant-search-form.vue create mode 100644 src/pages-system/tenant/index.vue create mode 100644 src/pages-system/tenant/package/detail/index.vue create mode 100644 src/pages-system/tenant/package/form/index.vue create mode 100644 src/pages-system/tenant/tenant/detail/index.vue create mode 100644 src/pages-system/tenant/tenant/form/index.vue diff --git a/src/api/infra/config/index.ts b/src/api/infra/config/index.ts new file mode 100644 index 0000000..159708d --- /dev/null +++ b/src/api/infra/config/index.ts @@ -0,0 +1,45 @@ +import type { PageParam, PageResult } from '@/http/types' +import { http } from '@/http/http' + +/** 参数配置信息 */ +export interface Config { + id?: number + category: string + name: string + key: string + value: string + type: number + visible: boolean + remark: string + createTime?: Date +} + +/** 获取参数配置分页列表 */ +export function getConfigPage(params: PageParam) { + return http.get>('/infra/config/page', params) +} + +/** 获取参数配置详情 */ +export function getConfig(id: number) { + return http.get(`/infra/config/get?id=${id}`) +} + +/** 根据参数键名查询参数值 */ +export function getConfigKey(configKey: string) { + return http.get(`/infra/config/get-value-by-key?key=${configKey}`) +} + +/** 创建参数配置 */ +export function createConfig(data: Config) { + return http.post('/infra/config/create', data) +} + +/** 更新参数配置 */ +export function updateConfig(data: Config) { + return http.put('/infra/config/update', data) +} + +/** 删除参数配置 */ +export function deleteConfig(id: number) { + return http.delete(`/infra/config/delete?id=${id}`) +} diff --git a/src/api/infra/data-source-config/index.ts b/src/api/infra/data-source-config/index.ts new file mode 100644 index 0000000..eca2eb5 --- /dev/null +++ b/src/api/infra/data-source-config/index.ts @@ -0,0 +1,36 @@ +import { http } from '@/http/http' + +/** 数据源配置信息 */ +export interface DataSourceConfig { + id?: number + name: string + url: string + username: string + password: string + createTime?: Date +} + +/** 获取数据源配置列表(无分页) */ +export function getDataSourceConfigList() { + return http.get('/infra/data-source-config/list') +} + +/** 获取数据源配置详情 */ +export function getDataSourceConfig(id: number) { + return http.get(`/infra/data-source-config/get?id=${id}`) +} + +/** 创建数据源配置 */ +export function createDataSourceConfig(data: DataSourceConfig) { + return http.post('/infra/data-source-config/create', data) +} + +/** 更新数据源配置 */ +export function updateDataSourceConfig(data: DataSourceConfig) { + return http.put('/infra/data-source-config/update', data) +} + +/** 删除数据源配置 */ +export function deleteDataSourceConfig(id: number) { + return http.delete(`/infra/data-source-config/delete?id=${id}`) +} diff --git a/src/api/system/oauth2/client/index.ts b/src/api/system/oauth2/client/index.ts new file mode 100644 index 0000000..af6945e --- /dev/null +++ b/src/api/system/oauth2/client/index.ts @@ -0,0 +1,48 @@ +import type { PageParam, PageResult } from '@/http/types' +import { http } from '@/http/http' + +/** OAuth2.0 客户端信息 */ +export interface OAuth2Client { + id?: number + clientId: string + secret: string + name: string + logo: string + description: string + status: number + accessTokenValiditySeconds: number + refreshTokenValiditySeconds: number + redirectUris: string[] + autoApprove: boolean + authorizedGrantTypes: string[] + scopes: string[] + authorities: string[] + resourceIds: string[] + additionalInformation: string + createTime?: Date +} + +/** 获取 OAuth2.0 客户端分页列表 */ +export function getOAuth2ClientPage(params: PageParam) { + return http.get>('/system/oauth2-client/page', params) +} + +/** 获取 OAuth2.0 客户端详情 */ +export function getOAuth2Client(id: number) { + return http.get(`/system/oauth2-client/get?id=${id}`) +} + +/** 创建 OAuth2.0 客户端 */ +export function createOAuth2Client(data: OAuth2Client) { + return http.post('/system/oauth2-client/create', data) +} + +/** 更新 OAuth2.0 客户端 */ +export function updateOAuth2Client(data: OAuth2Client) { + return http.put('/system/oauth2-client/update', data) +} + +/** 删除 OAuth2.0 客户端 */ +export function deleteOAuth2Client(id: number) { + return http.delete(`/system/oauth2-client/delete?id=${id}`) +} diff --git a/src/api/system/oauth2/token/index.ts b/src/api/system/oauth2/token/index.ts new file mode 100644 index 0000000..9b67bcb --- /dev/null +++ b/src/api/system/oauth2/token/index.ts @@ -0,0 +1,24 @@ +import type { PageParam, PageResult } from '@/http/types' +import { http } from '@/http/http' + +/** OAuth2.0 令牌信息 */ +export interface OAuth2Token { + id?: number + accessToken: string + refreshToken: string + userId: number + userType: number + clientId: string + createTime?: Date + expiresTime?: Date +} + +/** 获取 OAuth2.0 令牌分页列表 */ +export function getOAuth2TokenPage(params: PageParam) { + return http.get>('/system/oauth2-token/page', params) +} + +/** 删除 OAuth2.0 令牌 */ +export function deleteOAuth2Token(accessToken: string) { + return http.delete(`/system/oauth2-token/delete?accessToken=${accessToken}`) +} diff --git a/src/api/system/social/client/index.ts b/src/api/system/social/client/index.ts new file mode 100644 index 0000000..3f9721a --- /dev/null +++ b/src/api/system/social/client/index.ts @@ -0,0 +1,41 @@ +import type { PageParam, PageResult } from '@/http/types' +import { http } from '@/http/http' + +/** 社交客户端信息 */ +export interface SocialClient { + id?: number + name: string + socialType: number + userType: number + clientId: string + clientSecret: string + agentId?: string + publicKey?: string + status: number + createTime?: Date +} + +/** 获取社交客户端分页列表 */ +export function getSocialClientPage(params: PageParam) { + return http.get>('/system/social-client/page', params) +} + +/** 获取社交客户端详情 */ +export function getSocialClient(id: number) { + return http.get(`/system/social-client/get?id=${id}`) +} + +/** 创建社交客户端 */ +export function createSocialClient(data: SocialClient) { + return http.post('/system/social-client/create', data) +} + +/** 更新社交客户端 */ +export function updateSocialClient(data: SocialClient) { + return http.put('/system/social-client/update', data) +} + +/** 删除社交客户端 */ +export function deleteSocialClient(id: number) { + return http.delete(`/system/social-client/delete?id=${id}`) +} diff --git a/src/api/system/social/user/index.ts b/src/api/system/social/user/index.ts new file mode 100644 index 0000000..ae6999f --- /dev/null +++ b/src/api/system/social/user/index.ts @@ -0,0 +1,28 @@ +import type { PageParam, PageResult } from '@/http/types' +import { http } from '@/http/http' + +/** 社交用户信息 */ +export interface SocialUser { + id?: number + type: number + openid: string + token: string + rawTokenInfo: string + nickname: string + avatar: string + rawUserInfo: string + code: string + state: string + createTime?: Date + updateTime?: Date +} + +/** 获取社交用户分页列表 */ +export function getSocialUserPage(params: PageParam) { + return http.get>('/system/social-user/page', params) +} + +/** 获取社交用户详情 */ +export function getSocialUser(id: number) { + return http.get(`/system/social-user/get?id=${id}`) +} diff --git a/src/api/system/tenant-package/index.ts b/src/api/system/tenant-package/index.ts new file mode 100644 index 0000000..aa0ddc4 --- /dev/null +++ b/src/api/system/tenant-package/index.ts @@ -0,0 +1,42 @@ +import type { PageParam, PageResult } from '@/http/types' +import { http } from '@/http/http' + +/** 租户套餐信息 */ +export interface TenantPackage { + id?: number + name: string + status: number + remark: string + menuIds: number[] + createTime?: Date +} + +/** 获取租户套餐分页列表 */ +export function getTenantPackagePage(params: PageParam) { + return http.get>('/system/tenant-package/page', params) +} + +/** 获取租户套餐精简信息列表 */ +export function getTenantPackageList() { + return http.get('/system/tenant-package/get-simple-list') +} + +/** 获取租户套餐详情 */ +export function getTenantPackage(id: number) { + return http.get(`/system/tenant-package/get?id=${id}`) +} + +/** 创建租户套餐 */ +export function createTenantPackage(data: TenantPackage) { + return http.post('/system/tenant-package/create', data) +} + +/** 更新租户套餐 */ +export function updateTenantPackage(data: TenantPackage) { + return http.put('/system/tenant-package/update', data) +} + +/** 删除租户套餐 */ +export function deleteTenantPackage(id: number) { + return http.delete(`/system/tenant-package/delete?id=${id}`) +} diff --git a/src/api/system/tenant/index.ts b/src/api/system/tenant/index.ts new file mode 100644 index 0000000..82c5348 --- /dev/null +++ b/src/api/system/tenant/index.ts @@ -0,0 +1,46 @@ +import type { PageParam, PageResult } from '@/http/types' +import { http } from '@/http/http' + +/** 租户信息 */ +export interface Tenant { + id?: number + name: string + packageId: number + contactName: string + contactMobile: string + accountCount: number + expireTime: Date + websites: string[] + status: number + createTime?: Date +} + +/** 获取租户分页列表 */ +export function getTenantPage(params: PageParam) { + return http.get>('/system/tenant/page', params) +} + +/** 获取租户精简信息列表 */ +export function getSimpleTenantList() { + return http.get('/system/tenant/simple-list') +} + +/** 获取租户详情 */ +export function getTenant(id: number) { + return http.get(`/system/tenant/get?id=${id}`) +} + +/** 创建租户 */ +export function createTenant(data: Tenant) { + return http.post('/system/tenant/create', data) +} + +/** 更新租户 */ +export function updateTenant(data: Tenant) { + return http.put('/system/tenant/update', data) +} + +/** 删除租户 */ +export function deleteTenant(id: number) { + return http.delete(`/system/tenant/delete?id=${id}`) +} diff --git a/src/pages-infra/config/components/search-form.vue b/src/pages-infra/config/components/search-form.vue new file mode 100644 index 0000000..fa3c4f8 --- /dev/null +++ b/src/pages-infra/config/components/search-form.vue @@ -0,0 +1,169 @@ + + + diff --git a/src/pages-infra/config/detail/index.vue b/src/pages-infra/config/detail/index.vue new file mode 100644 index 0000000..27743d5 --- /dev/null +++ b/src/pages-infra/config/detail/index.vue @@ -0,0 +1,133 @@ + + + + + diff --git a/src/pages-infra/config/form/index.vue b/src/pages-infra/config/form/index.vue new file mode 100644 index 0000000..011cfa5 --- /dev/null +++ b/src/pages-infra/config/form/index.vue @@ -0,0 +1,166 @@ + + + + + diff --git a/src/pages-infra/config/index.vue b/src/pages-infra/config/index.vue new file mode 100644 index 0000000..197bf6d --- /dev/null +++ b/src/pages-infra/config/index.vue @@ -0,0 +1,171 @@ + + + + + diff --git a/src/pages-infra/data-source-config/detail/index.vue b/src/pages-infra/data-source-config/detail/index.vue new file mode 100644 index 0000000..760cfcf --- /dev/null +++ b/src/pages-infra/data-source-config/detail/index.vue @@ -0,0 +1,124 @@ + + + + + diff --git a/src/pages-infra/data-source-config/form/index.vue b/src/pages-infra/data-source-config/form/index.vue new file mode 100644 index 0000000..94561d3 --- /dev/null +++ b/src/pages-infra/data-source-config/form/index.vue @@ -0,0 +1,68 @@ + + + + + diff --git a/src/pages-system/oauth2/client/detail/index.vue b/src/pages-system/oauth2/client/detail/index.vue new file mode 100644 index 0000000..d382b2b --- /dev/null +++ b/src/pages-system/oauth2/client/detail/index.vue @@ -0,0 +1,133 @@ + + + + + diff --git a/src/pages-system/oauth2/client/form/index.vue b/src/pages-system/oauth2/client/form/index.vue new file mode 100644 index 0000000..de1aeb9 --- /dev/null +++ b/src/pages-system/oauth2/client/form/index.vue @@ -0,0 +1,187 @@ + + + + + diff --git a/src/pages-system/oauth2/components/client-list.vue b/src/pages-system/oauth2/components/client-list.vue new file mode 100644 index 0000000..73b2cd6 --- /dev/null +++ b/src/pages-system/oauth2/components/client-list.vue @@ -0,0 +1,147 @@ + + + diff --git a/src/pages-system/oauth2/components/client-search-form.vue b/src/pages-system/oauth2/components/client-search-form.vue new file mode 100644 index 0000000..8d480a0 --- /dev/null +++ b/src/pages-system/oauth2/components/client-search-form.vue @@ -0,0 +1,94 @@ + + + diff --git a/src/pages-system/oauth2/components/token-list.vue b/src/pages-system/oauth2/components/token-list.vue new file mode 100644 index 0000000..57387f2 --- /dev/null +++ b/src/pages-system/oauth2/components/token-list.vue @@ -0,0 +1,155 @@ + + + diff --git a/src/pages-system/oauth2/components/token-search-form.vue b/src/pages-system/oauth2/components/token-search-form.vue new file mode 100644 index 0000000..64312a5 --- /dev/null +++ b/src/pages-system/oauth2/components/token-search-form.vue @@ -0,0 +1,110 @@ + + + diff --git a/src/pages-system/oauth2/index.vue b/src/pages-system/oauth2/index.vue new file mode 100644 index 0000000..eb98afd --- /dev/null +++ b/src/pages-system/oauth2/index.vue @@ -0,0 +1,53 @@ + + + + + diff --git a/src/pages-system/social/client/detail/index.vue b/src/pages-system/social/client/detail/index.vue new file mode 100644 index 0000000..f30b905 --- /dev/null +++ b/src/pages-system/social/client/detail/index.vue @@ -0,0 +1,135 @@ + + + + + diff --git a/src/pages-system/social/client/form/index.vue b/src/pages-system/social/client/form/index.vue new file mode 100644 index 0000000..bf0f15c --- /dev/null +++ b/src/pages-system/social/client/form/index.vue @@ -0,0 +1,181 @@ + + + + + diff --git a/src/pages-system/social/components/client-list.vue b/src/pages-system/social/components/client-list.vue new file mode 100644 index 0000000..8b23cfe --- /dev/null +++ b/src/pages-system/social/components/client-list.vue @@ -0,0 +1,143 @@ + + + diff --git a/src/pages-system/social/components/client-search-form.vue b/src/pages-system/social/components/client-search-form.vue new file mode 100644 index 0000000..19365be --- /dev/null +++ b/src/pages-system/social/components/client-search-form.vue @@ -0,0 +1,140 @@ + + + diff --git a/src/pages-system/social/components/user-list.vue b/src/pages-system/social/components/user-list.vue new file mode 100644 index 0000000..70b34c2 --- /dev/null +++ b/src/pages-system/social/components/user-list.vue @@ -0,0 +1,121 @@ + + + diff --git a/src/pages-system/social/components/user-search-form.vue b/src/pages-system/social/components/user-search-form.vue new file mode 100644 index 0000000..bbd5aab --- /dev/null +++ b/src/pages-system/social/components/user-search-form.vue @@ -0,0 +1,110 @@ + + + diff --git a/src/pages-system/social/index.vue b/src/pages-system/social/index.vue new file mode 100644 index 0000000..e2a5c5e --- /dev/null +++ b/src/pages-system/social/index.vue @@ -0,0 +1,53 @@ + + + + + diff --git a/src/pages-system/social/user/detail/index.vue b/src/pages-system/social/user/detail/index.vue new file mode 100644 index 0000000..7f4a156 --- /dev/null +++ b/src/pages-system/social/user/detail/index.vue @@ -0,0 +1,81 @@ + + + + + diff --git a/src/pages-system/tenant/components/package-list.vue b/src/pages-system/tenant/components/package-list.vue new file mode 100644 index 0000000..e63a2f3 --- /dev/null +++ b/src/pages-system/tenant/components/package-list.vue @@ -0,0 +1,139 @@ + + + diff --git a/src/pages-system/tenant/components/package-search-form.vue b/src/pages-system/tenant/components/package-search-form.vue new file mode 100644 index 0000000..fe96a3c --- /dev/null +++ b/src/pages-system/tenant/components/package-search-form.vue @@ -0,0 +1,153 @@ + + + diff --git a/src/pages-system/tenant/components/tenant-list.vue b/src/pages-system/tenant/components/tenant-list.vue new file mode 100644 index 0000000..004d624 --- /dev/null +++ b/src/pages-system/tenant/components/tenant-list.vue @@ -0,0 +1,147 @@ + + + diff --git a/src/pages-system/tenant/components/tenant-search-form.vue b/src/pages-system/tenant/components/tenant-search-form.vue new file mode 100644 index 0000000..9cf9ca9 --- /dev/null +++ b/src/pages-system/tenant/components/tenant-search-form.vue @@ -0,0 +1,185 @@ + + + diff --git a/src/pages-system/tenant/index.vue b/src/pages-system/tenant/index.vue new file mode 100644 index 0000000..0991d23 --- /dev/null +++ b/src/pages-system/tenant/index.vue @@ -0,0 +1,53 @@ + + + + + diff --git a/src/pages-system/tenant/package/detail/index.vue b/src/pages-system/tenant/package/detail/index.vue new file mode 100644 index 0000000..7acae86 --- /dev/null +++ b/src/pages-system/tenant/package/detail/index.vue @@ -0,0 +1,127 @@ + + + + + diff --git a/src/pages-system/tenant/package/form/index.vue b/src/pages-system/tenant/package/form/index.vue new file mode 100644 index 0000000..dab99e2 --- /dev/null +++ b/src/pages-system/tenant/package/form/index.vue @@ -0,0 +1,139 @@ + + + + + diff --git a/src/pages-system/tenant/tenant/detail/index.vue b/src/pages-system/tenant/tenant/detail/index.vue new file mode 100644 index 0000000..8dfa9aa --- /dev/null +++ b/src/pages-system/tenant/tenant/detail/index.vue @@ -0,0 +1,150 @@ + + + + + diff --git a/src/pages-system/tenant/tenant/form/index.vue b/src/pages-system/tenant/tenant/form/index.vue new file mode 100644 index 0000000..5e9b06e --- /dev/null +++ b/src/pages-system/tenant/tenant/form/index.vue @@ -0,0 +1,212 @@ + + + + +