|
|
@ -224,7 +224,7 @@ |
|
|
|
|
|
|
|
<div class="picture-container raman-picture-container" v-show="currentElement === 'extinction'"> |
|
|
|
<div class="picture special-picture"> |
|
|
|
<div v-loading="loadingExtinctionStatus" |
|
|
|
<div v-loading="loadingExtinctionBeforeStatus" |
|
|
|
style="width: 100%;" |
|
|
|
custom-class="loading" |
|
|
|
element-loading-text="加载中"> |
|
|
@ -243,7 +243,7 @@ |
|
|
|
|
|
|
|
<div class="picture-container raman-picture-container" v-show="currentElement === 'watervapor'"> |
|
|
|
<div class="picture special-picture"> |
|
|
|
<div v-loading="loadingWaterVaporStatus" |
|
|
|
<div v-loading="loadingWatervaporBeforeStatus" |
|
|
|
style="width: 100%" |
|
|
|
element-loading-text="加载中"> |
|
|
|
<canvas id='watervapor_chart-before'></canvas> |
|
|
@ -281,6 +281,9 @@ export default { |
|
|
|
name: 'RamanLidar', |
|
|
|
setup() { |
|
|
|
let timer = null; |
|
|
|
const quailtyTimes = ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", |
|
|
|
"14", "15", "16", "17", "18", "19", "20", "21", "22", "23"]; |
|
|
|
|
|
|
|
let creates: { |
|
|
|
boundaryLayerHeight: HighChartCreate |
|
|
|
cloudsHeight: HighChartCreate |
|
|
@ -291,6 +294,7 @@ export default { |
|
|
|
extinctionBeforeDrawer: HeatMapDrawer, |
|
|
|
extinctionDrawer: HeatMapDrawer, |
|
|
|
watervaporDrawer: HeatMapDrawer, |
|
|
|
watervaporBeforeDrawer: HeatMapDrawer, |
|
|
|
opticsExtinctionDrawer: HeatMapDrawer, |
|
|
|
singleWatervaporDrawer: HeatMapDrawer, |
|
|
|
cloudSolDrawer: HeatMapDrawer, |
|
|
@ -307,6 +311,7 @@ export default { |
|
|
|
extinctionDrawer: null, |
|
|
|
extinctionBeforeDrawer: null, |
|
|
|
watervaporDrawer: null, |
|
|
|
watervaporBeforeDrawer: null, |
|
|
|
singleWatervaporDrawer: null, |
|
|
|
opticsExtinctionDrawer: null, |
|
|
|
cloudSolDrawer: null, |
|
|
@ -343,6 +348,8 @@ export default { |
|
|
|
loadingCloudSolStatus: false, |
|
|
|
loadingCloudRecognitionStatus: false, |
|
|
|
loadingExtinctionStatus: false, |
|
|
|
loadingExtinctionBeforeStatus: false, |
|
|
|
loadingWatervaporBeforeStatus: false, |
|
|
|
loadingWaterVaporStatus: false, |
|
|
|
loadingBackscatterStatus: false, |
|
|
|
loadingLidarRatioStatus: false, |
|
|
@ -589,40 +596,72 @@ export default { |
|
|
|
case 'extinction' : |
|
|
|
// initTimeLineDay() |
|
|
|
reloadExtinctionBefore(); |
|
|
|
reloadCloudRecognition('extinction', 801, 'extinction', drawExtinctionAfter); |
|
|
|
reloadCloudRecognition('extinction', 801, 'extinction', drawExtinctionAfter, true); |
|
|
|
break; |
|
|
|
case 'watervapor' : |
|
|
|
// initTimeLineDay() |
|
|
|
reloadCloudRecognition('watervapor', 101, 'watervapor', drawWatervaporBefore); |
|
|
|
reloadCloudRecognition('watervapor', 101, 'watervapor', drawWatervaporAfter); |
|
|
|
reloadWatervaporBefore(); |
|
|
|
reloadCloudRecognition('watervapor', 101, 'watervapor', drawWatervaporAfter, true); |
|
|
|
break; |
|
|
|
default: |
|
|
|
throw new Error("无效的type类型"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const reloadWatervaporBefore = () => { |
|
|
|
options.loadingWatervaporBeforeStatus = true; |
|
|
|
let params = { |
|
|
|
date: moment(options.date).add(-1, 'd').format('YYYY-MM-DD'), |
|
|
|
var: 'Vapor Mixing Ratio', |
|
|
|
locate: options.currentRegion |
|
|
|
} |
|
|
|
post("/qualityCompare/findByTimeAndElement", params).then((response: any) => { |
|
|
|
options.loadingWatervaporBeforeStatus = false; |
|
|
|
if (response.error != 0){ |
|
|
|
console.log("未找到质控前数据文件"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (creates.watervaporBeforeDrawer != null) { |
|
|
|
creates.watervaporBeforeDrawer.close(); |
|
|
|
} |
|
|
|
|
|
|
|
let matrix = convertValueToBox(response.data); |
|
|
|
creates.watervaporBeforeDrawer = new HeatMapDrawer(800, 650, matrix, "watervapor_chart-before", 'g/kg','质控前'); |
|
|
|
creates.watervaporBeforeDrawer.setAxis(new CoordinateScale(quailtyTimes), new CoordinateScale([0, 500, 1000, 1500], true, true)); |
|
|
|
creates.watervaporBeforeDrawer.setColorChart(prepareWatervaporColors()); |
|
|
|
creates.watervaporBeforeDrawer.draw(); |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
const reloadExtinctionBefore = () => { |
|
|
|
options.loadingExtinctionBeforeStatus = true; |
|
|
|
let params = { |
|
|
|
date: moment(options.date).format('YYYY-MM-DD'), |
|
|
|
date: moment(options.date).add(-1, 'd').format('YYYY-MM-DD'), |
|
|
|
var: 'MEXT', |
|
|
|
locate: options.currentRegion |
|
|
|
} |
|
|
|
post("/qualityCompare/findByTimeAndElement", params).then((response: any) => { |
|
|
|
options.loadingExtinctionBeforeStatus = false; |
|
|
|
if (response.error != 0){ |
|
|
|
console.log("未找到质控前数据文件"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (creates.extinctionBeforeDrawer != null) { |
|
|
|
creates.extinctionBeforeDrawer.close(); |
|
|
|
} |
|
|
|
|
|
|
|
let matrix = convertValueToBox(response.data); |
|
|
|
creates.extinctionBeforeDrawer = new HeatMapDrawer(800, 650, matrix, "extinction_chart-before", 'km/sr','质控后'); |
|
|
|
creates.extinctionBeforeDrawer.setAxis(new CoordinateScale(options.timeArray), new CoordinateScale([0, 2000, 4000, 6000, 8000, 10000, 12000], true, true)); |
|
|
|
creates.extinctionBeforeDrawer = new HeatMapDrawer(800, 650, matrix, "extinction_chart-before", 'km/sr','质控前'); |
|
|
|
creates.extinctionBeforeDrawer.setAxis(new CoordinateScale(quailtyTimes), new CoordinateScale([0, 2000, 4000, 6000, 8000, 10000, 12000], true, true)); |
|
|
|
creates.extinctionBeforeDrawer.setColorChart(prepareExtinctionnColors()); |
|
|
|
creates.extinctionBeforeDrawer.draw(); |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
const convertValueToBox = (data) => { |
|
|
|
let timeMoment = moment(options.date).add(-1, 'd'); |
|
|
|
let timeMoment = moment(options.date).set('h', 0).add(-1, 'd'); |
|
|
|
let timeFormat = timeMoment.format("MM月DD日HH时"); |
|
|
|
|
|
|
|
let boxes = new Array<Array<Box>>(); |
|
|
@ -635,7 +674,7 @@ export default { |
|
|
|
|
|
|
|
let rows = new Array<Box>(r.length); |
|
|
|
for (let h = 0, len = r.length; h < len; h++) { |
|
|
|
rows[h] = new Box(index - 1, h, 0, 0, r[h], h * 15, timeFormat, "米"); |
|
|
|
rows[h] = new Box(index - 1, h, 0, 0, parseFloat(r[h]), h * 15, timeFormat, "米"); |
|
|
|
} |
|
|
|
index++; |
|
|
|
boxes.push(rows); |
|
|
@ -919,21 +958,6 @@ export default { |
|
|
|
creates.singleWatervaporDrawer.draw(); |
|
|
|
} |
|
|
|
|
|
|
|
const drawWatervaporBefore = (result: CustomeArray<any>) => { |
|
|
|
if (result.length != 24) return; |
|
|
|
|
|
|
|
options.loadingWaterVaporStatus = false; |
|
|
|
if (creates.watervaporDrawer != null) { |
|
|
|
creates.watervaporDrawer.close(); |
|
|
|
} |
|
|
|
|
|
|
|
let matrix = converCloudRecognition(101, result, 'watervapor'); |
|
|
|
creates.watervaporDrawer = new HeatMapDrawer(800, 650, matrix, "watervapor_chart-before",'g/kg', '质控前'); |
|
|
|
creates.watervaporDrawer.setAxis(new CoordinateScale(options.timeArray), new CoordinateScale([0, 500, 1000, 1500], true, true)); |
|
|
|
creates.watervaporDrawer.setColorChart(prepareWatervaporColors()); |
|
|
|
creates.watervaporDrawer.draw(); |
|
|
|
} |
|
|
|
|
|
|
|
const drawWatervaporAfter = (result: CustomeArray<any>) => { |
|
|
|
if (result.length != 24) return; |
|
|
|
|
|
|
@ -943,8 +967,8 @@ export default { |
|
|
|
} |
|
|
|
|
|
|
|
let matrix = converCloudRecognition(101, result, 'watervapor'); |
|
|
|
creates.watervaporDrawer = new HeatMapDrawer(800, 650, matrix, "watervapor_chart-after",'g/kg', '质控后'); |
|
|
|
creates.watervaporDrawer.setAxis(new CoordinateScale(options.timeArray), new CoordinateScale([0, 500, 1000, 1500], true, true)); |
|
|
|
creates.watervaporDrawer = new HeatMapDrawer(800, 650, matrix, "watervapor_chart-after",'g/kg', '质控前'); |
|
|
|
creates.watervaporDrawer.setAxis(new CoordinateScale(quailtyTimes), new CoordinateScale([0, 500, 1000, 1500], true, true)); |
|
|
|
creates.watervaporDrawer.setColorChart(prepareWatervaporColors()); |
|
|
|
creates.watervaporDrawer.draw(); |
|
|
|
} |
|
|
@ -966,7 +990,7 @@ export default { |
|
|
|
|
|
|
|
let matrix = converCloudRecognition(801, result, 'extinction'); |
|
|
|
creates.extinctionDrawer = new HeatMapDrawer(800, 650, matrix, "extinction_chart-after", 'km/sr','质控后'); |
|
|
|
creates.extinctionDrawer.setAxis(new CoordinateScale(options.timeArray), new CoordinateScale([0, 2000, 4000, 6000, 8000, 10000, 12000], true, true)); |
|
|
|
creates.extinctionDrawer.setAxis(new CoordinateScale(quailtyTimes), new CoordinateScale([0, 2000, 4000, 6000, 8000, 10000, 12000], true, true)); |
|
|
|
creates.extinctionDrawer.setColorChart(prepareExtinctionnColors()); |
|
|
|
creates.extinctionDrawer.draw(); |
|
|
|
} |
|
|
@ -980,10 +1004,12 @@ export default { |
|
|
|
return colorChart; |
|
|
|
} |
|
|
|
|
|
|
|
const reloadCloudRecognition = (type: string, capacity: number, element: string, callback: any) => { |
|
|
|
const reloadCloudRecognition = (type: string, capacity: number, element: string, callback: any, isDay: boolean = false) => { |
|
|
|
preprocessing(type); |
|
|
|
let result = new CustomeArray(callback); |
|
|
|
let time = moment(options.date); |
|
|
|
if (isDay) time.set('h', 23).add(-1, 'd'); |
|
|
|
|
|
|
|
options.timeArray = [] |
|
|
|
for (let index = 0; index < 24; index++) { |
|
|
|
reloadSingleCloudRecognition(capacity, time.clone().add(-index, 'h').format('M_D_H'), element, result); |
|
|
|