diff --git a/src/views/spectrumAnalysis/beta-analysis.vue b/src/views/spectrumAnalysis/beta-analysis.vue index d30157c..e4fe20c 100644 --- a/src/views/spectrumAnalysis/beta-analysis.vue +++ b/src/views/spectrumAnalysis/beta-analysis.vue @@ -548,6 +548,7 @@ export default { handleBoundaryChange(evt) { const { index, start, end } = evt this.$set(this.roiParamList, index, [start, end]) + this.$refs.betaChartRef.setBoundaryList(cloneDeep(this.roiParamList)) }, // 从分析工具刷新部分数据 diff --git a/src/views/spectrumAnalysis/components/BetaGammaSpectrum.vue b/src/views/spectrumAnalysis/components/BetaGammaSpectrum.vue index 7936f32..9d57ac2 100644 --- a/src/views/spectrumAnalysis/components/BetaGammaSpectrum.vue +++ b/src/views/spectrumAnalysis/components/BetaGammaSpectrum.vue @@ -535,8 +535,18 @@ export default { this.currBoundaryItem.width = nextLeft - this.boundaryRight this.direction = 'right' } else { - this.currBoundaryItem.left = nextLeft - this.currBoundaryItem.width = nextWidth + // 如果将要超出容器左边线 + if (nextLeft < 0) { + this.currBoundaryItem.left = 0 + this.currBoundaryItem.width = nextWidth + nextLeft + this.handleBorderMouseLeave() + return + } + // 设置为将要移动到的位置 + else { + this.currBoundaryItem.left = nextLeft + this.currBoundaryItem.width = nextWidth + } this.direction = 'left' } } @@ -549,7 +559,16 @@ export default { this.currBoundaryItem.left = prevLeft + nextWidth this.currBoundaryItem.width = -nextWidth } else { - this.currBoundaryItem.width = nextWidth + // 如果将要超出容器右边线 + if (this.currBoundaryItem.left + nextWidth > this.boundaryContainerPosition.width) { + this.currBoundaryItem.width = this.boundaryContainerPosition.width - this.currBoundaryItem.left + this.handleBorderMouseLeave() + return + } + // 设置为将要移动到的位置 + else { + this.currBoundaryItem.width = nextWidth + } this.direction = 'right' } }