diff --git a/src/views/spectrumAnalysis/components/Modals/EfficiencyCalibrationModal.vue b/src/views/spectrumAnalysis/components/Modals/EfficiencyCalibrationModal.vue index d0f1f62..dbfd00e 100644 --- a/src/views/spectrumAnalysis/components/Modals/EfficiencyCalibrationModal.vue +++ b/src/views/spectrumAnalysis/components/Modals/EfficiencyCalibrationModal.vue @@ -22,10 +22,10 @@ }" > - + - + Insert @@ -357,7 +357,7 @@ export default { // 表格单行点击 handleRowClick(row) { this.model = cloneDeep(row) - this.model.channel = parseFloat(Number(this.model.channel).toPrecision(6)) + this.model.efficiency = parseFloat(Number(this.model.efficiency).toPrecision(6)) this.model.energy = parseFloat(Number(this.model.energy).toPrecision(6)) this.emptyModal = cloneDeep(row) }, @@ -409,8 +409,8 @@ export default { }) }, handleChannelChange(e) { - if (e.target.value != parseFloat(Number(this.emptyModal.channel).toPrecision(6))) { - this.emptyModal.channel = e.target.value + if (e.target.value != parseFloat(Number(this.emptyModal.efficiency).toPrecision(6))) { + this.emptyModal.efficiency = e.target.value } }, handleEnergyChange(e) { @@ -425,6 +425,7 @@ export default { if (this.selectedRowKeys.length) { const energy = parseFloat(this.emptyModal.energy) const efficiency = parseFloat(this.emptyModal.efficiency) + console.log(energy+">>>>"+efficiency); if (Number.isNaN(energy) || Number.isNaN(efficiency)) { this.$message.warn('Format is invalid.') diff --git a/src/views/spectrumAnalysis/components/Modals/ResolutionCalibrationModal.vue b/src/views/spectrumAnalysis/components/Modals/ResolutionCalibrationModal.vue index acadd96..2278599 100644 --- a/src/views/spectrumAnalysis/components/Modals/ResolutionCalibrationModal.vue +++ b/src/views/spectrumAnalysis/components/Modals/ResolutionCalibrationModal.vue @@ -22,10 +22,10 @@ }" > - + - + Insert @@ -158,7 +158,7 @@ const initialOption = { const energy = parseInt(x) const fwhm = y.toFixed(3) return `
Energy: ${energy}
-
Fwhm: ${fwhm}
` +
Efficiency : ${efficiency}
` }, className: 'figure-chart-option-tooltip', }, @@ -317,7 +317,7 @@ export default { // 表格单行点击 handleRowClick(row) { this.model = cloneDeep(row) - this.model.channel = parseFloat(Number(this.model.channel).toPrecision(6)) + this.model.fwhm = parseFloat(Number(this.model.fwhm).toPrecision(6)) this.model.energy = parseFloat(Number(this.model.energy).toPrecision(6)) this.emptyModal = cloneDeep(row) }, @@ -326,7 +326,6 @@ export default { handleInsert() { const energy = parseFloat(this.model.energy) const fwhm = parseFloat(this.model.fwhm) - if (Number.isNaN(energy) || Number.isNaN(fwhm)) { this.$message.warn('Format is invalid.') return @@ -369,12 +368,11 @@ export default { }) }, handleChannelChange(e) { - if (e.target.value != parseFloat(Number(this.emptyModal.channel).toPrecision(6))) { - this.emptyModal.channel = e.target.value + if (e.target.value != parseFloat(Number(this.emptyModal.fwhm).toPrecision(6))) { + this.emptyModal.fwhm = e.target.value } }, handleEnergyChange(e) { - console.log(e.target.value) if (e.target.value != parseFloat(Number(this.emptyModal.energy).toPrecision(6))) { this.emptyModal.energy = e.target.value }