Merge branch 'dev-3.6' of https://git.mesalab.cn/nezha/nezha-fronted into dev-3.7
This commit is contained in:
@@ -332,6 +332,7 @@ export default {
|
||||
{ name: 'JSON', value: 3 }
|
||||
],
|
||||
suffix: '.xlsx',
|
||||
faildSuffix: '.xlsx',
|
||||
panel: {},
|
||||
rightBox: { // 面板弹出框相关
|
||||
panel: { show: false },
|
||||
@@ -358,6 +359,8 @@ export default {
|
||||
this.importFileList = [fileList[fileList.length - 1]]
|
||||
}
|
||||
this.importFile = this.importFileList[0]
|
||||
const arr = this.importFile.name.split('.')
|
||||
this.faildSuffix = '.' + arr[arr.length - 1] // 获取文件后缀名
|
||||
this.validateFile()
|
||||
},
|
||||
validateFile () {
|
||||
@@ -691,7 +694,7 @@ export default {
|
||||
const blob = new Blob([uInt8Array])
|
||||
link.style.display = 'none'
|
||||
link.href = URL.createObjectURL(blob)
|
||||
link.setAttribute('download', 'failed_records' + '-' + this.getTimeString() + '.json')
|
||||
link.setAttribute('download', 'failed_records' + '-' + this.getTimeString() + this.faildSuffix)
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
|
||||
@@ -471,6 +471,9 @@ export default {
|
||||
if (add) {
|
||||
if (add === 'alertRule') {
|
||||
this.add()
|
||||
const newQuery = JSON.parse(JSON.stringify(this.$route.query)) // 深拷贝
|
||||
delete newQuery.add
|
||||
this.$router.replace({ query: newQuery })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1007,11 +1007,17 @@ export default {
|
||||
if (add) {
|
||||
if (add === 'asset') {
|
||||
this.add()
|
||||
const newQuery = JSON.parse(JSON.stringify(this.$route.query)) // 深拷贝
|
||||
delete newQuery.add
|
||||
this.$router.replace({ query: newQuery })
|
||||
}
|
||||
}
|
||||
if (importAsset) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.export.showImportBox(1)
|
||||
const newQuery = JSON.parse(JSON.stringify(this.$route.query)) // 深拷贝
|
||||
delete newQuery.importAsset
|
||||
this.$router.replace({ query: newQuery })
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -312,10 +312,16 @@ export default {
|
||||
if (add) {
|
||||
if (add === 'agent') {
|
||||
this.add()
|
||||
const newQuery = JSON.parse(JSON.stringify(this.$route.query)) // 深拷贝
|
||||
delete newQuery.add
|
||||
this.$router.replace({ query: newQuery })
|
||||
}
|
||||
}
|
||||
if (download) {
|
||||
this.toDownloadAgent()
|
||||
const newQuery = JSON.parse(JSON.stringify(this.$route.query)) // 深拷贝
|
||||
delete newQuery.download
|
||||
this.$router.replace({ query: newQuery })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -312,6 +312,9 @@ export default {
|
||||
if (add === 'cabinet') {
|
||||
this.addCabinet()
|
||||
}
|
||||
const newQuery = JSON.parse(JSON.stringify(this.$route.query)) // 深拷贝
|
||||
delete newQuery.add
|
||||
this.$router.replace({ query: newQuery })
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1187,8 +1187,10 @@ export default {
|
||||
this.addChartBefore()
|
||||
}
|
||||
if (add === 'panel') {
|
||||
this.toAdd()
|
||||
}
|
||||
const newQuery = JSON.parse(JSON.stringify(this.$route.query)) // 深拷贝
|
||||
delete newQuery.add
|
||||
this.$router.replace({ query: newQuery })
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -985,10 +985,16 @@ export default {
|
||||
if (add === 'endpoint') {
|
||||
this.add()
|
||||
}
|
||||
const newQuery = JSON.parse(JSON.stringify(this.$route.query)) // 深拷贝
|
||||
delete newQuery.add
|
||||
this.$router.replace({ query: newQuery })
|
||||
}
|
||||
if (importEndpoint) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.export.showImportBox(1)
|
||||
const newQuery = JSON.parse(JSON.stringify(this.$route.query)) // 深拷贝
|
||||
delete newQuery.importEndpoint
|
||||
this.$router.replace({ query: newQuery })
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -597,6 +597,9 @@ export default {
|
||||
if (add === 'module') {
|
||||
this.add()
|
||||
}
|
||||
const newQuery = JSON.parse(JSON.stringify(this.$route.query)) // 深拷贝
|
||||
delete newQuery.add
|
||||
this.$router.replace({ query: newQuery })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,6 +35,9 @@ export default {
|
||||
this.$refs.dataList.add()
|
||||
})
|
||||
}
|
||||
const newQuery = JSON.parse(JSON.stringify(this.$route.query)) // 深拷贝
|
||||
delete newQuery.add
|
||||
this.$router.replace({ query: newQuery })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user