From 005a057f47b07b0b36e4cc4f94ff0fdc47fd5b88 Mon Sep 17 00:00:00 2001 From: Xu Zhimeng Date: Thu, 29 Jun 2023 17:43:15 +0800 Subject: [PATCH] =?UTF-8?q?WIP:=20=E5=AE=9E=E7=8E=B0=E4=BA=8C=E7=BA=A7?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E4=B8=ADSpectra=E7=BB=84=E4=BB=B6=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=80=E7=BA=A7=E8=8F=9C=E5=8D=95=E7=BB=93?= =?UTF-8?q?=E6=9E=84=EF=BC=8C=E5=B9=B6=E5=9C=A8=E8=8F=9C=E5=8D=95=E4=B8=AD?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=B7=B2=E9=80=89=E4=B8=AD=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=EF=BC=9B=E7=BB=98=E5=88=B63D=20Scatter?= =?UTF-8?q?=E5=92=8C3D=20Surface=20=E5=9B=BE=E8=A1=A8=EF=BC=88=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E4=B8=AD=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/components/Custom3DChart/index.vue | 51 +++ src/components/CustomChart/index.vue | 1 - .../components/BetaGammaSpectrumChart.vue | 244 +++++++++++++-- .../components/SpectraListInMenu.vue | 65 ++++ .../components/SpectrumLineChart.vue | 14 +- .../sub-operators/PopOverWithIcon.vue | 21 +- .../components/sub-operators/Spectra.vue | 64 +++- src/views/spectrumAnalysis/index.vue | 291 ++++++++++++++---- 9 files changed, 652 insertions(+), 100 deletions(-) create mode 100644 src/components/Custom3DChart/index.vue create mode 100644 src/views/spectrumAnalysis/components/SpectraListInMenu.vue diff --git a/package.json b/package.json index e92f39a..bbea7cf 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "dayjs": "^1.8.0", "dom-align": "1.12.0", "echarts": "^5.4.2", + "echarts-gl": "^2.0.9", "enquire.js": "^2.1.6", "js-cookie": "^2.2.0", "lodash.get": "^4.4.2", diff --git a/src/components/Custom3DChart/index.vue b/src/components/Custom3DChart/index.vue new file mode 100644 index 0000000..da5b31b --- /dev/null +++ b/src/components/Custom3DChart/index.vue @@ -0,0 +1,51 @@ + + + diff --git a/src/components/CustomChart/index.vue b/src/components/CustomChart/index.vue index a39c9ff..f1157bc 100644 --- a/src/components/CustomChart/index.vue +++ b/src/components/CustomChart/index.vue @@ -30,7 +30,6 @@ export default { option: { handler() { if(this.chart) { - this.chart.clear() this.chart.setOption(this.option) } }, diff --git a/src/views/spectrumAnalysis/components/BetaGammaSpectrumChart.vue b/src/views/spectrumAnalysis/components/BetaGammaSpectrumChart.vue index 9ab5d17..46c4bf1 100644 --- a/src/views/spectrumAnalysis/components/BetaGammaSpectrumChart.vue +++ b/src/views/spectrumAnalysis/components/BetaGammaSpectrumChart.vue @@ -10,34 +10,51 @@ >
- + +
+ +
+
256
+
+
0
+
+
+ + + + + + + +
+ + diff --git a/src/views/spectrumAnalysis/components/SpectrumLineChart.vue b/src/views/spectrumAnalysis/components/SpectrumLineChart.vue index 4bcdfd4..116ab17 100644 --- a/src/views/spectrumAnalysis/components/SpectrumLineChart.vue +++ b/src/views/spectrumAnalysis/components/SpectrumLineChart.vue @@ -12,7 +12,7 @@ import { cloneDeep } from 'lodash' const initialOption = { grid: { top: 25, - right: 0, + right: 12, bottom: 40 }, title: { @@ -33,7 +33,9 @@ const initialOption = { } }, xAxis: { - type: 'category', + min: 0, + max: 256, + interval: 64, axisLine: { lineStyle: { color: 'rgb(119, 181, 213, 0.5)' @@ -57,10 +59,12 @@ const initialOption = { fontSize: 14, color: '#5b9cba' }, - nameGap: 25, - data: new Array(256).fill(0).map((_, index) => index) + nameGap: 25 }, yAxis: { + min: 0, + max: 21099, + interval: 21000 / 4, axisLine: { show: true, lineStyle: { @@ -84,7 +88,7 @@ const initialOption = { symbol: 'none', data: new Array(256) .fill(0) - .map((_, index) => (Math.random() < 0.05 ? parseInt(Math.random() * 19644) : parseInt(Math.random() * 800))) + .map((_, index) => [index, (Math.random() < 0.05 ? parseInt(Math.random() * 19644) : parseInt(Math.random() * 800))]) } } diff --git a/src/views/spectrumAnalysis/components/sub-operators/PopOverWithIcon.vue b/src/views/spectrumAnalysis/components/sub-operators/PopOverWithIcon.vue index 3ac6b89..7e52eb8 100644 --- a/src/views/spectrumAnalysis/components/sub-operators/PopOverWithIcon.vue +++ b/src/views/spectrumAnalysis/components/sub-operators/PopOverWithIcon.vue @@ -1,5 +1,5 @@