-
+
@@ -120,7 +120,15 @@ export default {
yearChildData: '',
parentsProjectId: null,
parentsAnjuanId: null,
- parentsJuanneiId: null
+ parentsJuanneiId: null,
+ smartQuery: {
+ 'retention': null, // 保管期限
+ 'security_class': null, // 密级
+ 'doc_type': null, // 文种
+ 'medium_type': null, // 载体类型
+ 'archive_year': null, // 年度
+ 'fonds_no': null // 全宗
+ }
}
},
watch: {
@@ -147,7 +155,7 @@ export default {
json.childDictionarys = []
return json
})
- this.classifyTree.unshift({ id: -1, dictionaryName: '年度', dicCode: 'Search_year', childDictionarys: newYearArr })
+ this.classifyTree.unshift({ id: -1, dictionaryName: '年度', dictionaryCode: 'archive_year', childDictionarys: newYearArr })
}
this.classifyLoading = false
}, 500)
@@ -222,6 +230,14 @@ export default {
})
},
handleNodeClick(val) {
+ this.smartQuery = {
+ 'retention': null, // 保管期限
+ 'security_class': null, // 密级
+ 'doc_type': null, // 文种
+ 'medium_type': null, // 载体类型
+ 'archive_year': null, // 年度
+ 'fonds_no': null // 全宗
+ }
// 缓存当前的选中的
localStorage.setItem('currentArchivesKey', JSON.stringify(val))
this.selectedCategory = val
@@ -232,29 +248,53 @@ export default {
this.classifyTree = []
}
this.$nextTick(() => {
- if (this.selectedCategory.arrangeType === 3) {
- // 项目下
+ this.handlePageList()
+ })
+ },
+ handlePageList(isQuickFilter) {
+ if (this.selectedCategory.arrangeType === 3) {
+ const tablistEle = this.$refs.projectEle
+ // 项目下
+ if (isQuickFilter) {
+ tablistEle.$refs.collectHeaderRef.getInitArchivesClass()
+ tablistEle.getTableDisplayFieldsLoading = true
+ tablistEle.getViewTableList(1, null, isQuickFilter)
+ } else {
this.$refs.projectEle.getCommonData(1)
- } else if (this.selectedCategory.arrangeType === 2) {
- // 案卷下
- this.$refs.anjuanEle.$refs.ajContent.$refs.tableList.getCommonData(2)
- } else if (this.selectedCategory.arrangeType === 1) {
- // 文件下
- this.$refs.anjuanEle.$refs.ajContent.$refs.tableList.getCommonData(3)
}
- if (this.$refs.anjuanEle) {
- this.$refs.anjuanEle.anjuanDrawer = false
- if (this.$refs.anjuanEle.$refs.ajContent) {
- this.$refs.anjuanEle.$refs.ajContent.activeIndex = 0
- }
+ } else if (this.selectedCategory.arrangeType === 2) {
+ const tablistEle = this.$refs.anjuanEle.$refs.ajContent.$refs.tableList
+ // 案卷下
+ if (isQuickFilter) {
+ tablistEle.$refs.collectHeaderRef.getInitArchivesClass()
+ tablistEle.getTableDisplayFieldsLoading = true
+ tablistEle.getViewTableList(2, null, isQuickFilter)
+ } else {
+ tablistEle.getCommonData(2)
}
- if (this.$refs.juanneiEle) {
- this.$refs.juanneiEle.juanneiDrawer = false
+ } else if (this.selectedCategory.arrangeType === 1) {
+ const tablistEle = this.$refs.anjuanEle.$refs.ajContent.$refs.tableList
+ // 文件下
+ if (isQuickFilter) {
+ tablistEle.$refs.collectHeaderRef.getInitArchivesClass()
+ tablistEle.getTableDisplayFieldsLoading = true
+ tablistEle.getViewTableList(3, null, isQuickFilter)
+ } else {
+ tablistEle.getCommonData(3)
}
- if (this.$refs.fileEle) {
- this.$refs.fileEle.fileDrawer = false
+ }
+ if (this.$refs.anjuanEle) {
+ this.$refs.anjuanEle.anjuanDrawer = false
+ if (this.$refs.anjuanEle.$refs.ajContent) {
+ this.$refs.anjuanEle.$refs.ajContent.activeIndex = 0
}
- })
+ }
+ if (this.$refs.juanneiEle) {
+ this.$refs.juanneiEle.juanneiDrawer = false
+ }
+ if (this.$refs.fileEle) {
+ this.$refs.fileEle.fileDrawer = false
+ }
},
getDictionaryTreeByCategoryId(categoryId) {
this.classifyLoading = true
@@ -274,8 +314,60 @@ export default {
console.log(err)
})
},
- handleNodeFilter(val) {
- // console.log('val', val)
+ handleClassifyFilter(data, node, ele) {
+ this.smartQuery = {
+ 'retention': null, // 保管期限
+ 'security_class': null, // 密级
+ 'doc_type': null, // 文种
+ 'medium_type': null, // 载体类型
+ 'archive_year': null, // 年度
+ 'fonds_no': null // 全宗
+ }
+ if (data) {
+ if (node.childNodes.length === 0) {
+ const selectedKey = this.$refs.classifyTree.getCurrentNode()
+ this.treeCurrentNode = ele.$el
+ if (ele.$el.classList.contains('is-current')) {
+ this.treeCurrentNode.classList.remove('is-current')
+ } else {
+ this.treeCurrentNode.classList.add('is-current')
+ if (Object.keys(selectedKey).includes('fondsId')) {
+ this.smartQuery.fonds_no = selectedKey.fondsNo
+ } else {
+ const selectedParentVal = this.$refs.classifyTree.getNode(selectedKey).parent.data.dictionaryCode
+ switch (selectedParentVal) {
+ case 'security_class':
+ if (selectedKey.dictionaryCode !== 'security_class') {
+ this.smartQuery.security_class = selectedKey.dictionaryName
+ }
+ break
+ case 'retention':
+ if (selectedKey.dictionaryCode !== 'retention') {
+ this.smartQuery.retention = selectedKey.dictionaryName
+ }
+ break
+ case 'doc_type':
+ if (selectedKey.dictionaryCode !== 'doc_type') {
+ this.smartQuery.doc_type = selectedKey.dictionaryName
+ }
+ break
+ case 'medium_type':
+ if (selectedKey.dictionaryCode !== 'medium_type') {
+ this.smartQuery.medium_type = selectedKey.dictionaryName
+ }
+ break
+ default:
+ if (selectedKey.dicCode !== 'archive_year') {
+ this.smartQuery.archive_year = selectedKey.dictionaryName
+ }
+ }
+ }
+ }
+ this.$nextTick(() => {
+ this.handlePageList('quickFilter')
+ })
+ }
+ }
},
handleOpenAnjuan(data, parentId) {
this.parentsProjectId = parentId
diff --git a/src/views/collectReorganizi/collectionLibrary/juannei/index.vue b/src/views/collectReorganizi/collectionLibrary/juannei/index.vue
index ef959d5..228ab5f 100644
--- a/src/views/collectReorganizi/collectionLibrary/juannei/index.vue
+++ b/src/views/collectReorganizi/collectionLibrary/juannei/index.vue
@@ -8,7 +8,7 @@
direction="rtl"
:size="selectedCategory.arrangeType === 2 ? '90%' :'80%'"
>
-
+
{
- this.getViewTableList(categoryLevel, 'search', parentsId)
+ this.getViewTableList(categoryLevel, this.parentsId, 'search')
}, 200)
},
- getViewTable(categoryLevel, parentsId) {
+ getViewTable(categoryLevel, parentsId, type) {
this.getTableDisplayFieldsLoading = true
this.tableDisplayFields = []
FetchInitCategoryViewTable({ categoryId: this.selectedCategory.id, categoryLevel: categoryLevel }).then((res) => {
@@ -73,76 +84,103 @@ export const collectionLibraryCrud = {
}
})
this.$nextTick(() => {
- this.getViewTableList(categoryLevel, null, parentsId)
+ this.getViewTableList(categoryLevel, parentsId, type)
})
}
})
},
- getViewTableList(categoryLevel, type, parentsId) {
+ getViewTableList(categoryLevel, parentsId, type) {
console.log('list', parentsId)
const params = {
'parentId': parentsId,
'categoryId': this.selectedCategory.id,
'categoryLevel': categoryLevel,
'search': this.query.search,
+ 'retention': this.smartQuery.retention,
+ 'security_class': this.smartQuery.security_class,
+ 'medium_type': this.smartQuery.medium_type,
+ 'doc_type': this.smartQuery.doc_type,
+ 'archive_year': this.smartQuery.archive_year,
+ 'fonds_no': this.smartQuery.fonds_no,
+ 'project_class': this.query.project_class,
+ 'archive_ctg_no': this.query.archive_ctg_no,
'page': this.page.page - 1,
'size': this.page.size
}
FetchInitCategoryView(params).then((res) => {
if (res.code !== 500) {
if (categoryLevel === 1) {
+ // 项目
this.projectData = res.list.content
+ this.page.total = res.list.totalElements
this.yearData = res.yearGroup
- if (this.yearData) {
+ if (this.yearData && type !== 'quickFilter') {
this.$emit('myYearEvent', this.yearData)
}
if (type === 'search') {
this.$parent.projectData = res.list.content
+ this.$parent.page.total = res.list.totalElements
this.$parent.getTableDisplayFieldsLoading = false
}
} else if (categoryLevel === 2) {
+ // 案卷
+ const anjuanObj = this.parentsData.$refs.anjuanEle.$refs.ajContent.$refs.tableList
this.anjuanData = res.list.content
+ this.page.total = res.list.totalElements
this.yearData = res.yearGroup
- if (this.yearData) {
+ if (this.yearData && type !== 'quickFilter') {
this.$parent.$parent.$emit('myYearEvent', this.yearData)
}
+ // 搜索/新增/编辑 非 案卷是主页的时候
if (type === 'search') {
- this.$parent.anjuanData = res.list.content
- this.$parent.getTableDisplayFieldsLoading = false
+ anjuanObj.anjuanData = res.list.content
+ anjuanObj.page.total = res.list.totalElements
+ anjuanObj.getTableDisplayFieldsLoading = false
}
} else if (categoryLevel === 3) {
- if (this.isTitleType === 6) {
- this.fileData = res.list.content
- } else if (this.isTitleType === 3) {
+ if (this.isTitleType === 3) {
+ console.log('2222')
+ // 案卷下的未整理 / 文件为主页时
+ const wjObj = this.parentsData.$refs.anjuanEle.$refs.ajContent.$refs.tableList
this.anjuanData = res.list.content
+ this.page.total = res.list.totalElements
this.yearData = res.yearGroup
- if (this.yearData) {
+ if (this.yearData && type !== 'quickFilter') {
this.$parent.$parent.$emit('myYearEvent', this.yearData)
}
+ if (type === 'search') {
+ wjObj.anjuanData = res.list.content
+ wjObj.page.total = res.list.totalElements
+ wjObj.getTableDisplayFieldsLoading = false
+ }
} else {
- if (this.selectedCategory.arrangeType === 1) {
- this.anjuanData = res.list.content
- this.yearData = res.yearGroup
- if (this.yearData) {
- this.$parent.$parent.$emit('myYearEvent', this.yearData)
- }
- if (type === 'search') {
- this.$parent.anjuanData = res.list.content
- this.$parent.getTableDisplayFieldsLoading = false
- }
- } else {
- this.junneiData = res.list.content
- if (type === 'search') {
- this.$parent.$parent.junneiData = res.list.content
- this.$parent.$parent.getTableDisplayFieldsLoading = false
- }
+ // 卷内
+ console.log('5555')
+ this.junneiData = res.list.content
+ this.page.total = res.list.totalElements
+ if (type === 'search') {
+ this.parentsData.$refs.juanneiEle.junneiData = res.list.content
+ this.parentsData.$refs.juanneiEle.page.total = res.list.totalElements
+ this.parentsData.$refs.juanneiEle.getTableDisplayFieldsLoading = false
}
}
+ } else {
+ // 原文
+ this.fileData = res.list.content
+ this.page.total = res.list.totalElements
+ if (type === 'search') {
+ this.parentsData.$refs.fileEle.fileData = res.list.content
+ this.parentsData.$refs.fileEle.page.total = res.list.totalElements
+ this.parentsData.$refs.fileEle.getTableDisplayFieldsLoading = false
+ }
}
- this.page.total = res.list.totalElements
}
this.getTableDisplayFieldsLoading = false
- this.$parent.$parent.$refs.table.clearSelection()
+ if (!parentsId) {
+ this.selections = []
+ this.crud.selections = []
+ this.$refs.table.clearSelection()
+ }
})
},
diff --git a/src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue b/src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue
index 4bcee8c..59fa987 100644
--- a/src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue
+++ b/src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue
@@ -6,30 +6,34 @@
搜索
- 重置
+ 重置