diff --git a/src/views/spectrumAnalysis/components/Modals/ArrRrrModal.vue b/src/views/spectrumAnalysis/components/Modals/ArrRrrModal.vue
index 6f1e050..ba0ee4f 100644
--- a/src/views/spectrumAnalysis/components/Modals/ArrRrrModal.vue
+++ b/src/views/spectrumAnalysis/components/Modals/ArrRrrModal.vue
@@ -103,29 +103,35 @@ export default {
handleOk() {
this.fileName = ''
if (this.content) {
+ let name = this.newSampleData.inputFileName.split('.')[0]
let strData = new Blob([this.content], { type: 'text/plain;charset=utf-8' })
// if (this.type == 1 || this.type == 3) {
// saveAs(strData, `${this.type == 1 ?'Gamma-':'Beta-'} ARR.txt`)
// } else {
// saveAs(strData, `${this.type == 2 ?'Gamma-':'Beta-'} RRR.txt`)
// }
- 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(strData, `${_this.fileName}.txt`)
- }
- },
- })
+ if (this.type == 1 || this.type == 3) {
+ saveAs(strData, `${name}_ARR.txt`)
+ } else {
+ saveAs(strData, `${name}_RRR.txt`)
+ }
+ // 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(strData, `${_this.fileName}.txt`)
+ // }
+ // },
+ // })
} else {
this.$message.warning('No data can be saved!')
}
diff --git a/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/AutomaticAnalysisLogModal.vue b/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/AutomaticAnalysisLogModal.vue
index 871e6c5..b3e2b05 100644
--- a/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/AutomaticAnalysisLogModal.vue
+++ b/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/AutomaticAnalysisLogModal.vue
@@ -37,9 +37,10 @@ export default {
async getInfo() {
try {
this.isLoading = true
- const { sampleId } = this.sampleData
+ const { sampleId, sampleFileName } = this.sampleData
const res = await getAction(this.type == 1 ? '/gamma/viewAutomaticAnalysisLog' : '/spectrumAnalysis/viewAutomaticAnalysisLog', { // 自动分析日志接口暂用都是gammam,beta暂时没有
- sampleId
+ sampleId,
+ sampleFileName
})
if(typeof res == 'string') {
this.content = res
diff --git a/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaQCResultsModal.vue b/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaQCResultsModal.vue
index 2df4055..a3cc64c 100644
--- a/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaQCResultsModal.vue
+++ b/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaQCResultsModal.vue
@@ -146,58 +146,76 @@ export default {
str += `${item.status} \n`
this.text += str
})
+ let name = this.newSampleData.inputFileName.split('.')[0]
let strData = new Blob([this.text], { type: 'text/plain;charset=utf-8' })
- 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(strData, `${_this.fileName}.txt`)
- }
- },
- })
+ saveAs(strData, `${name}_QC Result.txt`)
+ // 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(strData, `${_this.fileName}.txt`)
+ // }
+ // },
+ // })
},
// 导出到Excel
handleExportToExcel() {
this.fileName_excel = ''
- const { sampleId, inputFileName: fileName } = this.sampleData
+ const { sampleId, inputFileName: fileName, dbName, detFileName, gasFileName } = this.newSampleData
if (this.list.length > 0) {
- 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_excel) {
- let params = {
- sampleId: sampleId || '',
- fileName,
- }
- getFileAction('/spectrumAnalysis/exportQCResult', params).then((res) => {
- if (res.code && res.code == 500) {
- this.$message.warning('This operation fails. Contact your system administrator')
- } else {
- const blob = new Blob([res], { type: 'application/vnd.ms-excel' })
- saveAs(blob, `${_this.fileName_excel}`)
- }
- })
- }
- },
+ let name = this.newSampleData.inputFileName.split('.')[0]
+ let params = {
+ sampleId: sampleId || '',
+ dbName,
+ sampleFileName: fileName,
+ gasFileName,
+ detFileName,
+ }
+ getFileAction('/spectrumAnalysis/exportQCResult', params).then((res) => {
+ if (res.code && res.code == 500) {
+ this.$message.warning('This operation fails. Contact your system administrator')
+ } else {
+ const blob = new Blob([res], { type: 'application/vnd.ms-excel' })
+ saveAs(blob, `${name}_QC Result`)
+ }
})
+ // 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_excel) {
+ // let params = {
+ // sampleId: sampleId || '',
+ // fileName,
+ // }
+ // getFileAction('/spectrumAnalysis/exportQCResult', params).then((res) => {
+ // if (res.code && res.code == 500) {
+ // this.$message.warning('This operation fails. Contact your system administrator')
+ // } else {
+ // const blob = new Blob([res], { type: 'application/vnd.ms-excel' })
+ // saveAs(blob, `${_this.fileName_excel}`)
+ // }
+ // })
+ // }
+ // },
+ // })
} else {
this.$message.warning('No downloadable data')
}
diff --git a/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaRLRModal/index.vue b/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaRLRModal/index.vue
index 7071d0a..064fa8c 100644
--- a/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaRLRModal/index.vue
+++ b/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaRLRModal/index.vue
@@ -55,6 +55,7 @@
diff --git a/src/views/spectrumAnalysis/components/Modals/QcResultsModal.vue b/src/views/spectrumAnalysis/components/Modals/QcResultsModal.vue
index 42c0809..4d5a36b 100644
--- a/src/views/spectrumAnalysis/components/Modals/QcResultsModal.vue
+++ b/src/views/spectrumAnalysis/components/Modals/QcResultsModal.vue
@@ -10,7 +10,7 @@
diff --git a/src/views/spectrumAnalysis/components/Modals/SampleInfomationModal.vue b/src/views/spectrumAnalysis/components/Modals/SampleInfomationModal.vue
index 95b8912..55fb57c 100644
--- a/src/views/spectrumAnalysis/components/Modals/SampleInfomationModal.vue
+++ b/src/views/spectrumAnalysis/components/Modals/SampleInfomationModal.vue
@@ -10,7 +10,7 @@
-
+
Export to Excel
Close
@@ -28,60 +28,60 @@ import SampleDataMixin from '../../SampleDataMixin'
const columns = [
{
title: 'Station Id',
- key: 'stationId'
+ key: 'stationId',
},
{
title: 'Detector Id',
- key: 'detectorId'
+ key: 'detectorId',
},
{
title: 'Sample Id',
- key: 'sampleId'
+ key: 'sampleId',
},
{
title: 'Sample Geometry',
- key: 'sampleGeometry'
+ key: 'sampleGeometry',
},
{
title: 'Sample Quantity',
- key: 'sampleQuantity'
+ key: 'sampleQuantity',
},
{
title: 'Sample Type',
- key: 'sampleType'
+ key: 'sampleType',
},
{
title: 'Collection Start',
- key: 'collectStart'
+ key: 'collectStart',
},
{
title: 'Sampling Time',
- key: 'samplingTime'
+ key: 'samplingTime',
},
{
title: 'Collection Stop',
- key: 'collectStop'
+ key: 'collectStop',
},
{
title: 'Decay Time',
- key: 'decayTime'
+ key: 'decayTime',
},
{
title: 'Acquisition Start',
- key: 'acquisitionStart'
+ key: 'acquisitionStart',
},
{
title: 'Acquisition Time',
- key: 'acquisitionTime'
+ key: 'acquisitionTime',
},
{
title: 'Acquisition Stop',
- key: 'acquisitionStop'
+ key: 'acquisitionStop',
},
{
title: 'Avg Flow Rate',
- key: 'avgFlowRate'
- }
+ key: 'avgFlowRate',
+ },
]
export default {
@@ -91,7 +91,7 @@ export default {
return {
isLoading: false,
data: {},
- fileName: ''
+ fileName: '',
}
},
methods: {
@@ -101,7 +101,7 @@ export default {
const { sampleId, inputFileName: fileName } = this.sampleData
const { success, result, message } = await getAction('/gamma/sampleInformation', {
sampleId,
- fileName
+ fileName,
})
if (success) {
result.sampleId = sampleId
@@ -125,39 +125,52 @@ export default {
this.fileName = ''
const { sampleId, inputFileName: fileName } = this.sampleData
if (Object.keys(this.data).length > 0) {
- 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) {
- let params = {
- sampleId,
- fileName
- }
- getFileAction('/gamma/exportSampleInformation', params).then(res => {
- if (res.code && res.code == 500) {
- this.$message.warning('This operation fails. Contact your system administrator')
- } else {
- const blob = new Blob([res], { type: 'application/vnd.ms-excel' })
- saveAs(blob, `${_this.fileName}`)
- }
- })
- }
+ let name = this.newSampleData.inputFileName.split('.')[0]
+ let params = {
+ sampleId,
+ fileName,
+ }
+ getFileAction('/gamma/exportSampleInformation', params).then((res) => {
+ if (res.code && res.code == 500) {
+ this.$message.warning('This operation fails. Contact your system administrator')
+ } else {
+ const blob = new Blob([res], { type: 'application/vnd.ms-excel' })
+ saveAs(blob, `${name}_Sample Infomation`)
}
})
+ // 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) {
+ // let params = {
+ // sampleId,
+ // fileName
+ // }
+ // getFileAction('/gamma/exportSampleInformation', params).then(res => {
+ // if (res.code && res.code == 500) {
+ // this.$message.warning('This operation fails. Contact your system administrator')
+ // } else {
+ // const blob = new Blob([res], { type: 'application/vnd.ms-excel' })
+ // saveAs(blob, `${_this.fileName}`)
+ // }
+ // })
+ // }
+ // }
+ // })
} else {
this.$message.warning('No downloadable data')
}
- }
- }
+ },
+ },
}
diff --git a/src/views/spectrumAnalysis/components/PeakInfomation.vue b/src/views/spectrumAnalysis/components/PeakInfomation.vue
index 1360971..723b6da 100644
--- a/src/views/spectrumAnalysis/components/PeakInfomation.vue
+++ b/src/views/spectrumAnalysis/components/PeakInfomation.vue
@@ -32,7 +32,7 @@