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 @@ 搜索 + 高级检索 重置
@@ -174,6 +175,15 @@
+ + + @@ -191,8 +201,9 @@
- {{ 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 @@
-