From 986f50c6dab9db40cbdb1443e0876b0edf3b772d Mon Sep 17 00:00:00 2001 From: cherishsince Date: Wed, 15 May 2024 16:55:37 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91=E8=A7=92?= =?UTF-8?q?=E8=89=B2=E4=BB=93=E5=BA=93=20=E5=92=8C=20=E5=85=AC=E5=BC=80?= =?UTF-8?q?=E8=A7=92=E8=89=B2=E4=BB=93=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/ai/model/chatRole/index.ts | 14 ++++ src/views/ai/chat/role/RoleList.vue | 97 ++++++++++++++++++++++++ src/views/ai/chat/role/index.vue | 110 ++++++++++++++++++++++++++++ 3 files changed, 221 insertions(+) create mode 100644 src/views/ai/chat/role/RoleList.vue create mode 100644 src/views/ai/chat/role/index.vue diff --git a/src/api/ai/model/chatRole/index.ts b/src/api/ai/model/chatRole/index.ts index 5e81110b..1f962cb9 100644 --- a/src/api/ai/model/chatRole/index.ts +++ b/src/api/ai/model/chatRole/index.ts @@ -14,6 +14,15 @@ export interface ChatRoleVO { status: number // 状态 } +// AI 聊天角色 分页请求 vo +export interface ChatRolePageReqVO { + name?: string // 角色名称 + category?: string // 角色类别 + publicStatus: boolean // 是否公开 + pageNo: number // 是否公开 + pageSize: number // 是否公开 +} + // AI 聊天角色 API export const ChatRoleApi = { // 查询聊天角色分页 @@ -39,5 +48,10 @@ export const ChatRoleApi = { // 删除聊天角色 deleteChatRole: async (id: number) => { return await request.delete({ url: `/ai/chat-role/delete?id=` + id }) + }, + + // 获取 my role + getMyRole: async (params: ChatRolePageReqVO) => { + return await request.get({ url: `/ai/chat-role/my-page`, params}) } } diff --git a/src/views/ai/chat/role/RoleList.vue b/src/views/ai/chat/role/RoleList.vue new file mode 100644 index 00000000..e57f09ab --- /dev/null +++ b/src/views/ai/chat/role/RoleList.vue @@ -0,0 +1,97 @@ + + + + + + diff --git a/src/views/ai/chat/role/index.vue b/src/views/ai/chat/role/index.vue new file mode 100644 index 00000000..0daa3d52 --- /dev/null +++ b/src/views/ai/chat/role/index.vue @@ -0,0 +1,110 @@ + + + + + + +