fix: todo修复

This commit is contained in:
hw
2025-11-20 10:34:21 +08:00
237 changed files with 2791 additions and 3444 deletions

View File

@@ -15,7 +15,6 @@ export namespace AiChatConversationApi {
maxTokens: number; // 单条回复的最大 Token 数量
maxContexts: number; // 上下文的最大 Message 数量
createTime?: Date; // 创建时间
// 额外字段
systemMessage?: string; // 角色设定
modelName?: string; // 模型名字
roleAvatar?: string; // 角色头像
@@ -24,52 +23,52 @@ export namespace AiChatConversationApi {
}
}
// 获得【我的】聊天对话
/** 获得【我的】聊天对话 */
export function getChatConversationMy(id: number) {
return requestClient.get<AiChatConversationApi.ChatConversation>(
`/ai/chat/conversation/get-my?id=${id}`,
);
}
// 新增【我的】聊天对话
/** 新增【我的】聊天对话 */
export function createChatConversationMy(
data: AiChatConversationApi.ChatConversation,
) {
return requestClient.post('/ai/chat/conversation/create-my', data);
}
// 更新【我的】聊天对话
/** 更新【我的】聊天对话 */
export function updateChatConversationMy(
data: AiChatConversationApi.ChatConversation,
) {
return requestClient.put(`/ai/chat/conversation/update-my`, data);
}
// 删除【我的】聊天对话
/** 删除【我的】聊天对话 */
export function deleteChatConversationMy(id: number) {
return requestClient.delete(`/ai/chat/conversation/delete-my?id=${id}`);
}
// 删除【我的】所有对话,置顶除外
/** 删除【我的】所有对话,置顶除外 */
export function deleteChatConversationMyByUnpinned() {
return requestClient.delete(`/ai/chat/conversation/delete-by-unpinned`);
}
// 获得【我的】聊天对话列表
/** 获得【我的】聊天对话列表 */
export function getChatConversationMyList() {
return requestClient.get<AiChatConversationApi.ChatConversation[]>(
`/ai/chat/conversation/my-list`,
);
}
// 获得【我的】聊天对话列表
/** 获得【我的】聊天对话列表 */
export function getChatConversationPage(params: any) {
return requestClient.get<
PageResult<AiChatConversationApi.ChatConversation[]>
>(`/ai/chat/conversation/page`, { params });
}
// 管理员删除消息
/** 管理员删除消息 */
export function deleteChatConversationByAdmin(id: number) {
return requestClient.delete(`/ai/chat/conversation/delete-by-admin?id=${id}`);
}

View File

@@ -19,6 +19,7 @@ export namespace AiChatMessageApi {
model: number; // 模型标志
modelId: number; // 模型编号
content: string; // 聊天内容
reasoningContent?: string; // 推理内容(深度思考)
tokens: number; // 消耗 Token 数量
segmentIds?: number[]; // 段落编号
segments?: {
@@ -27,13 +28,25 @@ export namespace AiChatMessageApi {
documentName: string; // 文档名称
id: number; // 段落编号
}[];
webSearchPages?: WebSearchPage[]; // 联网搜索结果
attachmentUrls?: string[]; // 附件 URL 数组
createTime: Date; // 创建时间
roleAvatar: string; // 角色头像
userAvatar: string; // 用户头像
}
/** 联网搜索页面接口 */
export interface WebSearchPage {
name: string; // 网站名称
icon: string; // 网站图标 URL
title: string; // 页面标题
url: string; // 页面 URL
snippet: string; // 简短描述
summary: string; // 内容摘要
}
}
// 消息列表
/** 消息列表 */
export function getChatMessageListByConversationId(
conversationId: null | number,
) {
@@ -42,15 +55,17 @@ export function getChatMessageListByConversationId(
);
}
// 发送 Stream 消息
/** 发送 Stream 消息 */
export function sendChatMessageStream(
conversationId: number,
content: string,
ctrl: any,
enableContext: boolean,
enableWebSearch: boolean,
onMessage: any,
onError: any,
onClose: any,
attachmentUrls?: string[],
) {
const token = accessStore.accessToken;
return fetchEventSource(`${apiURL}/ai/chat/message/send-stream`, {
@@ -64,6 +79,8 @@ export function sendChatMessageStream(
conversationId,
content,
useContext: enableContext,
useSearch: enableWebSearch,
attachmentUrls: attachmentUrls || [],
}),
onmessage: onMessage,
onerror: onError,
@@ -72,19 +89,19 @@ export function sendChatMessageStream(
});
}
// 删除消息
/** 删除消息 */
export function deleteChatMessage(id: number) {
return requestClient.delete(`/ai/chat/message/delete?id=${id}`);
}
// 删除指定对话的消息
/** 删除指定对话的消息 */
export function deleteByConversationId(conversationId: number) {
return requestClient.delete(
`/ai/chat/message/delete-by-conversation-id?conversationId=${conversationId}`,
);
}
// 获得消息分页
/** 获得消息分页 */
export function getChatMessagePage(params: any) {
return requestClient.get<PageResult<AiChatMessageApi.ChatMessage>>(
'/ai/chat/message/page',
@@ -92,7 +109,7 @@ export function getChatMessagePage(params: any) {
);
}
// 管理员删除消息
/** 管理员删除消息 */
export function deleteChatMessageByAdmin(id: number) {
return requestClient.delete(`/ai/chat/message/delete-by-admin?id=${id}`);
}

View File

@@ -3,14 +3,7 @@ import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace AiImageApi {
export interface ImageMidjourneyButtons {
customId: string; // MJ::JOB::upsample::1::85a4b4c1-8835-46c5-a15c-aea34fad1862 动作标识
emoji: string; // 图标 emoji
label: string; // Make Variations 文本
style: number; // 样式: 2Primary、3Green
}
/** AI 绘图 */
/** 绘图 */
export interface Image {
id: number; // 编号
userId: number;
@@ -30,7 +23,14 @@ export namespace AiImageApi {
finishTime: Date; // 完成时间
}
export interface ImageDrawReq {
export interface ImageMidjourneyButtons {
customId: string; // MJ::JOB::upsample::1::85a4b4c1-8835-46c5-a15c-aea34fad1862 动作标识
emoji: string; // 图标 emoji
label: string; // Make Variations 文本
style: number; // 样式: 2Primary、3Green
}
export interface ImageDrawReqVO {
prompt: string; // 提示词
modelId: number; // 模型
style: string; // 图像生成的风格
@@ -39,7 +39,7 @@ export namespace AiImageApi {
options: object; // 绘制参数Map<String, String>
}
export interface ImageMidjourneyImagineReq {
export interface ImageMidjourneyImagineReqVO {
prompt: string; // 提示词
modelId: number; // 模型
base64Array?: string[]; // size不能为空
@@ -54,60 +54,62 @@ export namespace AiImageApi {
}
}
// 获取【我的】绘图分页
/** 获取【我的】绘图分页 */
export function getImagePageMy(params: PageParam) {
return requestClient.get<PageResult<AiImageApi.Image>>('/ai/image/my-page', {
params,
});
}
// 获取【我的】绘图记录
/** 获取【我的】绘图记录 */
export function getImageMy(id: number) {
return requestClient.get<AiImageApi.Image>(`/ai/image/get-my?id=${id}`);
}
// 获取【我的】绘图记录列表
/** 获取【我的】绘图记录列表 */
export function getImageListMyByIds(ids: number[]) {
return requestClient.get<AiImageApi.Image[]>(`/ai/image/my-list-by-ids`, {
params: { ids: ids.join(',') },
});
}
// 生成图片
export function drawImage(data: AiImageApi.ImageDrawReq) {
/** 生成图片 */
export function drawImage(data: AiImageApi.ImageDrawReqVO) {
return requestClient.post(`/ai/image/draw`, data);
}
// 删除【我的】绘画记录
/** 删除【我的】绘画记录 */
export function deleteImageMy(id: number) {
return requestClient.delete(`/ai/image/delete-my?id=${id}`);
}
// ================ midjourney 专属 ================
/** ================ midjourney 专属 ================ */
// 【Midjourney】生成图片
export function midjourneyImagine(data: AiImageApi.ImageMidjourneyImagineReq) {
/** 【Midjourney】生成图片 */
export function midjourneyImagine(
data: AiImageApi.ImageMidjourneyImagineReqVO,
) {
return requestClient.post(`/ai/image/midjourney/imagine`, data);
}
// 【Midjourney】Action 操作(二次生成图片)
/** 【Midjourney】Action 操作(二次生成图片) */
export function midjourneyAction(data: AiImageApi.ImageMidjourneyAction) {
return requestClient.post(`/ai/image/midjourney/action`, data);
}
// ================ 绘图管理 ================
/** ================ 绘图管理 ================ */
// 查询绘画分页
/** 查询绘画分页 */
export function getImagePage(params: any) {
return requestClient.get<AiImageApi.Image[]>(`/ai/image/page`, { params });
}
// 更新绘画发布状态
/** 更新绘画发布状态 */
export function updateImage(data: any) {
return requestClient.put(`/ai/image/update`, data);
}
// 删除绘画
/** 删除绘画 */
export function deleteImage(id: number) {
return requestClient.delete(`/ai/image/delete?id=${id}`);
}

View File

@@ -15,39 +15,39 @@ export namespace AiKnowledgeDocumentApi {
}
}
// 查询知识库文档分页
/** 查询知识库文档分页 */
export function getKnowledgeDocumentPage(params: PageParam) {
return requestClient.get<
PageResult<AiKnowledgeDocumentApi.KnowledgeDocument>
>('/ai/knowledge/document/page', { params });
}
// 查询知识库文档详情
/** 查询知识库文档详情 */
export function getKnowledgeDocument(id: number) {
return requestClient.get(`/ai/knowledge/document/get?id=${id}`);
}
// 新增知识库文档(单个)
/** 新增知识库文档(单个) */
export function createKnowledge(data: any) {
return requestClient.post('/ai/knowledge/document/create', data);
}
// 新增知识库文档(多个)
/** 新增知识库文档(多个) */
export function createKnowledgeDocumentList(data: any) {
return requestClient.post('/ai/knowledge/document/create-list', data);
}
// 修改知识库文档
/** 修改知识库文档 */
export function updateKnowledgeDocument(data: any) {
return requestClient.put('/ai/knowledge/document/update', data);
}
// 修改知识库文档状态
/** 修改知识库文档状态 */
export function updateKnowledgeDocumentStatus(data: any) {
return requestClient.put('/ai/knowledge/document/update-status', data);
}
// 删除知识库文档
/** 删除知识库文档 */
export function deleteKnowledgeDocument(id: number) {
return requestClient.delete(`/ai/knowledge/document/delete?id=${id}`);
}

View File

@@ -13,7 +13,7 @@ export namespace AiKnowledgeKnowledgeApi {
}
}
// 查询知识库分页
/** 查询知识库分页 */
export function getKnowledgePage(params: PageParam) {
return requestClient.get<PageResult<AiKnowledgeKnowledgeApi.Knowledge>>(
'/ai/knowledge/page',
@@ -21,29 +21,29 @@ export function getKnowledgePage(params: PageParam) {
);
}
// 查询知识库详情
/** 查询知识库详情 */
export function getKnowledge(id: number) {
return requestClient.get<AiKnowledgeKnowledgeApi.Knowledge>(
`/ai/knowledge/get?id=${id}`,
);
}
// 新增知识库
/** 新增知识库 */
export function createKnowledge(data: AiKnowledgeKnowledgeApi.Knowledge) {
return requestClient.post('/ai/knowledge/create', data);
}
// 修改知识库
/** 修改知识库 */
export function updateKnowledge(data: AiKnowledgeKnowledgeApi.Knowledge) {
return requestClient.put('/ai/knowledge/update', data);
}
// 删除知识库
/** 删除知识库 */
export function deleteKnowledge(id: number) {
return requestClient.delete(`/ai/knowledge/delete?id=${id}`);
}
// 获取知识库简单列表
/** 获取知识库简单列表 */
export function getSimpleKnowledgeList() {
return requestClient.get<AiKnowledgeKnowledgeApi.Knowledge[]>(
'/ai/knowledge/simple-list',

View File

@@ -3,7 +3,6 @@ import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace AiKnowledgeSegmentApi {
// AI 知识库分段
export interface KnowledgeSegment {
id: number; // 编号
documentId: number; // 文档编号
@@ -18,7 +17,7 @@ export namespace AiKnowledgeSegmentApi {
}
}
// 查询知识库分段分页
/** 查询知识库分段分页 */
export function getKnowledgeSegmentPage(params: PageParam) {
return requestClient.get<PageResult<AiKnowledgeSegmentApi.KnowledgeSegment>>(
'/ai/knowledge/segment/page',
@@ -26,28 +25,28 @@ export function getKnowledgeSegmentPage(params: PageParam) {
);
}
// 查询知识库分段详情
/** 查询知识库分段详情 */
export function getKnowledgeSegment(id: number) {
return requestClient.get<AiKnowledgeSegmentApi.KnowledgeSegment>(
`/ai/knowledge/segment/get?id=${id}`,
);
}
// 新增知识库分段
/** 新增知识库分段 */
export function createKnowledgeSegment(
data: AiKnowledgeSegmentApi.KnowledgeSegment,
) {
return requestClient.post('/ai/knowledge/segment/create', data);
}
// 修改知识库分段
/** 修改知识库分段 */
export function updateKnowledgeSegment(
data: AiKnowledgeSegmentApi.KnowledgeSegment,
) {
return requestClient.put('/ai/knowledge/segment/update', data);
}
// 修改知识库分段状态
/** 修改知识库分段状态 */
export function updateKnowledgeSegmentStatus(id: number, status: number) {
return requestClient.put('/ai/knowledge/segment/update-status', {
id,
@@ -55,26 +54,26 @@ export function updateKnowledgeSegmentStatus(id: number, status: number) {
});
}
// 删除知识库分段
/** 删除知识库分段 */
export function deleteKnowledgeSegment(id: number) {
return requestClient.delete(`/ai/knowledge/segment/delete?id=${id}`);
}
// 切片内容
/** 切片内容 */
export function splitContent(url: string, segmentMaxTokens: number) {
return requestClient.get('/ai/knowledge/segment/split', {
params: { url, segmentMaxTokens },
});
}
// 获取文档处理列表
/** 获取文档处理列表 */
export function getKnowledgeSegmentProcessList(documentIds: number[]) {
return requestClient.get('/ai/knowledge/segment/get-process-list', {
params: { documentIds: documentIds.join(',') },
});
}
// 搜索知识库分段
/** 搜索知识库分段 */
export function searchKnowledgeSegment(params: any) {
return requestClient.get('/ai/knowledge/segment/search', {
params,

View File

@@ -8,7 +8,6 @@ const { apiURL } = useAppConfig(import.meta.env, import.meta.env.PROD);
const accessStore = useAccessStore();
export namespace AiMindmapApi {
// AI 思维导图
export interface MindMap {
id: number; // 编号
userId: number; // 用户编号
@@ -19,12 +18,12 @@ export namespace AiMindmapApi {
errorMessage: string; // 错误信息
}
// AI 思维导图生成
export interface AiMindMapGenerateReqVO {
prompt: string;
}
}
/** 生成思维导图 Stream */
export function generateMindMap({
data,
onClose,

View File

@@ -26,19 +26,19 @@ export namespace AiMusicApi {
}
}
// 查询音乐分页
/** 查询音乐分页 */
export function getMusicPage(params: PageParam) {
return requestClient.get<PageResult<AiMusicApi.Music>>(`/ai/music/page`, {
params,
});
}
// 更新音乐
/** 更新音乐 */
export function updateMusic(data: any) {
return requestClient.put('/ai/music/update', data);
}
// 删除音乐
/** 删除音乐 */
export function deleteMusic(id: number) {
return requestClient.delete(`/ai/music/delete?id=${id}`);
}

View File

@@ -36,6 +36,7 @@ export namespace AiWriteApi {
}
}
/** 写作 Stream */
export function writeStream({
data,
onClose,

View File

@@ -1,5 +1,7 @@
import type { PageParam, PageResult } from '@vben/request';
import type { BpmModelApi } from '#/api/bpm/model';
import { requestClient } from '#/api/request';
export namespace BpmProcessDefinitionApi {
@@ -9,16 +11,21 @@ export namespace BpmProcessDefinitionApi {
key?: string;
version: number;
name: string;
category: string;
description: string;
deploymentTime: number;
suspensionState: number;
modelType: number;
modelId: string;
formType?: number;
formId?: number;
formName?: string;
formCustomCreatePath?: string;
bpmnXml?: string;
simpleModel?: string;
formFields?: string[];
icon?: string;
startUsers?: BpmModelApi.UserInfo[];
}
}

View File

@@ -1,27 +1,6 @@
import { requestClient } from '#/api/request';
export namespace BpmModelApi {
/** 用户信息 TODO 这个是不是可以抽取出来定义在公共模块 */
// TODO @芋艿:一起看看。
export interface UserInfo {
id: number;
nickname: string;
avatar?: string;
deptId?: number;
deptName?: string;
}
/** 流程定义 */
export interface ProcessDefinition {
id: string;
key?: string;
version: number;
deploymentTime: number;
suspensionState: number;
formType?: number;
formCustomViewPath?: string;
}
/** 流程模型 */
export interface Model {
id: number;
@@ -42,6 +21,27 @@ export namespace BpmModelApi {
bpmnXml: string;
startUsers?: UserInfo[];
}
/** 流程定义 */
export interface ProcessDefinition {
id: string;
key?: string;
version: number;
deploymentTime: number;
suspensionState: number;
formType?: number;
formCustomViewPath?: string;
formFields?: string[];
}
/** 用户信息 */
export interface UserInfo {
id: number;
nickname: string;
avatar?: string;
deptId?: number;
deptName?: string;
}
}
/** 模型分类信息 */

View File

@@ -11,43 +11,6 @@ import type { BpmModelApi } from '#/api/bpm/model';
import { requestClient } from '#/api/request';
export namespace BpmProcessInstanceApi {
// TODO @芋艿:一些注释缺少或者不对;
export interface Task {
id: number;
name: string;
assigneeUser?: User;
}
export interface User {
avatar: string;
id: number;
nickname: string;
}
// 审批任务信息
export interface ApprovalTaskInfo {
assigneeUser: User;
id: number;
ownerUser: User;
reason: string;
signPicUrl: string;
status: number;
}
// 审批节点信息
export interface ApprovalNodeInfo {
candidateStrategy?: BpmCandidateStrategyEnum;
candidateUsers?: User[];
endTime?: Date;
id: string;
name: string;
nodeType: BpmNodeTypeEnum;
startTime?: Date;
status: number;
processInstanceId?: string;
tasks: ApprovalTaskInfo[];
}
/** 流程实例 */
export interface ProcessInstance {
businessKey: string;
@@ -73,8 +36,23 @@ export namespace BpmProcessInstanceApi {
tasks?: BpmProcessInstanceApi.Task[];
}
// 审批详情
export interface ApprovalDetail {
/** 流程实例的任务 */
export interface Task {
id: number;
name: string;
assigneeUser?: User;
}
/** 流程实例的用户信息 */
export interface User {
id: number;
nickname: string;
avatar: string;
deptName?: string;
}
/** 审批详情 */
export interface ApprovalDetailRespVO {
activityNodes: BpmProcessInstanceApi.ApprovalNodeInfo[];
formFieldsPermission: any;
processDefinition: BpmModelApi.ProcessDefinition;
@@ -83,8 +61,32 @@ export namespace BpmProcessInstanceApi {
todoTask: BpmTaskApi.Task;
}
// 抄送流程实例
export interface Copy {
/** 审批详情的节点信息 */
export interface ApprovalNodeInfo {
candidateStrategy?: BpmCandidateStrategyEnum;
candidateUsers?: User[];
endTime?: Date;
id: string;
name: string;
nodeType: BpmNodeTypeEnum;
startTime?: Date;
status: number;
processInstanceId?: string;
tasks: ApprovalTaskInfo[];
}
/** 审批详情的节点的任务 */
export interface ApprovalTaskInfo {
id: number;
assigneeUser: User;
ownerUser: User;
reason: string;
signPicUrl: string;
status: number;
}
/** 抄送流程实例 */
export interface ProcessInstanceCopyRespVO {
activityId: string;
activityName: string;
createTime: number;
@@ -101,6 +103,19 @@ export namespace BpmProcessInstanceApi {
}[];
taskId: string;
}
/** 流程实例的打印数据响应 */
export interface ProcessPrintDataRespVO {
printTemplateEnable: boolean;
printTemplateHtml?: string;
processInstance: ProcessInstance;
tasks: {
description: string;
id: number;
name: string;
signPicUrl?: string;
}[];
}
}
/** 查询我的流程实例分页 */
@@ -177,7 +192,7 @@ export async function updateProcessInstance(
/** 获取审批详情 */
export async function getApprovalDetail(params: any) {
return requestClient.get<BpmProcessInstanceApi.ApprovalDetail>(
return requestClient.get<BpmProcessInstanceApi.ApprovalDetailRespVO>(
`/bpm/process-instance/get-approval-detail`,
{ params },
);
@@ -191,17 +206,16 @@ export async function getNextApprovalNodes(params: any) {
);
}
/** 获取表单字段权限 */
export async function getFormFieldsPermission(params: any) {
return requestClient.get<BpmProcessInstanceApi.ProcessInstance>(
`/bpm/process-instance/get-form-fields-permission`,
{ params },
);
}
/** 获取流程实例 BPMN 模型视图 */
export async function getProcessInstanceBpmnModelView(id: string) {
return requestClient.get<BpmProcessInstanceApi.ProcessInstance>(
`/bpm/process-instance/get-bpmn-model-view?id=${id}`,
);
}
/** 获取流程实例打印数据 */
export async function getProcessInstancePrintData(id: string) {
return requestClient.get<BpmProcessInstanceApi.ProcessPrintDataRespVO>(
`/bpm/process-instance/get-print-data?processInstanceId=${id}`,
);
}

View File

@@ -3,7 +3,7 @@ import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace BpmProcessListenerApi {
/** BPM 流程监听器 */
/** 流程监听器 */
export interface ProcessListener {
id: number; // 编号
name: string; // 监听器名字

View File

@@ -5,7 +5,7 @@ import type { BpmProcessInstanceApi } from '../processInstance';
import { requestClient } from '#/api/request';
export namespace BpmTaskApi {
/** BPM 流程监听器 */
/** 流程任务 */
export interface Task {
id: number; // 编号
name: string; // 监听器名字
@@ -15,33 +15,6 @@ export namespace BpmTaskApi {
valueType: string; // 监听器值类型
processInstance?: BpmProcessInstanceApi.ProcessInstance; // 流程实例
}
// 流程任务
export interface TaskManager {
id: string; // 编号
name: string; // 任务名称
createTime: number; // 创建时间
endTime: number; // 结束时间
durationInMillis: number; // 持续时间
status: number; // 状态
reason: string; // 原因
ownerUser: any; // 负责人
assigneeUser: any; // 处理人
taskDefinitionKey: string; // 任务定义key
processInstanceId: string; // 流程实例id
processInstance: BpmProcessInstanceApi.ProcessInstance; // 流程实例
parentTaskId: any; // 父任务id
children: any; // 子任务
formId: any; // 表单id
formName: any; // 表单名称
formConf: any; // 表单配置
formFields: any; // 表单字段
formVariables: any; // 表单变量
buttonsSetting: any; // 按钮设置
signEnable: any; // 签名设置
reasonRequire: any; // 原因设置
nodeType: any; // 节点类型
}
}
/** 查询待办任务分页 */
@@ -88,51 +61,44 @@ export const getTaskListByReturn = async (id: string) => {
return await requestClient.get(`/bpm/task/list-by-return?id=${id}`);
};
/** 退回 */
/** 退回任务 */
export const returnTask = async (data: any) => {
return await requestClient.put('/bpm/task/return', data);
};
// 委派
/** 委派任务 */
export const delegateTask = async (data: any) => {
return await requestClient.put('/bpm/task/delegate', data);
};
// 转派
/** 转派任务 */
export const transferTask = async (data: any) => {
return await requestClient.put('/bpm/task/transfer', data);
};
// 加签
/** 加签任务 */
export const signCreateTask = async (data: any) => {
return await requestClient.put('/bpm/task/create-sign', data);
};
// 减签
/** 减签任务 */
export const signDeleteTask = async (data: any) => {
return await requestClient.delete('/bpm/task/delete-sign', data);
};
// 抄送
/** 抄送任务 */
export const copyTask = async (data: any) => {
return await requestClient.put('/bpm/task/copy', data);
};
// 获取我的待办任务
export const myTodoTask = async (processInstanceId: string) => {
return await requestClient.get(
`/bpm/task/my-todo?processInstanceId=${processInstanceId}`,
);
};
// 获取加签任务列表
/** 获取加签任务列表 */
export const getChildrenTaskList = async (id: string) => {
return await requestClient.get(
`/bpm/task/list-by-parent-task-id?parentTaskId=${id}`,
);
};
// 撤回任务
/** 撤回任务 */
export const withdrawTask = async (taskId: string) => {
return await requestClient.put('/bpm/task/withdraw', null, {
params: { taskId },

View File

@@ -3,7 +3,7 @@ import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace BpmUserGroupApi {
/** BPM 用户组 */
/** 用户组 */
export interface UserGroup {
id: number;
name: string;

View File

@@ -5,18 +5,12 @@ import { requestClient } from '#/api/request';
export namespace MallBrandApi {
/** 商品品牌 */
export interface Brand {
/** 品牌编号 */
id?: number;
/** 品牌名称 */
name: string;
/** 品牌图片 */
picUrl: string;
/** 品牌排序 */
sort?: number;
/** 品牌描述 */
description?: string;
/** 开启状态 */
status: number;
id?: number; // 品牌编号
name: string; // 品牌名称
picUrl: string; // 品牌图片
sort?: number; // 品牌排序
description?: string; // 品牌描述
status: number; // 开启状态
}
}

View File

@@ -3,18 +3,12 @@ import { requestClient } from '#/api/request';
export namespace MallCategoryApi {
/** 产品分类 */
export interface Category {
/** 分类编号 */
id?: number;
/** 父分类编号 */
parentId?: number;
/** 分类名称 */
name: string;
/** 移动端分类图 */
picUrl: string;
/** 分类排序 */
sort: number;
/** 开启状态 */
status: number;
id?: number; // 分类编号
parentId?: number; // 父分类编号
name: string; // 分类名称
picUrl: string; // 移动端分类图
sort: number; // 分类排序
status: number; // 开启状态
}
}
@@ -49,10 +43,3 @@ export function getCategoryList(params: any) {
},
);
}
/** 获得商品分类列表 */
export function getCategorySimpleList() {
return requestClient.get<MallCategoryApi.Category[]>(
'/product/category/list',
);
}

View File

@@ -1,81 +0,0 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace MallCommentApi {
export interface Property {
propertyId: number;
propertyName: string;
valueId: number;
valueName: string;
}
/** 商品评论 */
export interface Comment {
id: number;
userId: number;
userNickname: string;
userAvatar: string;
anonymous: boolean;
orderId: number;
orderItemId: number;
spuId: number;
spuName: string;
skuId: number;
visible: boolean;
scores: number;
descriptionScores: number;
benefitScores: number;
content: string;
picUrls: string[];
replyStatus: boolean;
replyUserId: number;
replyContent: string;
replyTime: Date;
createTime: Date;
skuProperties: Property[];
}
/** 评论可见性更新 */
export interface CommentVisibleUpdate {
id: number;
visible: boolean;
}
/** 评论回复 */
export interface CommentReply {
id: number;
replyContent: string;
}
}
/** 查询商品评论列表 */
export function getCommentPage(params: PageParam) {
return requestClient.get<PageResult<MallCommentApi.Comment>>(
'/product/comment/page',
{ params },
);
}
/** 查询商品评论详情 */
export function getComment(id: number) {
return requestClient.get<MallCommentApi.Comment>(
`/product/comment/get?id=${id}`,
);
}
/** 添加自评 */
export function createComment(data: MallCommentApi.Comment) {
return requestClient.post('/product/comment/create', data);
}
/** 显示 / 隐藏评论 */
export function updateCommentVisible(
data: MallCommentApi.CommentVisibleUpdate,
) {
return requestClient.put('/product/comment/update-visible', data);
}
/** 商家回复 */
export function replyComment(data: MallCommentApi.CommentReply) {
return requestClient.put('/product/comment/reply', data);
}

View File

@@ -0,0 +1,80 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace MallCommentApi {
/** 商品评论 */
export interface Comment {
id: number; // 评论编号
userId: number; // 用户编号
userNickname: string; // 用户昵称
userAvatar: string; // 用户头像
anonymous: boolean; // 是否匿名
orderId: number; // 订单编号
orderItemId: number; // 订单项编号
spuId: number; // 商品SPU编号
spuName: string; // 商品名称
skuId: number; // 商品SKU编号
visible: boolean; // 是否可见
scores: number; // 总评分
descriptionScores: number; // 描述评分
benefitScores: number; // 服务评分
content: string; // 评论内容
picUrls: string[]; // 评论图片
replyStatus: boolean; // 是否回复
replyUserId: number; // 回复人编号
replyContent: string; // 回复内容
replyTime: Date; // 回复时间
createTime: Date; // 创建时间
skuProperties: {
propertyId: number; // 属性 ID
propertyName: string; // 属性名称
valueId: number; // 属性值 ID
valueName: string; // 属性值名称
}[]; // SKU 属性数组
}
/** 评论可见性更新请求 */
export interface CommentVisibleUpdateReqVO {
id: number; // 评论编号
visible: boolean; // 是否可见
}
/** 评论回复请求 */
export interface CommentReplyReqVO {
id: number; // 评论编号
replyContent: string; // 回复内容
}
}
/** 查询商品评论列表 */
export function getCommentPage(params: PageParam) {
return requestClient.get<PageResult<MallCommentApi.Comment>>(
'/product/comment/page',
{ params },
);
}
/** 查询商品评论详情 */
export function getComment(id: number) {
return requestClient.get<MallCommentApi.Comment>(
`/product/comment/get?id=${id}`,
);
}
/** 添加自评 */
export function createComment(data: MallCommentApi.Comment) {
return requestClient.post('/product/comment/create', data);
}
/** 显示 / 隐藏评论 */
export function updateCommentVisible(
data: MallCommentApi.CommentVisibleUpdateReqVO,
) {
return requestClient.put('/product/comment/update-visible', data);
}
/** 商家回复 */
export function replyComment(data: MallCommentApi.CommentReplyReqVO) {
return requestClient.put('/product/comment/reply', data);
}

View File

@@ -5,12 +5,9 @@ import { requestClient } from '#/api/request';
export namespace MallFavoriteApi {
/** 商品收藏 */
export interface Favorite {
/** 收藏编号 */
id?: number;
/** 用户编号 */
userId?: string;
/** 商品 SPU 编号 */
spuId?: null | number;
id?: number; // 收藏编号
userId?: string; // 用户编号
spuId?: number; // 商品 SPU 编号
}
}

View File

@@ -5,22 +5,14 @@ import { requestClient } from '#/api/request';
export namespace MallHistoryApi {
/** 商品浏览记录 */
export interface BrowseHistory {
/** 记录编号 */
id?: number;
/** 用户编号 */
userId?: number;
/** 商品 SPU 编号 */
spuId?: number;
/** 浏览时间 */
createTime?: Date;
id?: number; // 记录编号
userId?: number; // 用户编号
spuId?: number; // 商品 SPU 编号
createTime?: Date; // 浏览时间
}
}
/**
*
*
* @param params
*/
/** 获得商品浏览记录分页 */
export function getBrowseHistoryPage(params: PageParam) {
return requestClient.get<PageResult<MallHistoryApi.BrowseHistory>>(
'/product/browse-history/page',

View File

@@ -5,29 +5,17 @@ import { requestClient } from '#/api/request';
export namespace MallPropertyApi {
/** 商品属性 */
export interface Property {
/** 属性编号 */
id?: number;
/** 名称 */
name: string;
/** 备注 */
remark?: string;
id?: number; // 属性编号
name: string; // 名称
remark?: string; // 备注
}
/** 属性值 */
export interface PropertyValue {
/** 属性值编号 */
id?: number;
/** 属性项的编号 */
propertyId?: number;
/** 名称 */
name: string;
/** 备注 */
remark?: string;
}
/** 属性值查询参数 */
export interface PropertyValueQuery extends PageParam {
propertyId?: number;
id?: number; // 属性值编号
propertyId?: number; // 属性项的编号
name: string; // 名称
remark?: string; // 备注
}
}
@@ -69,9 +57,7 @@ export function getPropertySimpleList() {
}
/** 获得属性值分页 */
export function getPropertyValuePage(
params: MallPropertyApi.PropertyValueQuery,
) {
export function getPropertyValuePage(params: PageParam) {
return requestClient.get<PageResult<MallPropertyApi.PropertyValue>>(
'/product/property/value/page',
{ params },

View File

@@ -1,179 +0,0 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace MallSpuApi {
/** 商品属性 */
export interface Property {
/** 属性编号 */
propertyId?: number;
/** 属性名称 */
propertyName?: string;
/** 属性值编号 */
valueId?: number;
/** 属性值名称 */
valueName?: string;
}
/** 商品 SKU */
export interface Sku {
/** 商品 SKU 编号 */
id?: number;
/** 商品 SKU 名称 */
name?: string;
/** SPU 编号 */
spuId?: number;
/** 属性数组 */
properties?: Property[];
/** 商品价格 */
price?: number | string;
/** 市场价 */
marketPrice?: number | string;
/** 成本价 */
costPrice?: number | string;
/** 商品条码 */
barCode?: string;
/** 图片地址 */
picUrl?: string;
/** 库存 */
stock?: number;
/** 商品重量单位kg 千克 */
weight?: number;
/** 商品体积单位m^3 平米 */
volume?: number;
/** 一级分销的佣金 */
firstBrokeragePrice?: number | string;
/** 二级分销的佣金 */
secondBrokeragePrice?: number | string;
/** 商品销量 */
salesCount?: number;
}
/** 优惠券模板 */
export interface GiveCouponTemplate {
/** 优惠券编号 */
id?: number;
/** 优惠券名称 */
name?: string;
}
/** 商品 SPU */
export interface Spu {
/** 商品编号 */
id?: number;
/** 商品名称 */
name?: string;
/** 商品分类 */
categoryId?: number;
/** 关键字 */
keyword?: string;
/** 单位 */
unit?: number | undefined;
/** 商品封面图 */
picUrl?: string;
/** 商品轮播图 */
sliderPicUrls?: string[];
/** 商品简介 */
introduction?: string;
/** 配送方式 */
deliveryTypes?: number[];
/** 运费模版 */
deliveryTemplateId?: number | undefined;
/** 商品品牌编号 */
brandId?: number;
/** 商品规格 */
specType?: boolean;
/** 分销类型 */
subCommissionType?: boolean;
/** sku数组 */
skus?: Sku[];
/** 商品详情 */
description?: string;
/** 商品排序 */
sort?: number;
/** 赠送积分 */
giveIntegral?: number;
/** 虚拟销量 */
virtualSalesCount?: number;
/** 商品价格 */
price?: number;
/** 商品拼团价格 */
combinationPrice?: number;
/** 商品秒杀价格 */
seckillPrice?: number;
/** 商品销量 */
salesCount?: number;
/** 市场价 */
marketPrice?: number;
/** 成本价 */
costPrice?: number;
/** 商品库存 */
stock?: number;
/** 商品创建时间 */
createTime?: Date;
/** 商品状态 */
status?: number;
/** 浏览量 */
browseCount?: number;
}
/** 商品状态更新 */
export interface StatusUpdate {
/** 商品编号 */
id: number;
/** 商品状态 */
status: number;
}
}
/** 获得商品 SPU 列表 */
export function getSpuPage(params: PageParam) {
return requestClient.get<PageResult<MallSpuApi.Spu>>('/product/spu/page', {
params,
});
}
/** 获得商品 SPU 列表 tabsCount */
export function getTabsCount() {
return requestClient.get<Record<string, number>>('/product/spu/get-count');
}
/** 创建商品 SPU */
export function createSpu(data: MallSpuApi.Spu) {
return requestClient.post('/product/spu/create', data);
}
/** 更新商品 SPU */
export function updateSpu(data: MallSpuApi.Spu) {
return requestClient.put('/product/spu/update', data);
}
/** 更新商品 SPU 状态 */
export function updateStatus(data: MallSpuApi.StatusUpdate) {
return requestClient.put('/product/spu/update-status', data);
}
/** 获得商品 SPU */
export function getSpu(id: number) {
return requestClient.get<MallSpuApi.Spu>(`/product/spu/get-detail?id=${id}`);
}
/** 获得商品 SPU 详情列表 */
export function getSpuDetailList(ids: number[]) {
return requestClient.get<MallSpuApi.Spu[]>(`/product/spu/list?spuIds=${ids}`);
}
/** 删除商品 SPU */
export function deleteSpu(id: number) {
return requestClient.delete(`/product/spu/delete?id=${id}`);
}
/** 导出商品 SPU Excel */
export function exportSpu(params: PageParam) {
return requestClient.download('/product/spu/export-excel', { params });
}
/** 获得商品 SPU 精简列表 */
export function getSpuSimpleList() {
return requestClient.get<MallSpuApi.Spu[]>('/product/spu/list-all-simple');
}

View File

@@ -0,0 +1,129 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace MallSpuApi {
/** 商品 SPU */
export interface Spu {
id?: number; // 商品编号
name?: string; // 商品名称
categoryId?: number; // 商品分类
keyword?: string; // 关键字
unit?: number; // 单位
picUrl?: string; // 商品封面图
sliderPicUrls?: string[]; // 商品轮播图
introduction?: string; // 商品简介
deliveryTypes?: number[]; // 配送方式
deliveryTemplateId?: number; // 运费模版
brandId?: number; // 商品品牌编号
specType?: boolean; // 商品规格
subCommissionType?: boolean; // 分销类型
skus?: Sku[]; // sku数组
description?: string; // 商品详情
sort?: number; // 商品排序
giveIntegral?: number; // 赠送积分
virtualSalesCount?: number; // 虚拟销量
price?: number; // 商品价格
combinationPrice?: number; // 商品拼团价格
seckillPrice?: number; // 商品秒杀价格
salesCount?: number; // 商品销量
marketPrice?: number; // 市场价
costPrice?: number; // 成本价
stock?: number; // 商品库存
createTime?: Date; // 商品创建时间
status?: number; // 商品状态
browseCount?: number; // 浏览量
}
/** 商品 SKU */
export interface Sku {
id?: number; // 商品 SKU 编号
name?: string; // 商品 SKU 名称
spuId?: number; // SPU 编号
properties?: Property[]; // 属性数组
price?: number | string; // 商品价格
marketPrice?: number | string; // 市场价
costPrice?: number | string; // 成本价
barCode?: string; // 商品条码
picUrl?: string; // 图片地址
stock?: number; // 库存
weight?: number; // 商品重量单位kg 千克
volume?: number; // 商品体积单位m^3 平米
firstBrokeragePrice?: number | string; // 一级分销的佣金
secondBrokeragePrice?: number | string; // 二级分销的佣金
salesCount?: number; // 商品销量
}
/** 商品属性 */
export interface Property {
propertyId?: number; // 属性编号
propertyName?: string; // 属性名称
valueId?: number; // 属性值编号
valueName?: string; // 属性值名称
}
// TODO @puhui999这个还要么
/** 优惠券模板 */
export interface GiveCouponTemplate {
id?: number; // 优惠券编号
name?: string; // 优惠券名称
}
/** 商品状态更新请求 */
export interface SpuStatusUpdateReqVO {
id: number; // 商品编号
status: number; // 商品状态
}
}
/** 获得商品 SPU 列表 */
export function getSpuPage(params: PageParam) {
return requestClient.get<PageResult<MallSpuApi.Spu>>('/product/spu/page', {
params,
});
}
/** 获得商品 SPU 列表 tabsCount */
export function getTabsCount() {
return requestClient.get<Record<string, number>>('/product/spu/get-count');
}
/** 创建商品 SPU */
export function createSpu(data: MallSpuApi.Spu) {
return requestClient.post('/product/spu/create', data);
}
/** 更新商品 SPU */
export function updateSpu(data: MallSpuApi.Spu) {
return requestClient.put('/product/spu/update', data);
}
/** 更新商品 SPU 状态 */
export function updateStatus(data: MallSpuApi.SpuStatusUpdateReqVO) {
return requestClient.put('/product/spu/update-status', data);
}
/** 获得商品 SPU */
export function getSpu(id: number) {
return requestClient.get<MallSpuApi.Spu>(`/product/spu/get-detail?id=${id}`);
}
/** 获得商品 SPU 详情列表 */
export function getSpuDetailList(ids: number[]) {
return requestClient.get<MallSpuApi.Spu[]>(`/product/spu/list?spuIds=${ids}`);
}
/** 删除商品 SPU */
export function deleteSpu(id: number) {
return requestClient.delete(`/product/spu/delete?id=${id}`);
}
/** 导出商品 SPU Excel */
export function exportSpu(params: PageParam) {
return requestClient.download('/product/spu/export-excel', { params });
}
/** 获得商品 SPU 精简列表 */
export function getSpuSimpleList() {
return requestClient.get<MallSpuApi.Spu[]>('/product/spu/list-all-simple');
}

View File

@@ -5,16 +5,11 @@ import { requestClient } from '#/api/request';
export namespace MallArticleCategoryApi {
/** 文章分类 */
export interface ArticleCategory {
/** 分类编号 */
id: number;
/** 分类名称 */
name: string;
/** 分类图片 */
picUrl: string;
/** 状态 */
status: number;
/** 排序 */
sort: number;
id: number; // 分类编号
name: string; // 分类名称
picUrl: string; // 分类图片
status: number; // 状态
sort: number; // 排序
}
}

View File

@@ -5,18 +5,18 @@ import { requestClient } from '#/api/request';
export namespace MallBannerApi {
/** Banner 信息 */
export interface Banner {
id: number;
title: string;
picUrl: string;
status: number;
url: string;
position: number;
sort: number;
memo: string;
id: number; // Banner 编号
title: string; // Banner 标题
picUrl: string; // Banner 图片
status: number; // 状态
url: string; // 链接地址
position: number; // Banner 位置
sort: number; // 排序
memo: string; // 备注
}
}
/** 查询Banner管理列表 */
/** 查询 Banner 管理列表 */
export function getBannerPage(params: PageParam) {
return requestClient.get<PageResult<MallBannerApi.Banner>>(
'/promotion/banner/page',
@@ -24,24 +24,24 @@ export function getBannerPage(params: PageParam) {
);
}
/** 查询Banner管理详情 */
/** 查询 Banner 管理详情 */
export function getBanner(id: number) {
return requestClient.get<MallBannerApi.Banner>(
`/promotion/banner/get?id=${id}`,
);
}
/** 新增Banner管理 */
/** 新增 Banner 管理 */
export function createBanner(data: MallBannerApi.Banner) {
return requestClient.post('/promotion/banner/create', data);
}
/** 修改Banner管理 */
/** 修改 Banner 管理 */
export function updateBanner(data: MallBannerApi.Banner) {
return requestClient.put('/promotion/banner/update', data);
}
/** 删除Banner管理 */
/** 删除 Banner 管理 */
export function deleteBanner(id: number) {
return requestClient.delete(`/promotion/banner/delete?id=${id}`);
}

View File

@@ -7,62 +7,41 @@ import { requestClient } from '#/api/request';
export namespace MallBargainActivityApi {
/** 砍价活动 */
export interface BargainActivity {
/** 活动编号 */
id?: number;
/** 活动名称 */
name?: string;
/** 开始时间 */
startTime?: Date;
/** 结束时间 */
endTime?: Date;
/** 状态 */
status?: number;
/** 达到该人数,才能砍到低价 */
helpMaxCount?: number;
/** 最大帮砍次数 */
bargainCount?: number;
/** 最大购买次数 */
totalLimitCount?: number;
/** 商品 SPU 编号 */
spuId: number;
/** 商品 SKU 编号 */
skuId: number;
/** 砍价起始价格,单位分 */
bargainFirstPrice: number;
/** 砍价底价 */
bargainMinPrice: number;
/** 活动库存 */
stock: number;
/** 用户每次砍价的最小金额,单位:分 */
randomMinPrice?: number;
/** 用户每次砍价的最大金额,单位:分 */
randomMaxPrice?: number;
id?: number; // 活动编号
name?: string; // 活动名称
startTime?: Date; // 开始时间
endTime?: Date; // 结束时间
status?: number; // 状态
helpMaxCount?: number; // 达到该人数,才能砍到低价
bargainCount?: number; // 最大帮砍次数
totalLimitCount?: number; // 最大购买次数
spuId: number; // 商品 SPU 编号
skuId: number; // 商品 SKU 编号
bargainFirstPrice: number; // 砍价起始价格,单位分
bargainMinPrice: number; // 砍价底价
stock: number; // 活动库存
randomMinPrice?: number; // 用户每次砍价的最小金额,单位:分
randomMaxPrice?: number; // 用户每次砍价的最大金额,单位:分
}
/** 砍价活动所需属性。选择的商品和属性的时候使用方便使用活动的通用封装 */
export interface BargainProduct {
/** 商品 SPU 编号 */
spuId: number;
/** 商品 SKU 编号 */
skuId: number;
/** 砍价起始价格,单位分 */
bargainFirstPrice: number;
/** 砍价底价 */
bargainMinPrice: number;
/** 活动库存 */
stock: number;
spuId: number; // 商品 SPU 编号
skuId: number; // 商品 SKU 编号
bargainFirstPrice: number; // 砍价起始价格,单位分
bargainMinPrice: number; // 砍价底价
stock: number; // 活动库存
}
// TODO @puhui999要不要删除
/** 扩展 SKU 配置 */
export type SkuExtension = {
/** 砍价活动配置 */
productConfig: BargainProduct;
productConfig: BargainProduct; // 砍价活动配置
} & MallSpuApi.Sku;
/** 扩展 SPU 配置 */
export interface SpuExtension extends MallSpuApi.Spu {
/** SKU 列表 */
skus: SkuExtension[];
skus: SkuExtension[]; // SKU 列表
}
}

View File

@@ -5,16 +5,11 @@ import { requestClient } from '#/api/request';
export namespace MallBargainHelpApi {
/** 砍价记录 */
export interface BargainHelp {
/** 记录编号 */
id: number;
/** 砍价记录编号 */
record: number;
/** 用户编号 */
userId: number;
/** 砍掉金额 */
reducePrice: number;
/** 结束时间 */
endTime: Date;
id: number; // 记录编号
record: number; // 砍价记录编号
userId: number; // 用户编号
reducePrice: number; // 砍掉金额
endTime: Date; // 结束时间
}
}

View File

@@ -5,26 +5,16 @@ import { requestClient } from '#/api/request';
export namespace MallBargainRecordApi {
/** 砍价记录 */
export interface BargainRecord {
/** 记录编号 */
id: number;
/** 活动编号 */
activityId: number;
/** 用户编号 */
userId: number;
/** 商品 SPU 编号 */
spuId: number;
/** 商品 SKU 编号 */
skuId: number;
/** 砍价起始价格 */
bargainFirstPrice: number;
/** 砍价价格 */
bargainPrice: number;
/** 状态 */
status: number;
/** 订单编号 */
orderId: number;
/** 结束时间 */
endTime: Date;
id: number; // 记录编号
activityId: number; // 活动编号
userId: number; // 用户编号
spuId: number; // 商品 SPU 编号
skuId: number; // 商品 SKU 编号
bargainFirstPrice: number; // 砍价起始价格
bargainPrice: number; // 砍价价格
status: number; // 状态
orderId: number; // 订单编号
endTime: Date; // 结束时间
}
}

View File

@@ -5,67 +5,42 @@ import type { MallSpuApi } from '#/api/mall/product/spu';
import { requestClient } from '#/api/request';
export namespace MallCombinationActivityApi {
/** 拼团活动所需属性 */
export interface CombinationProduct {
/** 商品 SPU 编号 */
spuId: number;
/** 商品 SKU 编号 */
skuId: number;
/** 拼团价格 */
combinationPrice: number;
}
/** 拼团活动 */
export interface CombinationActivity {
/** 活动编号 */
id?: number;
/** 活动名称 */
name?: string;
/** 商品 SPU 编号 */
spuId?: number;
/** 总限购数量 */
totalLimitCount?: number;
/** 单次限购数量 */
singleLimitCount?: number;
/** 开始时间 */
startTime?: Date;
/** 结束时间 */
endTime?: Date;
/** 用户数量 */
userSize?: number;
/** 总数量 */
totalCount?: number;
/** 成功数量 */
successCount?: number;
/** 订单用户数量 */
orderUserCount?: number;
/** 虚拟成团 */
virtualGroup?: number;
/** 状态 */
status?: number;
/** 限制时长 */
limitDuration?: number;
/** 拼团价格 */
combinationPrice?: number;
/** 商品列表 */
products: CombinationProduct[];
/** 图片 */
picUrl?: string;
/** 商品名称 */
spuName?: string;
/** 市场价 */
marketPrice?: number;
id?: number; // 活动编号
name?: string; // 活动名称
spuId?: number; // 商品 SPU 编号
totalLimitCount?: number; // 总限购数量
singleLimitCount?: number; // 单次限购数量
startTime?: Date; // 开始时间
endTime?: Date; // 结束时间
userSize?: number; // 用户数量
totalCount?: number; // 总数量
successCount?: number; // 成功数量
orderUserCount?: number; // 订单用户数量
virtualGroup?: number; // 虚拟成团
status?: number; // 状态
limitDuration?: number; // 限制时长
combinationPrice?: number; // 拼团价格
products: CombinationProduct[]; // 商品列表
}
// TODO @puhui999要不要删除
/** 拼团活动所需属性 */
export interface CombinationProduct {
spuId: number; // 商品 SPU 编号
skuId: number; // 商品 SKU 编号
combinationPrice: number; // 拼团价格
}
/** 扩展 SKU 配置 */
export type SkuExtension = {
/** 拼团活动配置 */
productConfig: CombinationProduct;
productConfig: CombinationProduct; // 拼团活动配置
} & MallSpuApi.Sku;
/** 扩展 SPU 配置 */
export interface SpuExtension extends MallSpuApi.Spu {
/** SKU 列表 */
skus: SkuExtension[];
skus: SkuExtension[]; // SKU 列表
}
}

View File

@@ -5,44 +5,27 @@ import { requestClient } from '#/api/request';
export namespace MallCombinationRecordApi {
/** 拼团记录 */
export interface CombinationRecord {
/** 拼团记录编号 */
id: number;
/** 拼团活动编号 */
activityId: number;
/** 用户昵称 */
nickname: string;
/** 用户头像 */
avatar: string;
/** 团长编号 */
headId: number;
/** 过期时间 */
expireTime: string;
/** 可参团人数 */
userSize: number;
/** 已参团人数 */
userCount: number;
/** 拼团状态 */
status: number;
/** 商品名字 */
spuName: string;
/** 商品图片 */
picUrl: string;
/** 是否虚拟成团 */
virtualGroup: boolean;
/** 开始时间 (订单付款后开始的时间) */
startTime: string;
/** 结束时间(成团时间/失败时间) */
endTime: string;
id: number; // 拼团记录编号
activityId: number; // 拼团活动编号
nickname: string; // 用户昵称
avatar: string; // 用户头像
headId: number; // 团长编号
expireTime: string; // 过期时间
userSize: number; // 可参团人数
userCount: number; // 已参团人数
status: number; // 拼团状态
spuName: string; // 商品名字
picUrl: string; // 商品图片
virtualGroup: boolean; // 是否虚拟成团
startTime: string; // 开始时间 (订单付款后开始的时间)
endTime: string; // 结束时间(成团时间/失败时间)
}
/** 拼团记录概要信息 */
export interface RecordSummary {
/** 待成团数量 */
pendingCount: number;
/** 已成团数量 */
successCount: number;
/** 已失败数量 */
failCount: number;
pendingCount: number; // 待成团数量
successCount: number; // 已成团数量
failCount: number; // 已失败数量
}
}

View File

@@ -7,48 +7,34 @@ import { requestClient } from '#/api/request';
export namespace MallDiscountActivityApi {
/** 限时折扣相关属性 */
export interface DiscountProduct {
/** 商品 SPU 编号 */
spuId: number;
/** 商品 SKU 编号 */
skuId: number;
/** 折扣类型 */
discountType: number;
/** 折扣百分比 */
discountPercent: number;
/** 折扣价格 */
discountPrice: number;
spuId: number; // 商品 SPU 编号
skuId: number; // 商品 SKU 编号
discountType: number; // 折扣类型
discountPercent: number; // 折扣百分比
discountPrice: number; // 折扣价格
}
/** 限时折扣活动 */
export interface DiscountActivity {
/** 活动编号 */
id?: number;
/** 商品 SPU 编号 */
spuId?: number;
/** 活动名称 */
name?: string;
/** 状态 */
status?: number;
/** 备注 */
remark?: string;
/** 开始时间 */
startTime?: Date;
/** 结束时间 */
endTime?: Date;
/** 商品列表 */
products?: DiscountProduct[];
id?: number; // 活动编号
spuId?: number; // 商品 SPU 编号
name?: string; // 活动名称
status?: number; // 状态
remark?: string; // 备注
startTime?: Date; // 开始时间
endTime?: Date; // 结束时间
products?: DiscountProduct[]; // 商品列表
}
// TODO @puhui999要不要删除
/** 扩展 SKU 配置 */
export type SkuExtension = {
/** 限时折扣配置 */
productConfig: DiscountProduct;
productConfig: DiscountProduct; // 限时折扣配置
} & MallSpuApi.Sku;
/** 扩展 SPU 配置 */
export interface SpuExtension extends MallSpuApi.Spu {
/** SKU 列表 */
skus: SkuExtension[];
skus: SkuExtension[]; // SKU 列表
}
}

View File

@@ -5,18 +5,12 @@ import { requestClient } from '#/api/request';
export namespace MallDiyPageApi {
/** 装修页面 */
export interface DiyPage {
/** 页面编号 */
id?: number;
/** 模板编号 */
templateId?: number;
/** 页面名称 */
name: string;
/** 备注 */
remark: string;
/** 预览图片地址数组 */
previewPicUrls: string[];
/** 页面属性 */
property: string;
id?: number; // 页面编号
templateId?: number; // 模板编号
name: string; // 页面名称
remark: string; // 备注
previewPicUrls: string[]; // 预览图片地址数组
property: string; // 页面属性
}
}

View File

@@ -7,26 +7,18 @@ import { requestClient } from '#/api/request';
export namespace MallDiyTemplateApi {
/** 装修模板 */
export interface DiyTemplate {
/** 模板编号 */
id?: number;
/** 模板名称 */
name: string;
/** 是否使用 */
used: boolean;
/** 使用时间 */
usedTime?: Date;
/** 备注 */
remark: string;
/** 预览图片地址数组 */
previewPicUrls: string[];
/** 模板属性 */
property: string;
id?: number; // 模板编号
name: string; // 模板名称
used: boolean; // 是否使用
usedTime?: Date; // 使用时间
remark: string; // 备注
previewPicUrls: string[]; // 预览图片地址数组
property: string; // 模板属性
}
/** 装修模板属性(包含页面列表) */
export interface DiyTemplateProperty extends DiyTemplate {
/** 页面列表 */
pages: MallDiyPageApi.DiyPage[];
pages: MallDiyPageApi.DiyPage[]; // 页面列表
}
}

View File

@@ -18,7 +18,7 @@ export namespace MallKefuConversationApi {
}
/** 会话置顶请求 */
export interface ConversationPinnedUpdate {
export interface ConversationPinnedUpdateReqVO {
id: number; // 会话编号
pinned: boolean; // 是否置顶
}
@@ -40,7 +40,7 @@ export function getConversation(id: number) {
/** 客服会话置顶 */
export function updateConversationPinned(
data: MallKefuConversationApi.ConversationPinnedUpdate,
data: MallKefuConversationApi.ConversationPinnedUpdateReqVO,
) {
return requestClient.put(
'/promotion/kefu-conversation/update-conversation-pinned',

View File

@@ -24,11 +24,6 @@ export namespace MallKefuMessageApi {
contentType: number; // 消息类型
content: string; // 消息内容
}
/** 消息列表查询参数 */
export interface MessageQuery extends PageParam {
conversationId: number; // 会话编号
}
}
/** 发送客服消息 */
@@ -44,7 +39,7 @@ export function updateKeFuMessageReadStatus(conversationId: number) {
}
/** 获得消息列表(流式加载) */
export function getKeFuMessageList(params: MallKefuMessageApi.MessageQuery) {
export function getKeFuMessageList(params: PageParam) {
return requestClient.get<PageResult<MallKefuMessageApi.Message>>(
'/promotion/kefu-message/list',
{ params },

View File

@@ -7,80 +7,52 @@ import { requestClient } from '#/api/request';
export namespace MallPointActivityApi {
/** 积分商城商品 */
export interface PointProduct {
/** 积分商城商品编号 */
id?: number;
/** 积分商城活动 id */
activityId?: number;
/** 商品 SPU 编号 */
spuId?: number;
/** 商品 SKU 编号 */
skuId: number;
/** 可兑换数量 */
count: number;
/** 兑换积分 */
point: number;
/** 兑换金额,单位:分 */
price: number;
/** 积分商城商品库存 */
stock: number;
/** 积分商城商品状态 */
activityStatus?: number;
id?: number; // 积分商城商品编号
activityId?: number; // 积分商城活动 id
spuId?: number; // 商品 SPU 编号
skuId: number; // 商品 SKU 编号
count: number; // 可兑换数量
point: number; // 兑换积分
price: number; // 兑换金额,单位:分
stock: number; // 积分商城商品库存
activityStatus?: number; // 积分商城商品状态
}
/** 积分商城活动 */
export interface PointActivity {
/** 积分商城活动编号 */
id: number;
/** 积分商城活动商品 */
spuId: number;
/** 活动状态 */
status: number;
/** 积分商城活动库存 */
stock: number;
/** 积分商城活动总库存 */
totalStock: number;
/** 备注 */
remark?: string;
/** 排序 */
sort: number;
/** 创建时间 */
createTime: string;
/** 积分商城商品 */
products: PointProduct[];
/** 商品名称 */
spuName: string;
/** 商品主图 */
picUrl: string;
/** 商品市场价,单位:分 */
marketPrice: number;
/** 兑换积分 */
point: number;
/** 兑换金额,单位:分 */
price: number;
id: number; // 积分商城活动编号
spuId: number; // 积分商城活动商品
status: number; // 活动状态
stock: number; // 积分商城活动库存
totalStock: number; // 积分商城活动总库存
remark?: string; // 备注
sort: number; // 排序
createTime: string; // 创建时间
products: PointProduct[]; // 积分商城商品
spuName: string; // 商品名称
picUrl: string; // 商品主图
marketPrice: number; // 商品市场价,单位:分
point: number; // 兑换积分
price: number; // 兑换金额,单位:分
}
// TODO @puhui999这些还需要么
/** 扩展 SKU 配置 */
export type SkuExtension = {
/** 积分商城商品配置 */
productConfig: PointProduct;
productConfig: PointProduct; // 积分商城商品配置
} & MallSpuApi.Sku;
/** 扩展 SPU 配置 */
export interface SpuExtension extends MallSpuApi.Spu {
/** SKU 列表 */
skus: SkuExtension[];
skus: SkuExtension[]; // SKU 列表
}
/** 扩展 SPU 配置(带积分信息) */
export interface SpuExtensionWithPoint extends MallSpuApi.Spu {
/** 积分商城活动库存 */
pointStock: number;
/** 积分商城活动总库存 */
pointTotalStock: number;
/** 兑换积分 */
point: number;
/** 兑换金额,单位:分 */
pointPrice: number;
pointStock: number; // 积分商城活动库存
pointTotalStock: number; // 积分商城活动总库存
point: number; // 兑换积分
pointPrice: number; // 兑换金额,单位:分
}
}

View File

@@ -5,48 +5,30 @@ import { requestClient } from '#/api/request';
export namespace MallRewardActivityApi {
/** 优惠规则 */
export interface RewardRule {
/** 满足金额 */
limit?: number;
/** 优惠金额 */
discountPrice?: number;
/** 是否包邮 */
freeDelivery?: boolean;
/** 赠送积分 */
point: number;
/** 赠送优惠券数量 */
limit?: number; // 满足金额
discountPrice?: number; // 优惠金额
freeDelivery?: boolean; // 是否包邮
point: number; // 赠送积分
giveCouponTemplateCounts?: {
[key: number]: number;
};
}; // 赠送优惠券数量
}
/** 满减送活动 */
export interface RewardActivity {
/** 活动编号 */
id?: number;
/** 活动名称 */
name?: string;
/** 开始时间 */
startTime?: Date;
/** 结束时间 */
endTime?: Date;
/** 开始和结束时间(仅前端使用) */
startAndEndTime?: Date[];
/** 备注 */
remark?: string;
/** 条件类型 */
conditionType?: number;
/** 商品范围 */
productScope?: number;
/** 优惠规则列表 */
rules: RewardRule[];
/** 商品范围值(仅表单使用):值为品类编号列表、商品编号列表 */
productScopeValues?: number[];
/** 商品分类编号列表(仅表单使用) */
productCategoryIds?: number[];
/** 商品 SPU 编号列表(仅表单使用) */
productSpuIds?: number[];
/** 状态 */
status?: number;
id?: number; // 活动编号
name?: string; // 活动名称
status?: number; // 活动状态
startTime?: Date; // 开始时间
endTime?: Date; // 结束时间
startAndEndTime?: Date[]; // 开始和结束时间(仅前端使用)
remark?: string; // 备注
conditionType?: number; // 条件类型
productScope?: number; // 商品范围
rules: RewardRule[]; // 优惠规则列表
productScopeValues?: number[]; // 商品范围值(仅表单使用):值为品类编号列表、商品编号列表
productCategoryIds?: number[]; // 商品分类编号列表(仅表单使用)
productSpuIds?: number[]; // 商品 SPU 编号列表(仅表单使用)
}
}

View File

@@ -7,72 +7,43 @@ import { requestClient } from '#/api/request';
export namespace MallSeckillActivityApi {
/** 秒杀商品 */
export interface SeckillProduct {
/** 商品 SKU 编号 */
skuId: number;
/** 商品 SPU 编号 */
spuId: number;
/** 秒杀价格 */
seckillPrice: number;
/** 秒杀库存 */
stock: number;
skuId: number; // 商品 SKU 编号
spuId: number; // 商品 SPU 编号
seckillPrice: number; // 秒杀价格
stock: number; // 秒杀库存
}
/** 秒杀活动 */
export interface SeckillActivity {
/** 活动编号 */
id?: number;
/** 商品 SPU 编号 */
spuId?: number;
/** 活动名称 */
name?: string;
/** 活动状态 */
status?: number;
/** 备注 */
remark?: string;
/** 开始时间 */
startTime: Date;
/** 结束时间 */
endTime: Date;
/** 排序 */
sort?: number;
/** 配置编号 */
configIds?: number[];
/** 订单数量 */
orderCount?: number;
/** 用户数量 */
userCount?: number;
/** 总金额 */
totalPrice?: number;
/** 总限购数量 */
totalLimitCount?: number;
/** 单次限购数量 */
singleLimitCount?: number;
/** 秒杀库存 */
stock?: number;
/** 秒杀总库存 */
totalStock?: number;
/** 秒杀价格 */
seckillPrice?: number;
/** 秒杀商品列表 */
products?: SeckillProduct[];
/** 图片 */
picUrl?: string;
/** 商品名称 */
spuName?: string;
/** 市场价 */
marketPrice?: number;
id?: number; // 活动编号
spuId?: number; // 商品 SPU 编号
name?: string; // 活动名称
status?: number; // 活动状态
remark?: string; // 备注
startTime?: Date; // 开始时间
endTime?: Date; // 结束时间
sort?: number; // 排序
configIds?: string; // 配置编号
orderCount?: number; // 订单数量
userCount?: number; // 用户数量
totalPrice?: number; // 总金额
totalLimitCount?: number; // 总限购数量
singleLimitCount?: number; // 单次限购数量
stock?: number; // 秒杀库存
totalStock?: number; // 秒杀总库存
seckillPrice?: number; // 秒杀价格
products?: SeckillProduct[]; // 秒杀商品列表
}
// TODO @puhui999这些还需要么
/** 扩展 SKU 配置 */
export type SkuExtension = {
/** 秒杀商品配置 */
productConfig: SeckillProduct;
productConfig: SeckillProduct; // 秒杀商品配置
} & MallSpuApi.Sku;
/** 扩展 SPU 配置 */
export interface SpuExtension extends MallSpuApi.Spu {
/** SKU 列表 */
skus: SkuExtension[];
skus: SkuExtension[]; // SKU 列表
}
}

View File

@@ -5,26 +5,12 @@ import { requestClient } from '#/api/request';
export namespace MallSeckillConfigApi {
/** 秒杀时段 */
export interface SeckillConfig {
/** 编号 */
id: number;
/** 秒杀时段名称 */
name: string;
/** 开始时间点 */
startTime: string;
/** 结束时间点 */
endTime: string;
/** 秒杀轮播图 */
sliderPicUrls: string[];
/** 活动状态 */
status: number;
}
/** 时段配置状态更新 */
export interface StatusUpdate {
/** 编号 */
id: number;
/** 状态 */
status: number;
id: number; // 编号
name: string; // 秒杀时段名称
startTime: string; // 开始时间点
endTime: string; // 结束时间点
sliderPicUrls: string[]; // 秒杀轮播图
status: number; // 活动状态
}
}

View File

@@ -2,13 +2,13 @@ import { requestClient } from '#/api/request';
export namespace MpStatisticsApi {
/** 统计查询参数 */
export interface StatisticsQuery {
export interface StatisticsGetReqVO {
accountId: number;
date: Date[];
}
/** 消息发送概况数据 */
export interface UpstreamMessage {
export interface StatisticsUpstreamMessageRespVO {
refDate: string;
msgType: string;
msgUser: number;
@@ -16,7 +16,7 @@ export namespace MpStatisticsApi {
}
/** 用户增减数据 */
export interface UserSummary {
export interface StatisticsUserSummaryRespVO {
refDate: string;
userSource: number;
newUser: number;
@@ -25,13 +25,13 @@ export namespace MpStatisticsApi {
}
/** 用户累计数据 */
export interface UserCumulate {
export interface StatisticsUserCumulateRespVO {
refDate: string;
cumulateUser: number;
}
/** 接口分析数据 */
export interface InterfaceSummary {
export interface StatisticsInterfaceSummaryRespVO {
refDate: string;
callbackCount: number;
failCount: number;
@@ -41,8 +41,8 @@ export namespace MpStatisticsApi {
}
/** 获取消息发送概况数据 */
export function getUpstreamMessage(params: MpStatisticsApi.StatisticsQuery) {
return requestClient.get<MpStatisticsApi.UpstreamMessage[]>(
export function getUpstreamMessage(params: MpStatisticsApi.StatisticsGetReqVO) {
return requestClient.get<MpStatisticsApi.StatisticsUpstreamMessageRespVO[]>(
'/mp/statistics/upstream-message',
{
params,
@@ -51,8 +51,8 @@ export function getUpstreamMessage(params: MpStatisticsApi.StatisticsQuery) {
}
/** 获取用户增减数据 */
export function getUserSummary(params: MpStatisticsApi.StatisticsQuery) {
return requestClient.get<MpStatisticsApi.UserSummary[]>(
export function getUserSummary(params: MpStatisticsApi.StatisticsGetReqVO) {
return requestClient.get<MpStatisticsApi.StatisticsUserSummaryRespVO[]>(
'/mp/statistics/user-summary',
{
params,
@@ -61,8 +61,8 @@ export function getUserSummary(params: MpStatisticsApi.StatisticsQuery) {
}
/** 获取用户累计数据 */
export function getUserCumulate(params: MpStatisticsApi.StatisticsQuery) {
return requestClient.get<MpStatisticsApi.UserCumulate[]>(
export function getUserCumulate(params: MpStatisticsApi.StatisticsGetReqVO) {
return requestClient.get<MpStatisticsApi.StatisticsUserCumulateRespVO[]>(
'/mp/statistics/user-cumulate',
{
params,
@@ -71,8 +71,10 @@ export function getUserCumulate(params: MpStatisticsApi.StatisticsQuery) {
}
/** 获取接口分析数据 */
export function getInterfaceSummary(params: MpStatisticsApi.StatisticsQuery) {
return requestClient.get<MpStatisticsApi.InterfaceSummary[]>(
export function getInterfaceSummary(
params: MpStatisticsApi.StatisticsGetReqVO,
) {
return requestClient.get<MpStatisticsApi.StatisticsInterfaceSummaryRespVO[]>(
'/mp/statistics/interface-summary',
{
params,

View File

@@ -11,12 +11,6 @@ export namespace MpTagApi {
count?: number;
createTime?: Date;
}
/** 标签分页查询参数 */
export interface TagPageQuery extends PageParam {
accountId?: number;
name?: string;
}
}
/** 创建公众号标签 */
@@ -44,7 +38,7 @@ export function getTag(id: number) {
}
/** 获取公众号标签分页 */
export function getTagPage(params: MpTagApi.TagPageQuery) {
export function getTagPage(params: PageParam) {
return requestClient.get<PageResult<MpTagApi.Tag>>('/mp/tag/page', {
params,
});

View File

@@ -20,21 +20,14 @@ export namespace PayAppApi {
}
/** 更新状态请求 */
export interface UpdateStatusReq {
export interface AppUpdateStatusReqVO {
id: number;
status: number;
}
export interface AppPageReqVO extends PageParam {
name?: string;
appKey?: string;
status?: number;
createTime?: Date[];
}
}
/** 查询支付应用列表 */
export function getAppPage(params: PayAppApi.AppPageReqVO) {
export function getAppPage(params: PageParam) {
return requestClient.get<PageResult<PayAppApi.App>>('/pay/app/page', {
params,
});
@@ -56,7 +49,7 @@ export function updateApp(data: PayAppApi.App) {
}
/** 修改支付应用状态 */
export function updateAppStatus(data: PayAppApi.UpdateStatusReq) {
export function updateAppStatus(data: PayAppApi.AppUpdateStatusReqVO) {
return requestClient.put('/pay/app/update-status', data);
}

View File

@@ -1,5 +1,3 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace PayChannelApi {
@@ -16,16 +14,6 @@ export namespace PayChannelApi {
}
}
/** 查询支付渠道列表 */
export function getChannelPage(params: PageParam) {
return requestClient.get<PageResult<PayChannelApi.Channel>>(
'/pay/channel/page',
{
params,
},
);
}
/** 查询支付渠道详情 */
export function getChannel(appId: number, code: string) {
return requestClient.get<PayChannelApi.Channel>('/pay/channel/get', {
@@ -42,13 +30,3 @@ export function createChannel(data: PayChannelApi.Channel) {
export function updateChannel(data: PayChannelApi.Channel) {
return requestClient.put('/pay/channel/update', data);
}
/** 删除支付渠道 */
export function deleteChannel(id: number) {
return requestClient.delete(`/pay/channel/delete?id=${id}`);
}
/** 导出支付渠道 */
export function exportChannel(params: PageParam) {
return requestClient.download('/pay/channel/export-excel', { params });
}

View File

@@ -19,11 +19,6 @@ export namespace DemoOrderApi {
spuId?: number;
createTime?: Date;
}
export interface OrderPageReqVO extends PageParam {
spuId?: number;
createTime?: Date[];
}
}
/** 创建示例订单 */
@@ -32,7 +27,7 @@ export function createDemoOrder(data: DemoOrderApi.Order) {
}
/** 获得示例订单分页 */
export function getDemoOrderPage(params: DemoOrderApi.OrderPageReqVO) {
export function getDemoOrderPage(params: PageParam) {
return requestClient.get<PageResult<DemoOrderApi.Order>>(
'/pay/demo-order/page',
{

View File

@@ -22,18 +22,6 @@ export namespace PayNotifyApi {
updateTime: Date;
logs?: any[];
}
/** 支付通知任务分页请求 */
export interface NotifyTaskPageReqVO extends PageParam {
appId?: number;
type?: number;
dataId?: number;
status?: number;
merchantOrderId?: string;
merchantRefundId?: string;
merchantTransferId?: string;
createTime?: Date[];
}
}
/** 获得支付通知明细 */
@@ -42,7 +30,7 @@ export function getNotifyTaskDetail(id: number) {
}
/** 获得支付通知分页 */
export function getNotifyTaskPage(params: PayNotifyApi.NotifyTaskPageReqVO) {
export function getNotifyTaskPage(params: PageParam) {
return requestClient.get<PageResult<PayNotifyApi.NotifyTask>>(
'/pay/notify/page',
{

View File

@@ -38,21 +38,10 @@ export namespace PayOrderApi {
createTime: Date;
updateTime: Date;
}
/** 支付订单分页请求 */
export interface OrderPageReqVO extends PageParam {
appId?: number;
channelCode?: string;
merchantOrderId?: string;
channelOrderNo?: string;
no?: string;
status?: number;
createTime?: Date[];
}
}
/** 查询支付订单列表 */
export function getOrderPage(params: PayOrderApi.OrderPageReqVO) {
export function getOrderPage(params: PageParam) {
return requestClient.get<PageResult<PayOrderApi.Order>>('/pay/order/page', {
params,
});

View File

@@ -36,39 +36,10 @@ export namespace PayRefundApi {
createTime: Date;
updateTime: Date;
}
/** 退款订单分页请求 */
export interface RefundPageReqVO extends PageParam {
merchantId?: number;
appId?: number;
channelId?: number;
channelCode?: string;
orderId?: string;
tradeNo?: string;
merchantOrderId?: string;
merchantRefundNo?: string;
notifyUrl?: string;
notifyStatus?: number;
status?: number;
type?: number;
payAmount?: number;
refundAmount?: number;
reason?: string;
userIp?: string;
channelOrderNo?: string;
channelRefundNo?: string;
channelErrorCode?: string;
channelErrorMsg?: string;
channelExtras?: string;
expireTime?: Date[];
successTime?: Date[];
notifyTime?: Date[];
createTime?: Date[];
}
}
/** 查询退款订单列表 */
export function getRefundPage(params: PayRefundApi.RefundPageReqVO) {
export function getRefundPage(params: PageParam) {
return requestClient.get<PageResult<PayRefundApi.Refund>>(
'/pay/refund/page',
{

View File

@@ -25,23 +25,10 @@ export namespace PayTransferApi {
notifyUrl: string;
channelNotifyData: string;
}
/** 转账单分页请求 */
export interface TransferPageReqVO extends PageParam {
no?: string;
appId?: number;
channelCode?: string;
merchantOrderId?: string;
status?: number;
userName?: string;
userAccount?: string;
channelTransferNo?: string;
createTime?: Date[];
}
}
/** 查询转账单列表 */
export function getTransferPage(params: PayTransferApi.TransferPageReqVO) {
export function getTransferPage(params: PageParam) {
return requestClient.get<PageResult<PayTransferApi.Transfer>>(
'/pay/transfer/page',
{

View File

@@ -3,11 +3,6 @@ import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace PayWalletApi {
/** 用户钱包查询参数 */
export interface PayWalletUserReq {
userId: number;
}
/** 钱包信息 */
export interface Wallet {
id: number;
@@ -19,32 +14,27 @@ export namespace PayWalletApi {
freezePrice: number;
}
/** 钱包分页请求 */
export interface WalletPageReqVO extends PageParam {
userId?: number;
userType?: number;
balance?: number;
totalExpense?: number;
totalRecharge?: number;
freezePrice?: number;
/** 钱包查询参数 */
export interface WalletUserQueryReqVO {
userId: number;
}
/** 钱包修改余额 */
export interface PayWalletUpdateBalanceReqVO {
export interface WalletUpdateBalanceReqVO {
userId: number;
balance: number;
}
}
/** 查询用户钱包详情 */
export function getWallet(params: PayWalletApi.PayWalletUserReq) {
export function getWallet(params: PayWalletApi.WalletUserQueryReqVO) {
return requestClient.get<PayWalletApi.Wallet>('/pay/wallet/get', {
params,
});
}
/** 查询会员钱包列表 */
export function getWalletPage(params: PayWalletApi.WalletPageReqVO) {
export function getWalletPage(params: PageParam) {
return requestClient.get<PageResult<PayWalletApi.Wallet>>(
'/pay/wallet/page',
{
@@ -55,7 +45,7 @@ export function getWalletPage(params: PayWalletApi.WalletPageReqVO) {
/** 修改会员钱包余额 */
export function updateWalletBalance(
data: PayWalletApi.PayWalletUpdateBalanceReqVO,
data: PayWalletApi.WalletUpdateBalanceReqVO,
) {
return requestClient.put('/pay/wallet/update-balance', data);
}

View File

@@ -547,7 +547,10 @@ onMounted(async () => {
<template>
<Page auto-content-height>
<ElContainer class="absolute left-0 top-0 m-4 h-full w-full flex-1">
<ElContainer
direction="horizontal"
class="absolute left-0 top-0 m-4 h-full w-full flex-1"
>
<!-- 左侧对话列表 -->
<ConversationList
class="!bg-card"
@@ -560,7 +563,7 @@ onMounted(async () => {
/>
<!-- 右侧详情部分 -->
<ElContainer class="bg-card mx-4">
<ElContainer direction="vertical" class="bg-card mx-4 flex-1">
<ElHeader
class="!bg-card border-border flex !h-12 items-center justify-between border-b !px-4"
>
@@ -571,30 +574,30 @@ onMounted(async () => {
</span>
</div>
<div class="flex w-72 justify-end" v-if="activeConversation">
<div class="flex w-72 justify-end gap-2" v-if="activeConversation">
<ElButton
type="primary"
plain
class="mr-2 px-2"
class="!px-2"
size="small"
@click="openChatConversationUpdateForm"
>
<span v-html="activeConversation?.modelName"></span>
<IconifyIcon icon="lucide:settings" class="ml-2 size-4" />
<IconifyIcon icon="lucide:settings" class="!ml-2 size-4" />
</ElButton>
<ElButton
size="small"
class="mr-2 px-2"
class="!ml-0 !px-2"
@click="handlerMessageClear"
>
<IconifyIcon icon="lucide:trash-2" color="#787878" />
</ElButton>
<ElButton size="small" class="mr-2 px-2">
<ElButton size="small" class="!ml-0 !px-2">
<IconifyIcon icon="lucide:download" color="#787878" />
</ElButton>
<ElButton
size="small"
class="mr-2 px-2"
class="!ml-0 !px-2"
@click="handleGoTopMessage"
>
<IconifyIcon icon="lucide:arrow-up" color="#787878" />
@@ -629,7 +632,7 @@ onMounted(async () => {
</div>
</ElMain>
<ElFooter class="!bg-card flex flex-col !p-0">
<ElFooter height="auto" class="!bg-card flex flex-col !p-0">
<form
class="border-border mx-4 mb-8 mt-2 flex flex-col rounded-xl border p-2"
>
@@ -673,7 +676,8 @@ onMounted(async () => {
{{ conversationInProgress ? '进行中' : '发送' }}
</ElButton>
<ElButton
type="danger"
type="primary"
:danger="true"
@click="stopStream()"
v-if="conversationInProgress === true"
>

View File

@@ -166,232 +166,277 @@ async function getConversationGroupByCreateTime(
return groupMap;
}
/** 新建对话 */
async function handleConversationCreate() {
// 1. 创建对话
const conversationId = await createChatConversationMy({
roleId: undefined,
} as unknown as AiChatConversationApi.ChatConversation);
// 2. 刷新列表
async function createConversation() {
// 1. 新建对话
const conversationId = await createChatConversationMy(
{} as unknown as AiChatConversationApi.ChatConversation,
);
// 2. 获取对话内容
await getChatConversationList();
// 3. 选中对话
await handleConversationClick(conversationId);
// 4. 回调
emits('onConversationCreate');
}
// 3. 回调
emits('onConversationCreate', conversationId);
/** 修改对话的标题 */
async function updateConversationTitle(
conversation: AiChatConversationApi.ChatConversation,
) {
// 1. 二次确认
await prompt({
async beforeClose(scope) {
if (scope.isConfirm) {
if (scope.value) {
try {
// 2. 发起修改
await updateChatConversationMy({
id: conversation.id,
title: scope.value,
} as AiChatConversationApi.ChatConversation);
ElMessage.success('重命名成功');
// 3. 刷新列表
await getChatConversationList();
// 4. 过滤当前切换的
const filterConversationList = conversationList.value.filter(
(item) => {
return item.id === conversation.id;
},
);
if (
filterConversationList.length > 0 &&
filterConversationList[0] && // tip避免切换对话
activeConversationId.value === filterConversationList[0].id!
) {
emits('onConversationClick', filterConversationList[0]);
}
} catch {
return false;
}
} else {
ElMessage.error('请输入标题');
return false;
}
}
},
component: () => {
return h(ElInput, {
placeholder: '请输入标题',
clearable: true,
modelValue: conversation.title,
});
},
content: '请输入标题',
title: '修改标题',
modelPropName: 'modelValue',
});
}
/** 删除聊天对话 */
async function deleteChatConversation(
conversation: AiChatConversationApi.ChatConversation,
) {
// 删除的二次确认
await confirm(`是否确认删除对话 - ${conversation.title}?`);
// 发起删除
await deleteChatConversationMy(conversation.id);
ElMessage.success('对话已删除');
// 刷新列表
await getChatConversationList();
// 回调
emits('onConversationDelete', conversation);
}
/** 清空未置顶的对话 */
async function handleConversationClear() {
await confirm({
title: '清空未置顶的对话',
content: h('div', {}, [
h('p', '确认清空未置顶的对话吗?'),
h('p', '清空后,未置顶的对话将被删除,无法恢复!'),
]),
});
// 清空
async function handleClearConversation() {
await confirm('确认后对话会全部清空,置顶的对话除外。');
await deleteChatConversationMyByUnpinned();
// 刷新列表
ElMessage.success($t('ui.actionMessage.operationSuccess'));
// 清空对话、对话内容
activeConversationId.value = null;
// 获取对话列表
await getChatConversationList();
// 回调
// 回调 方法
emits('onConversationClear');
}
/** 删除对话 */
async function handleConversationDelete(id: number) {
await confirm({
title: '删除对话',
content: h('div', {}, [
h('p', '确认删除该对话吗?'),
h('p', '删除后,该对话将被删除,无法恢复!'),
]),
});
// 删除
await deleteChatConversationMy(id);
// 刷新列表
await getChatConversationList();
// 回调
emits('onConversationDelete', id);
}
/** 置顶对话 */
async function handleConversationPin(conversation: any) {
// 更新
await updateChatConversationMy({
id: conversation.id,
pinned: !conversation.pinned,
} as AiChatConversationApi.ChatConversation);
// 刷新列表
/** 对话置顶 */
async function handleTop(conversation: AiChatConversationApi.ChatConversation) {
// 更新对话置顶
conversation.pinned = !conversation.pinned;
await updateChatConversationMy(conversation);
// 刷新对话
await getChatConversationList();
}
/** 编辑对话 */
async function handleConversationEdit(conversation: any) {
const title = await prompt({
title: '编辑对话',
content: '请输入对话标题',
defaultValue: conversation.title,
});
// 更新
await updateChatConversationMy({
id: conversation.id,
title,
} as AiChatConversationApi.ChatConversation);
// 刷新列表
await getChatConversationList();
// 提示
ElMessage.success($t('ui.actionMessage.operationSuccess'));
}
// ============ 角色仓库 ============
/** 打开角色仓库 */
async function handleRoleRepositoryOpen() {
/** 角色仓库抽屉 */
const handleRoleRepository = async () => {
drawerApi.open();
}
/** 监听 activeId 变化 */
watch(
() => props.activeId,
(newValue) => {
activeConversationId.value = newValue;
},
);
};
/** 监听选中的对话 */
const { activeId } = toRefs(props);
watch(activeId, async (newValue) => {
activeConversationId.value = newValue;
});
defineExpose({ createConversation });
/** 初始化 */
onMounted(async () => {
// 获取对话列表
// 获取 对话列表
await getChatConversationList();
// 设置选中的对话
if (activeId.value) {
activeConversationId.value = activeId.value;
// 默认选中
if (props.activeId) {
activeConversationId.value = props.activeId;
} else {
// 首次默认选中第一个
if (conversationList.value.length > 0 && conversationList.value[0]) {
activeConversationId.value = conversationList.value[0].id;
// 回调 onConversationClick
emits('onConversationClick', conversationList.value[0]);
}
}
});
defineExpose({ getChatConversationList });
</script>
<template>
<ElAside
class="bg-card relative flex h-full flex-col overflow-hidden border-r border-gray-200"
width="280px"
class="relative flex h-full flex-col justify-between overflow-hidden p-4"
>
<Drawer />
<!-- 头部 -->
<div class="flex flex-col p-4">
<div class="mb-4 flex flex-row items-center justify-between">
<div class="text-lg font-bold">对话</div>
<div class="flex flex-row">
<ElButton
class="flex items-center bg-transparent px-1.5 hover:bg-gray-100"
text
@click="handleConversationCreate"
>
<IconifyIcon icon="lucide:plus" />
</ElButton>
<ElButton
class="flex items-center bg-transparent px-1.5 hover:bg-gray-100"
text
@click="handleConversationClear"
>
<IconifyIcon icon="lucide:trash" />
</ElButton>
<ElButton
class="flex items-center bg-transparent px-1.5 hover:bg-gray-100"
text
@click="handleRoleRepositoryOpen"
>
<IconifyIcon icon="lucide:user" />
</ElButton>
</div>
</div>
<!-- 左顶部对话 -->
<div class="flex h-full flex-col">
<ElButton class="h-9 w-full" type="primary" @click="createConversation">
<IconifyIcon icon="lucide:plus" class="mr-1" />
新建对话
</ElButton>
<ElInput
v-model="searchName"
placeholder="搜索对话"
@keyup.enter="searchConversation"
size="large"
class="search-input mt-4"
placeholder="搜索历史记录"
@keyup="searchConversation"
>
<template #suffix>
<template #prefix>
<IconifyIcon icon="lucide:search" />
</template>
</ElInput>
</div>
<!-- 对话列表 -->
<div class="flex-1 overflow-y-auto px-4">
<div v-if="loading" class="flex h-full items-center justify-center">
<div class="text-sm text-gray-400">加载中...</div>
</div>
<div v-else-if="Object.keys(conversationMap).length === 0">
<ElEmpty description="暂无对话" />
</div>
<div v-else>
<!-- 左中间对话列表 -->
<div class="mt-2 flex-1 overflow-auto">
<!-- 情况一加载中 -->
<ElEmpty v-if="loading" description="." v-loading="loading" />
<!-- 情况二按照 group 分组 -->
<div
v-for="(conversations, groupName) in conversationMap"
:key="groupName"
v-for="conversationKey in Object.keys(conversationMap)"
:key="conversationKey"
>
<div
v-if="conversations.length > 0"
class="mb-2 mt-4 text-xs text-gray-400"
v-if="conversationMap[conversationKey].length > 0"
class="classify-title pt-2"
>
{{ groupName }}
<p class="mx-1">
{{ conversationKey }}
</p>
</div>
<div
v-for="conversation in conversations"
v-for="conversation in conversationMap[conversationKey]"
:key="conversation.id"
class="group relative mb-2 cursor-pointer rounded-lg p-2 transition-all hover:bg-gray-100"
:class="{
'bg-gray-100': activeConversationId === conversation.id,
}"
@click="handleConversationClick(conversation.id)"
@mouseenter="hoverConversationId = conversation.id"
@mouseleave="hoverConversationId = null"
@mouseover="hoverConversationId = conversation.id"
@mouseout="hoverConversationId = null"
class="mt-1"
>
<div class="flex items-center">
<ElAvatar
v-if="conversation.roleAvatar"
:src="conversation.roleAvatar"
:size="28"
/>
<SvgGptIcon v-else class="size-7" />
<div class="ml-2 flex-1 overflow-hidden">
<div class="truncate text-sm font-medium">
<div
class="mb-2 flex cursor-pointer flex-row items-center justify-between rounded-lg px-2 leading-10 transition-colors hover:bg-gray-100 dark:hover:bg-gray-800"
:class="[
conversation.id === activeConversationId
? 'bg-primary/10 dark:bg-primary/20'
: '',
]"
>
<div class="flex items-center">
<ElAvatar
v-if="conversation.roleAvatar"
:src="conversation.roleAvatar"
:size="28"
/>
<SvgGptIcon v-else class="size-6" />
<span
class="max-w-32 overflow-hidden text-ellipsis whitespace-nowrap p-2 text-sm font-normal"
>
{{ conversation.title }}
</div>
</span>
</div>
<div
v-if="hoverConversationId === conversation.id"
class="flex flex-row"
v-show="hoverConversationId === conversation.id"
class="relative right-0.5 flex items-center text-gray-400"
>
<!-- TODO @AI三个按钮之间间隙太大了 -->
<ElButton
class="flex items-center bg-transparent px-1.5 hover:bg-gray-100"
text
@click.stop="handleConversationPin(conversation)"
class="mr-0 px-1"
link
@click.stop="handleTop(conversation)"
>
<IconifyIcon
:icon="
conversation.pinned ? 'lucide:pin-off' : 'lucide:pin'
"
v-if="!conversation.pinned"
icon="lucide:arrow-up-to-line"
/>
<IconifyIcon
v-if="conversation.pinned"
icon="lucide:arrow-down-from-line"
/>
</ElButton>
<ElButton
class="flex items-center bg-transparent px-1.5 hover:bg-gray-100"
text
@click.stop="handleConversationEdit(conversation)"
class="mr-0 px-1"
link
@click.stop="updateConversationTitle(conversation)"
>
<IconifyIcon icon="lucide:edit" />
</ElButton>
<ElButton
class="flex items-center bg-transparent px-1.5 hover:bg-gray-100"
text
@click.stop="handleConversationDelete(conversation.id)"
class="mr-0 px-1"
link
@click.stop="deleteChatConversation(conversation)"
>
<IconifyIcon icon="lucide:trash" />
<IconifyIcon icon="lucide:trash-2" />
</ElButton>
</div>
</div>
</div>
</div>
</div>
<!-- 底部占位 -->
<div class="h-12 w-full"></div>
</div>
<!-- 左底部工具栏 -->
<div
class="bg-card absolute bottom-1 left-0 right-0 mb-4 flex items-center justify-between px-5 leading-9 text-gray-400 shadow-sm"
>
<div
class="flex cursor-pointer items-center text-gray-400"
@click="handleRoleRepository"
>
<IconifyIcon icon="lucide:user" />
<span class="ml-1">角色仓库</span>
</div>
<div
class="flex cursor-pointer items-center text-gray-400"
@click="handleClearConversation"
>
<IconifyIcon icon="lucide:trash" />
<span class="ml-1">清空未置顶对话</span>
</div>
</div>
</ElAside>
</template>

View File

@@ -18,11 +18,9 @@ async function handlerPromptClick(prompt: any) {
</script>
<template>
<div class="relative flex h-full w-full flex-row justify-center">
<!-- center-container -->
<div class="flex flex-col justify-center">
<!-- title -->
<div class="text-center text-3xl font-bold">芋道 AI</div>
<!-- role-list -->
<div class="mt-5 flex w-96 flex-wrap items-center justify-center">
<div

View File

@@ -37,7 +37,7 @@ const emits = defineEmits(['onDeleteSuccess', 'onRefresh', 'onEdit']);
const { copy } = useClipboard(); // 初始化 copy 到粘贴板
const userStore = useUserStore();
// 判断"消息列表"滚动的位置(用于判断是否需要滚动到消息最下方)
// 判断消息列表滚动的位置(用于判断是否需要滚动到消息最下方)
const messageContainer: any = ref(null);
const isScrolling = ref(false); // 用于判断用户是否在滚动
@@ -88,6 +88,7 @@ async function copyContent(content: string) {
await copy(content);
ElMessage.success('复制成功!');
}
/** 删除 */
async function handleDelete(id: number) {
// 删除 message
@@ -153,7 +154,7 @@ onMounted(async () => {
</div>
<div class="mt-2 flex flex-row">
<ElButton
class="flex items-center bg-transparent px-1.5 hover:bg-gray-100"
class="!ml-1 flex items-center bg-transparent !px-1.5 hover:bg-gray-100"
text
@click="copyContent(item.content)"
>
@@ -161,7 +162,7 @@ onMounted(async () => {
</ElButton>
<ElButton
v-if="item.id > 0"
class="flex items-center bg-transparent px-1.5 hover:bg-gray-100"
class="!ml-1 flex items-center bg-transparent !px-1.5 hover:bg-gray-100"
text
@click="handleDelete(item.id)"
>
@@ -196,28 +197,28 @@ onMounted(async () => {
</div>
<div class="mt-2 flex flex-row-reverse">
<ElButton
class="flex items-center bg-transparent px-1.5 hover:bg-gray-100"
class="!ml-1 flex items-center bg-transparent !px-1.5 hover:bg-gray-100"
text
@click="copyContent(item.content)"
>
<IconifyIcon icon="lucide:copy" />
</ElButton>
<ElButton
class="flex items-center bg-transparent px-1.5 hover:bg-gray-100"
class="!ml-1 flex items-center bg-transparent !px-1.5 hover:bg-gray-100"
text
@click="handleDelete(item.id)"
>
<IconifyIcon icon="lucide:trash" />
</ElButton>
<ElButton
class="flex items-center bg-transparent px-1.5 hover:bg-gray-100"
class="!ml-1 flex items-center bg-transparent !px-1.5 hover:bg-gray-100"
text
@click="handleRefresh(item)"
>
<IconifyIcon icon="lucide:refresh-cw" />
</ElButton>
<ElButton
class="flex items-center bg-transparent px-1.5 hover:bg-gray-100"
class="!ml-1 flex items-center bg-transparent !px-1.5 hover:bg-gray-100"
text
@click="handleEdit(item)"
>

View File

@@ -24,7 +24,7 @@ async function handleCategoryClick(category: string) {
</script>
<template>
<div class="flex flex-wrap items-center">
<div class="mx-0 flex flex-wrap items-center">
<div
class="mr-2 flex flex-row"
v-for="category in categoryList"

View File

@@ -63,59 +63,59 @@ async function handleTabsScroll() {
<template>
<div
class="relative flex h-full flex-wrap content-start items-start overflow-auto px-6 pb-36"
class="relative flex h-full flex-wrap content-start items-start overflow-auto pb-36"
ref="tabsRef"
@scroll="handleTabsScroll"
>
<div class="mb-5 mr-5 inline-block" v-for="role in roleList" :key="role.id">
<div class="mb-3 mr-3 inline-block" v-for="role in roleList" :key="role.id">
<ElCard
class="relative rounded-lg"
body-style="position: relative; display: flex; flex-direction: row; justify-content: flex-start; width: 240px; max-width: 240px; padding: 15px 15px 10px;"
body-style="position: relative; display: flex; flex-direction: column; justify-content: flex-start; width: 240px; max-width: 240px; padding: 15px;"
>
<!-- 更多操作 -->
<div v-if="showMore" class="absolute right-2 top-0">
<ElDropdown>
<ElButton link>
<IconifyIcon icon="lucide:ellipsis-vertical" />
<!-- 头部头像名称 -->
<div class="flex items-center justify-between">
<div class="flex min-w-0 flex-1 items-center">
<ElAvatar
:src="role.avatar"
class="h-8 w-8 flex-shrink-0 overflow-hidden"
/>
<div class="ml-2 truncate text-base font-medium">
{{ role.name }}
</div>
</div>
</div>
<!-- 描述信息 -->
<div
class="mt-2 line-clamp-2 h-10 overflow-hidden text-sm text-gray-600"
>
{{ role.description }}
</div>
<!-- 底部操作按钮 -->
<div class="flex items-center justify-end gap-2">
<ElDropdown v-if="showMore">
<ElButton size="small">
<IconifyIcon icon="lucide:ellipsis" />
</ElButton>
<template #dropdown>
<ElDropdownMenu>
<ElDropdownItem @click="handleMoreClick('edit', role)">
<div class="flex items-center">
<IconifyIcon icon="lucide:edit" color="#787878" />
<span class="text-primary">编辑</span>
</div>
</ElDropdownItem>
<ElDropdownItem @click="handleMoreClick('delete', role)">
<div class="flex items-center">
<IconifyIcon icon="lucide:trash" color="red" />
<span class="text-red-500">删除</span>
<span class="ml-2 text-red-500">删除</span>
</div>
</ElDropdownItem>
<ElDropdownItem @click="handleMoreClick('edit', role)">
<div class="flex items-center">
<IconifyIcon icon="lucide:edit" color="#787878" />
<span class="text-primary ml-2">编辑</span>
</div>
</ElDropdownItem>
</ElDropdownMenu>
</template>
</ElDropdown>
</div>
<!-- 角色信息 -->
<div>
<ElAvatar :src="role.avatar" class="h-10 w-10 overflow-hidden" />
</div>
<div class="ml-2 w-4/5">
<div class="h-20">
<div class="max-w-32 text-lg font-bold">
{{ role.name }}
</div>
<div class="mt-2 text-sm">
{{ role.description }}
</div>
</div>
<div class="mt-1 flex flex-row-reverse">
<ElButton type="primary" size="small" @click="handleUseClick(role)">
使用
</ElButton>
</div>
<ElButton type="primary" size="small" @click="handleUseClick(role)">
使用
</ElButton>
</div>
</ElCard>
</div>

View File

@@ -119,6 +119,7 @@ async function handlerCategoryClick(category: string) {
async function handlerAddRole() {
formModalApi.setData({ formType: 'my-create' }).open();
}
/** 编辑角色 */
async function handlerCardEdit(role: any) {
formModalApi.setData({ formType: 'my-update', id: role.id }).open();
@@ -187,7 +188,7 @@ onMounted(async () => {
<FormModal @success="handlerAddRoleSuccess" />
<ElMain class="relative m-0 flex-1 overflow-hidden p-0">
<div class="z-100 absolute right-0 top--1 mr-5 mt-5">
<div class="z-100 absolute right-5 top-5 flex items-center">
<!-- 搜索输入框 -->
<ElInput
v-model="search"
@@ -196,7 +197,11 @@ onMounted(async () => {
@keyup.enter="getActiveTabsRole"
>
<template #suffix>
<IconifyIcon icon="lucide:search" />
<IconifyIcon
icon="lucide:search"
class="cursor-pointer"
@click="getActiveTabsRole"
/>
</template>
</ElInput>
<ElButton
@@ -209,11 +214,10 @@ onMounted(async () => {
添加角色
</ElButton>
</div>
<!-- 标签页内容 -->
<ElTabs
v-model="activeTab"
class="relative h-full p-4"
class="relative h-full pb-4 pr-4"
@tab-click="handleTabsClick"
>
<ElTabPane
@@ -229,10 +233,8 @@ onMounted(async () => {
@on-edit="handlerCardEdit"
@on-use="handlerCardUse"
@on-page="handlerCardPage('my')"
class="mt-5"
/>
</ElTabPane>
<ElTabPane
name="public-role"
class="flex h-full flex-col overflow-y-auto"

View File

@@ -69,7 +69,7 @@ async function handleGenerateImage() {
width: width.value, // 图片宽度
height: height.value, // 图片高度
options: {},
} as unknown as AiImageApi.ImageDrawReq;
} as unknown as AiImageApi.ImageDrawReqVO;
await drawImage(form);
} finally {
// 回调

View File

@@ -116,7 +116,7 @@ async function handleGenerateImage() {
options: {
style: style.value, // 图像生成的风格
},
} as AiImageApi.ImageDrawReq;
} as AiImageApi.ImageDrawReqVO;
// 发送请求
await drawImage(form);
} finally {

View File

@@ -144,7 +144,7 @@ async function handleImageMidjourneyButtonClick(
const data = {
id: imageDetail.id,
customId: button.customId,
} as AiImageApi.ImageMidjourneyAction;
} as AiImageApi.ImageMidjourneyActionVO;
// 2. 发送 action
await midjourneyAction(data);
// 3. 刷新列表

View File

@@ -103,7 +103,7 @@ async function handleGenerateImage() {
height: imageSize.height,
version: selectVersion.value,
referImageUrl: referImageUrl.value,
} as AiImageApi.ImageMidjourneyImagineReq;
} as AiImageApi.ImageMidjourneyImagineReqVO;
await midjourneyImagine(req);
} finally {
// 回调

View File

@@ -103,7 +103,7 @@ async function handleGenerateImage() {
clipGuidancePreset: clipGuidancePreset.value, // 文本提示相匹配的图像 CLIP
stylePreset: stylePreset.value, // 风格
},
} as unknown as AiImageApi.ImageDrawReq;
} as unknown as AiImageApi.ImageDrawReqVO;
await drawImage(form);
} finally {
// 回调

View File

@@ -14,7 +14,7 @@ import { useGridColumns, useGridFormSchema } from './data';
defineOptions({ name: 'BpmCopyTask' });
/** 任务详情 */
function handleDetail(row: BpmProcessInstanceApi.Copy) {
function handleDetail(row: BpmProcessInstanceApi.ProcessInstanceCopyRespVO) {
const query = {
id: row.processInstanceId,
...(row.activityId && { activityId: row.activityId }),
@@ -52,7 +52,7 @@ const [Grid] = useVbenVxeGrid({
refresh: true,
search: true,
},
} as VxeTableGridOptions<BpmProcessInstanceApi.Copy>,
} as VxeTableGridOptions<BpmProcessInstanceApi.ProcessInstanceCopyRespVO>,
});
</script>

View File

@@ -49,7 +49,7 @@ const [Grid] = useVbenVxeGrid({
refresh: true,
search: true,
},
} as VxeTableGridOptions<BpmTaskApi.TaskManager>,
} as VxeTableGridOptions<BpmTaskApi.Task>,
});
</script>

View File

@@ -1,6 +1,6 @@
<script lang="ts" setup>
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { MallArticleCategoryApi } from '#/api/mall/promotion/articleCategory';
import type { MallArticleCategoryApi } from '#/api/mall/promotion/article/category';
import { DocAlert, Page, useVbenModal } from '@vben/common-ui';
@@ -10,7 +10,7 @@ import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import {
deleteArticleCategory,
getArticleCategoryPage,
} from '#/api/mall/promotion/articleCategory';
} from '#/api/mall/promotion/article/category';
import { $t } from '#/locales';
import { useGridColumns, useGridFormSchema } from './data';

View File

@@ -1,5 +1,5 @@
<script lang="ts" setup>
import type { MallArticleCategoryApi } from '#/api/mall/promotion/articleCategory';
import type { MallArticleCategoryApi } from '#/api/mall/promotion/article/category';
import { computed, ref } from 'vue';
@@ -12,7 +12,7 @@ import {
createArticleCategory,
getArticleCategory,
updateArticleCategory,
} from '#/api/mall/promotion/articleCategory';
} from '#/api/mall/promotion/article/category';
import { $t } from '#/locales';
import { useFormSchema } from '../data';

View File

@@ -1,12 +1,12 @@
import type { VbenFormSchema } from '#/adapter/form';
import type { VxeGridPropTypes } from '#/adapter/vxe-table';
import type { MallArticleCategoryApi } from '#/api/mall/promotion/articleCategory';
import type { MallArticleCategoryApi } from '#/api/mall/promotion/article/category';
import { CommonStatusEnum, DICT_TYPE } from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { z } from '#/adapter/form';
import { getSimpleArticleCategoryList } from '#/api/mall/promotion/articleCategory';
import { getSimpleArticleCategoryList } from '#/api/mall/promotion/article/category';
import { getRangePickerDefaultProps } from '#/utils';
/** 关联数据 */

View File

@@ -1,13 +1,13 @@
<script lang="ts" setup>
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { MallBannerApi } from '#/api/mall/market/banner';
import type { MallBannerApi } from '#/api/mall/promotion/banner';
import { DocAlert, Page, useVbenModal } from '@vben/common-ui';
import { ElLoading, ElMessage } from 'element-plus';
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import { deleteBanner, getBannerPage } from '#/api/mall/market/banner';
import { deleteBanner, getBannerPage } from '#/api/mall/promotion/banner';
import { $t } from '#/locales';
import { useGridColumns, useGridFormSchema } from './data';

View File

@@ -1,5 +1,6 @@
<script lang="ts" setup>
import type { MallBannerApi } from '#/api/mall/market/banner';
import type { MallBannerApi } from '#/api/mall/promotion/banner';
import type { SystemUserApi } from '#/api/system/user';
import { computed, ref } from 'vue';
@@ -12,7 +13,7 @@ import {
createBanner,
getBanner,
updateBanner,
} from '#/api/mall/market/banner';
} from '#/api/mall/promotion/banner';
import { $t } from '#/locales';
import { useFormSchema } from '../data';

View File

@@ -1,5 +1,5 @@
<script lang="ts" setup>
import type { Reply } from '#/views/mp/components/reply/types';
import type { Reply } from '#/views/mp/components/wx-reply/types';
import { computed, nextTick, ref } from 'vue';
@@ -10,7 +10,7 @@ import { ElMessage } from 'element-plus';
import { useVbenForm } from '#/adapter/form';
import { createAutoReply, updateAutoReply } from '#/api/mp/autoReply';
import { $t } from '#/locales';
import { ReplyType } from '#/views/mp/components/reply/types';
import { ReplyType } from '#/views/mp/components/wx-reply/types';
import { useFormSchema } from '../data';
import { MsgType } from './types';

View File

@@ -1 +0,0 @@
export { default } from './account-select.vue';

View File

@@ -1,22 +1,24 @@
// 统一导出所有模块组件
export { default as AccountSelect } from './account-select/account-select.vue';
export { default as AccountSelect } from './wx-account-select/wx-account-select.vue';
export { default as WxAccountSelect } from './wx-account-select/wx-account-select.vue';
export { default as Location } from './location/location.vue';
export { default as MaterialSelect } from './material-select/material-select.vue';
// TODO @hw还是带着 wx 前缀。。。貌似好点,我的锅!!!
export { default as Location } from './wx-location/wx-location.vue';
export * from './wx-material-select/types';
export * from './material-select/types';
export { default as MaterialSelect } from './wx-material-select/wx-material-select.vue';
export * from './msg/types';
export * from './wx-msg/types';
export { default as Music } from './music/music.vue';
export { default as Music } from './wx-music/wx-music.vue';
export { default as News } from './news/news.vue';
export { default as News } from './wx-news/wx-news.vue';
export { default as ReplySelect } from './reply/reply.vue';
export * from './wx-reply/types';
export * from './reply/types';
export { default as ReplySelect } from './wx-reply/wx-reply.vue';
export { default as VideoPlayer } from './video-play/video-play.vue';
export { default as VideoPlayer } from './wx-video-play/wx-video-play.vue';
export { default as VoicePlayer } from './voice-play/voice-play.vue';
export { default as VoicePlayer } from './wx-voice-play/wx-voice-play.vue';

View File

@@ -1 +0,0 @@
export { default } from './location.vue';

View File

@@ -1,3 +0,0 @@
export { default } from './material-select.vue';
export { MaterialType, NewsType } from './types';

View File

@@ -1,3 +0,0 @@
export { default } from './msg.vue';
export { MsgType } from './types';

View File

@@ -1 +0,0 @@
export { default } from './music.vue';

View File

@@ -1 +0,0 @@
export { default } from './news.vue';

View File

@@ -1 +0,0 @@
export { default } from './video-play.vue';

View File

@@ -1 +0,0 @@
export { default } from './voice-play.vue';

View File

@@ -0,0 +1 @@
export { default } from './wx-account-select.vue';

View File

@@ -124,7 +124,7 @@ onMounted(() => {
<ElSelect
v-model="currentId"
placeholder="请选择公众号"
class="!w-240px"
class="!w-full"
@change="onChanged"
>
<ElOption

View File

@@ -0,0 +1 @@
export { default } from './wx-location.vue';

View File

@@ -0,0 +1,3 @@
export { default } from './wx-material-select.vue';
export { MaterialType, NewsType } from './types';

View File

@@ -20,9 +20,9 @@ import {
import * as MpDraftApi from '#/api/mp/draft';
import * as MpFreePublishApi from '#/api/mp/freePublish';
import * as MpMaterialApi from '#/api/mp/material';
import News from '#/views/mp/components/news/news.vue';
import VideoPlayer from '#/views/mp/components/video-play/video-play.vue';
import VoicePlayer from '#/views/mp/components/voice-play/voice-play.vue';
import News from '#/views/mp/components/wx-news/wx-news.vue';
import VideoPlayer from '#/views/mp/components/wx-video-play/wx-video-play.vue';
import VoicePlayer from '#/views/mp/components/wx-voice-play/wx-voice-play.vue';
import { NewsType } from './types';

View File

@@ -0,0 +1,3 @@
export { default } from './wx-msg.vue';
export { MsgType } from './types';

View File

@@ -5,7 +5,7 @@ import { formatDateTime } from '@vben/utils';
import avatarWechat from '#/assets/imgs/wechat.png';
import Msg from './msg.vue';
import Msg from './wx-msg.vue';
// User 使
type PropsUser = User;

View File

@@ -1,11 +1,11 @@
<script lang="ts" setup>
import { ref } from 'vue';
import Location from '#/views/mp/components/location/location.vue';
import Music from '#/views/mp/components/music/music.vue';
import News from '#/views/mp/components/news/news.vue';
import VideoPlayer from '#/views/mp/components/video-play/video-play.vue';
import VoicePlayer from '#/views/mp/components/voice-play/voice-play.vue';
import Location from '#/views/mp/components/wx-location/wx-location.vue';
import Music from '#/views/mp/components/wx-music/wx-music.vue';
import News from '#/views/mp/components/wx-news/wx-news.vue';
import VideoPlayer from '#/views/mp/components/wx-video-play/wx-video-play.vue';
import VoicePlayer from '#/views/mp/components/wx-voice-play/wx-voice-play.vue';
import { MsgType } from '../types';
import MsgEvent from './msg-event.vue';

View File

@@ -0,0 +1 @@
export { default } from './wx-music.vue';

View File

@@ -63,5 +63,5 @@ defineExpose({
<style lang="scss" scoped>
/* 因为 joolun 实现依赖 avue 组件,该页面使用了 card.scss */
@import url('../msg/card.scss');
@import url('../wx-msg/card.scss');
</style>

View File

@@ -0,0 +1 @@
export { default } from './wx-news.vue';

View File

@@ -120,5 +120,8 @@ defineExpose({
.material-img {
width: 100%;
display: flex;
justify-content: center;
align-items: center;
}
</style>

View File

@@ -1,3 +1,3 @@
export { default } from './reply.vue';
export { createEmptyReply, type Reply, ReplyType } from './types';
export { default } from './wx-reply.vue';

View File

@@ -18,7 +18,7 @@ import {
} from 'element-plus';
import { UploadType, useBeforeUpload } from '#/utils/useUpload';
import MaterialSelect from '#/views/mp/components/material-select/material-select.vue';
import MaterialSelect from '#/views/mp/components/wx-material-select/wx-material-select.vue';
const props = defineProps<{
modelValue: Reply;

View File

@@ -20,7 +20,7 @@ import {
import { UploadType, useBeforeUpload } from '#/utils/useUpload';
// import { getAccessToken } from '@/utils/auth'
import MaterialSelect from '#/views/mp/components/material-select/material-select.vue';
import MaterialSelect from '#/views/mp/components/wx-material-select/wx-material-select.vue';
//

Some files were not shown because too many files have changed in this diff Show More