|
@@ -188,7 +188,11 @@ export default {
|
|
|
{ label: "PO₄³⁻ ", value: 'zlsy' },
|
|
|
{ label: "NH₃-N ", value: 'nh3' },
|
|
|
{ label: "COD ", value: 'cod' },
|
|
|
- { label: "SS ", value: 'ss' }
|
|
|
+ { label: "SS ", value: 'ss' },
|
|
|
+ { label: "#1缺氧硝酸盐 ", value: 'qyxsy1' },
|
|
|
+ { label: "#2缺氧硝酸盐 ", value: 'qyxsy2' },
|
|
|
+ { label: "#1缺氧氨氮 ", value: 'qynh31' },
|
|
|
+ { label: "#2缺氧氨氮 ", value: 'qynh32' }
|
|
|
],
|
|
|
// 查询参数
|
|
|
queryParams: {
|
|
@@ -244,17 +248,28 @@ export default {
|
|
|
}
|
|
|
|
|
|
const data = await getEchartData({ category: this.activeItem.value, timeBegin, timeEnd });
|
|
|
- console.log(data);
|
|
|
+
|
|
|
+ Object.keys(data).forEach(key => {
|
|
|
+ const len = data[key].data.length;
|
|
|
+ console.log( data[key].data[len - 1] );
|
|
|
+ if ( !data[key].data[len - 1] ) {
|
|
|
+ data[key].data.pop()
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ const reusltData = data.hs.data.splice(data.real.data.length, data.hs.data.length - data.real.data.length);
|
|
|
+ // const reusltTime = data.hs.time.splice(data.real.time.length, data.hs.time.length - data.real.time.length);
|
|
|
+ // console.log( reusltData, reusltTime );
|
|
|
let xAxisData = [];
|
|
|
- const realOneList = [];
|
|
|
- const realTwoList = [];
|
|
|
- const realThreeList = [];
|
|
|
- const hsForecastOneList = [];
|
|
|
- const hsForecastTwoList = [];
|
|
|
- const hsForecastThreeList = [];
|
|
|
- const yyForecastOneList = [];
|
|
|
- const yyForecastTwoList = [];
|
|
|
- const yyForecastThreeList = [];
|
|
|
+ // const realOneList = [];
|
|
|
+ // const realTwoList = [];
|
|
|
+ // const realThreeList = [];
|
|
|
+ // const hsForecastOneList = [];
|
|
|
+ // const hsForecastTwoList = [];
|
|
|
+ // const hsForecastThreeList = [];
|
|
|
+ // const yyForecastOneList = [];
|
|
|
+ // const yyForecastTwoList = [];
|
|
|
+ // const yyForecastThreeList = [];
|
|
|
|
|
|
// data.map(item => {
|
|
|
// const {
|
|
@@ -275,10 +290,10 @@ export default {
|
|
|
// yyForecastThreeList.push(yyForecastThree);
|
|
|
// })
|
|
|
|
|
|
- xAxisData = data.yy.time
|
|
|
+ xAxisData = [...data.yy.time];
|
|
|
|
|
|
const echartData = [
|
|
|
- { name: 'TFT', val: data.hs.data },
|
|
|
+ { name: 'TFT', val: [...data.hs.data, ...reusltData] },
|
|
|
{ name: '真实值', val: data.real.data },
|
|
|
{ name: 'LSTM', val: data.yy.data },
|
|
|
// { name: 'TFTpre_1', val: hsForecastOneList },
|
|
@@ -289,7 +304,9 @@ export default {
|
|
|
// { name: 'LSTMpre_3', val: yyForecastThreeList }
|
|
|
]
|
|
|
|
|
|
- const option = getEchartLineOption({ xAxisData, echartData });
|
|
|
+ const specificData = new Array(data.hs.data.length).fill(null).concat( reusltData );
|
|
|
+
|
|
|
+ const option = getEchartLineOption({ xAxisData, echartData, specificData:specificData });
|
|
|
|
|
|
echart.setOption(option);
|
|
|
|
|
@@ -356,6 +373,10 @@ export default {
|
|
|
nh3: 'NH₃',
|
|
|
cod: 'COD',
|
|
|
ss: 'SS',
|
|
|
+ qyxsy1: '#1缺氧硝酸盐',
|
|
|
+ qyxsy2: '#2缺氧硝酸盐',
|
|
|
+ qynh31: '#1缺氧氨氮',
|
|
|
+ qynh32: '#2缺氧氨氮'
|
|
|
}
|
|
|
this.comparisonList = response.rows.map(item => ({ ...item, category: whiteList[item.category] }));
|
|
|
this.total = response.total;
|