|
@@ -539,7 +539,16 @@ const isloading = ref(false);
|
|
|
watchEffect(()=>{
|
|
watchEffect(()=>{
|
|
|
if(currentsensor.value && useWSStore().getMessage()[currentsensor.value.id] && useWSStore().getMessage()[currentsensor.value.id][currentname.value] ){
|
|
if(currentsensor.value && useWSStore().getMessage()[currentsensor.value.id] && useWSStore().getMessage()[currentsensor.value.id][currentname.value] ){
|
|
|
let data = useWSStore().getMessage()[currentsensor.value.id][currentname.value];
|
|
let data = useWSStore().getMessage()[currentsensor.value.id][currentname.value];
|
|
|
- historytabledata.value.push([moment(data.time).toDate(),data.value]);
|
|
|
|
|
|
|
+ var isadd = false;
|
|
|
|
|
+ historytabledata.value.forEach(i=>{
|
|
|
|
|
+ if(moment(data.time).utc()-moment(i[0]).utc()>10){
|
|
|
|
|
+ isadd = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ if(isadd){
|
|
|
|
|
+ historytabledata.value.push([moment(data.time).toDate(),data.value]);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
if(historytabledata.value.length>0){
|
|
if(historytabledata.value.length>0){
|
|
|
const usedmemoryInstance = echarts.init(chartlinediv.value, "macarons");
|
|
const usedmemoryInstance = echarts.init(chartlinediv.value, "macarons");
|