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