|
@@ -5,7 +5,7 @@ import dayjs from 'dayjs';
|
|
import { TheChatView } from '@/components';
|
|
import { TheChatView } from '@/components';
|
|
import { dataApi } from '@/api/data';
|
|
import { dataApi } from '@/api/data';
|
|
import * as echarts from 'echarts';
|
|
import * as echarts from 'echarts';
|
|
-import { ForecastColumns, getEchartMultiLineOption } from './config';
|
|
|
|
|
|
+import { ForecastColumns, getEchartMultiLineOption, formatTofixed } from './config';
|
|
|
|
|
|
let echart = null;
|
|
let echart = null;
|
|
const formData = ref({ pageNum: 1 });
|
|
const formData = ref({ pageNum: 1 });
|
|
@@ -13,7 +13,7 @@ const pageCount = ref(0);
|
|
const echartRef = ref(null);
|
|
const echartRef = ref(null);
|
|
const tableData = ref([]);
|
|
const tableData = ref([]);
|
|
const timeRangeValue = ref(null);
|
|
const timeRangeValue = ref(null);
|
|
-const selectValue = ref('xsy1');
|
|
|
|
|
|
+const selectValue = ref('cod');
|
|
|
|
|
|
const selectOptions = [
|
|
const selectOptions = [
|
|
{ label: "#1NO₃⁻", value: 'xsy1' },
|
|
{ label: "#1NO₃⁻", value: 'xsy1' },
|
|
@@ -83,12 +83,15 @@ const initEchartData = async () => {
|
|
})
|
|
})
|
|
|
|
|
|
const reusltData = data.hs.data.splice(data.real.data.length, data.hs.data.length - data.real.data.length);
|
|
const reusltData = data.hs.data.splice(data.real.data.length, data.hs.data.length - data.real.data.length);
|
|
|
|
+
|
|
let xAxisData = [];
|
|
let xAxisData = [];
|
|
|
|
+
|
|
xAxisData = [...data.yy.time];
|
|
xAxisData = [...data.yy.time];
|
|
|
|
|
|
const echartData = [
|
|
const echartData = [
|
|
- { name: '预测值', val: [...data.hs.data, ...reusltData] },
|
|
|
|
- { name: '真实值', val: data.real.data }
|
|
|
|
|
|
+ { name: '真实值', val: data.real.data.map(item => formatTofixed(item)) },
|
|
|
|
+ { name: '预测值', val: [...data.hs.data.map(item => formatTofixed(item)), ...reusltData.map(item => formatTofixed(item))] },
|
|
|
|
+ { name: '机理预测值', val: data.jl.data.map(item => formatTofixed(item)) }
|
|
]
|
|
]
|
|
|
|
|
|
const specificData = new Array(data.hs.data.length).fill(null).concat( reusltData );
|
|
const specificData = new Array(data.hs.data.length).fill(null).concat( reusltData );
|
|
@@ -117,7 +120,6 @@ const getTableList = async () => {
|
|
qynh31: '#1缺氧氨氮',
|
|
qynh31: '#1缺氧氨氮',
|
|
qynh32: '#2缺氧氨氮'
|
|
qynh32: '#2缺氧氨氮'
|
|
}
|
|
}
|
|
-
|
|
|
|
tableData.value = rows.map(item => ({ ...item, category: whiteList[item.category] }));
|
|
tableData.value = rows.map(item => ({ ...item, category: whiteList[item.category] }));
|
|
pageCount.value = total;
|
|
pageCount.value = total;
|
|
}
|
|
}
|