-
+
+ - AI辅助著录可支持的文件格式包括:
+ - 1.文本文件:
doc/docx、txt
+ - 2.电子表格和演示文稿:
xls/xlsx、ppt/pptx
+ - 3.图像文件:
jpge/jpg、png
+ - 4.其他文件:
pdf、ofd
+ - 注意:目前支持单次上传多个图像文件或1个非图像文件,单个文件的大小不得超过10M。文件解析耗时根据文件的大小以及类型各有不同,用户可在上传成功后手动点击“刷新”按钮更新文件解析状态。
+
+
+
@@ -192,6 +202,9 @@ export default {
console.log(err)
})
},
+ openFileSelector() {
+ this.$refs.fileInput.click()
+ },
async handleFileChange(event) {
const file = event.target.files[0]
const allowedExtensions = ['.xlsx', '.xls', '.docx', '.doc', '.pdf', '.ofd', '.pptx', '.txt']
diff --git a/src/views/AIAssistant/AIIntelligentCoding/index.vue b/src/views/AIAssistant/AIIntelligentCoding/index.vue
index 9891051..24f6212 100644
--- a/src/views/AIAssistant/AIIntelligentCoding/index.vue
+++ b/src/views/AIAssistant/AIIntelligentCoding/index.vue
@@ -68,11 +68,15 @@
-
-
专题名称:{{ currentResearch && currentResearch.researchTitle }}
-
编研类型:{{ currentResearch && currentResearch.researchType }}
+
+
+
专题名称:{{ currentResearch && currentResearch.researchTitle }}
+
编研类型:{{ currentResearch && currentResearch.researchType }}
+
+
导出为 Word
diff --git a/src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue b/src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue
index a4b73db..035d80d 100644
--- a/src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue
+++ b/src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue
@@ -173,7 +173,7 @@
-
+
+
+
+ {{ getFileSize(scope.row.fileSize) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -202,7 +252,7 @@
-
-
+
解析中
已解析
@@ -216,6 +266,7 @@
+
@@ -283,7 +334,7 @@ import CRUD, { crud } from '@crud/crud'
import { collectionLibraryCrud } from '../mixins/index'
import { FetchInitCategoryInputFieldByPid, FetchCategoryMenu } from '@/api/system/category/category'
import { FetchDetailsById, collectDel, FetchRemoveArchivesSingle, FetchDeleteArchivesFile, FetchUpdateArchivesNo, FetchDisbandArchives, FetchReturnReDocument, FetchCompleteDelArchives, FetchRestoreArchives, FetchMaxItemNoByParentId } from '@/api/collect/collect'
-import { FetchInitAssistEnter, FetchDoHandleEnterAnalysis } from '@/api/ai/ai'
+import { FetchInitAssistEnter, FetchDoHandleEnterAnalysis, FetchInitAssistEnterTemp } from '@/api/ai/ai'
import { FetchArchivesClassTree } from '@/api/system/archivesClass'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
@@ -365,6 +416,8 @@ export default {
aIAssistEnterVisible: false,
aiCategoryData: [],
aiCategoryloading: false,
+ childLoading: false,
+ expandedRows: [],
aiResultCaLoading: true, // ai分析得内容结果前得loading
isDialogClosed: false, // 新增标志位,用于控制是否继续处理流式响应
reader: null // 用于存储响应体的读取器
@@ -1486,11 +1539,13 @@ export default {
'isHandle': 0
}
FetchInitAssistEnter(params).then(data => {
+ data.forEach(function(item, index) {
+ item.hasChildren = true
+ item.children = null
+ item.childLoading = false
+ })
this.aiCategoryData = data
this.aiCategoryloading = false
- setTimeout(() => {
- this.getDoHandleEnterAnalysis()
- }, 1000)
})
},
// 获取自动分析内容和提问
@@ -1499,13 +1554,48 @@ export default {
this.aIAssistEnterVisible = false
const params = {
'categoryId': this.selectedCategory.id,
- 'anId': null
+ 'anId': row.id
}
FetchDoHandleEnterAnalysis(params).then(data => {
// const inputMessage = data.query + '需要提取得内容部分是' + data.context
this.sendMessage(data.query, data.context)
})
},
+ handleExpandChange(row, expandedRows) {
+ if (expandedRows.length > 0) {
+ // 展开行
+ this.loadFile(row)
+ } else {
+ // 收起行
+ row.children = null
+ }
+ },
+ loadFile(row) {
+ row.childLoading = true
+ const params = {
+ 'anId': row ? row.id : null
+ }
+ FetchInitAssistEnterTemp(params).then(data => {
+ row.children = data
+ setTimeout(() => {
+ row.childLoading = false
+ }, 500)
+ }).catch(error => {
+ console.error('请求接口失败', error)
+ setTimeout(() => {
+ row.childLoading = false
+ }, 500)
+ })
+ },
+ handleAIClose() {
+ this.aiCategoryData = []
+ this.aIAssistEnterVisible = false
+ },
+ getFileSize(fileSize) {
+ const fileSizeInKB = (fileSize / 1024).toFixed(2) + 'kB'
+ const fileSizeInB = fileSize + 'B'
+ return (fileSize / 1024) <= 0.01 ? fileSizeInB : fileSizeInKB
+ },
// 向deepseek发出提问和分析内容
async sendMessage(prompt, context) {
const linkSrc = process.env.NODE_ENV === 'production' ? window.g.AIDeepSeekUrl : process.env.VUE_APP_AIDEEPSEEK_API
@@ -1644,7 +1734,7 @@ export default {
}
.aiAssist-dialog{
::v-deep .el-dialog{
- width: 1000px !important;
+ width: 1160px !important;
}
}
@@ -1659,5 +1749,7 @@ pre {
overflow: hidden;
overflow-y: auto;
}
-
+::v-deep .el-table.child-table tr{
+ background-color: #f0f9eb;
+}