mirror of https://github.com/veops/cmdb.git
Merge pull request #604 from veops/dev_ui_240826
feat: export remove reference attr
This commit is contained in:
commit
5d3221b93a
|
@ -417,7 +417,7 @@ export default {
|
|||
|
||||
async openBatchDownload() {
|
||||
this.$refs.batchDownload.open({
|
||||
preferenceAttrList: this.preferenceAttrList,
|
||||
preferenceAttrList: this.preferenceAttrList.filter((attr) => !attr?.is_reference),
|
||||
ciTypeName: this.$route.meta.title || this.$route.meta.name,
|
||||
})
|
||||
},
|
||||
|
|
|
@ -1259,7 +1259,7 @@ export default {
|
|||
},
|
||||
async openBatchDownload() {
|
||||
this.$refs.batchDownload.open({
|
||||
preferenceAttrList: this.preferenceAttrList,
|
||||
preferenceAttrList: this.preferenceAttrList.filter((attr) => !attr?.is_reference),
|
||||
ciTypeName: this.$route.meta.name,
|
||||
})
|
||||
},
|
||||
|
|
|
@ -592,11 +592,21 @@ export default {
|
|||
return ''
|
||||
},
|
||||
handleExport() {
|
||||
const preferenceAttrList = [
|
||||
{ id: `ci_type_alias`, value: 'ci_type_alias', label: this.$t('cmdb.ciType.ciType') },
|
||||
...this.columnsGroup,
|
||||
]
|
||||
|
||||
preferenceAttrList.forEach((attr) => {
|
||||
if (Array.isArray(attr?.children) && attr?.children?.length) {
|
||||
attr.children = attr.filter((child) => {
|
||||
return !child?.is_reference
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
this.$refs.batchDownload.open({
|
||||
preferenceAttrList: [
|
||||
{ id: `ci_type_alias`, value: 'ci_type_alias', label: this.$t('cmdb.ciType.ciType') },
|
||||
...this.columnsGroup,
|
||||
],
|
||||
preferenceAttrList,
|
||||
})
|
||||
},
|
||||
batchDownload({ filename, type, checkedKeys }) {
|
||||
|
|
|
@ -808,7 +808,7 @@ export default {
|
|||
})
|
||||
},
|
||||
async openBatchDownload() {
|
||||
this.$refs.batchDownload.open({ preferenceAttrList: this.currentAttrList, ciTypeName: this.currentCiTypeName })
|
||||
this.$refs.batchDownload.open({ preferenceAttrList: this.currentAttrList.filter((attr) => !attr?.is_reference), ciTypeName: this.currentCiTypeName })
|
||||
},
|
||||
batchDownload({ filename, type, checkedKeys }) {
|
||||
console.log(filename, type)
|
||||
|
|
Loading…
Reference in New Issue