NEZ-2625 fix:刷新页面,出现 panel 或 chart 新建页面
This commit is contained in:
@@ -329,6 +329,7 @@ export default {
|
|||||||
{ name: 'JSON', value: 3 }
|
{ name: 'JSON', value: 3 }
|
||||||
],
|
],
|
||||||
suffix: '.xlsx',
|
suffix: '.xlsx',
|
||||||
|
faildSuffix: '.xlsx',
|
||||||
panel: {},
|
panel: {},
|
||||||
rightBox: { // 面板弹出框相关
|
rightBox: { // 面板弹出框相关
|
||||||
panel: { show: false },
|
panel: { show: false },
|
||||||
@@ -355,6 +356,8 @@ export default {
|
|||||||
this.importFileList = [fileList[fileList.length - 1]]
|
this.importFileList = [fileList[fileList.length - 1]]
|
||||||
}
|
}
|
||||||
this.importFile = this.importFileList[0]
|
this.importFile = this.importFileList[0]
|
||||||
|
const arr = this.importFile.name.split('.')
|
||||||
|
this.faildSuffix = '.' + arr[arr.length - 1] // 获取文件后缀名
|
||||||
this.validateFile()
|
this.validateFile()
|
||||||
},
|
},
|
||||||
validateFile () {
|
validateFile () {
|
||||||
@@ -688,7 +691,7 @@ export default {
|
|||||||
const blob = new Blob([uInt8Array])
|
const blob = new Blob([uInt8Array])
|
||||||
link.style.display = 'none'
|
link.style.display = 'none'
|
||||||
link.href = URL.createObjectURL(blob)
|
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)
|
document.body.appendChild(link)
|
||||||
link.click()
|
link.click()
|
||||||
document.body.removeChild(link)
|
document.body.removeChild(link)
|
||||||
|
|||||||
@@ -471,6 +471,9 @@ export default {
|
|||||||
if (add) {
|
if (add) {
|
||||||
if (add === 'alertRule') {
|
if (add === 'alertRule') {
|
||||||
this.add()
|
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) {
|
||||||
if (add === 'asset') {
|
if (add === 'asset') {
|
||||||
this.add()
|
this.add()
|
||||||
|
const newQuery = JSON.parse(JSON.stringify(this.$route.query)) // 深拷贝
|
||||||
|
delete newQuery.add
|
||||||
|
this.$router.replace({ query: newQuery })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (importAsset) {
|
if (importAsset) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.export.showImportBox(1)
|
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) {
|
||||||
if (add === 'agent') {
|
if (add === 'agent') {
|
||||||
this.add()
|
this.add()
|
||||||
|
const newQuery = JSON.parse(JSON.stringify(this.$route.query)) // 深拷贝
|
||||||
|
delete newQuery.add
|
||||||
|
this.$router.replace({ query: newQuery })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (download) {
|
if (download) {
|
||||||
this.toDownloadAgent()
|
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') {
|
if (add === 'cabinet') {
|
||||||
this.addCabinet()
|
this.addCabinet()
|
||||||
}
|
}
|
||||||
|
const newQuery = JSON.parse(JSON.stringify(this.$route.query)) // 深拷贝
|
||||||
|
delete newQuery.add
|
||||||
|
this.$router.replace({ query: newQuery })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1224,8 +1224,10 @@ export default {
|
|||||||
this.addChartBefore()
|
this.addChartBefore()
|
||||||
}
|
}
|
||||||
if (add === 'panel') {
|
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') {
|
if (add === 'endpoint') {
|
||||||
this.add()
|
this.add()
|
||||||
}
|
}
|
||||||
|
const newQuery = JSON.parse(JSON.stringify(this.$route.query)) // 深拷贝
|
||||||
|
delete newQuery.add
|
||||||
|
this.$router.replace({ query: newQuery })
|
||||||
}
|
}
|
||||||
if (importEndpoint) {
|
if (importEndpoint) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.export.showImportBox(1)
|
this.$refs.export.showImportBox(1)
|
||||||
|
const newQuery = JSON.parse(JSON.stringify(this.$route.query)) // 深拷贝
|
||||||
|
delete newQuery.importEndpoint
|
||||||
|
this.$router.replace({ query: newQuery })
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -590,6 +590,9 @@ export default {
|
|||||||
if (add === 'module') {
|
if (add === 'module') {
|
||||||
this.add()
|
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()
|
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