|
|
@ -144,6 +144,7 @@ export default { |
|
|
|
} |
|
|
|
return null |
|
|
|
}, |
|
|
|
|
|
|
|
// 展开选中的父级 |
|
|
|
expandParents(node) { |
|
|
|
node.expanded = true |
|
|
@ -195,14 +196,9 @@ export default { |
|
|
|
getIntellClassify() { |
|
|
|
getDicts().then(data => { |
|
|
|
if (data) { |
|
|
|
this.intellClassifyTree = data |
|
|
|
// this.intellClassifyTree.filter(item => { |
|
|
|
// if (item.childMenus !== null) { |
|
|
|
// item.childMenus.map(val => { |
|
|
|
// val.ifChild = true |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
this.intellClassifyTree = data.filter(item => { |
|
|
|
return item.dicCode === 'Search_MJ' || item.dicCode === 'Search_BGQX' || item.dicCode === 'Search_JGWT' || item.dicCode === 'Search_BM' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
@ -317,7 +313,7 @@ export default { |
|
|
|
json.ifChild = true |
|
|
|
return json |
|
|
|
}) |
|
|
|
this.intellClassifyTree.unshift({ id: -1, dicName: '年度', childMenus: newYearArr }) |
|
|
|
this.intellClassifyTree.unshift({ id: -1, dicName: '年度', dicCode: 'Search_year', childMenus: newYearArr }) |
|
|
|
} |
|
|
|
this.intellClassifyLoading = false |
|
|
|
}, 500) |
|
|
@ -326,10 +322,10 @@ export default { |
|
|
|
// 智能分类 |
|
|
|
handleIntellNodeClick(data, node, ele) { |
|
|
|
if (data) { |
|
|
|
if (node.childNodes.length === 0) { |
|
|
|
const selectedKey = this.$refs.smartTree.getCurrentNode() |
|
|
|
const selectedParentVal = this.$refs.smartTree.getNode(selectedKey).parent.label |
|
|
|
const selectedParentVal = this.$refs.smartTree.getNode(selectedKey).parent.data.dicCode |
|
|
|
this.treeCurrentNode = ele.$el |
|
|
|
|
|
|
|
// if (data.ifChild) { |
|
|
|
// this.treeCurrentNode = ele.$el |
|
|
|
// const eles = document.querySelectorAll('.el-tree-node__children .el-tree-node.is-focusable') |
|
|
@ -344,7 +340,6 @@ export default { |
|
|
|
// this.treeCurrentNode.classList.add('is-current') |
|
|
|
// } |
|
|
|
// } |
|
|
|
|
|
|
|
if (ele.$el.classList.contains('is-current')) { |
|
|
|
this.treeCurrentNode.classList.remove('is-current') |
|
|
|
this.smartQuery = { |
|
|
@ -354,43 +349,35 @@ export default { |
|
|
|
'securityClass': null, |
|
|
|
'organizationMatter': null |
|
|
|
} |
|
|
|
this.handleTableList() |
|
|
|
} else { |
|
|
|
this.treeCurrentNode.classList.add('is-current') |
|
|
|
console.log(this.$refs.smartTree.getNode(selectedKey).parent.data) |
|
|
|
switch (selectedParentVal) { |
|
|
|
case '年度': |
|
|
|
this.treeCurrentNode.classList.remove('is-current') |
|
|
|
if (selectedKey.dicName !== '年度') { |
|
|
|
case 'Search_year': |
|
|
|
if (selectedKey.dicCode !== 'Search_year') { |
|
|
|
this.smartQuery.archiveYear = selectedKey.dicName |
|
|
|
} |
|
|
|
break |
|
|
|
case '部门名称': |
|
|
|
if (selectedKey.dicName !== '部门名称') { |
|
|
|
case 'Search_BM': |
|
|
|
if (selectedKey.dicCode !== 'Search_BM') { |
|
|
|
this.smartQuery.department = selectedKey.dicName |
|
|
|
} |
|
|
|
break |
|
|
|
case '保管期限': |
|
|
|
if (selectedKey.dicName !== '保管期限') { |
|
|
|
case 'Search_BGQX': |
|
|
|
if (selectedKey.dicCode !== 'Search_BGQX') { |
|
|
|
this.smartQuery.retention = selectedKey.dicName |
|
|
|
} |
|
|
|
break |
|
|
|
case '密级': |
|
|
|
if (selectedKey.dicName !== '密级') { |
|
|
|
case 'Search_MJ': |
|
|
|
if (selectedKey.dicCode !== 'Search_MJ') { |
|
|
|
this.smartQuery.securityClass = selectedKey.dicName |
|
|
|
} |
|
|
|
break |
|
|
|
case ' 机构(问题)': |
|
|
|
if (selectedKey.dicName !== '机构(问题)') { |
|
|
|
default: |
|
|
|
if (selectedKey.dicCode !== 'Search_JGWT') { |
|
|
|
console.log(selectedKey.dicName) |
|
|
|
this.smartQuery.organizationMatter = selectedKey.dicName |
|
|
|
} |
|
|
|
break |
|
|
|
default: |
|
|
|
this.smartQuery = { |
|
|
|
'archiveYear': null, |
|
|
|
'department': null, |
|
|
|
'retention': null, |
|
|
|
'securityClass': null, |
|
|
|
'organizationMatter': null |
|
|
|
} |
|
|
|
} |
|
|
|
this.handleTableList() |
|
|
|