|
@@ -159,7 +159,7 @@ function topAreaClick(index) {
|
|
|
echartDat.push({ id: '1', time: JSON.parse(choiceData[index].readData.expectInfo)['aveTime'], value: JSON.parse(choiceData[index].readData.expectInfo)['aveVal'] })
|
|
|
echartDat.push({ id: '2', time: JSON.parse(choiceData[index].readData.expectInfo)['nowTime'], value: JSON.parse(choiceData[index].readData.expectInfo)['nowVal'] })
|
|
|
let unique = uniqueObjects(echartDat, 'time');
|
|
|
- let setData = [...echartDatas.value, ...unique]
|
|
|
+ let setData = [...echartDatas.value, ...unique].sort((a,b)=>Date.parse(new Date(a.time)) - Date.parse(new Date(b.time)))
|
|
|
setData.forEach((m, n) => {
|
|
|
echartDataFc.xData.push(m.time);
|
|
|
if (unique.filter(t => t.time == m.time).length != 0 && m.id == '1') {
|
|
@@ -230,7 +230,7 @@ function getSysWarnList(id, type) {
|
|
|
echartDat.push({ id: '1', time: JSON.parse(choiceData[activeIndex.value].readData.expectInfo)['aveTime'], value: JSON.parse(choiceData[activeIndex.value].readData.expectInfo)['aveVal'] })
|
|
|
echartDat.push({ id: '2', time: JSON.parse(choiceData[activeIndex.value].readData.expectInfo)['nowTime'], value: JSON.parse(choiceData[activeIndex.value].readData.expectInfo)['nowVal'] })
|
|
|
let unique = uniqueObjects(echartDat, 'time');
|
|
|
- let setData = [...echartDatas.value, ...unique]
|
|
|
+ let setData = [...echartDatas.value, ...unique].sort((a,b)=>Date.parse(new Date(a.time)) - Date.parse(new Date(b.time)))
|
|
|
setData.forEach((m, n) => {
|
|
|
echartDataFc.xData.push(m.time);
|
|
|
if (unique.filter(t => t.time == m.time).length != 0 && m.id == '1') {
|
|
@@ -261,7 +261,7 @@ function getSysWarnList(id, type) {
|
|
|
echartDat.push({ id: '1', time: JSON.parse(choiceData[activeIndex.value].readData.expectInfo)['aveTime'], value: JSON.parse(choiceData[activeIndex.value].readData.expectInfo)['aveVal'] })
|
|
|
echartDat.push({ id: '2', time: JSON.parse(choiceData[activeIndex.value].readData.expectInfo)['nowTime'], value: JSON.parse(choiceData[activeIndex.value].readData.expectInfo)['nowVal'] })
|
|
|
let unique = uniqueObjects(echartDat, 'time');
|
|
|
- let setData = [...echartDatas.value, ...unique]
|
|
|
+ let setData = [...echartDatas.value, ...unique].sort((a,b)=>Date.parse(new Date(a.time)) - Date.parse(new Date(b.time)))
|
|
|
setData.forEach((m, n) => {
|
|
|
echartDataFc.xData.push(m.time);
|
|
|
if (unique.filter(t => t.time == m.time).length != 0 && m.id == '1') {
|