From 6e4ed7cc6a39c8549aa64a8fc7823deffe922dff Mon Sep 17 00:00:00 2001 From: xuhuajiao <13476289682@163.com> Date: Mon, 24 Mar 2025 17:33:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/ai/ai.js | 11 +- src/api/collect/collect.js | 12 +- .../AICataloging/running/index.vue | 39 +++++- .../AIIntelligentCoding/aiForm.vue | 5 + .../AIAssistant/AIIntelligentCoding/index.vue | 36 +++--- .../AIAssistant/AIKeywords/archivesList.vue | 6 +- .../collectionLibrary/mixins/index.js | 2 +- .../module/collectHeader.vue | 51 +++++++- .../module/collectMoveFile/index.vue | 119 ++++++++---------- src/views/components/category/PreviewForm.vue | 1 - 10 files changed, 182 insertions(+), 100 deletions(-) diff --git a/src/api/ai/ai.js b/src/api/ai/ai.js index 7c6f400..ccc5b72 100644 --- a/src/api/ai/ai.js +++ b/src/api/ai/ai.js @@ -59,4 +59,13 @@ export function FetchEditResearchAI(data) { }) } -export default { FetchInitAssistEnter, FetchDoHandleEnterAnalysis, FetchInitAssistEnterTemp, FetchDelAssistEnter, FetchHandleEnterAnalysis, FetchInitShowByCategory, FetchEditResearchAI } +// 删除AI编研 +export function FetchDelResearchAI(data) { + return request({ + url: 'api/ai/delResearchAI', + method: 'post', + data + }) +} + +export default { FetchInitAssistEnter, FetchDoHandleEnterAnalysis, FetchInitAssistEnterTemp, FetchDelAssistEnter, FetchHandleEnterAnalysis, FetchInitShowByCategory, FetchEditResearchAI, FetchDelResearchAI } diff --git a/src/api/collect/collect.js b/src/api/collect/collect.js index 7eb5d93..60bce5f 100644 --- a/src/api/collect/collect.js +++ b/src/api/collect/collect.js @@ -376,6 +376,15 @@ export function FetchInitFileMarkCategoryView(params) { }) } +// 通过案卷id获取最大件号 +export function FetchMaxItemNoByParentId(params) { + return request({ + url: 'api/collect/getMaxItemNoByParentId', + method: 'get', + params + }) +} + export default { collectAdd, collectEdit, @@ -414,5 +423,6 @@ export default { FetchSetAnalysisedText, FetchEditMarkByFileId, FetchMarkByFileId, - FetchInitFileMarkCategoryView + FetchInitFileMarkCategoryView, + FetchMaxItemNoByParentId } diff --git a/src/views/AIAssistant/AICataloging/running/index.vue b/src/views/AIAssistant/AICataloging/running/index.vue index 2c9b491..8642c7d 100644 --- a/src/views/AIAssistant/AICataloging/running/index.vue +++ b/src/views/AIAssistant/AICataloging/running/index.vue @@ -46,7 +46,7 @@ row-key="id" @select="crud.selectChange" @select-all="crud.selectAllChange" - @cell-dblclick="tableDoubleClick" + @row-dblclick="tableDoubleClick" @selection-change="crud.selectionChangeHandler" > @@ -98,7 +98,7 @@ - +
@@ -511,6 +511,9 @@ export default { // }) } else { this.$message({ message: '已清空所有要上传的附件', offset: 8 }) + if (this.$refs.fileInput) { + this.$refs.fileInput.value = '' + } } }, // 将上传的图片转为base64 @@ -733,7 +736,34 @@ export default { jsonData.archival_category_code = this.aiAddArchiveCategory.code jsonData.is_entity = 1 console.log('jsonData', jsonData) - this.$refs.previewForm.addOrUpdateForm = jsonData + + const newFormData = {} + for (const key in jsonData) { + if (jsonData.hasOwnProperty(key)) { + const value = jsonData[key] + const fieldConfig = this.formPreviewData.find(config => config.fieldName === key) + if (fieldConfig) { + // 判断是否是数字框且值包含数字 + if (fieldConfig.isInputClass === 'number' && fieldConfig.isDataType === 2 && fieldConfig.isDataTypeDetails === 'int') { + const numMatch = value.match(/\d+/) + if (numMatch) { + // newFormData[key] = parseInt(numMatch[0]) + newFormData[key] = numMatch[0] + } else { + console.log(`字段 ${key} 的值 ${value} 不包含有效数字,将不提交该字段`) + continue + } + } else { + newFormData[key] = value + } + } else { + newFormData[key] = value + } + } + } + + console.log('newFormData', newFormData) + this.$refs.previewForm.addOrUpdateForm = newFormData } } this.reader = null // 清空读取器 @@ -795,6 +825,9 @@ export default { if (this.reader) { this.reader.cancel() // 取消读取器,终止流式响应 } + if (this.$refs.fileInput) { + this.$refs.fileInput.value = '' + } }, // 删除解析任务 handleDel(data) { diff --git a/src/views/AIAssistant/AIIntelligentCoding/aiForm.vue b/src/views/AIAssistant/AIIntelligentCoding/aiForm.vue index b73e68f..9949279 100644 --- a/src/views/AIAssistant/AIIntelligentCoding/aiForm.vue +++ b/src/views/AIAssistant/AIIntelligentCoding/aiForm.vue @@ -465,6 +465,11 @@ export default { this.researchContext = '' this.message = [] this.formVisible = false + if (this.$refs.form) { + // this.$refs.form.clearValidate() + this.$refs.form.resetFields() + this.form = {} + } this.deleteFile() }, handleEditorChange(value) { diff --git a/src/views/AIAssistant/AIIntelligentCoding/index.vue b/src/views/AIAssistant/AIIntelligentCoding/index.vue index b7ef042..9891051 100644 --- a/src/views/AIAssistant/AIIntelligentCoding/index.vue +++ b/src/views/AIAssistant/AIIntelligentCoding/index.vue @@ -67,7 +67,7 @@
-
+

专题名称:{{ currentResearch && currentResearch.researchTitle }}

编研类型:{{ currentResearch && currentResearch.researchType }}

@@ -90,7 +90,7 @@