|
|
@ -29,8 +29,7 @@ |
|
|
|
</el-tree> |
|
|
|
</div> |
|
|
|
<h3 class="arc-title arc-title-bottom">快速筛选</h3> |
|
|
|
<!-- show-checkbox |
|
|
|
@check-change="handleCheckChange" --> |
|
|
|
<!-- @node-click="handleClassifyFilter" --> |
|
|
|
<el-tree |
|
|
|
ref="classifyTree" |
|
|
|
v-loading="classifyLoading" |
|
|
@ -40,7 +39,8 @@ |
|
|
|
node-key="id" |
|
|
|
:expand-on-click-node="false" |
|
|
|
highlight-current |
|
|
|
@node-click="handleClassifyFilter" |
|
|
|
show-checkbox |
|
|
|
@check-change="handleCheckChange" |
|
|
|
> |
|
|
|
<span slot-scope="{ node, data }" class="custom-tree-node"> |
|
|
|
<span v-if="data.childDictionarys || data.fondsName" class="iconClassify"> |
|
|
@ -170,6 +170,7 @@ export default { |
|
|
|
const json = {} |
|
|
|
json.id = index |
|
|
|
json.dictionaryName = item |
|
|
|
json.dictionaryParents = '-1' |
|
|
|
json.childDictionarys = [] |
|
|
|
return json |
|
|
|
}) |
|
|
@ -398,17 +399,99 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
handleCheckChange(data, checked, indeterminate) { |
|
|
|
// 获取所有选中的节点 start |
|
|
|
// 获取所有选中的节点 |
|
|
|
const res = this.$refs.classifyTree.getCheckedNodes() |
|
|
|
const arrClassify = [] |
|
|
|
res.forEach((item) => { |
|
|
|
arrClassify.push(item) |
|
|
|
|
|
|
|
if (res.some(obj => obj.fondsName === '全宗')) { |
|
|
|
this.smartQuery.fonds_no = null |
|
|
|
} else { |
|
|
|
const fondsGroup = res.filter(item => item.fondsId).map(item => item.fondsNo) |
|
|
|
this.smartQuery.fonds_no = fondsGroup.join(',') |
|
|
|
} |
|
|
|
|
|
|
|
const groupedData = {} |
|
|
|
res.forEach(function(item) { |
|
|
|
if (item.dictionaryParents === '-1') { |
|
|
|
groupedData.archive_year = groupedData.archive_year || [] |
|
|
|
groupedData.archive_year.push(item.dictionaryName) |
|
|
|
} else if (item.dictionaryParents === '4028e3c389cee5920189cf0af3d30000') { |
|
|
|
groupedData.security_class = groupedData.security_class || [] |
|
|
|
groupedData.security_class.push(item.dictionaryName) |
|
|
|
} else if (item.dictionaryParents === '4028e3c38a20f4d4018a213c26ff001c') { |
|
|
|
groupedData.retention = groupedData.retention || [] |
|
|
|
groupedData.retention.push(item.dictionaryName) |
|
|
|
} else if (item.dictionaryParents === '4028e3c38b4159fe018b415a7c470000') { |
|
|
|
groupedData.doc_type = groupedData.doc_type || [] |
|
|
|
groupedData.doc_type.push(item.dictionaryName) |
|
|
|
} else if (item.dictionaryParents === '4028e3c38b415cea018b417f4a6c0011') { |
|
|
|
groupedData.medium_type = groupedData.medium_type || [] |
|
|
|
groupedData.medium_type.push(item.dictionaryName) |
|
|
|
} |
|
|
|
}) |
|
|
|
// this.dataTree 就是选中的数据 |
|
|
|
// this.dataTree = arrDeptId |
|
|
|
console.log(arrClassify) |
|
|
|
|
|
|
|
console.log(data, checked, indeterminate) |
|
|
|
if (data.id) { |
|
|
|
const selectedParentVal = this.$refs.classifyTree.getNode(data.id).parent.data.dictionaryCode |
|
|
|
switch (selectedParentVal) { |
|
|
|
case 'security_class': |
|
|
|
if (res.some(obj => obj.dictionaryCode === 'security_class')) { |
|
|
|
this.smartQuery.security_class = null |
|
|
|
} else { |
|
|
|
if (groupedData.security_class) { |
|
|
|
this.smartQuery.security_class = groupedData.security_class.join(',') |
|
|
|
} else { |
|
|
|
this.smartQuery.security_class = null |
|
|
|
} |
|
|
|
} |
|
|
|
break |
|
|
|
case 'retention': |
|
|
|
if (res.some(obj => obj.dictionaryCode === 'retention')) { |
|
|
|
this.smartQuery.retention = null |
|
|
|
} else { |
|
|
|
if (groupedData.retention) { |
|
|
|
this.smartQuery.retention = groupedData.retention.join(',') |
|
|
|
} else { |
|
|
|
this.smartQuery.retention = null |
|
|
|
} |
|
|
|
} |
|
|
|
break |
|
|
|
case 'doc_type': |
|
|
|
if (res.some(obj => obj.dictionaryCode === 'doc_type')) { |
|
|
|
this.smartQuery.doc_type = null |
|
|
|
} else { |
|
|
|
if (groupedData.doc_type) { |
|
|
|
this.smartQuery.doc_type = groupedData.doc_type.join(',') |
|
|
|
} else { |
|
|
|
this.smartQuery.doc_type = null |
|
|
|
} |
|
|
|
} |
|
|
|
break |
|
|
|
case 'medium_type': |
|
|
|
if (res.some(obj => obj.dictionaryCode === 'medium_type')) { |
|
|
|
this.smartQuery.medium_type = null |
|
|
|
} else { |
|
|
|
if (groupedData.medium_type) { |
|
|
|
this.smartQuery.medium_type = groupedData.medium_type.join(',') |
|
|
|
} else { |
|
|
|
this.smartQuery.medium_type = null |
|
|
|
} |
|
|
|
} |
|
|
|
break |
|
|
|
default: |
|
|
|
if (res.some(obj => obj.dictionaryCode === 'archive_year')) { |
|
|
|
this.smartQuery.archive_year = null |
|
|
|
} else { |
|
|
|
if (groupedData.archive_year) { |
|
|
|
this.smartQuery.archive_year = groupedData.archive_year.join(',') |
|
|
|
} else { |
|
|
|
this.smartQuery.archive_year = null |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
this.handlePageList('quickFilter') |
|
|
|
}) |
|
|
|
}, |
|
|
|
handleOpenAnjuan(data, parentId, parentsRow) { |
|
|
|
this.parentsProjectId = parentId |
|
|
|