From df5765a46193415287550fd2b730384279d1f367 Mon Sep 17 00:00:00 2001 From: 15003752739 Date: Sun, 31 May 2026 17:57:25 +0800 Subject: [PATCH 1/4] =?UTF-8?q?feat(biz):=20=E6=96=B0=E5=A2=9E=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=B9=B3=E5=8F=B0=E5=92=8C=E6=8E=A5=E5=8F=A3=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E7=AE=A1=E7=90=86=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加平台管理API接口,支持平台的增删改查和状态切换 - 添加接口定义管理API接口,支持接口的增删改查和完整URL构建 - 实现平台管理页面,包含表单验证、数据列表展示和操作功能 - 实现接口定义管理页面,支持平台选择、URI拼接和积分配置 - 创建平台和定义相关的数据类型定义文件 - 集成权限控制和字典数据绑定功能 --- src/api/biz/definition/index.ts | 41 ++++ src/api/biz/definition/types.ts | 39 +++ src/api/biz/platform/index.ts | 63 +++++ src/api/biz/platform/types.ts | 42 ++++ src/views/biz/apiDefinition/index.vue | 332 ++++++++++++++++++++++++++ src/views/biz/platform/index.vue | 291 ++++++++++++++++++++++ 6 files changed, 808 insertions(+) create mode 100644 src/api/biz/definition/index.ts create mode 100644 src/api/biz/definition/types.ts create mode 100644 src/api/biz/platform/index.ts create mode 100644 src/api/biz/platform/types.ts create mode 100644 src/views/biz/apiDefinition/index.vue create mode 100644 src/views/biz/platform/index.vue diff --git a/src/api/biz/definition/index.ts b/src/api/biz/definition/index.ts new file mode 100644 index 00000000..7e06be18 --- /dev/null +++ b/src/api/biz/definition/index.ts @@ -0,0 +1,41 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { DefinitionForm, DefinitionQuery, DefinitionVO } from '@/api/biz/definition/types'; + +export function listDefinition(query?: DefinitionQuery): AxiosPromise { + return request({ + url: '/biz/definition/list', + method: 'get', + params: query + }); +} + +export function getDefinition(apiId: string | number): AxiosPromise { + return request({ + url: '/biz/definition/' + apiId, + method: 'get' + }); +} + +export function addDefinition(data: DefinitionForm) { + return request({ + url: '/biz/definition', + method: 'post', + data: data + }); +} + +export function updateDefinition(data: DefinitionForm) { + return request({ + url: '/biz/definition', + method: 'put', + data: data + }); +} + +export function delDefinition(apiId: string | number | Array) { + return request({ + url: '/biz/definition/' + apiId, + method: 'delete' + }); +} diff --git a/src/api/biz/definition/types.ts b/src/api/biz/definition/types.ts new file mode 100644 index 00000000..ac3b36ca --- /dev/null +++ b/src/api/biz/definition/types.ts @@ -0,0 +1,39 @@ +export interface DefinitionVO { + apiId: string | number; + platformId: string | number; + platformName: string; + baseUrl: string; + apiCode: string; + apiName: string; + apiUri: string; + fullUrl: string; + requestMethod: string; + pointsCost: number; + timeout: number; + contentType: string; + status: string; + remark: string; + createTime: string; +} + +export interface DefinitionForm extends BaseEntity { + apiId?: string | number; + platformId?: string | number; + apiCode?: string; + apiName?: string; + apiUri?: string; + requestMethod?: string; + pointsCost?: number; + timeout?: number; + contentType?: string; + status?: string; + remark?: string; +} + +export interface DefinitionQuery extends PageQuery { + platformId?: string | number; + apiCode?: string; + apiName?: string; + requestMethod?: string; + status?: string; +} diff --git a/src/api/biz/platform/index.ts b/src/api/biz/platform/index.ts new file mode 100644 index 00000000..75d85392 --- /dev/null +++ b/src/api/biz/platform/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { PlatformForm, PlatformOptionVO, PlatformQuery, PlatformVO } from '@/api/biz/platform/types'; + +export function listPlatform(query?: PlatformQuery): AxiosPromise { + return request({ + url: '/biz/platform/list', + method: 'get', + params: query + }); +} + +export function getPlatform(platformId: string | number): AxiosPromise { + return request({ + url: '/biz/platform/' + platformId, + method: 'get' + }); +} + +export function optionselectPlatform(): AxiosPromise { + return request({ + url: '/biz/platform/optionselect', + method: 'get' + }); +} + +export function addPlatform(data: PlatformForm) { + return request({ + url: '/biz/platform', + method: 'post', + data: data + }); +} + +export function updatePlatform(data: PlatformForm) { + return request({ + url: '/biz/platform', + method: 'put', + data: data + }); +} + +export function delPlatform(platformId: string | number | Array) { + return request({ + url: '/biz/platform/' + platformId, + method: 'delete' + }); +} + +export function changePlatformStatus(platformId: string | number, status: string) { + return request({ + url: '/biz/platform/changeStatus', + method: 'put', + data: { platformId, status } + }); +} + +export function resetPlatformSecret(platformId: string | number) { + return request({ + url: '/biz/platform/resetSecret/' + platformId, + method: 'put' + }); +} diff --git a/src/api/biz/platform/types.ts b/src/api/biz/platform/types.ts new file mode 100644 index 00000000..89234ec0 --- /dev/null +++ b/src/api/biz/platform/types.ts @@ -0,0 +1,42 @@ +export interface PlatformVO { + platformId: string | number; + platformCode: string; + platformName: string; + baseUrl: string; + appKey: string; + appSecret: string; + token: string; + tokenExpireTime: string; + authType: string; + status: string; + remark: string; + createTime: string; +} + +export interface PlatformOptionVO { + platformId: string | number; + platformCode: string; + platformName: string; + baseUrl: string; +} + +export interface PlatformForm extends BaseEntity { + platformId?: string | number; + platformCode?: string; + platformName?: string; + baseUrl?: string; + appKey?: string; + appSecret?: string; + token?: string; + tokenExpireTime?: string; + authType?: string; + status?: string; + remark?: string; +} + +export interface PlatformQuery extends PageQuery { + platformCode?: string; + platformName?: string; + authType?: string; + status?: string; +} diff --git a/src/views/biz/apiDefinition/index.vue b/src/views/biz/apiDefinition/index.vue new file mode 100644 index 00000000..1365aa4e --- /dev/null +++ b/src/views/biz/apiDefinition/index.vue @@ -0,0 +1,332 @@ + + + diff --git a/src/views/biz/platform/index.vue b/src/views/biz/platform/index.vue new file mode 100644 index 00000000..8ba55dd4 --- /dev/null +++ b/src/views/biz/platform/index.vue @@ -0,0 +1,291 @@ + + + From 96c80447fb06dd82bf9739f3948c32b5988bcdd9 Mon Sep 17 00:00:00 2001 From: 15003752739 Date: Sun, 31 May 2026 22:03:31 +0800 Subject: [PATCH 2/4] =?UTF-8?q?feat(biz):=20=E6=96=B0=E5=A2=9E=E8=B0=83?= =?UTF-8?q?=E7=94=A8=E8=AE=B0=E5=BD=95=E7=AE=A1=E7=90=86=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 创建了调用记录相关的API接口定义 - 实现了调用记录列表查询、详情查看等功能 - 添加了按平台编码、接口编码、用户名等条件的搜索过滤 - 集成了日期范围选择器支持时间段筛选 - 实现了调用记录详情弹窗展示功能 - 添加了请求参数JSON格式化显示 - 集成了导出功能支持数据导出为Excel文件 - 实现了分页功能和表格数据加载展示 --- src/api/biz/invokeRecord/index.ts | 18 +++ src/api/biz/invokeRecord/types.ts | 25 ++++ src/views/biz/invokeRecord/index.vue | 177 +++++++++++++++++++++++++++ 3 files changed, 220 insertions(+) create mode 100644 src/api/biz/invokeRecord/index.ts create mode 100644 src/api/biz/invokeRecord/types.ts create mode 100644 src/views/biz/invokeRecord/index.vue diff --git a/src/api/biz/invokeRecord/index.ts b/src/api/biz/invokeRecord/index.ts new file mode 100644 index 00000000..4fec624f --- /dev/null +++ b/src/api/biz/invokeRecord/index.ts @@ -0,0 +1,18 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { InvokeRecordQuery, InvokeRecordVO } from '@/api/biz/invokeRecord/types'; + +export function listInvokeRecord(query?: InvokeRecordQuery): AxiosPromise { + return request({ + url: '/biz/invokeRecord/list', + method: 'get', + params: query + }); +} + +export function getInvokeRecord(recordId: string | number): AxiosPromise { + return request({ + url: '/biz/invokeRecord/' + recordId, + method: 'get' + }); +} diff --git a/src/api/biz/invokeRecord/types.ts b/src/api/biz/invokeRecord/types.ts new file mode 100644 index 00000000..ab128cbd --- /dev/null +++ b/src/api/biz/invokeRecord/types.ts @@ -0,0 +1,25 @@ +export interface InvokeRecordVO { + recordId: string | number; + tenantId?: string; + platformCode: string; + platformName: string; + apiCode: string; + apiName: string; + userName: string; + requestTime: string; + requestMethod: string; + pointsCost: number; + bizCode: number; + httpStatus: number; + elapsedMs: number; + requestParams?: string; + requestUrl?: string; +} + +export interface InvokeRecordQuery extends PageQuery { + platformCode?: string; + apiCode?: string; + userName?: string; + beginRequestTime?: string; + endRequestTime?: string; +} diff --git a/src/views/biz/invokeRecord/index.vue b/src/views/biz/invokeRecord/index.vue new file mode 100644 index 00000000..475d5ad7 --- /dev/null +++ b/src/views/biz/invokeRecord/index.vue @@ -0,0 +1,177 @@ + + + + + From 06bd77bc60c2fba8c7a08ba3658d19c44c641cb2 Mon Sep 17 00:00:00 2001 From: 15003752739 Date: Wed, 3 Jun 2026 22:21:54 +0800 Subject: [PATCH 3/4] =?UTF-8?q?feat(biz):=20=E6=B7=BB=E5=8A=A0=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=B5=8B=E8=AF=95=E9=A1=B5=E9=9D=A2=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E8=A7=86=E9=A2=91=E6=90=9C=E7=B4=A2=E5=92=8C=E8=AF=84=E8=AE=BA?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 fetchVideoSearchV2 和 fetchVideoComments API 接口 - 实现接口测试页面,支持 JSON 参数输入和响应结果显示 - 集成视频搜索和视频评论两种测试方法 - 添加参数验证、示例填充和结果清空功能 - 实现接口调用耗时统计和落库结果展示 - 集成权限控制和错误处理机制 --- src/api/biz/apiTest/index.ts | 23 ++++ src/views/biz/apiTest/index.vue | 192 ++++++++++++++++++++++++++++++++ 2 files changed, 215 insertions(+) create mode 100644 src/api/biz/apiTest/index.ts create mode 100644 src/views/biz/apiTest/index.vue diff --git a/src/api/biz/apiTest/index.ts b/src/api/biz/apiTest/index.ts new file mode 100644 index 00000000..c0429de8 --- /dev/null +++ b/src/api/biz/apiTest/index.ts @@ -0,0 +1,23 @@ +import request from '@/utils/request'; + +/** + * 测试 fetchVideoSearchV2 + */ +export const fetchVideoSearchV2 = (data: Record) => { + return request({ + url: '/biz/apiTest/fetchVideoSearchV2', + method: 'post', + data + }); +}; + +/** + * 测试 fetchVideoComments + */ +export const fetchVideoComments = (data: Record) => { + return request({ + url: '/biz/apiTest/fetchVideoComments', + method: 'post', + data + }); +}; diff --git a/src/views/biz/apiTest/index.vue b/src/views/biz/apiTest/index.vue new file mode 100644 index 00000000..3fc04110 --- /dev/null +++ b/src/views/biz/apiTest/index.vue @@ -0,0 +1,192 @@ + + + + + From 34082c57dbda140f45c4481a01070ecc7d412a33 Mon Sep 17 00:00:00 2001 From: hzyuan <562447916@qq.com> Date: Sun, 7 Jun 2026 22:42:04 +0800 Subject: [PATCH 4/4] =?UTF-8?q?[=E6=96=B0=E5=A2=9E=E5=8A=9F=E8=83=BD-?= =?UTF-8?q?=E5=89=8D=E7=AB=AF=E6=8F=90=E4=BA=A4]1=E3=80=81=E6=96=B0?= =?UTF-8?q?=E5=A2=9Elinkflow=E6=96=B0=E7=A7=9F=E6=88=B7=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=202=E3=80=81=E9=85=8D=E9=A2=9D=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/linkflow/org/index.ts | 102 +++++++++++++++++++++++++++++++ src/api/linkflow/org/types.ts | 64 +++++++++++++++++++ src/api/linkflow/quota/index.ts | 39 ++++++++++++ src/api/linkflow/quota/types.ts | 2 + src/layout/components/Navbar.vue | 3 + 5 files changed, 210 insertions(+) create mode 100644 src/api/linkflow/org/index.ts create mode 100644 src/api/linkflow/org/types.ts create mode 100644 src/api/linkflow/quota/index.ts create mode 100644 src/api/linkflow/quota/types.ts diff --git a/src/api/linkflow/org/index.ts b/src/api/linkflow/org/index.ts new file mode 100644 index 00000000..d2d5a5c9 --- /dev/null +++ b/src/api/linkflow/org/index.ts @@ -0,0 +1,102 @@ +import request from '@/utils/request'; +import { TenantDetailVO, TenantDetailQuery, TenantDetailForm } from './types'; +import { AxiosPromise } from 'axios'; + +// 查询LinkFlow租户列表 +export function listLinkflowTenant(query: TenantDetailQuery): AxiosPromise { + return request({ + url: '/linkflow/tenant/list', + method: 'get', + params: query + }); +} + +// 查询租户详情 +export function getLinkflowTenant(tenantId: string | number): AxiosPromise { + return request({ + url: '/linkflow/tenant/' + tenantId, + method: 'get' + }); +} + +// 新增租户 +export function addLinkflowTenant(data: TenantDetailForm) { + return request({ + url: '/linkflow/tenant', + method: 'post', + data: data + }); +} + +// 修改租户 +export function updateLinkflowTenant(data: TenantDetailForm) { + return request({ + url: '/linkflow/tenant', + method: 'put', + data: data + }); +} + +// 切换业务状态 +export function changeOrgStatus(tenantId: string, orgStatus: string) { + return request({ + url: '/linkflow/tenant/changeOrgStatus', + method: 'put', + data: { tenantId, orgStatus } + }); +} + +// 删除租户 +export function delLinkflowTenant(ids: string | number | Array) { + return request({ + url: '/linkflow/tenant/' + ids, + method: 'delete' + }); +} + +// 导出租户 +export function exportLinkflowTenant(data: any) { + return request({ + url: '/linkflow/tenant/export', + method: 'post', + data: data, + responseType: 'blob' + }); +} + +// ========== 通知相关 ========== + +// 查询通知列表(tenantId 可选,后端自动兜底) +export function listNotifications(tenantId?: string) { + return request({ + url: '/linkflow/tenant/notifications', + method: 'get', + params: tenantId ? { tenantId } : {} + }); +} + +// 标记已读 +export function markNotificationRead(id: number | string) { + return request({ + url: '/linkflow/tenant/notifications/' + id + '/read', + method: 'put' + }); +} + +// 全部已读 +export function markAllNotificationsRead(tenantId?: string) { + return request({ + url: '/linkflow/tenant/notifications/readAll', + method: 'put', + params: tenantId ? { tenantId } : {} + }); +} + +// 未读数量 +export function getUnreadCount(tenantId?: string) { + return request({ + url: '/linkflow/tenant/notifications/unreadCount', + method: 'get', + params: tenantId ? { tenantId } : {} + }); +} diff --git a/src/api/linkflow/org/types.ts b/src/api/linkflow/org/types.ts new file mode 100644 index 00000000..eb864dc3 --- /dev/null +++ b/src/api/linkflow/org/types.ts @@ -0,0 +1,64 @@ +export interface TenantDetailVO extends BaseEntity { + id: number | string; + tenantId: string; + companyName: string; + contactUserName: string; + contactPhone: string; + domain: string; + packageId: number | string; + packageName: string; + expireTime: string; + accountCount: number; + status: string; + // lf_tenant_ext 字段 + extId: number | string; + monthlyQuota: number; + usedQuota: number; + platformCount: number; + orgStatus: string; + remark: string; + // 管理员信息 + phonenumber: string; + // 计算字段 + quotaUsageRate: number; + daysToExpire: number; +} + +export interface TenantDetailQuery extends PageQuery { + companyName?: string; + contactUserName?: string; + orgStatus?: string; + packageId?: number | string; +} + +export interface TenantDetailForm { + id?: number | string | undefined; + tenantId?: string | undefined; + companyName: string; + contactUserName: string; + contactPhone: string; + domain?: string; + packageId: number | string; + expireTime: string; + accountCount: number; + // 新增租户时需要(RuoYi 创建租户同时创建管理员用户) + username?: string; + password?: string; + phonenumber?: string; + // lf_tenant_ext + extId?: number | string | undefined; + monthlyQuota: number; + platformCount: number; + remark?: string; + orgStatus?: string; +} + +export interface NotificationVO { + id: number | string; + tenantId: string; + type: string; + title: string; + content: string; + isRead: string; + createTime: string; +} diff --git a/src/api/linkflow/quota/index.ts b/src/api/linkflow/quota/index.ts new file mode 100644 index 00000000..571b1f08 --- /dev/null +++ b/src/api/linkflow/quota/index.ts @@ -0,0 +1,39 @@ +import request from '@/utils/request'; +import { QuotaVO, QuotaQuery } from './types'; +import { AxiosPromise } from 'axios'; + +// 查询配额列表 +export function listQuota(query: QuotaQuery): AxiosPromise { + return request({ + url: '/linkflow/quota/list', + method: 'get', + params: query + }); +} + +// 查询单个租户配额 +export function getQuota(tenantId: string | number): AxiosPromise { + return request({ + url: '/linkflow/quota/' + tenantId, + method: 'get' + }); +} + +// 调整配额 +export function adjustQuota(tenantId: string, newMonthlyQuota: number) { + return request({ + url: '/linkflow/quota/adjust', + method: 'put', + params: { tenantId, newMonthlyQuota } + }); +} + +// 导出配额 +export function exportQuota(data: any) { + return request({ + url: '/linkflow/quota/export', + method: 'post', + data: data, + responseType: 'blob' + }); +} diff --git a/src/api/linkflow/quota/types.ts b/src/api/linkflow/quota/types.ts new file mode 100644 index 00000000..4956505a --- /dev/null +++ b/src/api/linkflow/quota/types.ts @@ -0,0 +1,2 @@ +// 配额 VO 复用 TenantDetailVO(包含配额使用率等计算字段) +export type { TenantDetailVO as QuotaVO, TenantDetailQuery as QuotaQuery } from '../org/types'; diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 906ed6f3..b4374cd1 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -47,6 +47,8 @@ + + @@ -102,6 +104,7 @@ import { getTenantList } from '@/api/login'; import { dynamicClear, dynamicTenant } from '@/api/system/tenant'; import { TenantVO } from '@/api/types'; import notice from './notice/index.vue'; +import LfNotification from '@/components/LfNotification/index.vue'; import router from '@/router'; import { ElMessageBoxOptions } from 'element-plus/es/components/message-box/src/message-box.type'; import { NavTypeEnum } from '@/enums/NavTypeEnum';