fix: Beta的Calibration修改逻辑。beta数据依赖于Gamma
This commit is contained in:
parent
49379f82fb
commit
f7aeeb7a3b
|
@ -551,6 +551,10 @@ export default {
|
|||
type: Boolean,
|
||||
required: false,
|
||||
},
|
||||
isBetaReset:{
|
||||
type: Boolean,
|
||||
required: false,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
this.columns = columns
|
||||
|
@ -601,14 +605,23 @@ export default {
|
|||
recalculateROICountsFor: [],
|
||||
|
||||
count: 0, //反算时需要传递的数值 非反算的情况下不需要传递 数值大小是 第一次调用接口时返回的tableWidgets 大小
|
||||
// isFirstFitting: true,
|
||||
isInverse: false, // 是否需要反算
|
||||
betaIsFitting: false,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$bus.$on('betaRefresh', this.handleReset)
|
||||
this.$bus.$on('betaRefresh', this.getData)
|
||||
this.getData()
|
||||
},
|
||||
watch: {
|
||||
isFirstFitting: {
|
||||
handler() {
|
||||
// this.getData()
|
||||
},
|
||||
immediate: true
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
handleExit() {
|
||||
this.$emit('exit')
|
||||
|
@ -622,7 +635,8 @@ export default {
|
|||
const res = await getAction('/spectrumAnalysis/viewBetaDetectorCalibration', {
|
||||
sampleId,
|
||||
qcFileName,
|
||||
sampleFileName: inputFileName
|
||||
sampleFileName: inputFileName,
|
||||
fittingBtn: this.isFirstFitting
|
||||
})
|
||||
if (res.success) {
|
||||
const { CToE, EToC, betaEnergy, gammaEnergy, gammaGatedBetaSpectrum, histogramData, oldScatterSeries } =
|
||||
|
@ -632,7 +646,6 @@ export default {
|
|||
|
||||
this.oldScatterSeries = oldScatterSeries
|
||||
this.count = oldScatterSeries.length
|
||||
// this.isFirstFitting = true
|
||||
|
||||
this.betaGammaChartOption.series.data = histogramData.map(({ b, g, c }) => [b, g, c])
|
||||
this.gammaEnergy = gammaEnergy
|
||||
|
@ -880,21 +893,20 @@ export default {
|
|||
|
||||
// 点击Reset Button 重置
|
||||
async handleReset() {
|
||||
this.$emit('isFitting', false)
|
||||
this.removeCache("CALIBRATION_BETA_"+this.newSampleData.inputFileName) // 删除fitting之后缓存的数据 20231101:xiao
|
||||
this.newCalibrationFuncModel = cloneDeep(newCalibrationFuncModel)
|
||||
this.list = []
|
||||
this.newE2C = []
|
||||
|
||||
// 按乔的要求增加请求reset的接口 20231211:xiao
|
||||
const res = await postAction('/spectrumAnalysis/resetButton', {
|
||||
tabName: "beta",
|
||||
sampleFileName: this.newSampleData.inputFileName
|
||||
})
|
||||
const res = await postAction('/spectrumAnalysis/resetButton?tabName=beta&sampleFileName='+this.newSampleData.inputFileName, {})
|
||||
|
||||
this.figureChartOption = this.oldChartOption
|
||||
|
||||
this.figureChartOption = cloneDeep(this.oldChartOption)
|
||||
this.isFirstFitting = true
|
||||
// this.isFirstFitting = true
|
||||
|
||||
this.isInverse = false
|
||||
},
|
||||
|
||||
|
@ -919,7 +931,6 @@ export default {
|
|||
count: this.isFirstFitting || !this.isInverse ? undefined : this.count,
|
||||
})
|
||||
if (success) {
|
||||
// this.isFirstFitting = false
|
||||
this.betaIsFitting = true
|
||||
this.$emit('isFitting', true) // 点击reAnalyze按钮,将isFirstFitting改为true 20231101:xiao
|
||||
|
||||
|
@ -927,7 +938,6 @@ export default {
|
|||
|
||||
this.setFirringResult(result)
|
||||
|
||||
|
||||
} else {
|
||||
this.$message.error(message)
|
||||
}
|
||||
|
|
|
@ -472,7 +472,6 @@ export default {
|
|||
recalculateROICountsFor: [],
|
||||
|
||||
count: 0, //反算时需要传递的数值 非反算的情况下不需要传递 数值大小是 第一次调用接口时返回的tableWidgets 大小
|
||||
// isFirstFitting: true,
|
||||
isInverse: false, // 是否需要反算
|
||||
gammaIsFitting: false,
|
||||
}
|
||||
|
@ -486,7 +485,6 @@ export default {
|
|||
},
|
||||
|
||||
async getData() {
|
||||
console.log("isFirstFitting>>>"+this.isFirstFitting);
|
||||
// 增加sampleFileName参数 20231101:xiao
|
||||
const { sampleId = '', qcFileName, inputFileName } = this.newSampleData
|
||||
|
||||
|
@ -495,7 +493,8 @@ export default {
|
|||
const res = await getAction('/spectrumAnalysis/viewGammaDetectorCalibration', {
|
||||
sampleId,
|
||||
qcFileName,
|
||||
sampleFileName: inputFileName
|
||||
sampleFileName: inputFileName,
|
||||
fittingBtn: this.isFirstFitting
|
||||
})
|
||||
|
||||
if (res.success) {
|
||||
|
@ -505,7 +504,6 @@ export default {
|
|||
this.e2c = EToC
|
||||
this.oldScatterSeries = oldScatterSeries
|
||||
this.count = oldScatterSeries.length
|
||||
// this.isFirstFitting = true
|
||||
|
||||
const { max: _max, min: _min, interval: _interval } = splitAxis(max, min, 4)
|
||||
|
||||
|
@ -663,13 +661,14 @@ export default {
|
|||
this.newE2C = []
|
||||
|
||||
// 按乔的要求增加请求reset的接口 20231211:xiao
|
||||
const res = await postAction('/spectrumAnalysis/resetButton', {
|
||||
tabName: "gamma",
|
||||
sampleFileName: this.newSampleData.inputFileName
|
||||
})
|
||||
const res = await postAction('/spectrumAnalysis/resetButton?tabName=gamma&sampleFileName='+ this.newSampleData.inputFileName, { })
|
||||
|
||||
this.$emit('isFitting', false)
|
||||
|
||||
// 通知Beta页清空数据
|
||||
this.$bus.$emit('betaRefresh', {})
|
||||
|
||||
this.figureChartOption = cloneDeep(this.oldChartOption)
|
||||
this.isFirstFitting = false
|
||||
this.isInverse = false
|
||||
},
|
||||
|
||||
|
@ -696,7 +695,6 @@ export default {
|
|||
fittingBtn : this.isFirstFitting
|
||||
})
|
||||
if (success) {
|
||||
// this.isFirstFitting = true
|
||||
this.gammaIsFitting = true
|
||||
this.$emit('isFitting', true) // 点击reAnalyze按钮,将isFirstFitting改为true 20231101:xiao
|
||||
|
||||
|
@ -704,6 +702,10 @@ export default {
|
|||
|
||||
this.setFirringResult(result)
|
||||
|
||||
// 通知Beta页清空数据
|
||||
this.$bus.$emit('betaRefresh', {})
|
||||
console.log("betaRefresh>>>");
|
||||
|
||||
} else {
|
||||
this.$message.error(message)
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<gamma-detector-calibration @isFitting="getFittingFlag_gamma" :isFirstFitting="gammaEnergyValid" />
|
||||
</a-tab-pane>
|
||||
<a-tab-pane tab="Beta Detector Calibration" key="beta">
|
||||
<beta-detector-calibration @isFitting="getFittingFlag_beta" :isFirstFitting="gammaEnergyValid" />
|
||||
<beta-detector-calibration @isFitting="getFittingFlag_beta" :isFirstFitting="betaEnergyValid" />
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
<div class="footer">
|
||||
|
@ -88,12 +88,17 @@ export default {
|
|||
},
|
||||
getFittingFlag_beta(val) {
|
||||
this.betaEnergyValid = val
|
||||
console.log('beta-zhiqian>>>' + this.betaEnergyValid)
|
||||
console.log('betaEnergyValid>>>' + this.betaEnergyValid)
|
||||
},
|
||||
getFittingFlag_gamma(val) {
|
||||
console.log('zhiqian>>>' + this.gammaEnergyValid)
|
||||
this.gammaEnergyValid = val
|
||||
console.log('zhihou>>>' + this.gammaEnergyValid)
|
||||
// 1. Beta数据依赖于Gamma
|
||||
// 2. 如果Gamma情况数据,beta也需要
|
||||
// if(!this.gammaEnergyValid){
|
||||
// this.betaEnergyValid = val;
|
||||
// console.log("重置Beta>>"+this.betaEnergyValid)
|
||||
// }
|
||||
console.log('gammaEnergyValid>>>' + this.gammaEnergyValid)
|
||||
},
|
||||
handleReAnalyse() {
|
||||
// todo 1.fitting之后才能点击; 2.isReAnalyze需要缓存
|
||||
|
@ -197,14 +202,12 @@ export default {
|
|||
handleExit() {
|
||||
console.log('this.currTab>>>' + this.currTab)
|
||||
this.gammaEnergyValid = this.isReanlyze
|
||||
if (!this.isReanlyze) {
|
||||
if (!this.isReanlyze && (!this.gammaEnergyValid || !this.gammaEnergyValid)) {
|
||||
// 如果没有点击ReANalyze,删除fitting之后缓存的数据 20231101:xiao
|
||||
if (this.currTab === 'gamma') {
|
||||
this.$ls.remove('CALIBRATION_GAMMA_' + this.newSampleData.inputFileName)
|
||||
}
|
||||
if (this.currTab === 'beta') {
|
||||
this.$ls.remove('CALIBRATION_BETA_' + this.newSampleData.inputFileName)
|
||||
}
|
||||
// 1. Beta数据依赖于Gamma
|
||||
// 2. 点击reanalyze,如果beta有数据也要缓存
|
||||
this.$ls.remove('CALIBRATION_GAMMA_' + this.newSampleData.inputFileName)
|
||||
this.$ls.remove('CALIBRATION_BETA_' + this.newSampleData.inputFileName)
|
||||
}
|
||||
this.visible = false
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user