gamma save to db 之后sampleId 没有回显

This commit is contained in:
任珮宇 2023-11-24 11:01:59 +08:00
parent 61a495efd0
commit 3320234545
2 changed files with 14 additions and 4 deletions

View File

@ -152,6 +152,9 @@ export default {
updateFlag: {
type: String,
},
currSampleDet: {
type: Array,
},
},
components: {
CustomChart,
@ -913,7 +916,6 @@ export default {
}
},
//
setChartBottomTitle(channel, energy, counts) {
const { index, find } = findNearPeak(channel, this.peakList)
@ -925,7 +927,7 @@ export default {
// xAixschannelenergycounts
getEnergyAndCountsByXAxis(xAxis) {
if(-1 == xAxis) {
if (-1 == xAxis) {
return {
channel: -1,
energy: 0,
@ -1811,6 +1813,11 @@ export default {
},
immediate: true,
},
currSampleDet: {
handler(val) {
this.detailedInfomation = [...val]
},
},
},
computed: {
// Energy

View File

@ -37,6 +37,7 @@
v-if="isGamma"
ref="gammaAnalysisRef"
:sample="sampleData"
:currSampleDet="currSampleDet"
:updateFlag="updateFlag"
@reAnalyed="handleReAnalyed"
/>
@ -427,6 +428,7 @@ export default {
finishCont: 0,
percentBar: 0,
analysedFileName: '', //
currSampleDet: [], // DetailedInformation
}
},
created() {
@ -711,11 +713,12 @@ export default {
if (type == 'current') {
const hideLoading = this.$message.loading('Saving...', 0)
try {
const { success, message } = await getAction('/gamma/saveToDB', {
const { success, message, result } = await getAction('/gamma/saveToDB', {
fileName: this.sampleData.inputFileName,
})
if (success) {
this.$message.success('Save Success')
this.currSampleDet = [...result.DetailedInformation]
} else {
this.$message.error(message)
}
@ -796,7 +799,7 @@ export default {
handleReprocessAll() {
this.percentBar = 0
this.finishCont = 0
this.analysedFileName=""
this.analysedFileName = ''
this.analyzeAllModalVisible = true
const { inputFileName, sampleType } = this.sampleData
// gamma list