diff --git a/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaSpectrumModal.vue b/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaSpectrumModal.vue
index 69eef1f..2b87122 100644
--- a/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaSpectrumModal.vue
+++ b/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaSpectrumModal.vue
@@ -37,28 +37,35 @@ export default {
detBg: [],
gasBg: [],
qc: [],
- sample: []
+ sample: [],
},
isLoading: true,
fileName: '',
- currTab: 1
+ currTab: 1,
}
},
methods: {
async getContent() {
try {
this.isLoading = true
- const { sampleId, dbName, sampleFileName, gasFileName, detFileName, qcFileName } = this.newSampleData
+ const {
+ sampleId,
+ dbName,
+ inputFileName: sampleFileName,
+ gasFileName,
+ detFileName,
+ qcFileName,
+ } = this.newSampleData
const { success, result, message } = await getAction('/spectrumAnalysis/viewSpectrum', {
sampleId,
dbName,
sampleFileName,
gasFileName,
detFileName,
- qcFileName
+ qcFileName,
})
if (success) {
- if(result) {
+ if (result) {
this.content = result
}
} else {
@@ -78,42 +85,42 @@ export default {
this.currTab = key
},
handleOk() {
- this.fileName=""
- let text = ""
+ this.fileName = ''
+ let text = ''
if (this.currTab == 1) {
- text=this.content.sample.join('\n')
+ text = this.content.sample.join('\n')
} else if (this.currTab == 2) {
- text=this.content.gasBg.join('\n')
- }else if (this.currTab == 3) {
- text=this.content.detBg.join('\n')
- }else if (this.currTab == 4) {
- text=this.content.qc.join('\n')
+ text = this.content.gasBg.join('\n')
+ } else if (this.currTab == 3) {
+ text = this.content.detBg.join('\n')
+ } else if (this.currTab == 4) {
+ text = this.content.qc.join('\n')
}
- if (text) {
- let strData = new Blob([text], { type: 'text/plain;charset=utf-8' });
+ if (text) {
+ let strData = new Blob([text], { type: 'text/plain;charset=utf-8' })
// saveAs(strData, `GammaViewer Log.txt`)
let _this = this
this.$confirm({
title: 'Please enter file name',
- content: h => ,
+ content: (h) => ,
okText: 'Cancle',
cancelText: 'Save',
- okButtonProps: {style: {backgroundColor: "#b98326", color: "#fff", borderColor: "transparent"}},
- cancelButtonProps: {style: {color: "#fff", backgroundColor: "#31aab0", borderColor: "transparent"}},
+ okButtonProps: { style: { backgroundColor: '#b98326', color: '#fff', borderColor: 'transparent' } },
+ cancelButtonProps: { style: { color: '#fff', backgroundColor: '#31aab0', borderColor: 'transparent' } },
onOk() {
- console.log('Cancel');
+ console.log('Cancel')
},
onCancel() {
if (_this.fileName) {
saveAs(strData, `${_this.fileName}.txt`)
}
},
- });
+ })
} else {
- this.$message.warning("No data can be saved!")
+ this.$message.warning('No data can be saved!')
}
- }
- }
+ },
+ },
}