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

View File

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