From 5b2779c3bd94282621d3bd86f234347a17016041 Mon Sep 17 00:00:00 2001
From: xuhuajiao <13476289682@163.com>
Date: Tue, 26 May 2026 16:49:21 +0800
Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E5=BD=92=E6=A1=A3=E5=BA=93/=E7=AE=A1?=
=?UTF-8?q?=E7=90=86=E5=BA=93=E9=AB=98=E7=BA=A7=E6=A3=80=E7=B4=A2/?=
=?UTF-8?q?=E6=94=B6=E9=9B=86=E5=BA=93=E6=96=B0=E5=A2=9E=E4=B8=8A=E4=BC=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../managementLibrary/anjuan/tableList.vue | 8 +
.../managementLibrary/mixins/index.js | 2 +
.../module/collectHeader.vue | 75 ++-
.../module/collectHeader.vue | 30 +-
.../module/uploadOriginal/embedUpload.vue | 101 +++-
src/views/components/category/PreviewForm.vue | 35 +-
.../prearchiveLibrary/advancedSearchModal.vue | 461 ++++++++++++++++++
src/views/prearchiveLibrary/index.vue | 76 ++-
8 files changed, 745 insertions(+), 43 deletions(-)
create mode 100644 src/views/prearchiveLibrary/advancedSearchModal.vue
diff --git a/src/views/archivesManage/managementLibrary/anjuan/tableList.vue b/src/views/archivesManage/managementLibrary/anjuan/tableList.vue
index 6854967..2ba602a 100644
--- a/src/views/archivesManage/managementLibrary/anjuan/tableList.vue
+++ b/src/views/archivesManage/managementLibrary/anjuan/tableList.vue
@@ -351,6 +351,14 @@ export default {
this.loadTableData()
},
loadTableData() {
+ // 从 localStorage 恢复高级检索条件
+ const savedSql = localStorage.getItem('advancedSearchSql')
+ console.log('savedSql', savedSql)
+ if (savedSql) {
+ this.query.condition = savedSql
+ } else {
+ this.query.condition = null
+ }
if (this.selectedCategory.arrangeType === 3) {
this.getViewTableList(2, this.parentsData.parentsProjectId, '')
} else if (this.selectedCategory.arrangeType === 1) {
diff --git a/src/views/archivesManage/managementLibrary/mixins/index.js b/src/views/archivesManage/managementLibrary/mixins/index.js
index 31dd9fc..ae8975a 100644
--- a/src/views/archivesManage/managementLibrary/mixins/index.js
+++ b/src/views/archivesManage/managementLibrary/mixins/index.js
@@ -23,6 +23,7 @@ export const manageLibraryCrud = {
timer: null,
query: {
search: null,
+ condition: null,
project_class: null,
archive_ctg_no: null
},
@@ -161,6 +162,7 @@ export const manageLibraryCrud = {
'fonds_no': this.smartQuery.fonds_no,
'project_class': this.query.project_class,
'archive_ctg_no': this.query.archive_ctg_no,
+ 'intelligenceSearch': this.query.condition,
'page': this.page.page,
'size': this.page.size,
'sort': this.arrySort,
diff --git a/src/views/archivesManage/managementLibrary/module/collectHeader.vue b/src/views/archivesManage/managementLibrary/module/collectHeader.vue
index c391771..0fd32f9 100644
--- a/src/views/archivesManage/managementLibrary/module/collectHeader.vue
+++ b/src/views/archivesManage/managementLibrary/module/collectHeader.vue
@@ -74,6 +74,7 @@
搜索
+ 高级检索
重置
+
+
-
{{ test }}
+
高级检索:{{ advancedSearchDisplayText }}
+
{{ test }}
利用结束时间:{{ parentsData.authUtilize.endTime | parseTime }}
@@ -245,13 +256,14 @@ import OnlineHandover from './onlineHandover/index'
import OffLineHandover from './offLineHandover/index'
import ExportZip from './exportZip/index'
import HandOverForm from './handOverForm'
+import AdvancedSearchModal from '@/views/collectReorganizi/collectionLibrary/module/advancedSearchModal'
import qs from 'qs'
import { downloadFile, exportFile } from '@/utils/index'
import { mapGetters } from 'vuex'
export default {
name: 'CollectHeader',
- components: { Treeselect, PreviewForm, BindingTagDlg, Print, PackingBox, OnlineHandover, OffLineHandover, ExportZip, HandOverForm },
+ components: { Treeselect, PreviewForm, BindingTagDlg, Print, PackingBox, OnlineHandover, OffLineHandover, ExportZip, HandOverForm, AdvancedSearchModal },
mixins: [manageLibraryCrud, crud()],
props: {
selectedCategory: {
@@ -432,7 +444,9 @@ export default {
classifyOptions: [],
isDesFormType: 'manageArcives', // 区分是门类得还是档案得
arcId: null,
- totalSumAll: 0
+ totalSumAll: 0,
+ showAdvancedSearchModal: false,
+ advancedSearchConditions: []
}
},
computed: {
@@ -498,6 +512,31 @@ export default {
return '请选择项目阶段'
}
return '请选择项目分类'
+ },
+ // 格式化高级检索条件显示文案
+ advancedSearchDisplayText() {
+ if (!this.advancedSearchConditions || this.advancedSearchConditions.length === 0) {
+ return ''
+ }
+ return this.advancedSearchConditions.map(item => {
+ if (item.field) {
+ // 字段条件
+ let keywordDisplay = item.keyWord
+ if (item.symbol === '包含' || item.symbol === '不包含') {
+ keywordDisplay = `'%${item.keyWord}%'`
+ } else if (item.keyWord && isNaN(parseInt(item.keyWord))) {
+ keywordDisplay = `'${item.keyWord}'`
+ }
+ return `${item.field} ${item.symbol} ${keywordDisplay}`
+ } else if (item.connector) {
+ // 连接符
+ return item.connector
+ } else if (item.bracket) {
+ // 括号
+ return item.bracket
+ }
+ return ''
+ }).join(' ')
}
},
created() {
@@ -520,6 +559,26 @@ export default {
this.getCategoryDataTree()
},
methods: {
+ // 打开高级检索弹窗
+ handleAdvancedSearchClick() {
+ this.showAdvancedSearchModal = true
+ },
+ // 点击文案打开高级检索弹窗(还原之前的条件)
+ openAdvancedSearchModal() {
+ this.showAdvancedSearchModal = true
+ },
+ // 处理高级检索
+ handleAdvancedSearch(condition) {
+ console.log('condition', condition)
+ console.log('this.parentsData', this.parentsData)
+ this.showAdvancedSearchModal = false
+ this.smartQuery = this.parentsData.smartQuery
+ // 设置检索条件(SQL)
+ this.query.condition = condition.sql
+ // 保存原始条件数据用于显示文案
+ this.advancedSearchConditions = condition.conditions
+ this.handleSearch(this.collectLevel)
+ },
getCategoryDataTree() {
FetchCategoryMenu().then(res => {
this.categoryMenu = res
@@ -529,9 +588,14 @@ export default {
this.selectStatus = []
this.query = {
'search': null,
+ 'condition': null,
'project_class': null,
'archive_ctg_no': null
}
+ this.advancedSearchConditions = []
+ // 清除 localStorage 中的高级检索条件
+ localStorage.removeItem('advancedSearchConditions')
+ localStorage.removeItem('advancedSearchSql')
this.handleSearch(this.collectLevel)
},
// 筛选 - 档案分类
@@ -539,9 +603,14 @@ export default {
this.classifyOptions = []
this.query = {
'search': null,
+ 'condition': null,
'project_class': null,
'archive_ctg_no': null
}
+ this.advancedSearchConditions = []
+ // 清除 localStorage 中的高级检索条件
+ localStorage.removeItem('advancedSearchConditions')
+ localStorage.removeItem('advancedSearchSql')
const params = {
'categoryId': this.selectedCategory.id
}
diff --git a/src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue b/src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue
index 80ddfd2..c523aac 100644
--- a/src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue
+++ b/src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue
@@ -159,6 +159,7 @@
:is-title-type="isTitleType"
:collect-level="collectLevel"
:category-menu="categoryMenu"
+ :uploaded-file-data="uploadedFileData"
@close-dialog="closeDialog"
@handleForm="handleForm"
@formLoadingShow="formLoadingShow"
@@ -170,8 +171,8 @@
ref="embedUploadRef"
:selected-category="selectedCategory"
:arc-id="arcId"
- @on-upload-success="handleUploadSuccess"
- @show-repeat-modal="handleShowRepeatModal"
+ @onUploadSuccess="handleUploadSuccess"
+ @showRepeatModal="handleShowRepeatModal"
/>
{{ displayedText }}
@@ -495,7 +496,8 @@ export default {
repeatResponseData: {},
repeatData: [],
archiveInfo: {},
- advancedSearchConditions: []
+ advancedSearchConditions: [],
+ uploadedFileData: null
}
},
computed: {
@@ -709,6 +711,12 @@ export default {
}
// 清空formPreviewData
this.formPreviewData = []
+ // 清空上传文件数据
+ this.uploadedFileData = null
+ // 重置嵌入版上传组件的上传结果
+ if (this.$refs.embedUploadRef) {
+ this.$refs.embedUploadRef.resetUploadedResults()
+ }
this.formIsAddOrEdit = type
@@ -882,6 +890,10 @@ export default {
},
// form - submit
handlerArchivesSubmit(type) {
+ if (this.$refs.embedUploadRef && this.$refs.embedUploadRef.hasPendingFiles()) {
+ this.$message.warning('请先上传文件列表里的文件才可保存')
+ return
+ }
this.$refs.previewForm.submitForm('addOrUpdateForm', this.selectedCategory.id, this.quickPaperArcId, type)
},
handlerArchivesSubmitAndAdd() {
@@ -917,6 +929,7 @@ export default {
this.isAiAutoCategory = false
this.displayedText = ''
this.isDialogClosed = true
+ this.uploadedFileData = null
if (this.reader) {
this.reader.cancel()
}
@@ -928,14 +941,19 @@ export default {
// 额外清空formPreviewData(可选,根据业务需求)
this.formPreviewData = []
}
+ // 重置嵌入版上传组件的上传结果
+ if (this.$refs.embedUploadRef) {
+ this.$refs.embedUploadRef.resetUploadedResults()
+ }
})
done()
},
// 嵌入版上传成功回调
- handleUploadSuccess() {
- // 上传成功后可以刷新文件列表或做其他操作
- console.log('嵌入版上传成功')
+ handleUploadSuccess(fileData) {
+ console.log('fileData', fileData)
+ this.uploadedFileData = fileData
+ console.log('嵌入版上传成功', this.uploadedFileData)
},
// 显示重复文件弹窗
handleShowRepeatModal(repeatData) {
diff --git a/src/views/collectReorganizi/collectionLibrary/module/uploadOriginal/embedUpload.vue b/src/views/collectReorganizi/collectionLibrary/module/uploadOriginal/embedUpload.vue
index bbef418..071410c 100644
--- a/src/views/collectReorganizi/collectionLibrary/module/uploadOriginal/embedUpload.vue
+++ b/src/views/collectReorganizi/collectionLibrary/module/uploadOriginal/embedUpload.vue
@@ -57,7 +57,6 @@
+
+
diff --git a/src/views/prearchiveLibrary/index.vue b/src/views/prearchiveLibrary/index.vue
index e4069ee..df0a567 100644
--- a/src/views/prearchiveLibrary/index.vue
+++ b/src/views/prearchiveLibrary/index.vue
@@ -8,10 +8,17 @@
-
+
+
高级检索
+
重置
+
+
+ 高级检索:
+ {{ advancedSearchDisplayText }}
+
@@ -144,6 +151,14 @@
+
+
+
@@ -165,6 +180,7 @@ import batchFile from './module/batchFile'
import moveFile from './module/moveFile'
import detail from './module/detail'
import File from './file/index'
+import AdvancedSearchModal from './advancedSearchModal'
import { exportFile } from '@/utils/index'
import qs from 'qs'
@@ -172,7 +188,7 @@ import { mapGetters } from 'vuex'
export default {
name: 'PrearchiveLibrary',
- components: { TreeList, PreviewForm, batchFile, moveFile, detail, Treeselect, rrOperation, crudOperation, pagination, File },
+ components: { TreeList, PreviewForm, batchFile, moveFile, detail, Treeselect, rrOperation, crudOperation, pagination, File, AdvancedSearchModal },
cruds() {
return [
CRUD({
@@ -184,7 +200,7 @@ export default {
del: false,
download: false,
group: false,
- reset: true
+ reset: false
},
queryOnPresenterCreated: false
})
@@ -228,13 +244,40 @@ export default {
mousedownX: 0,
mousedownY: 0,
fileOriginal: null,
- fileOneVisible: false
+ fileOneVisible: false,
+ advancedSearchVisible: false,
+ advancedSearchConditions: []
}
},
computed: {
...mapGetters([
'baseApi'
- ])
+ ]),
+ // 格式化高级检索条件显示文案
+ advancedSearchDisplayText() {
+ if (!this.advancedSearchConditions || this.advancedSearchConditions.length === 0) {
+ return ''
+ }
+ return this.advancedSearchConditions.map(item => {
+ if (item.field) {
+ // 字段条件
+ let keywordDisplay = item.keyWord
+ if (item.symbol === '包含' || item.symbol === '不包含') {
+ keywordDisplay = `'%${item.keyWord}%'`
+ } else if (item.keyWord && isNaN(parseInt(item.keyWord))) {
+ keywordDisplay = `'${item.keyWord}'`
+ }
+ return `${item.field} ${item.symbol} ${keywordDisplay}`
+ } else if (item.connector) {
+ // 连接符
+ return item.connector
+ } else if (item.bracket) {
+ // 括号
+ return item.bracket
+ }
+ return ''
+ }).join(' ')
+ }
},
created() {
},
@@ -244,6 +287,7 @@ export default {
this.crud.query.fondsAffiliation = this.selectedDocument.fondsId
this.crud.query.sort = this.arrySort
},
+
formLoadingShow(loadingType) {
this.archivesBtnLoading = loadingType
},
@@ -251,6 +295,28 @@ export default {
this.selectedDocument = data
this.getInitDocumentsViewTable()
},
+ // 显示高级检索弹窗
+ showAdvancedSearch() {
+ this.advancedSearchVisible = true
+ },
+ // 处理高级检索
+ handleAdvancedSearch(data) {
+ this.advancedSearchVisible = false
+ this.crud.query.intelligenceSearch = data.sql
+ this.advancedSearchConditions = data.conditions || []
+ this.crud.toQuery()
+ },
+ // 清除高级检索条件
+ clearAdvancedSearch() {
+ this.crud.query.intelligenceSearch = null
+ this.advancedSearchConditions = []
+ this.crud.toQuery()
+ },
+ // 重置查询
+ resetQuery() {
+ this.advancedSearchConditions = []
+ this.crud.resetQuery()
+ },
// 字段项
getInitDocumentsViewTable() {
PrearchiveCrud.FetchInitDocumentsViewTable({ documentId: this.selectedDocument.id }).then(data => {