diff --git a/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BGLogViewer.vue b/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BGLogViewer.vue index f16bb6d..6c4be6f 100644 --- a/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BGLogViewer.vue +++ b/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BGLogViewer.vue @@ -13,7 +13,7 @@ import ModalMixin from '@/mixins/ModalMixin' import { getAction } from '@/api/manage' import SampleDataMixin from '@/views/spectrumAnalysis/SampleDataMixin' -import { showSaveFileModal } from '@/utils/file' +import { saveAs } from 'file-saver' export default { mixins: [ModalMixin, SampleDataMixin], data() { @@ -25,7 +25,14 @@ export default { async getDetail() { try { this.isLoading = true - const { dbName, sampleId, inputFileName: sampleFileName, gasFileName, detFileName, qcFileName } = this.newSampleData + const { + dbName, + sampleId, + inputFileName: sampleFileName, + gasFileName, + detFileName, + qcFileName, + } = this.newSampleData const result = await getAction('/spectrumAnalysis/viewBGLogViewer', { dbName, sampleId, @@ -34,7 +41,7 @@ export default { detFileName, qcFileName, }) - if(typeof result == 'string') { + if (typeof result == 'string') { this.content = result } else { const { success, result, message } = res @@ -56,8 +63,9 @@ export default { }, handleClick() { + let name = this.newSampleData.inputFileName.split('.')[0] const blob = new Blob([this.content], { type: 'text/plain' }) - showSaveFileModal(blob, 'txt') + saveAs(blob, `${name}_beta analysis log.txt`) }, }, } diff --git a/src/views/spectrumAnalysis/components/Modals/DataProcessingLogModal.vue b/src/views/spectrumAnalysis/components/Modals/DataProcessingLogModal.vue index d0b72fc..aa34f88 100644 --- a/src/views/spectrumAnalysis/components/Modals/DataProcessingLogModal.vue +++ b/src/views/spectrumAnalysis/components/Modals/DataProcessingLogModal.vue @@ -3,7 +3,7 @@
{{ text }}
-
+
Export Cancel @@ -15,64 +15,48 @@