From c9e16424aa006a2df6afe0543ae934e559d6ef28 Mon Sep 17 00:00:00 2001 From: xuhongjie <1943105267@qq.com> Date: Mon, 21 Apr 2025 14:57:50 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=94=A8=E6=88=B7=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=B8=B8=E7=94=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/path/project.api.ts | 18 +++ src/enums/httpEnum.ts | 4 +- src/plugins/naive.ts | 6 +- src/views/AI/chat/index.vue | 23 ++-- src/views/AI/components/addIssue/index.vue | 133 ++++++++++++++------- src/views/AI/components/aiTable/index.vue | 7 +- 6 files changed, 135 insertions(+), 56 deletions(-) diff --git a/src/api/path/project.api.ts b/src/api/path/project.api.ts index 24383a0..aba7fee 100644 --- a/src/api/path/project.api.ts +++ b/src/api/path/project.api.ts @@ -14,6 +14,24 @@ export const projectListApi = async (data?: object) => { } } +export const getDict = async(data: object)=>{ + try{ + const res = await http(RequestHttpEnum.GET)(`${ModuleTypeEnum.DICT}`, data) + return res + }catch{ + httpErrorHandle() + } +} + +export const addIssue = async(data: object)=>{ + try{ + const res = await http(RequestHttpEnum.POST)(`${ModuleTypeEnum.ISSUE}`, data) + return res + }catch{ + httpErrorHandle() + } +} + // 新增聊天室历史记录 diff --git a/src/enums/httpEnum.ts b/src/enums/httpEnum.ts index 1bbe91e..e0338d2 100644 --- a/src/enums/httpEnum.ts +++ b/src/enums/httpEnum.ts @@ -2,7 +2,9 @@ export enum ModuleTypeEnum { SYSTEM = 'sys', PROJECT = 'project', - MESSAGE = 'tHistoricalReply' + MESSAGE = 'tHistoricalReply', + DICT = 'dictionary', + ISSUE= 'commonQuestion' } // 请求结果集 diff --git a/src/plugins/naive.ts b/src/plugins/naive.ts index 0d004df..6523c84 100644 --- a/src/plugins/naive.ts +++ b/src/plugins/naive.ts @@ -100,7 +100,8 @@ import { NColorPicker, NWatermark, NEmpty, - NCollapseTransition + NCollapseTransition, + NPopconfirm } from 'naive-ui' const naive = create({ @@ -204,7 +205,8 @@ const naive = create({ NColorPicker, NWatermark, NEmpty, - NCollapseTransition + NCollapseTransition, + NPopconfirm ] }) diff --git a/src/views/AI/chat/index.vue b/src/views/AI/chat/index.vue index ba7038b..b0e234b 100644 --- a/src/views/AI/chat/index.vue +++ b/src/views/AI/chat/index.vue @@ -3,7 +3,7 @@