fix:reviewModal, gamma 分析和 interactive讲请求不同的接口,如果从 gamma 分析页面将请求另外的接口

This commit is contained in:
orgin 2023-12-20 13:51:53 +08:00
parent 92b8b33c9b
commit 6e8f8baf00
2 changed files with 26 additions and 10 deletions

View File

@ -1,5 +1,5 @@
<template>
<custom-modal v-model="visible" :width="1280" title="Nuclide Review" :footer="null" destroy-on-close>
<custom-modal v-model="visible" :width="1280" title="Nuclide Review" :footer="null" @close="handleCancel">
<a-spin :spinning="isLoading">
<div class="nuclide-review-search">
<span @click="handleNuclideChange('prev')">&lt;</span>
@ -163,6 +163,10 @@ export default {
nuclide: {
type: String,
},
page: {
type: String,
default: 'AnalyzeInteractiveToolModal'
},
},
data() {
this.columns = columns
@ -267,7 +271,12 @@ export default {
try {
this.isLoading = true
const { sampleId, inputFileName: fileName } = this.sampleData
const { success, result, message } = await getAction('/gamma/nuclideReview', {
let url = '/gamma/nuclideReview'
// 20231219:xiao
if(this.page === 'gamma-analysis'){
url = '/gamma/nuclideReviewGamma'
}
const { success, result, message } = await getAction(url, {
sampleId: sampleId,
channel: this.channel,
fileName,
@ -331,7 +340,12 @@ export default {
try {
this.isLoading = true
const { sampleId, inputFileName } = this.sampleData
const { success, result, message } = await getAction('/gamma/changeNuclide', {
let url = '/gamma/changeNuclide'
// 20231219:xiao
if(this.page === 'gamma-analysis'){
url = '/gamma/changeNuclideGamma'
}
const { success, result, message } = await getAction(url, {
sampleId,
nuclideName: this.currNuclide,
fileName: inputFileName,

View File

@ -87,6 +87,7 @@
:sampleId="sample.sampleId"
:channel="currChannel"
:nuclide="nuclideReview.nuclide"
:page="`gamma-analysis`"
/>
<compare-file-list-modal v-model="compareFileListModalVisible" @fileSelect="handleFileSelect" />
@ -392,7 +393,7 @@ export default {
counts: rightCounts,
} = this.getEnergyAndCountsByXAxis(rightAxis)
this.setChartBottomTitle(rightChannel, rightEnergy, rightCounts)
this.getSelPosNuclide(rightChannel)
this.getSelPosNuclide(rightChannel, rightEnergy)
break
case 'ArrowLeft':
if (markLineXAxis <= this.xAxisMin) {
@ -412,7 +413,7 @@ export default {
counts: leftCounts,
} = this.getEnergyAndCountsByXAxis(leftAxis)
this.setChartBottomTitle(leftChannel, leftEnergy, leftCounts)
this.getSelPosNuclide(leftChannel)
this.getSelPosNuclide(leftChannel, leftEnergy)
break
}
},
@ -972,7 +973,7 @@ export default {
const { channel, energy, counts } = this.getEnergyAndCountsByXAxis(xAxis)
this.setChartBottomTitle(channel, energy, counts)
this.getSelPosNuclide(channel)
this.getSelPosNuclide(channel, energy)
}
},
@ -1012,17 +1013,18 @@ export default {
},
// Nuclide Library
async getSelPosNuclide(channel) {
async getSelPosNuclide(channel, energy) {
this.currChannel = channel
try {
this.isLoadingNuclide = true
const { sampleId, inputFileName: fileName } = this.sample
const { success, result, message } = await getAction('/gamma/getSelPosNuclide', {
const { success, result, message } = await getAction('/gamma/getGammaSelPosNuclide', {
sampleId,
channel,
fileName,
energy
})
if (success) {
const { possible } = result
@ -1126,7 +1128,7 @@ export default {
if (centroid > prevChannel) {
const energy = this.getEnergyByChannel(centroid)
this.setMarkLineXAxis(this.isEnergy ? energy : centroid, i)
this.getSelPosNuclide(centroid)
this.getSelPosNuclide(centroid, energy)
const { counts } = this.getEnergyAndCountsByXAxis(this.isEnergy ? energy : centroid)
this.setChartBottomTitle(centroid, energy, counts)
return
@ -1138,7 +1140,7 @@ export default {
if (Math.round(centroid) < prevChannel) {
const energy = this.getEnergyByChannel(centroid)
this.setMarkLineXAxis(this.isEnergy ? energy : centroid, i)
this.getSelPosNuclide(centroid)
this.getSelPosNuclide(centroid, energy)
const { counts } = this.getEnergyAndCountsByXAxis(this.isEnergy ? energy : centroid)
this.setChartBottomTitle(centroid, energy, counts)
return