|
@@ -491,9 +491,14 @@ const setLineparames = (
|
|
selectData: Array<AnyObject>
|
|
selectData: Array<AnyObject>
|
|
) => {
|
|
) => {
|
|
// 横坐标时间点
|
|
// 横坐标时间点
|
|
- xAxisParamsData.value = dataAll.map((its) => moment(its.data._ts).format('HH:mm:ss') );
|
|
|
|
|
|
+ xAxisParamsData.value = dataAll.map((its) => moment(its.data._ts).format('HH:mm:ss') ).slice(-30);
|
|
// 折线图数据
|
|
// 折线图数据
|
|
- seriesParamsData.value = selectData;
|
|
|
|
|
|
+ seriesParamsData.value = selectData.map((its) => {
|
|
|
|
+ return {
|
|
|
|
+ ...its,
|
|
|
|
+ data:its.data.slice(-30)
|
|
|
|
+ }
|
|
|
|
+ });
|
|
// 图例
|
|
// 图例
|
|
legendPramsData.value = selectData.map((its) => its.name);
|
|
legendPramsData.value = selectData.map((its) => its.name);
|
|
};
|
|
};
|
|
@@ -639,6 +644,10 @@ const runstatusMessage = (data: { label: string; state: 0 | 1 | 2 }) => {
|
|
};
|
|
};
|
|
const workMessage = (data: Object) => {
|
|
const workMessage = (data: Object) => {
|
|
// 获取工况数据 一小时来一次
|
|
// 获取工况数据 一小时来一次
|
|
|
|
+ data.forEach(element => {
|
|
|
|
+ element.type=Math.floor(Math.random() * 3)
|
|
|
|
+
|
|
|
|
+ });
|
|
let currentValue=workParamsAllRef.value
|
|
let currentValue=workParamsAllRef.value
|
|
workParamsAllRef.value = currentValue.concat(data);
|
|
workParamsAllRef.value = currentValue.concat(data);
|
|
workChange()
|
|
workChange()
|
|
@@ -777,7 +786,7 @@ const healthyMessage = (data: Object) => {
|
|
|
|
|
|
// 获取健康数据
|
|
// 获取健康数据
|
|
// let obj=determineHealthStatus(data.avg_num)
|
|
// let obj=determineHealthStatus(data.avg_num)
|
|
- let obj=`${data.sha}(${data.avg_num*100}%)`
|
|
|
|
|
|
+ let obj=`${data.sha}(${data.avg_num}%)`
|
|
healthyStatusText.value=obj
|
|
healthyStatusText.value=obj
|
|
xAxisData.value.push(moment(data.date).format('HH:mm:ss'));
|
|
xAxisData.value.push(moment(data.date).format('HH:mm:ss'));
|
|
seriesData.value[0].data.push(data.avg_num)
|
|
seriesData.value[0].data.push(data.avg_num)
|