From f60b004d348588e0971c806f06fdf9a9d6f13c58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=AF=BB=E6=AC=A2?= Date: Fri, 2 Feb 2024 17:30:25 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/assistant.ts | 29 +++++++ src/style/reset.scss | 17 ++++ src/views/infra/assistant/index.vue | 118 +++++++++++++++++++++++++++- 3 files changed, 162 insertions(+), 2 deletions(-) create mode 100644 src/api/assistant.ts diff --git a/src/api/assistant.ts b/src/api/assistant.ts new file mode 100644 index 0000000..a3c6987 --- /dev/null +++ b/src/api/assistant.ts @@ -0,0 +1,29 @@ +import { http } from "@/utils/http"; +import { BaseResponse } from "@/api/base"; + +/** AI助手信息 */ +export type AiAssistantResult = { + /** Id */ + id: string; + createdAt: Date; + updatedAt: Date; + /** 名称 */ + name: string; + /** 人设 */ + personality: string; + /** 模型 */ + model: string; + /** 是否启用 */ + enable: boolean; + /** 是否编辑 */ + edit: boolean; +}; + +/** 查询所有AI助手 */ +export const getAllAiAssistant = (data: any) => { + return http.request>>( + "get", + "/admin/v1/ai-assistant", + { data } + ); +}; diff --git a/src/style/reset.scss b/src/style/reset.scss index ba8e6a0..1634215 100644 --- a/src/style/reset.scss +++ b/src/style/reset.scss @@ -256,3 +256,20 @@ div:focus { content: " "; } } + +/* 调整滚动条 */ +/* 选择滚动条的样式 */ +::-webkit-scrollbar { + width: 5px; /* 调整滚动条的宽度 */ +} + +/* 设置滚动条的轨道 */ +::-webkit-scrollbar-track { + background-color: #f1f1f1; +} + +/* 设置滚动条的滑块 */ +::-webkit-scrollbar-thumb { + background-color: #888; + border-radius: 4px; /* 可以根据需要调整滑块的圆角 */ +} diff --git a/src/views/infra/assistant/index.vue b/src/views/infra/assistant/index.vue index 599cf22..9f27cb8 100644 --- a/src/views/infra/assistant/index.vue +++ b/src/views/infra/assistant/index.vue @@ -1,12 +1,126 @@ + +