diff --git a/src/views/collectReorganizi/collectionLibrary/anjuan/tableList.vue b/src/views/collectReorganizi/collectionLibrary/anjuan/tableList.vue index 9d2be86..022db79 100644 --- a/src/views/collectReorganizi/collectionLibrary/anjuan/tableList.vue +++ b/src/views/collectReorganizi/collectionLibrary/anjuan/tableList.vue @@ -285,16 +285,6 @@ export default { const field = prop || column.property if (!field) return - // 清除父组件 smartQuery 中选中的筛选条件(保留 fonds_no) - // 使用 Vue.set 逐个修改属性,保持响应式追踪 - const smartQuery = this.parentsData.smartQuery - this.$set(smartQuery, 'retention', null) - this.$set(smartQuery, 'security_class', null) - this.$set(smartQuery, 'doc_type', null) - this.$set(smartQuery, 'medium_type', null) - this.$set(smartQuery, 'archive_year', null) - this.$set(smartQuery, 'organ_or_function', null) - // 循环切换排序 const current = this.sortMap[field] if (!current) { @@ -329,6 +319,15 @@ 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.activeIndex === 1) { this.getViewTableList(3, null, '') } else { diff --git a/src/views/collectReorganizi/collectionLibrary/file/index.vue b/src/views/collectReorganizi/collectionLibrary/file/index.vue index 7045db1..5e82f05 100644 --- a/src/views/collectReorganizi/collectionLibrary/file/index.vue +++ b/src/views/collectReorganizi/collectionLibrary/file/index.vue @@ -10,7 +10,7 @@ :class="((selectedCategory.arrangeType === 2 && isAjNo === 0) || (selectedCategory.arrangeType === 3 && isAjNo === 1)) ? 'drawer2-modal' : (isAjNo === 1) ? 'drawer1-modal' : (selectedCategory.arrangeType === 1) ? 'drawer1-modal' : 'drawer3-modal'" :size="((selectedCategory.arrangeType === 2 && isAjNo === 0) || (selectedCategory.arrangeType === 3 && isAjNo === 1)) ? '80%' : (isAjNo === 1) ? '90%' : (selectedCategory.arrangeType === 1) ? '90%' : '70%'" > - +
- +
+ +
+ + + + + + + + + + + + + + + +
+ 新增 + 重置 +
+
+

检索条件

+
+
+ 删除 + 上移 + 下移 +
+
    +
  • + {{ item.field }} + {{ item.symbol }} + '%{{ item.keyWord }}%' + '{{ item.keyWord }}' + {{ item.keyWord }} + {{ item.connector }} + {{ item.bracket }} +
  • +
+
+ {{ item }} +
+
+
+
+ +
+ + + + + diff --git a/src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue b/src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue index 0b23cad..80ddfd2 100644 --- a/src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue +++ b/src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue @@ -51,6 +51,7 @@ 搜索 + 高级检索 重置
@@ -139,7 +140,8 @@ - + +
@@ -162,6 +164,15 @@ @formLoadingShow="formLoadingShow" @repeatDataShow="repeatDataShow" /> + +
{{ displayedText }}
@@ -357,10 +368,20 @@ + + +
+

高级检索:{{ advancedSearchDisplayText }}

{{ test }}
隐藏状态栏 @@ -381,6 +402,8 @@ import '@riophae/vue-treeselect/dist/vue-treeselect.css' import PreviewForm from '@/views/components/category/PreviewForm' import UploadOriginal from './uploadOriginal/index' import BigUpload from './uploadOriginal/bigUpload' +import EmbedUpload from './uploadOriginal/embedUpload' +import AdvancedSearchModal from './advancedSearchModal' import BlukImport from './bulkImport/index' import BlukEditing from './blukEditing/index' import FileSeqAdjustment from './fileSeqAdjustment/index' @@ -403,7 +426,7 @@ export default { directives: { elDragDialog }, - components: { Treeselect, PreviewForm, UploadOriginal, BigUpload, BlukImport, BlukEditing, FileSeqAdjustment, CombineFile, InsertFile, CollectMoveFile, Print, FourTest, QuickPaper, PackingBox, ArchivesFilling }, + components: { Treeselect, PreviewForm, UploadOriginal, BigUpload, EmbedUpload, AdvancedSearchModal, BlukImport, BlukEditing, FileSeqAdjustment, CombineFile, InsertFile, CollectMoveFile, Print, FourTest, QuickPaper, PackingBox, ArchivesFilling }, mixins: [collectionLibraryCrud, crud()], props: { selectedCategory: { @@ -458,6 +481,7 @@ export default { isAiAutoCategory: false, displayedText: '', formIsAddOrEdit: '', + showAdvancedSearchModal: false, aIAssistEnterVisible: false, aiCategoryData: [], aiCategoryloading: false, @@ -470,7 +494,8 @@ export default { repeatLoading: false, repeatResponseData: {}, repeatData: [], - archiveInfo: {} + archiveInfo: {}, + advancedSearchConditions: [] } }, computed: { @@ -556,6 +581,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(' ') } }, watch: { @@ -578,10 +628,25 @@ export default { created() { }, mounted() { + // 从 localStorage 恢复高级检索条件 + // this.restoreAdvancedSearchConditions() this.getInitArchivesClass() this.getCategoryDataTree() }, methods: { + // 从 localStorage 恢复高级检索条件 + restoreAdvancedSearchConditions() { + const savedConditions = localStorage.getItem('advancedSearchConditions') + const savedSql = localStorage.getItem('advancedSearchSql') + if (savedConditions && savedSql) { + try { + this.advancedSearchConditions = JSON.parse(savedConditions) + this.query.condition = savedSql + } catch (e) { + console.error('err:', e) + } + } + }, getCategoryDataTree() { FetchCategoryMenu().then(res => { this.categoryMenu = res @@ -590,9 +655,16 @@ export default { resetQuery() { this.query = { 'search': null, + 'condition': null, 'project_class': null, 'archive_ctg_no': null } + this.advancedSearchConditions = [] + // 清除 localStorage 中的高级检索条件 + localStorage.removeItem('advancedSearchConditions') + localStorage.removeItem('advancedSearchSql') + localStorage.removeItem('currentPageSize') + localStorage.removeItem('currentPage') this.handleSearch(this.collectLevel) }, // 筛选 - 档案分类 @@ -600,9 +672,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 } @@ -855,6 +932,36 @@ export default { done() }, + // 嵌入版上传成功回调 + handleUploadSuccess() { + // 上传成功后可以刷新文件列表或做其他操作 + console.log('嵌入版上传成功') + }, + // 显示重复文件弹窗 + handleShowRepeatModal(repeatData) { + // 这里可以处理重复文件的逻辑,比如调用已有的重复文件处理机制 + console.log('重复文件:', repeatData) + }, + // 打开高级检索弹窗 + 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) + }, // 删除 toDelete() { if (this.selections.length === 0) { diff --git a/src/views/collectReorganizi/collectionLibrary/module/uploadOriginal/embedUpload.vue b/src/views/collectReorganizi/collectionLibrary/module/uploadOriginal/embedUpload.vue new file mode 100644 index 0000000..bbef418 --- /dev/null +++ b/src/views/collectReorganizi/collectionLibrary/module/uploadOriginal/embedUpload.vue @@ -0,0 +1,610 @@ + + + + + diff --git a/src/views/collectReorganizi/collectionLibrary/project/index.vue b/src/views/collectReorganizi/collectionLibrary/project/index.vue index 1b8b401..0e57f6a 100644 --- a/src/views/collectReorganizi/collectionLibrary/project/index.vue +++ b/src/views/collectReorganizi/collectionLibrary/project/index.vue @@ -1,6 +1,6 @@