|
@@ -135,16 +135,16 @@ function cardClick(ind, item) {
|
|
|
clearTimeout(timer);
|
|
|
getMonitor(item.deviceID, true);
|
|
|
}
|
|
|
-function uniqueObjects(arr, key) {
|
|
|
- const unique = arr.map((e) => e[key])
|
|
|
- // 存储每个属性值
|
|
|
- .map((e, i, final) => final.indexOf(e) === i && i)
|
|
|
- // 移除重复值的索引
|
|
|
- .filter((e) => arr[e])
|
|
|
- // 映射到对应的对象
|
|
|
- .map((e) => arr[e]);
|
|
|
- return unique;
|
|
|
-}
|
|
|
+// function uniqueObjects(arr, key) {
|
|
|
+// const unique = arr.map((e) => e[key])
|
|
|
+// // 存储每个属性值
|
|
|
+// .map((e, i, final) => final.indexOf(e) === i && i)
|
|
|
+// // 移除重复值的索引
|
|
|
+// .filter((e) => arr[e])
|
|
|
+// // 映射到对应的对象
|
|
|
+// .map((e) => arr[e]);
|
|
|
+// return unique;
|
|
|
+// }
|
|
|
//顶部区域选项切换
|
|
|
function topAreaClick(index) {
|
|
|
activeIndex.value = index;
|
|
@@ -155,8 +155,8 @@ function topAreaClick(index) {
|
|
|
|
|
|
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'] })
|
|
|
- let unique = uniqueObjects(echartNow.value, 'time');
|
|
|
- let setData = [...unique].sort((a, b) => Date.parse(new Date(a.time)) - Date.parse(new Date(b.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)))
|
|
|
setData.forEach(el => {
|
|
|
if (el.value && el.value != '0' && el.value1!='0') {
|
|
|
echartDataFc.maxData.data.push(el.value);
|
|
@@ -217,8 +217,8 @@ function getSysWarnList(id, type) {
|
|
|
if (choiceData[activeIndex.value]) {
|
|
|
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'] })
|
|
|
- let unique = uniqueObjects(echartNow.value, 'time');
|
|
|
- let setData = [...unique].sort((a, b) => Date.parse(new Date(a.time)) - Date.parse(new Date(b.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)))
|
|
|
setData.forEach(el => {
|
|
|
if (el.value && el.value != '0' && el.value1!='0') {
|
|
|
echartDataFc.maxData.data.push(el.value);
|
|
@@ -238,8 +238,8 @@ function getSysWarnList(id, type) {
|
|
|
activeIndex.value = 0;
|
|
|
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'] })
|
|
|
- let unique = uniqueObjects(echartNow.value, 'time');
|
|
|
- let setData = [...unique].sort((a, b) => Date.parse(new Date(a.time)) - Date.parse(new Date(b.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)))
|
|
|
setData.forEach(el => {
|
|
|
if (el.value && el.value != '0' && el.value1!='0') {
|
|
|
echartDataFc.maxData.data.push(el.value);
|