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: {
|
methods: {
|
||||||
...mapMutations('cmdbStore', ['SET_IS_TABLE_LOADING']),
|
...mapMutations('cmdbStore', ['SET_IS_TABLE_LOADING']),
|
||||||
open({ preferenceAttrList }) {
|
open({ preferenceAttrList, ciTypeName = undefined }) {
|
||||||
this.preferenceAttrList = preferenceAttrList
|
this.preferenceAttrList = preferenceAttrList
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.$nextTick((res) => {
|
this.$nextTick((res) => {
|
||||||
this.form.setFieldsValue({
|
this.form.setFieldsValue({
|
||||||
filename: `cmdb-${moment().format('YYYYMMDDHHmmss')}`,
|
filename: ciTypeName
|
||||||
|
? `cmdb-${ciTypeName}-${moment().format('YYYYMMDDHHmmss')}`
|
||||||
|
: `cmdb-${moment().format('YYYYMMDDHHmmss')}`,
|
||||||
})
|
})
|
||||||
if (this.treeType === 'tree') {
|
if (this.treeType === 'tree') {
|
||||||
const _check = ['ci_type_alias']
|
const _check = ['ci_type_alias']
|
||||||
|
|
|
@ -106,7 +106,6 @@ export default {
|
||||||
this.uploadData = _uploadData.slice(1)
|
this.uploadData = _uploadData.slice(1)
|
||||||
this.hasError = false
|
this.hasError = false
|
||||||
this.isUploading = false
|
this.isUploading = false
|
||||||
this.$refs.uploadResult.visible = false
|
|
||||||
},
|
},
|
||||||
handleUpload() {
|
handleUpload() {
|
||||||
if (!this.ciType) {
|
if (!this.ciType) {
|
||||||
|
|
|
@ -576,7 +576,10 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
async openBatchDownload() {
|
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 }) {
|
batchDownload({ filename, type, checkedKeys }) {
|
||||||
const jsonAttrList = []
|
const jsonAttrList = []
|
||||||
|
|
|
@ -58,10 +58,10 @@
|
||||||
/>
|
/>
|
||||||
<div class="relation-views-right-bar">
|
<div class="relation-views-right-bar">
|
||||||
<a-space>
|
<a-space>
|
||||||
<a-button
|
<a-button
|
||||||
v-if="isLeaf"
|
v-if="isLeaf"
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
@click="$refs.create.handleOpen(true, 'create')"
|
@click="$refs.create.handleOpen(true, 'create')"
|
||||||
>新建</a-button
|
>新建</a-button
|
||||||
>
|
>
|
||||||
|
@ -1322,7 +1322,10 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async openBatchDownload() {
|
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 }) {
|
batchDownload({ filename, type, checkedKeys }) {
|
||||||
const jsonAttrList = []
|
const jsonAttrList = []
|
||||||
|
|
|
@ -18,10 +18,10 @@
|
||||||
属性说明
|
属性说明
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<a-button
|
<a-button
|
||||||
size="small"
|
size="small"
|
||||||
icon="plus"
|
icon="plus"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="$refs.create.handleOpen(true, 'create')"
|
@click="$refs.create.handleOpen(true, 'create')"
|
||||||
>新建</a-button
|
>新建</a-button
|
||||||
>
|
>
|
||||||
|
@ -1054,7 +1054,10 @@ export default {
|
||||||
this.$refs.jsonEditor.open(column, row)
|
this.$refs.jsonEditor.open(column, row)
|
||||||
},
|
},
|
||||||
async openBatchDownload() {
|
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 }) {
|
batchDownload({ filename, type, checkedKeys }) {
|
||||||
console.log(filename, type)
|
console.log(filename, type)
|
||||||
|
|
Loading…
Reference in New Issue