save to db 之后 需要回显对应的 Sample ID
This commit is contained in:
parent
449570f171
commit
91a580ec8c
|
@ -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>
|
||||||
|
|
|
@ -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}`)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user