Browse Source

commit

master
xuhuihui 3 years ago
parent
commit
5cae87dac3
  1. 35
      04.系统编码/Frontend/src/components/RamanLidar.vue

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

@ -246,7 +246,7 @@ export default {
const boundaryLayerHeightInit = () => { const boundaryLayerHeightInit = () => {
creates.boundaryLayerHeight = new HighChartCreate('BoundaryLayerHeight'); creates.boundaryLayerHeight = new HighChartCreate('BoundaryLayerHeight');
creates.boundaryLayerHeight.setChart(); creates.boundaryLayerHeight.setChart();
creates.boundaryLayerHeight.setXAxis('时间(分钟)', false); creates.boundaryLayerHeight.setXAxis('时间(小时)', false);
creates.boundaryLayerHeight.setYAxis('边界层高度(米)', 3000, 0, 500, 7); creates.boundaryLayerHeight.setYAxis('边界层高度(米)', 3000, 0, 500, 7);
creates.boundaryLayerHeight.setLegend(); creates.boundaryLayerHeight.setLegend();
creates.boundaryLayerHeight.setTooltip('{point.category}: {point.y}(m)'); creates.boundaryLayerHeight.setTooltip('{point.category}: {point.y}(m)');
@ -300,28 +300,28 @@ export default {
const reloadChangeData = () => { const reloadChangeData = () => {
cancelRequest(); cancelRequest();
if (options.currentTab === 'boundary-layer-height') { if (options.currentTab === 'boundary-layer-height') {
reloadCloudRecognition(101, 'watervapor', drawSingleWatervapor); // reloadCloudRecognition(101, 'watervapor', drawSingleWatervapor);
} else if (options.currentTab === 'optical-property') { } else if (options.currentTab === 'optical-property') {
// extinctionApi() // extinctionApi()
// LidarRatioApi() // LidarRatioApi()
reloadCloudRecognition(801, 'extinction', drawOpticsExtinction); // reloadCloudRecognition(801, 'extinction', drawOpticsExtinction);
} else if (options.currentTab === 'aerosol-product') { } else if (options.currentTab === 'aerosol-product') {
// boundaryLayerHeightDate() // boundaryLayerHeightDate()
reloadChartsRecognition('pblh', drawCharts) reloadChartsRecognition('pblh', drawCharts)
reloadCloudRecognition(201, 'pm2_5', drawPm2Point5); reloadCloudRecognition(201, 'pm2_5', drawPm2Point5);
reloadCloudRecognition(201, 'pm10', drawPm10); // reloadCloudRecognition(201, 'pm10', drawPm10);
// boundaryCharacteristicApi() // boundaryCharacteristicApi()
//aerosolApi() //aerosolApi()
} else if (options.currentTab === 'BingoCloud') { } else if (options.currentTab === 'BingoCloud') {
//layerTypeApi() //layerTypeApi()
// cloudsHeightApi() // cloudsHeightApi()
// cloudTopHeightApi() // cloudTopHeightApi()
reloadCloudRecognition(801, 'layertype', drawCloudSol); // reloadCloudRecognition(801, 'layertype', drawCloudSol);
} else if (options.currentTab === 'MWR') { } else if (options.currentTab === 'MWR') {
//waterVapourApi() //waterVapourApi()
reloadCloudRecognition(801, 'layertype', drawCloudRecognition); // reloadCloudRecognition(801, 'layertype', drawCloudRecognition);
reloadCloudRecognition(801, 'extinction', drawExtinction); // reloadCloudRecognition(801, 'extinction', drawExtinction);
reloadCloudRecognition(101, 'watervapor', drawWatervapor); // reloadCloudRecognition(101, 'watervapor', drawWatervapor);
} }
} }
@ -334,11 +334,9 @@ export default {
const drawPm2Point5 = (result: CustomeArray<any>) => { const drawPm2Point5 = (result: CustomeArray<any>) => {
if (result.length != 24) return; if (result.length != 24) return;
if (creates.pm2Point5Drawer != null){ if (creates.pm2Point5Drawer != null){
creates.pm2Point5Drawer.close(); creates.pm2Point5Drawer.close();
} }
let matrix = converCloudRecognition(201, result); let matrix = converCloudRecognition(201, result);
creates.pm2Point5Drawer = new HeatMapDrawer(800, 600, matrix, "pm2_5_chart", '米'); creates.pm2Point5Drawer = new HeatMapDrawer(800, 600, matrix, "pm2_5_chart", '米');
creates.pm2Point5Drawer.setAxis(new CoordinateScale([0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24]), new CoordinateScale([0, 1000, 2000, 3000], true, true)); creates.pm2Point5Drawer.setAxis(new CoordinateScale([0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24]), new CoordinateScale([0, 1000, 2000, 3000], true, true));
@ -362,7 +360,21 @@ export default {
const drawCharts = (result: CustomeArray<any>) => { const drawCharts = (result: CustomeArray<any>) => {
if (result.length != 24) return; if (result.length != 24) return;
console.log(result) prepareChartData(result)
}
const prepareChartData = (result) => {
options.boundaryLayerHeightList = []
result.sort((x, y) => moment(x.time, 'M_D_H').isBefore(moment(y.time, 'M_D_H')) ? -1 : 1);
result.forEach(item => {
if (item.data )
options.boundaryLayerHeightList.push(item.data)
if (item.data == null ) {
}
})
creates.boundaryLayerHeight.updateSeries(0, options.boundaryLayerHeightList)
} }
const preparePmColors = () => { const preparePmColors = () => {
return new ColorChart(['#F6EF20','#FEC338', '#C5C22A', '#72CD64', '#31C69F', '#01B8CA', '#259BE8', '#327CFC', '#4853F4', '#422EC1'], return new ColorChart(['#F6EF20','#FEC338', '#C5C22A', '#72CD64', '#31C69F', '#01B8CA', '#259BE8', '#327CFC', '#4853F4', '#422EC1'],
@ -510,7 +522,6 @@ export default {
} }
return; return;
} }
const interval = Math.round(60 / r.data[0].length); const interval = Math.round(60 / r.data[0].length);
for(let h = 0, len = r.data.length; h < len; h++){ for(let h = 0, len = r.data.length; h < len; h++){
let tempIndex = parseInt(index + ""); let tempIndex = parseInt(index + "");

Loading…
Cancel
Save