fix:reviewModal, gamma 分析和 interactive讲请求不同的接口,如果从 gamma 分析页面将请求另外的接口
This commit is contained in:
parent
92b8b33c9b
commit
6e8f8baf00
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<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">
|
<a-spin :spinning="isLoading">
|
||||||
<div class="nuclide-review-search">
|
<div class="nuclide-review-search">
|
||||||
<span @click="handleNuclideChange('prev')"><</span>
|
<span @click="handleNuclideChange('prev')"><</span>
|
||||||
|
@ -163,6 +163,10 @@ export default {
|
||||||
nuclide: {
|
nuclide: {
|
||||||
type: String,
|
type: String,
|
||||||
},
|
},
|
||||||
|
page: {
|
||||||
|
type: String,
|
||||||
|
default: 'AnalyzeInteractiveToolModal'
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
this.columns = columns
|
this.columns = columns
|
||||||
|
@ -267,7 +271,12 @@ export default {
|
||||||
try {
|
try {
|
||||||
this.isLoading = true
|
this.isLoading = true
|
||||||
const { sampleId, inputFileName: fileName } = this.sampleData
|
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,
|
sampleId: sampleId,
|
||||||
channel: this.channel,
|
channel: this.channel,
|
||||||
fileName,
|
fileName,
|
||||||
|
@ -331,7 +340,12 @@ export default {
|
||||||
try {
|
try {
|
||||||
this.isLoading = true
|
this.isLoading = true
|
||||||
const { sampleId, inputFileName } = this.sampleData
|
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,
|
sampleId,
|
||||||
nuclideName: this.currNuclide,
|
nuclideName: this.currNuclide,
|
||||||
fileName: inputFileName,
|
fileName: inputFileName,
|
||||||
|
|
|
@ -87,6 +87,7 @@
|
||||||
:sampleId="sample.sampleId"
|
:sampleId="sample.sampleId"
|
||||||
:channel="currChannel"
|
:channel="currChannel"
|
||||||
:nuclide="nuclideReview.nuclide"
|
:nuclide="nuclideReview.nuclide"
|
||||||
|
:page="`gamma-analysis`"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<compare-file-list-modal v-model="compareFileListModalVisible" @fileSelect="handleFileSelect" />
|
<compare-file-list-modal v-model="compareFileListModalVisible" @fileSelect="handleFileSelect" />
|
||||||
|
@ -392,7 +393,7 @@ export default {
|
||||||
counts: rightCounts,
|
counts: rightCounts,
|
||||||
} = this.getEnergyAndCountsByXAxis(rightAxis)
|
} = this.getEnergyAndCountsByXAxis(rightAxis)
|
||||||
this.setChartBottomTitle(rightChannel, rightEnergy, rightCounts)
|
this.setChartBottomTitle(rightChannel, rightEnergy, rightCounts)
|
||||||
this.getSelPosNuclide(rightChannel)
|
this.getSelPosNuclide(rightChannel, rightEnergy)
|
||||||
break
|
break
|
||||||
case 'ArrowLeft':
|
case 'ArrowLeft':
|
||||||
if (markLineXAxis <= this.xAxisMin) {
|
if (markLineXAxis <= this.xAxisMin) {
|
||||||
|
@ -412,7 +413,7 @@ export default {
|
||||||
counts: leftCounts,
|
counts: leftCounts,
|
||||||
} = this.getEnergyAndCountsByXAxis(leftAxis)
|
} = this.getEnergyAndCountsByXAxis(leftAxis)
|
||||||
this.setChartBottomTitle(leftChannel, leftEnergy, leftCounts)
|
this.setChartBottomTitle(leftChannel, leftEnergy, leftCounts)
|
||||||
this.getSelPosNuclide(leftChannel)
|
this.getSelPosNuclide(leftChannel, leftEnergy)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -972,7 +973,7 @@ export default {
|
||||||
const { channel, energy, counts } = this.getEnergyAndCountsByXAxis(xAxis)
|
const { channel, energy, counts } = this.getEnergyAndCountsByXAxis(xAxis)
|
||||||
this.setChartBottomTitle(channel, energy, counts)
|
this.setChartBottomTitle(channel, energy, counts)
|
||||||
|
|
||||||
this.getSelPosNuclide(channel)
|
this.getSelPosNuclide(channel, energy)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1012,17 +1013,18 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
// 获取 Nuclide Library 数据
|
// 获取 Nuclide Library 数据
|
||||||
async getSelPosNuclide(channel) {
|
async getSelPosNuclide(channel, energy) {
|
||||||
this.currChannel = channel
|
this.currChannel = channel
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.isLoadingNuclide = true
|
this.isLoadingNuclide = true
|
||||||
const { sampleId, inputFileName: fileName } = this.sample
|
const { sampleId, inputFileName: fileName } = this.sample
|
||||||
|
|
||||||
const { success, result, message } = await getAction('/gamma/getSelPosNuclide', {
|
const { success, result, message } = await getAction('/gamma/getGammaSelPosNuclide', {
|
||||||
sampleId,
|
sampleId,
|
||||||
channel,
|
channel,
|
||||||
fileName,
|
fileName,
|
||||||
|
energy
|
||||||
})
|
})
|
||||||
if (success) {
|
if (success) {
|
||||||
const { possible } = result
|
const { possible } = result
|
||||||
|
@ -1126,7 +1128,7 @@ export default {
|
||||||
if (centroid > prevChannel) {
|
if (centroid > prevChannel) {
|
||||||
const energy = this.getEnergyByChannel(centroid)
|
const energy = this.getEnergyByChannel(centroid)
|
||||||
this.setMarkLineXAxis(this.isEnergy ? energy : centroid, i)
|
this.setMarkLineXAxis(this.isEnergy ? energy : centroid, i)
|
||||||
this.getSelPosNuclide(centroid)
|
this.getSelPosNuclide(centroid, energy)
|
||||||
const { counts } = this.getEnergyAndCountsByXAxis(this.isEnergy ? energy : centroid)
|
const { counts } = this.getEnergyAndCountsByXAxis(this.isEnergy ? energy : centroid)
|
||||||
this.setChartBottomTitle(centroid, energy, counts)
|
this.setChartBottomTitle(centroid, energy, counts)
|
||||||
return
|
return
|
||||||
|
@ -1138,7 +1140,7 @@ export default {
|
||||||
if (Math.round(centroid) < prevChannel) {
|
if (Math.round(centroid) < prevChannel) {
|
||||||
const energy = this.getEnergyByChannel(centroid)
|
const energy = this.getEnergyByChannel(centroid)
|
||||||
this.setMarkLineXAxis(this.isEnergy ? energy : centroid, i)
|
this.setMarkLineXAxis(this.isEnergy ? energy : centroid, i)
|
||||||
this.getSelPosNuclide(centroid)
|
this.getSelPosNuclide(centroid, energy)
|
||||||
const { counts } = this.getEnergyAndCountsByXAxis(this.isEnergy ? energy : centroid)
|
const { counts } = this.getEnergyAndCountsByXAxis(this.isEnergy ? energy : centroid)
|
||||||
this.setChartBottomTitle(centroid, energy, counts)
|
this.setChartBottomTitle(centroid, energy, counts)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue
Block a user