Browse Source

commit

master
xuhuihui 3 years ago
parent
commit
a31acb9ee2
  1. 9
      04.系统编码/Frontend/src/components/RamanLidar.vue
  2. 11
      04.系统编码/Frontend/src/model/high-chart-create.ts
  3. 4
      04.系统编码/Frontend/src/uilts/box-drawer.ts

9
04.系统编码/Frontend/src/components/RamanLidar.vue

@ -268,6 +268,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import {onMounted, reactive, toRefs, watch} from 'vue'; import {onMounted, reactive, toRefs, watch} from 'vue';
import moment from "moment"; import moment from "moment";
import {post} from '../uilts/axios'; import {post} from '../uilts/axios';
@ -660,7 +661,7 @@ export default {
} }
let matrix = convertValueToBox(response.data); 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.setAxis(new CoordinateScale(options.timeArray), new CoordinateScale([0, 2000, 4000, 6000, 8000, 10000, 12000], true, true));
creates.extinctionBeforeDrawer.setColorChart(prepareExtinctionnColors()); creates.extinctionBeforeDrawer.setColorChart(prepareExtinctionnColors());
creates.extinctionBeforeDrawer.draw(); creates.extinctionBeforeDrawer.draw();
@ -787,7 +788,7 @@ export default {
} }
let matrix = converCloudRecognition(801, result, 'backscatter'); 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.setAxis(new CoordinateScale(options.timeArray), new CoordinateScale([0, 2000, 4000, 6000, 8000, 10000, 12000], true, true));
creates.backscatterDrawer.setColorChart(prepareBackscatterColors()); creates.backscatterDrawer.setColorChart(prepareBackscatterColors());
creates.backscatterDrawer.draw(); creates.backscatterDrawer.draw();
@ -948,7 +949,7 @@ export default {
} }
let matrix = converCloudRecognition(801, result, 'extinctionOptics'); 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.setAxis(new CoordinateScale(options.timeArray), new CoordinateScale([0, 2000, 4000, 6000, 8000, 10000, 12000], true, true));
creates.opticsExtinctionDrawer.setColorChart(prepareExtinctionnColors()); creates.opticsExtinctionDrawer.setColorChart(prepareExtinctionnColors());
creates.opticsExtinctionDrawer.draw(); creates.opticsExtinctionDrawer.draw();
@ -1001,7 +1002,7 @@ export default {
} }
let matrix = converCloudRecognition(801, result, 'extinction'); 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.setAxis(new CoordinateScale(options.timeArray), new CoordinateScale([0, 2000, 4000, 6000, 8000, 10000, 12000], true, true));
creates.extinctionDrawer.setColorChart(prepareExtinctionnColors()); creates.extinctionDrawer.setColorChart(prepareExtinctionnColors());
creates.extinctionDrawer.draw(); creates.extinctionDrawer.draw();

11
04.系统编码/Frontend/src/model/high-chart-create.ts

@ -1,7 +1,10 @@
import * as Highcharts from 'highcharts'; 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 readonly id: string;
private highChart: any; private highChart: any;
@ -12,7 +15,6 @@ export class HighChartCreate {
private legend: any = null; private legend: any = null;
private tooltip: any = null; private tooltip: any = null;
private time: any = null; private time: any = null;
constructor(id: string) { constructor(id: string) {
this.id = id; this.id = id;
} }
@ -55,7 +57,7 @@ export class HighChartCreate {
fontSize:'18px' fontSize:'18px'
}, },
formatter: function () { formatter: function () {
return Highcharts.dateFormat('%d日%H时', this.value); return Highcharts.dateFormat('%d日%H时', this.value);
} }
} }
// dateTimeLabelFormats: { // dateTimeLabelFormats: {
@ -157,7 +159,7 @@ export class HighChartCreate {
// 不换算单位, 不然出现 k // 不换算单位, 不然出现 k
Highcharts.setOptions({ Highcharts.setOptions({
lang: { lang: {
numericSymbols: null numericSymbols: null
}, },
}) })
@ -198,4 +200,3 @@ export class HighChartCreate {
} }
} }

4
04.系统编码/Frontend/src/uilts/box-drawer.ts

@ -278,8 +278,8 @@ export class BoxDrawer{
private drawTemperatureText(unit): void { private drawTemperatureText(unit): void {
this.canvasContext.font = "normal 35px 微软雅黑"; this.canvasContext.font = "normal 35px 微软雅黑";
this.canvasContext.fillStyle = "#000000"; this.canvasContext.fillStyle = "#000000";
let unitX = 1390 let unitX = this.width - this.paddingRight;
if (unit === '(degree)') unitX =1350 if (unit === '(degree)') unitX = this.width - this.paddingRight - 30;
this.canvasContext.fillText(unit, unitX,50); this.canvasContext.fillText(unit, unitX,50);
} }

Loading…
Cancel
Save