|
@@ -110,6 +110,7 @@ let gridV = reactive({
|
|
let cardListTf = reactive<any[]>([])
|
|
let cardListTf = reactive<any[]>([])
|
|
let router = useRouter()
|
|
let router = useRouter()
|
|
let echartNow = ref<any[]>([])
|
|
let echartNow = ref<any[]>([])
|
|
|
|
+let echartYc=reactive<any[]>([])
|
|
|
|
|
|
// https获取监测数据
|
|
// https获取监测数据
|
|
let timer: null | NodeJS.Timeout = null;
|
|
let timer: null | NodeJS.Timeout = null;
|
|
@@ -152,11 +153,12 @@ function topAreaClick(index) {
|
|
echartDataFc.minData.data.length = 0;
|
|
echartDataFc.minData.data.length = 0;
|
|
echartDataFc.aveValue.data.length = 0;
|
|
echartDataFc.aveValue.data.length = 0;
|
|
echartDataFc.xData.length = 0;
|
|
echartDataFc.xData.length = 0;
|
|
|
|
+ echartYc.length=0
|
|
|
|
|
|
echartNow.value = JSON.parse(choiceData[index].readData.expectInfo)['list']
|
|
echartNow.value = JSON.parse(choiceData[index].readData.expectInfo)['list']
|
|
- echartNow.value.push({ time: JSON.parse(choiceData[index].readData.expectInfo)['nowTime'], value: JSON.parse(choiceData[index].readData.expectInfo)['nowVal'], value1: JSON.parse(choiceData[index].readData.expectInfo)['aveVal'] })
|
|
|
|
|
|
+ echartYc.push({ time: JSON.parse(choiceData[index].readData.expectInfo)['nowTime'], value: JSON.parse(choiceData[index].readData.expectInfo)['nowVal'], value1: JSON.parse(choiceData[index].readData.expectInfo)['aveVal'] })
|
|
// let unique = uniqueObjects(echartNow.value, 'time');
|
|
// let unique = uniqueObjects(echartNow.value, 'time');
|
|
- let setData = [...echartNow.value].sort((a, b) => Date.parse(new Date(a.time)) - Date.parse(new Date(b.time)))
|
|
|
|
|
|
+ let setData = [...echartNow.value,echartYc].sort((a, b) => Date.parse(new Date(a.time)) - Date.parse(new Date(b.time)))
|
|
setData.forEach(el => {
|
|
setData.forEach(el => {
|
|
if (el.value && el.value != '0' && el.value1!='0') {
|
|
if (el.value && el.value != '0' && el.value1!='0') {
|
|
echartDataFc.maxData.data.push(el.value);
|
|
echartDataFc.maxData.data.push(el.value);
|
|
@@ -216,9 +218,9 @@ function getSysWarnList(id, type) {
|
|
|
|
|
|
if (choiceData[activeIndex.value]) {
|
|
if (choiceData[activeIndex.value]) {
|
|
echartNow.value = JSON.parse(choiceData[activeIndex.value].readData.expectInfo)['list']
|
|
echartNow.value = JSON.parse(choiceData[activeIndex.value].readData.expectInfo)['list']
|
|
- echartNow.value.push({ time: JSON.parse(choiceData[activeIndex.value].readData.expectInfo)['nowTime'], value: JSON.parse(choiceData[activeIndex.value].readData.expectInfo)['nowVal'], value1: JSON.parse(choiceData[activeIndex.value].readData.expectInfo)['aveVal'] })
|
|
|
|
|
|
+ echartYc.push({ time: JSON.parse(choiceData[activeIndex.value].readData.expectInfo)['nowTime'], value: JSON.parse(choiceData[activeIndex.value].readData.expectInfo)['nowVal'], value1: JSON.parse(choiceData[activeIndex.value].readData.expectInfo)['aveVal'] })
|
|
// let unique = uniqueObjects(echartNow.value, 'time');
|
|
// let unique = uniqueObjects(echartNow.value, 'time');
|
|
- let setData = [...echartNow.value].sort((a, b) => Date.parse(new Date(a.time)) - Date.parse(new Date(b.time)))
|
|
|
|
|
|
+ let setData = [...echartNow.value,echartYc].sort((a, b) => Date.parse(new Date(a.time)) - Date.parse(new Date(b.time)))
|
|
setData.forEach(el => {
|
|
setData.forEach(el => {
|
|
if (el.value && el.value != '0' && el.value1!='0') {
|
|
if (el.value && el.value != '0' && el.value1!='0') {
|
|
echartDataFc.maxData.data.push(el.value);
|
|
echartDataFc.maxData.data.push(el.value);
|
|
@@ -237,9 +239,9 @@ function getSysWarnList(id, type) {
|
|
} else {
|
|
} else {
|
|
activeIndex.value = 0;
|
|
activeIndex.value = 0;
|
|
echartNow.value = JSON.parse(choiceData[activeIndex.value].readData.expectInfo)['list']
|
|
echartNow.value = JSON.parse(choiceData[activeIndex.value].readData.expectInfo)['list']
|
|
- echartNow.value.push({ time: JSON.parse(choiceData[activeIndex.value].readData.expectInfo)['nowTime'], value: JSON.parse(choiceData[activeIndex.value].readData.expectInfo)['nowVal'], value1: JSON.parse(choiceData[activeIndex.value].readData.expectInfo)['aveVal'] })
|
|
|
|
|
|
+ echartYc.push({ time: JSON.parse(choiceData[activeIndex.value].readData.expectInfo)['nowTime'], value: JSON.parse(choiceData[activeIndex.value].readData.expectInfo)['nowVal'], value1: JSON.parse(choiceData[activeIndex.value].readData.expectInfo)['aveVal'] })
|
|
// let unique = uniqueObjects(echartNow.value, 'time');
|
|
// let unique = uniqueObjects(echartNow.value, 'time');
|
|
- let setData = [...echartNow.value].sort((a, b) => Date.parse(new Date(a.time)) - Date.parse(new Date(b.time)))
|
|
|
|
|
|
+ let setData = [...echartNow.value,echartYc].sort((a, b) => Date.parse(new Date(a.time)) - Date.parse(new Date(b.time)))
|
|
setData.forEach(el => {
|
|
setData.forEach(el => {
|
|
if (el.value && el.value != '0' && el.value1!='0') {
|
|
if (el.value && el.value != '0' && el.value1!='0') {
|
|
echartDataFc.maxData.data.push(el.value);
|
|
echartDataFc.maxData.data.push(el.value);
|