From 79e075a5e78d6de4737c19969c3b938a97eebe91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=AF=BB=E6=AC=A2?= Date: Sat, 3 Feb 2024 15:58:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90AI=E5=8A=A9=E6=89=8B=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/assistant.ts | 19 +++ src/views/infra/assistant/index.vue | 229 ++++++++++++++++++++++------ 2 files changed, 201 insertions(+), 47 deletions(-) diff --git a/src/api/assistant.ts b/src/api/assistant.ts index a3c6987..dd2eb0f 100644 --- a/src/api/assistant.ts +++ b/src/api/assistant.ts @@ -17,6 +17,8 @@ export type AiAssistantResult = { enable: boolean; /** 是否编辑 */ edit: boolean; + /** 是否保存中 */ + saveLoading: boolean; }; /** 查询所有AI助手 */ @@ -27,3 +29,20 @@ export const getAllAiAssistant = (data: any) => { { data } ); }; + +/* 保存 AI 助手信息 */ +export const saveAiAssistant = (data: any) => { + return http.request>( + "post", + "/admin/v1/ai-assistant", + { data } + ); +}; + +/* 删除 AI 助手信息 */ +export const deleteAiAssistant = (id: string) => { + return http.request>( + "delete", + `/admin/v1/ai-assistant/${id}` + ); +}; diff --git a/src/views/infra/assistant/index.vue b/src/views/infra/assistant/index.vue index 9f27cb8..2ab7761 100644 --- a/src/views/infra/assistant/index.vue +++ b/src/views/infra/assistant/index.vue @@ -1,23 +1,101 @@