fix: ReAnalyse后矩形框未变化的问题

This commit is contained in:
Xu Zhimeng 2023-11-09 16:39:00 +08:00
parent dd993b4ac8
commit f1af8cc8b9
2 changed files with 15 additions and 0 deletions

View File

@ -224,10 +224,24 @@ export default {
currSample: {}, currSample: {},
} }
}, },
created() {
this.$bus.$on('ReAnalyse', this.redrawRect)
},
destroyed() { destroyed() {
this.cancelLastRequest() this.cancelLastRequest()
this.$bus.$off('ReAnalyse', this.redrawRect)
}, },
methods: { methods: {
//
redrawRect(result) {
const keys = ['SampleBoundary', 'GasBoundary', 'DetBoundary', 'QCBoundary']
SampleType.forEach((item, index) => {
const value = result[keys[index]]
this.sampleDetail[item.value].Boundary = value || []
this.changeChartByType(this.spectraType)
})
},
handleGetFlag(val, obj) { handleGetFlag(val, obj) {
this.resultDisplay.forEach((item) => { this.resultDisplay.forEach((item) => {
if (item.nuclideName === obj.nuclideName) { if (item.nuclideName === obj.nuclideName) {

View File

@ -150,6 +150,7 @@ export default {
this.$message.success('Analyse Success!') this.$message.success('Analyse Success!')
this.isReanlyze = true this.isReanlyze = true
this.handleExit() this.handleExit()
this.$bus.$emit('ReAnalyse', res.result)
} else { } else {
this.$message.warning(res.message) this.$message.warning(res.message)
} }