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

View File

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