处理 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() { created() {
if (this.sampleId) { // if (this.sampleId) {
this.getData() this.getData()
} // }
}, },
methods: { methods: {
handleExit() { handleExit() {
@ -606,7 +606,7 @@ export default {
}, },
async getData() { async getData() {
const { sampleId, qcFileName } = this.newSampleData const { sampleId = '', qcFileName } = this.newSampleData
try { try {
this.isLoading = true this.isLoading = true
const res = await getAction('/spectrumAnalysis/viewBetaDetectorCalibration', { const res = await getAction('/spectrumAnalysis/viewBetaDetectorCalibration', {

View File

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

View File

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