Commit 563a64fb authored by zhuangzhuang's avatar zhuangzhuang

修改首页设备在线离线,以及时间

parent 23c37574
...@@ -42,12 +42,12 @@ ...@@ -42,12 +42,12 @@
<div class="rightCon"> <div class="rightCon">
<div class="block1" *ngIf="item.yewei || item.yewei === 0">池体液位: &nbsp;&nbsp;{{item.yewei}} m</div> <div class="block1" *ngIf="item.yewei || item.yewei === 0">池体液位: &nbsp;&nbsp;{{item.yewei}} m</div>
<div class="block2" *ngIf="item.temp || item.temp === 0">液体温度: &nbsp;&nbsp;{{item.temp}} ℃</div> <div class="block2" *ngIf="item.temp || item.temp === 0">液体温度: &nbsp;&nbsp;{{item.temp}} ℃</div>
<div class="block2">运行状态: &nbsp;&nbsp;{{item.state ? '工作中' : '离线'}} </div> <div class="block2">运行状态: &nbsp;&nbsp;{{item.state ? '工作中' : '未运行'}} </div>
</div> </div>
</div> </div>
<div class="bottom"> <div class="bottom">
<div [ngClass]="{'sucCir': item.state, 'errCir': !item.state}"></div>&nbsp; <div [ngClass]="{'sucCir': item.state, 'errCir': !item.state}"></div>&nbsp;
<span style="font-size: 13px">{{item.state ? '在线' : '离线'}}</span> <span style="font-size: 13px">{{item.online ? '在线' : '离线'}}</span>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -85,9 +85,10 @@ export class HomePage implements OnInit, OnDestroy { ...@@ -85,9 +85,10 @@ export class HomePage implements OnInit, OnDestroy {
temp: value.temp, temp: value.temp,
img: this.getImgName(value.fieldRegionName), img: this.getImgName(value.fieldRegionName),
url: value.fieldRegionGroup === '中转池自动控制组' ? 'east' : 'other', url: value.fieldRegionGroup === '中转池自动控制组' ? 'east' : 'other',
time: new Date().getTime(),
state: value.state, state: value.state,
group: value.fieldRegionGroup group: value.fieldRegionGroup,
online: value.online,
time: value.ts
}; };
this.items.push(itemInfo); this.items.push(itemInfo);
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment