diff --git a/cmdb-ui/src/modules/cmdb/components/batchDownload/batchDownload.vue b/cmdb-ui/src/modules/cmdb/components/batchDownload/batchDownload.vue index 429d6ce..6cfecf6 100644 --- a/cmdb-ui/src/modules/cmdb/components/batchDownload/batchDownload.vue +++ b/cmdb-ui/src/modules/cmdb/components/batchDownload/batchDownload.vue @@ -111,12 +111,14 @@ export default { }, methods: { ...mapMutations('cmdbStore', ['SET_IS_TABLE_LOADING']), - open({ preferenceAttrList }) { + open({ preferenceAttrList, ciTypeName = undefined }) { this.preferenceAttrList = preferenceAttrList this.visible = true this.$nextTick((res) => { this.form.setFieldsValue({ - filename: `cmdb-${moment().format('YYYYMMDDHHmmss')}`, + filename: ciTypeName + ? `cmdb-${ciTypeName}-${moment().format('YYYYMMDDHHmmss')}` + : `cmdb-${moment().format('YYYYMMDDHHmmss')}`, }) if (this.treeType === 'tree') { const _check = ['ci_type_alias'] diff --git a/cmdb-ui/src/modules/cmdb/views/batch/index.vue b/cmdb-ui/src/modules/cmdb/views/batch/index.vue index c6c8420..d9f8a4a 100644 --- a/cmdb-ui/src/modules/cmdb/views/batch/index.vue +++ b/cmdb-ui/src/modules/cmdb/views/batch/index.vue @@ -106,7 +106,6 @@ export default { this.uploadData = _uploadData.slice(1) this.hasError = false this.isUploading = false - this.$refs.uploadResult.visible = false }, handleUpload() { if (!this.ciType) { diff --git a/cmdb-ui/src/modules/cmdb/views/ci/index.vue b/cmdb-ui/src/modules/cmdb/views/ci/index.vue index 64019af..8a484a5 100644 --- a/cmdb-ui/src/modules/cmdb/views/ci/index.vue +++ b/cmdb-ui/src/modules/cmdb/views/ci/index.vue @@ -576,7 +576,10 @@ export default { }, async openBatchDownload() { - this.$refs.batchDownload.open({ preferenceAttrList: this.preferenceAttrList }) + this.$refs.batchDownload.open({ + preferenceAttrList: this.preferenceAttrList, + ciTypeName: this.$route.meta.title || this.$route.meta.name, + }) }, batchDownload({ filename, type, checkedKeys }) { const jsonAttrList = [] diff --git a/cmdb-ui/src/modules/cmdb/views/relation_views/index.vue b/cmdb-ui/src/modules/cmdb/views/relation_views/index.vue index 70d1c2d..056fa9d 100644 --- a/cmdb-ui/src/modules/cmdb/views/relation_views/index.vue +++ b/cmdb-ui/src/modules/cmdb/views/relation_views/index.vue @@ -58,10 +58,10 @@ />
- 新建 @@ -1322,7 +1322,10 @@ export default { }) }, async openBatchDownload() { - this.$refs.batchDownload.open({ preferenceAttrList: this.preferenceAttrList }) + this.$refs.batchDownload.open({ + preferenceAttrList: this.preferenceAttrList, + ciTypeName: this.$route.meta.title || this.$route.meta.name, + }) }, batchDownload({ filename, type, checkedKeys }) { const jsonAttrList = [] diff --git a/cmdb-ui/src/modules/cmdb/views/tree_views/index.vue b/cmdb-ui/src/modules/cmdb/views/tree_views/index.vue index 3b06fd5..d2896be 100644 --- a/cmdb-ui/src/modules/cmdb/views/tree_views/index.vue +++ b/cmdb-ui/src/modules/cmdb/views/tree_views/index.vue @@ -18,10 +18,10 @@ 属性说明 - 新建 @@ -1054,7 +1054,10 @@ export default { this.$refs.jsonEditor.open(column, row) }, async openBatchDownload() { - this.$refs.batchDownload.open({ preferenceAttrList: this.currentAttrList }) + this.$refs.batchDownload.open({ + preferenceAttrList: this.currentAttrList, + ciTypeName: this.$route.meta.title || this.$route.meta.name, + }) }, batchDownload({ filename, type, checkedKeys }) { console.log(filename, type)