mirror of
				https://github.com/veops/cmdb.git
				synced 2025-10-31 19:39:24 +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() { | ||||
|       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) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user