|
|
@ -32,7 +32,7 @@ |
|
|
|
node-key="id" |
|
|
|
:expand-on-click-node="false" |
|
|
|
highlight-current |
|
|
|
@node-click="handleNodeFilter" |
|
|
|
@node-click="handleClassifyFilter" |
|
|
|
> |
|
|
|
<span slot-scope="{ node, data }" class="custom-tree-node"> |
|
|
|
<span v-if="data.childDictionarys || data.fondsName" class="iconClassify"> |
|
|
@ -51,10 +51,10 @@ |
|
|
|
<div class="container-right tab-content"> |
|
|
|
<span class="right-top-line" /> |
|
|
|
<span class="left-bottom-line" /> |
|
|
|
<Project v-if="selectedCategory.arrangeType === 3" ref="projectEle" :selected-category="selectedCategory" :data="sharedData" :is-recycle="isRecycle" @openAnjuan="handleOpenAnjuan" @myYearEvent="handleYearData" /> |
|
|
|
<Anjuan v-if="selectedCategory.arrangeType === 1 || selectedCategory.arrangeType === 2 || selectedCategory.arrangeType === 3" ref="anjuanEle" :selected-category="selectedCategory" :data="sharedData" :is-recycle="isRecycle" @openJuannei="handleOpenJuannei" @myYearEvent="handleYearData" /> |
|
|
|
<Juannei v-if="selectedCategory.arrangeType === 2 || selectedCategory.arrangeType === 3" ref="juanneiEle" :data="sharedData" :selected-category="selectedCategory" :is-recycle="isRecycle" @openFile="handleOpenFile" /> |
|
|
|
<File v-if="selectedCategory.arrangeType === 1 || selectedCategory.arrangeType === 2 || selectedCategory.arrangeType === 3" ref="fileEle" :is-recycle="isRecycle" :selected-category="selectedCategory" /> |
|
|
|
<Project v-if="selectedCategory.arrangeType === 3" ref="projectEle" :selected-category="selectedCategory" :data="sharedData" :is-recycle="isRecycle" :smart-query="smartQuery" @openAnjuan="handleOpenAnjuan" @myYearEvent="handleYearData" /> |
|
|
|
<Anjuan v-if="selectedCategory.arrangeType === 1 || selectedCategory.arrangeType === 2 || selectedCategory.arrangeType === 3" ref="anjuanEle" :selected-category="selectedCategory" :data="sharedData" :is-recycle="isRecycle" :smart-query="smartQuery" @openJuannei="handleOpenJuannei" @myYearEvent="handleYearData" /> |
|
|
|
<Juannei v-if="selectedCategory.arrangeType === 2 || selectedCategory.arrangeType === 3" ref="juanneiEle" :data="sharedData" :selected-category="selectedCategory" :is-recycle="isRecycle" :smart-query="smartQuery" @openFile="handleOpenFile" /> |
|
|
|
<File v-if="selectedCategory.arrangeType === 1 || selectedCategory.arrangeType === 2 || selectedCategory.arrangeType === 3" ref="fileEle" :is-recycle="isRecycle" :selected-category="selectedCategory" :smart-query="smartQuery" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -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 |
|
|
|