fix:Beta 的energy calibration的操作逻辑
This commit is contained in:
parent
6a4bb9822d
commit
18f343d899
|
@ -128,9 +128,9 @@
|
||||||
<span>C to E : </span>
|
<span>C to E : </span>
|
||||||
<span>
|
<span>
|
||||||
E =
|
E =
|
||||||
<a-input-number size="small" v-model="newCalibrationFuncModel.paramA" /> +
|
<a-input-number size="small" v-model="newCalibrationFuncModel.paramA" @change="newCalibrationFuncModelChange"/> +
|
||||||
<a-input-number size="small" v-model="newCalibrationFuncModel.paramB" /> *C +
|
<a-input-number size="small" v-model="newCalibrationFuncModel.paramB" @change="newCalibrationFuncModelChange"/> *C +
|
||||||
<a-input-number size="small" v-model="newCalibrationFuncModel.paramC" /> *C <sup>2</sup>
|
<a-input-number size="small" v-model="newCalibrationFuncModel.paramC" @change="newCalibrationFuncModelChange" /> *C <sup>2</sup>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<div class="func">
|
<div class="func">
|
||||||
|
@ -785,6 +785,11 @@ export default {
|
||||||
energy,
|
energy,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// add之后 需要清空chart黄色的线 20231028:Xiao
|
||||||
|
if(this.figureChartOption.series[1].data) {
|
||||||
|
this.figureChartOption.series[1].data = []
|
||||||
|
}
|
||||||
|
|
||||||
this.figureChartOption.series[1].markPoint.data.push({ xAxis: channel, yAxis: energy })
|
this.figureChartOption.series[1].markPoint.data.push({ xAxis: channel, yAxis: energy })
|
||||||
|
|
||||||
const { min, max } = this.getFigureChartMaxAndMin()
|
const { min, max } = this.getFigureChartMaxAndMin()
|
||||||
|
@ -808,6 +813,19 @@ export default {
|
||||||
this.isInverse = true
|
this.isInverse = true
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 输入框发生变化
|
||||||
|
newCalibrationFuncModelChange() {
|
||||||
|
// 输入内容的时候 需要清空table数据 20231028:Xiao
|
||||||
|
this.list = []
|
||||||
|
// 需要清空chart黄色的线 20231028:Xiao
|
||||||
|
if(this.figureChartOption.series[1].data) {
|
||||||
|
this.figureChartOption.series[1].data = []
|
||||||
|
}
|
||||||
|
if(this.figureChartOption.series[1].markPoint.data) {
|
||||||
|
this.figureChartOption.series[1].markPoint.data = []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
// 删除表格里的单项
|
// 删除表格里的单项
|
||||||
handleDel(index) {
|
handleDel(index) {
|
||||||
const willDelItem = this.list.splice(index, 1)[0]
|
const willDelItem = this.list.splice(index, 1)[0]
|
||||||
|
@ -857,15 +875,19 @@ export default {
|
||||||
// 点击Fitting按钮执行重新计算
|
// 点击Fitting按钮执行重新计算
|
||||||
async handleFitting() {
|
async handleFitting() {
|
||||||
const hasEmpty = Object.entries(this.newCalibrationFuncModel).some(([_, v]) => !v)
|
const hasEmpty = Object.entries(this.newCalibrationFuncModel).some(([_, v]) => !v)
|
||||||
if (hasEmpty) {
|
if (hasEmpty && this.list.length < 3) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const { success, result, message } = await postAction('/spectrumAnalysis/fitting', {
|
const { success, result, message } = await postAction('/spectrumAnalysis/fitting', {
|
||||||
...this.newCalibrationFuncModel,
|
...this.newCalibrationFuncModel,
|
||||||
tempPoints: this.isFirstFitting
|
// 修改逻辑,如果列表中有数据 以列表的数据优先进行分析 20231028:Xiao
|
||||||
? this.oldScatterSeries
|
tempPoints: this.list.length > 0
|
||||||
: this.list.map((item) => ({ x: item.channel, y: item.energy })),
|
? this.list.map((item) => ({ x: item.channel, y: item.energy }))
|
||||||
|
: this.oldScatterSeries,
|
||||||
|
// tempPoints: this.isFirstFitting
|
||||||
|
// ? this.oldScatterSeries
|
||||||
|
// : this.list.map((item) => ({ x: item.channel, y: item.energy })),
|
||||||
count: this.isFirstFitting || !this.isInverse ? undefined : this.count,
|
count: this.isFirstFitting || !this.isInverse ? undefined : this.count,
|
||||||
})
|
})
|
||||||
if (success) {
|
if (success) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user