Merge branch 'dev-3.6' of https://git.mesalab.cn/nezha/nezha-fronted into dev-3.7

This commit is contained in:
zhangyu
2023-03-02 11:36:57 +08:00
9 changed files with 37 additions and 2 deletions

View File

@@ -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)