From 589a0b1da098268a2c5bb46842cad16e6b6864bd Mon Sep 17 00:00:00 2001 From: xuhuajiao <13476289682@163.com> Date: Tue, 4 Mar 2025 17:39:21 +0800 Subject: [PATCH] =?UTF-8?q?ai=E8=BE=85=E5=8A=A9=E8=91=97=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/ai/ai.js | 11 + src/api/category/category.js | 9 +- src/utils/upload.js | 16 + src/views/AIAssistant/AICataloging/Chat.vue | 159 +++++ src/views/AIAssistant/AICataloging/Chat2.vue | 176 ++++++ .../AIAssistant/AICataloging/deepSeekChat.vue | 74 +++ src/views/AIAssistant/AICataloging/index.vue | 4 +- .../{index copy.vue => index2.vue} | 10 +- .../AICataloging/running/index.vue | 570 +++++++++++++++--- 9 files changed, 953 insertions(+), 76 deletions(-) create mode 100644 src/api/ai/ai.js create mode 100644 src/views/AIAssistant/AICataloging/Chat.vue create mode 100644 src/views/AIAssistant/AICataloging/Chat2.vue create mode 100644 src/views/AIAssistant/AICataloging/deepSeekChat.vue rename src/views/AIAssistant/AICataloging/{index copy.vue => index2.vue} (96%) diff --git a/src/api/ai/ai.js b/src/api/ai/ai.js new file mode 100644 index 0000000..035b096 --- /dev/null +++ b/src/api/ai/ai.js @@ -0,0 +1,11 @@ +import request from '@/utils/request' +import qs from 'qs' + +// AI辅助著录预生成档案 +export function FetchDoHandleEnterAnalysis(params) { + return request({ + url: 'api/ai/doHandleEnterAnalysis' + '?' + qs.stringify(params, { indices: false }), + method: 'get' + }) +} +export default { FetchDoHandleEnterAnalysis } diff --git a/src/api/category/category.js b/src/api/category/category.js index 465e558..07353ff 100644 --- a/src/api/category/category.js +++ b/src/api/category/category.js @@ -1,5 +1,12 @@ import request from '@/utils/request' +export function getfondMenu() { + return request({ + url: 'api/category/fondMenu', + method: 'get' + }) +} + export function getCategoryTree() { return request({ url: 'api/archives-type/menu', @@ -57,4 +64,4 @@ export function edit(data) { }) } -export default { add, edit, del } +export default { add, edit, del, getfondMenu } diff --git a/src/utils/upload.js b/src/utils/upload.js index 40c58af..7e1b452 100644 --- a/src/utils/upload.js +++ b/src/utils/upload.js @@ -120,3 +120,19 @@ export function onlineUpload(api, file, params) { } return axios.post(api, data, config) } + +// AI +export function aiUpload(api, file, fileJsonString) { + var data = new FormData() + // data.append('files', file) // 之前 + for (const item in file) { // 现在 + data.append('files', file[item]) + } + data.append('fileJsonString', fileJsonString) + const config = { + headers: { + 'Authorization': getToken() + } + } + return axios.post(api, data, config) +} diff --git a/src/views/AIAssistant/AICataloging/Chat.vue b/src/views/AIAssistant/AICataloging/Chat.vue new file mode 100644 index 0000000..c576c61 --- /dev/null +++ b/src/views/AIAssistant/AICataloging/Chat.vue @@ -0,0 +1,159 @@ + + + + + diff --git a/src/views/AIAssistant/AICataloging/Chat2.vue b/src/views/AIAssistant/AICataloging/Chat2.vue new file mode 100644 index 0000000..719497f --- /dev/null +++ b/src/views/AIAssistant/AICataloging/Chat2.vue @@ -0,0 +1,176 @@ + + + + + diff --git a/src/views/AIAssistant/AICataloging/deepSeekChat.vue b/src/views/AIAssistant/AICataloging/deepSeekChat.vue new file mode 100644 index 0000000..590a868 --- /dev/null +++ b/src/views/AIAssistant/AICataloging/deepSeekChat.vue @@ -0,0 +1,74 @@ + + + + + diff --git a/src/views/AIAssistant/AICataloging/index.vue b/src/views/AIAssistant/AICataloging/index.vue index 5bd8a1f..f9c1d35 100644 --- a/src/views/AIAssistant/AICataloging/index.vue +++ b/src/views/AIAssistant/AICataloging/index.vue @@ -5,8 +5,8 @@ diff --git a/src/views/AIAssistant/AICataloging/index copy.vue b/src/views/AIAssistant/AICataloging/index2.vue similarity index 96% rename from src/views/AIAssistant/AICataloging/index copy.vue rename to src/views/AIAssistant/AICataloging/index2.vue index 7a35b30..b5683eb 100644 --- a/src/views/AIAssistant/AICataloging/index copy.vue +++ b/src/views/AIAssistant/AICataloging/index2.vue @@ -33,6 +33,11 @@
+ + + + +
@@ -95,9 +100,12 @@ import { getCurrentTime } from '@/utils/index' import { archivesUpload } from '@/utils/upload' import { mapGetters } from 'vuex' +import Chat from './Chat.vue' +import DeepSeekChat from './deepSeekChat.vue' + export default { name: 'AICataloging', - components: { PreviewForm }, + components: { PreviewForm, DeepSeekChat, Chat }, cruds() { return [ CRUD({ diff --git a/src/views/AIAssistant/AICataloging/running/index.vue b/src/views/AIAssistant/AICataloging/running/index.vue index 20c39c3..b74af55 100644 --- a/src/views/AIAssistant/AICataloging/running/index.vue +++ b/src/views/AIAssistant/AICataloging/running/index.vue @@ -1,16 +1,38 @@