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 @@
-
+
-
+
思考中
@@ -101,7 +100,7 @@ import aiIcon from '@/assets/images/ai/ai-icon.png'
import { useMessage } from 'naive-ui'
import useMessageRoomStore from '@/store/modules/messageRoom'
import { canvasCut } from '@/utils'
-import { historyMessageRoomById } from '@/api/path'
+import { historyMessageRoomById,getDict } from '@/api/path'
import { useRoute } from 'vue-router'
const route = useRoute()
@@ -122,15 +121,25 @@ const echartsTheme = ['简约风', '商务风', '科技风']
let stopWatch = null
let isWatching = ref(false)
const ehcatrsType = ['pie', 'line', 'bar']
+let dictList = ref( [])
/**
* 页面初始完成
*/
onMounted(() => {
+ getDictListist()
startWatching()
-
getMessageInfo()
})
+/**
+ * 字典
+ */
+const getDictListist =async ()=>{
+ const res =await getDict()
+ dictList.value = res.data.records
+
+}
+
/**
* 获取聊天详情
*/
@@ -185,7 +194,7 @@ const handleSend = async () => {
time: moment().format('YYYY/MM/DD HH:mm:ss'),
add: true
})
-return
+
//先存储AI回答,作为交互提示,接口响应后再做更新
setMessageItem(
{
diff --git a/src/views/AI/components/addIssue/index.vue b/src/views/AI/components/addIssue/index.vue
index 966bf31..d59177d 100644
--- a/src/views/AI/components/addIssue/index.vue
+++ b/src/views/AI/components/addIssue/index.vue
@@ -1,65 +1,112 @@
-
+
+
- 引用
+
+
+
+
+
+
+
+
+
+
+ 添加为常用问题
+
- 譬如,我或许可以就大象本身写一点什么,但对象的驯化却不知从何写起。
-
-
- 或许吧
-
-
-
-
-
-
+
+
+ {{ item.dictValue }}
-
尾部
-
- -->
+
+
diff --git a/src/views/AI/components/aiTable/index.vue b/src/views/AI/components/aiTable/index.vue
index 8f56c8f..e863c31 100644
--- a/src/views/AI/components/aiTable/index.vue
+++ b/src/views/AI/components/aiTable/index.vue
@@ -29,23 +29,24 @@ const props = defineProps({