From 0e9e68ec76fceb721d6e24edd6184d1bb5e09ad4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=BB=E7=8F=AE=E5=AE=87?= Date: Wed, 17 Jan 2024 18:41:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E5=B7=A6=E8=BE=B9=E7=BA=BF?= =?UTF-8?q?=E6=8B=96=E5=88=B0=E5=8F=B3=E8=BE=B9=EF=BC=8C=E5=9C=A8=E6=8B=96?= =?UTF-8?q?=E5=9B=9E=E5=8E=BB=E4=B9=8B=E5=90=8E=20=E5=8F=96=E5=80=BC?= =?UTF-8?q?=E6=9C=89=E9=97=AE=E9=A2=98=0B=E5=A4=84=E7=90=86=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=BC=82=E5=B8=B8=E6=8A=A5=E9=94=99=E6=98=AF=EF=BC=8C?= =?UTF-8?q?loading=20=E6=95=88=E6=9E=9C=E6=9C=AA=E5=8F=96=E6=B6=88?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../spectrumAnalysis/components/BetaGammaSpectrum.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/views/spectrumAnalysis/components/BetaGammaSpectrum.vue b/src/views/spectrumAnalysis/components/BetaGammaSpectrum.vue index eef4c43..9c416de 100644 --- a/src/views/spectrumAnalysis/components/BetaGammaSpectrum.vue +++ b/src/views/spectrumAnalysis/components/BetaGammaSpectrum.vue @@ -429,11 +429,14 @@ export default { this.myChart = this.$refs.chartTwoDRef.getChartInstance() let graphicHeight = this.$refs.TwoChartRef.clientHeight graphic1.shape.height = graphicHeight + let minleft = this.myChart.convertToPixel({ xAxisId: '2' }, 0) + let maxRight = this.myChart.convertToPixel({ xAxisId: '2' }, 1024) graphic1.position = [ this.myChart.convertToPixel({ xAxisId: '2' }, minX), this.myChart.convertToPixel({ yAxisId: '3' }, maxY), ] graphic1.ondrag = function () { + this.position[0] = this.position[0] < minleft ? minleft : this.position[0] let [a, lineSeries] = _this.twoDOption.series _this.startChannel = parseInt(_this.myChart.convertFromPixel({ xAxisId: '2' }, this.position[0])) const rect = [ @@ -451,12 +454,14 @@ export default { // } // _this.twoDOption.series.splice(1, _this.twoDOption.series.length - 1, ...lineSeries) } + // > maxRight ? maxRight : currRight graphic2.shape.height = graphicHeight graphic2.position = [ this.myChart.convertToPixel({ xAxisId: '2' }, maxX), this.myChart.convertToPixel({ yAxisId: '3' }, maxY), ] graphic2.ondrag = function () { + this.position[0] = this.position[0] > maxRight ? maxRight : this.position[0] let [a, lineSeries] = _this.twoDOption.series _this.endChannel = parseInt(_this.myChart.convertFromPixel({ xAxisId: '2' }, this.position[0])) const rect = [ @@ -682,6 +687,8 @@ export default { color: '#99CA53', } // this.reDrawRect() + } else { + this.$emit('update:isLoading', false) } } catch (error) { console.error(error)