save to db 之后 需要回显对应的 Sample ID

This commit is contained in:
任珮宇 2023-11-03 18:10:54 +08:00
parent 449570f171
commit 91a580ec8c
2 changed files with 14 additions and 0 deletions

View File

@ -180,6 +180,9 @@ export default {
sample: { sample: {
type: Object, type: Object,
}, },
sampleInfo: {
type: Object,
},
// analyseCurrentSpectrum: { // analyseCurrentSpectrum: {
// type: Object, // type: Object,
// }, // },
@ -542,6 +545,14 @@ export default {
immediate: true, immediate: true,
deep: true, deep: true,
}, },
sampleInfo: {
handler(newVal, oldVal) {
this.spectrumData.sampleId = newVal.sampleId
this.spectrumData.status = newVal.status
},
immediate: true,
deep: true,
},
}, },
} }
</script> </script>

View File

@ -51,6 +51,7 @@
@sendInfo="getStationName" @sendInfo="getStationName"
@reAnalyCurr="getReAnalyCurr" @reAnalyCurr="getReAnalyCurr"
@reAnalyAll="getReAnalyAll" @reAnalyAll="getReAnalyAll"
:sampleInfo="sampleInfo"
:sample="sampleData" :sample="sampleData"
:analyseCurrentSpectrum="analyseCurrentSpectrumData" :analyseCurrentSpectrum="analyseCurrentSpectrumData"
/> />
@ -406,6 +407,7 @@ export default {
isSaving: false, isSaving: false,
colorConfig: {}, // colorConfig: {}, //
sampleInfo:{}
} }
}, },
created() { created() {
@ -641,6 +643,7 @@ export default {
if (res.success) { if (res.success) {
this.$message.success('Save Successfully!') this.$message.success('Save Successfully!')
this.isSaving = false this.isSaving = false
this.sampleInfo = res.result.sample
} else { } else {
this.isSaving = false this.isSaving = false
this.$message.warning(`${res.message}`) this.$message.warning(`${res.message}`)