mirror of https://github.com/veops/cmdb.git
pref(cmdb-ui):download ci xlsx name
This commit is contained in:
parent
72b2f8b6de
commit
1651f7d6c1
|
@ -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']
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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 = []
|
||||
|
|
|
@ -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 = []
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue