diff --git a/src/views/spectrumAnalysis/beta-gamma-analysis.vue b/src/views/spectrumAnalysis/beta-gamma-analysis.vue index 74066a4..d2e7284 100644 --- a/src/views/spectrumAnalysis/beta-gamma-analysis.vue +++ b/src/views/spectrumAnalysis/beta-gamma-analysis.vue @@ -256,9 +256,8 @@ export default { this.$store.commit('ADD_SAMPLE_DATA', { inputFileName, data: result, - from: 'db' + from: 'db', }) - } else { this.$message.error(message) } @@ -273,7 +272,7 @@ export default { this.$emit('getFiles', { detFileName: result.detBg.fileName, gasFileName: result.gasBg.fileName, - qcFileName: result.qc ? result.qc.fileName : '' + qcFileName: result.qc ? result.qc.fileName : '', }) }, @@ -301,7 +300,7 @@ export default { this.$store.commit('ADD_SAMPLE_DATA', { inputFileName: this.sample.sampleFileName, data: result, - from: 'file' + from: 'file', }) this.isLoading = false } else { @@ -326,7 +325,7 @@ export default { }, changeChartByType(val) { - if (val === 'qc' && !this.sample.qcFileStatus) { + if (val === 'qc' && !this.sampleDetail.qc) { this.$message.warning('No qc spectrum file!') } else { const { @@ -456,11 +455,11 @@ export default { async handler(newVal, oldVal) { this.resultDisplay = [] const sampleData = await this.$store.dispatch('GET_SAMPLE_DATA', newVal.inputFileName) - if(sampleData) { + if (sampleData) { const { data, from } = sampleData this.sampleDetail = data this.changeChartByType('sample') - if(from == 'db') { + if (from == 'db') { this.sampleDetail = data this.emitGetFiles(data) } diff --git a/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaRLRModal/index.vue b/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaRLRModal/index.vue index 064fa8c..f87067e 100644 --- a/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaRLRModal/index.vue +++ b/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaRLRModal/index.vue @@ -304,7 +304,7 @@ export default { postFileAction('/spectrumAnalysis/exportRLR', params).then((res) => { let name = this.newSampleData.inputFileName.split('.')[0] const blob = new Blob([res], { type: 'application/vnd.ms-excel' }) - saveAs(blob, `${name}RLR`) + saveAs(blob, `${name}_RLR`) // let _this = this // this.$confirm({ // title: 'Please enter file name', diff --git a/src/views/spectrumAnalysis/components/Modals/RLRModal/index.vue b/src/views/spectrumAnalysis/components/Modals/RLRModal/index.vue index 78b4e97..56ece82 100644 --- a/src/views/spectrumAnalysis/components/Modals/RLRModal/index.vue +++ b/src/views/spectrumAnalysis/components/Modals/RLRModal/index.vue @@ -282,25 +282,27 @@ export default { Conclusion_Res: this.conclusionVal.conclusionRes || this.allInfo.Conclusion_Res, Comment: this.commentVal.comment || this.allInfo.Comment, } + let name = this.newSampleData.inputFileName.split('.')[0] postAction('/gamma/exportRLR', params).then((res) => { const blob = new Blob([res]) - let _this = this - this.$confirm({ - title: 'Please enter file name', - content: (h) => , - 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(blob, `${_this.fileName}.RLR`) - } - }, - }) + saveAs(blob, `${name}_RLR`) + // let _this = this + // this.$confirm({ + // title: 'Please enter file name', + // content: (h) => , + // 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(blob, `${_this.fileName}.RLR`) + // } + // }, + // }) }) } else { this.$message.warning('Please finishi ti edit new inserted row first.')