mirror of
https://github.com/veops/cmdb.git
synced 2025-08-07 08:34:08 +08:00
feat: export remove reference attr
This commit is contained in:
@@ -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() {
|
||||
this.$refs.batchDownload.open({
|
||||
preferenceAttrList: [
|
||||
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,
|
||||
})
|
||||
},
|
||||
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)
|
||||
|
Reference in New Issue
Block a user