fix:reviewModal, gamma 分析和 interactive讲请求不同的接口,如果从 gamma 分析页面将请求另外的接口
This commit is contained in:
parent
92b8b33c9b
commit
6e8f8baf00
|
@ -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')"><</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,
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user