处理 form File 来源 Energy Calibration 弹窗无数据的问题,及接口参数调整

This commit is contained in:
任珮宇 2023-09-15 18:17:21 +08:00
parent a3187a5975
commit 801ff3d10a
3 changed files with 18 additions and 12 deletions

View File

@ -596,9 +596,9 @@ export default {
}
},
created() {
if (this.sampleId) {
// if (this.sampleId) {
this.getData()
}
// }
},
methods: {
handleExit() {
@ -606,7 +606,7 @@ export default {
},
async getData() {
const { sampleId, qcFileName } = this.newSampleData
const { sampleId = '', qcFileName } = this.newSampleData
try {
this.isLoading = true
const res = await getAction('/spectrumAnalysis/viewBetaDetectorCalibration', {

View File

@ -475,9 +475,9 @@ export default {
}
},
created() {
if (this.sampleId) {
// if (this.sampleId) {
this.getData()
}
// }
},
methods: {
handleExit() {
@ -485,7 +485,7 @@ export default {
},
async getData() {
const { sampleId, qcFileName } = this.newSampleData
const { sampleId = '', qcFileName } = this.newSampleData
try {
this.isLoading = true
const res = await getAction('/spectrumAnalysis/viewGammaDetectorCalibration', {

View File

@ -375,6 +375,7 @@ export default {
},
methods: {
// formDB sampleData
getFiles(val) {
this.newSampleData = { ...this.sampleData, ...val }
},
@ -419,7 +420,7 @@ export default {
} else {
this.analysisType = ANALYZE_TYPE.GAMMA
}
this.sampleData = sample
this.sampleData = this.newSampleData = sample
},
//
@ -512,7 +513,6 @@ export default {
detFileNames: [this.sampleData.detFileName],
}
postAction('/spectrumAnalysis/analyseCurrentSpectrum', params).then((res) => {
console.log(res)
if (res.success) {
this.analyseCurrentSpectrumData = res.result
} else {
@ -524,9 +524,15 @@ export default {
console.log('savetodb')
},
handleEnergyCalib() {
if (this.newSampleData.sampleId) {
if (this.newSampleData.qcFileName) {
this.betaGammaEnergyCalibrationModalVisible = true
}
} else {
if (this.newSampleData.qcFileStatus && this.newSampleData.qcFileName) {
this.betaGammaEnergyCalibrationModalVisible = true
}
}
},
},
computed: {