beta gamma 模块中 Automatic Analysis Log 弹窗下载功能调整
This commit is contained in:
parent
0f3297cc8d
commit
76401ab00d
|
@ -30,7 +30,6 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
content: '',
|
content: '',
|
||||||
fileName: '',
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -63,27 +62,10 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
handleOk() {
|
handleOk() {
|
||||||
this.fileName = ''
|
|
||||||
if (this.content) {
|
if (this.content) {
|
||||||
let _this = this
|
let name = this.newSampleData.inputFileName.split('.')[0]
|
||||||
let strData = new Blob([this.content], { type: 'text/plain;charset=utf-8' })
|
let strData = new Blob([this.content], { type: 'text/plain;charset=utf-8' })
|
||||||
// saveAs(strData, `${this.type == 1 ?'Gamma-':'Beta-'}Automatic Analysis Log.txt`)
|
saveAs(strData, `${name}_Automatic Analysis Log.txt`)
|
||||||
this.$confirm({
|
|
||||||
title: 'Please enter file name',
|
|
||||||
content: (h) => <a-input v-model={_this.fileName} />,
|
|
||||||
okText: 'Cancle',
|
|
||||||
cancelText: 'Save',
|
|
||||||
okButtonProps: { style: { backgroundColor: '#b98326', color: '#fff', borderColor: 'transparent' } },
|
|
||||||
cancelButtonProps: { style: { color: '#fff', backgroundColor: '#31aab0', borderColor: 'transparent' } },
|
|
||||||
onOk() {
|
|
||||||
console.log('Cancel')
|
|
||||||
},
|
|
||||||
onCancel() {
|
|
||||||
if (_this.fileName) {
|
|
||||||
saveAs(strData, `${_this.fileName}.txt`)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
})
|
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning('No data can be saved!')
|
this.$message.warning('No data can be saved!')
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user