diff --git a/04.系统编码/Frontend/src/components/RamanLidar.vue b/04.系统编码/Frontend/src/components/RamanLidar.vue index 6765f6b..cfba413 100644 --- a/04.系统编码/Frontend/src/components/RamanLidar.vue +++ b/04.系统编码/Frontend/src/components/RamanLidar.vue @@ -268,6 +268,7 @@ </template> <script lang="ts"> + import {onMounted, reactive, toRefs, watch} from 'vue'; import moment from "moment"; import {post} from '../uilts/axios'; @@ -660,7 +661,7 @@ export default { } let matrix = convertValueToBox(response.data); - creates.extinctionBeforeDrawer = new HeatMapDrawer(800, 650, matrix, "extinction_chart-before", 'km/sr'); + creates.extinctionBeforeDrawer = new HeatMapDrawer(800, 650, matrix, "extinction_chart-before", '/km'); creates.extinctionBeforeDrawer.setAxis(new CoordinateScale(options.timeArray), new CoordinateScale([0, 2000, 4000, 6000, 8000, 10000, 12000], true, true)); creates.extinctionBeforeDrawer.setColorChart(prepareExtinctionnColors()); creates.extinctionBeforeDrawer.draw(); @@ -787,7 +788,7 @@ export default { } let matrix = converCloudRecognition(801, result, 'backscatter'); - creates.backscatterDrawer = new HeatMapDrawer(1200, 650, matrix, "backscatter_chart",'km/sr'); + creates.backscatterDrawer = new HeatMapDrawer(1200, 650, matrix, "backscatter_chart",'/km/sr'); creates.backscatterDrawer.setAxis(new CoordinateScale(options.timeArray), new CoordinateScale([0, 2000, 4000, 6000, 8000, 10000, 12000], true, true)); creates.backscatterDrawer.setColorChart(prepareBackscatterColors()); creates.backscatterDrawer.draw(); @@ -948,7 +949,7 @@ export default { } let matrix = converCloudRecognition(801, result, 'extinctionOptics'); - creates.opticsExtinctionDrawer = new HeatMapDrawer(1200, 650, matrix, "extinction_optics_chart",'km/sr'); + creates.opticsExtinctionDrawer = new HeatMapDrawer(1200, 650, matrix, "extinction_optics_chart",'/km'); creates.opticsExtinctionDrawer.setAxis(new CoordinateScale(options.timeArray), new CoordinateScale([0, 2000, 4000, 6000, 8000, 10000, 12000], true, true)); creates.opticsExtinctionDrawer.setColorChart(prepareExtinctionnColors()); creates.opticsExtinctionDrawer.draw(); @@ -1001,7 +1002,7 @@ export default { } let matrix = converCloudRecognition(801, result, 'extinction'); - creates.extinctionDrawer = new HeatMapDrawer(800, 650, matrix, "extinction_chart-after", 'km/sr'); + creates.extinctionDrawer = new HeatMapDrawer(800, 650, matrix, "extinction_chart-after", '/km'); creates.extinctionDrawer.setAxis(new CoordinateScale(options.timeArray), new CoordinateScale([0, 2000, 4000, 6000, 8000, 10000, 12000], true, true)); creates.extinctionDrawer.setColorChart(prepareExtinctionnColors()); creates.extinctionDrawer.draw(); diff --git a/04.系统编码/Frontend/src/model/high-chart-create.ts b/04.系统编码/Frontend/src/model/high-chart-create.ts index 26c3aa4..6906bde 100644 --- a/04.系统编码/Frontend/src/model/high-chart-create.ts +++ b/04.系统编码/Frontend/src/model/high-chart-create.ts @@ -1,7 +1,10 @@ import * as Highcharts from 'highcharts'; +//import * as Exporting from 'highcharts/modules/exporting'; -export class HighChartCreate { +// // 初始化导出模块 +// Exporting(Highcharts); +export class HighChartCreate { private readonly id: string; private highChart: any; @@ -12,7 +15,6 @@ export class HighChartCreate { private legend: any = null; private tooltip: any = null; private time: any = null; - constructor(id: string) { this.id = id; } @@ -55,7 +57,7 @@ export class HighChartCreate { fontSize:'18px' }, formatter: function () { - return Highcharts.dateFormat('%d日%H时', this.value); + return Highcharts.dateFormat('%d日%H时', this.value); } } // dateTimeLabelFormats: { @@ -157,7 +159,7 @@ export class HighChartCreate { // 不换算单位, 不然出现 k Highcharts.setOptions({ lang: { - numericSymbols: null + numericSymbols: null }, }) @@ -198,4 +200,3 @@ export class HighChartCreate { } } - diff --git a/04.系统编码/Frontend/src/uilts/box-drawer.ts b/04.系统编码/Frontend/src/uilts/box-drawer.ts index 11710f7..a17879b 100644 --- a/04.系统编码/Frontend/src/uilts/box-drawer.ts +++ b/04.系统编码/Frontend/src/uilts/box-drawer.ts @@ -278,8 +278,8 @@ export class BoxDrawer{ private drawTemperatureText(unit): void { this.canvasContext.font = "normal 35px 微软雅黑"; this.canvasContext.fillStyle = "#000000"; - let unitX = 1390 - if (unit === '(degree)') unitX =1350 + let unitX = this.width - this.paddingRight; + if (unit === '(degree)') unitX = this.width - this.paddingRight - 30; this.canvasContext.fillText(unit, unitX,50); }