Commit 8238acd4 authored by van.chen's avatar van.chen

加入震动值

parent eec5c67b
...@@ -27,6 +27,13 @@ ...@@ -27,6 +27,13 @@
<div <div
[class]="!base.locker || base.locker !== '1.0' ? 'rightLabel danger' : 'rightLabel success'">{{base.locker === '1.0' ? '正常-关' : '异常-开'}}</div> [class]="!base.locker || base.locker !== '1.0' ? 'rightLabel danger' : 'rightLabel success'">{{base.locker === '1.0' ? '正常-关' : '异常-开'}}</div>
</div> </div>
<div class="rightLine per50">
<img class="rightIcon"
[src]="!base.tiltWarn ? '../../../../../assets/img/13.png' : '../../../../../assets/img/12.png'">
<span class="descLabel">震动值</span>
<div
[class]="!base.tiltWarn ? 'rightLabel danger' : 'rightLabel success'">{{base.light}}(°)</div>
</div>
</div> </div>
</div> </div>
<nz-card [nzBordered]="false"> <nz-card [nzBordered]="false">
...@@ -36,11 +43,13 @@ ...@@ -36,11 +43,13 @@
<div class="echartsPart" echarts [options]="weektilt"></div> <div class="echartsPart" echarts [options]="weektilt"></div>
<div class="echartsPart" echarts [options]="weektemp"></div> <div class="echartsPart" echarts [options]="weektemp"></div>
<div class="echartsPart" echarts [options]="weekhumid"></div> <div class="echartsPart" echarts [options]="weekhumid"></div>
<div class="echartsPart" echarts [options]="weeklight"></div>
</nz-tab> </nz-tab>
<nz-tab nzTitle="一月内"> <nz-tab nzTitle="一月内">
<div class="echartsPart" echarts [options]="monthtilt"></div> <div class="echartsPart" echarts [options]="monthtilt"></div>
<div class="echartsPart" echarts [options]="monthtemp"></div> <div class="echartsPart" echarts [options]="monthtemp"></div>
<div class="echartsPart" echarts [options]="monthhumid"></div> <div class="echartsPart" echarts [options]="monthhumid"></div>
<div class="echartsPart" echarts [options]="monthlight"></div>
</nz-tab> </nz-tab>
</nz-tabset> </nz-tabset>
</nz-card-tab> </nz-card-tab>
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
} }
.leftPart { .leftPart {
padding: 30px 20px; padding: 30px 20px;
line-height: 40px; line-height: 50px;
z-index: 5; z-index: 5;
display: inline-block; display: inline-block;
font-size: 17px; font-size: 17px;
...@@ -53,14 +53,14 @@ ...@@ -53,14 +53,14 @@
} }
.oneIcon{ .oneIcon{
display: inline-block; display: inline-block;
height: 40px; height: 50px;
width: 40px; width: 50px;
text-align: center; text-align: center;
margin: 0 10px; margin: 0 10px;
} }
.oneLabel { .oneLabel {
display: inline-block; display: inline-block;
width: calc(35% - 30px); width: calc(35% - 35px);
} }
.oneLine { .oneLine {
@media screen and (min-width: @screen-md) { @media screen and (min-width: @screen-md) {
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
} }
.oneValue { .oneValue {
display: inline-block; display: inline-block;
width: calc(64% - 30px); width: calc(64% - 35px);
} }
.rightPart { .rightPart {
z-index: 5; z-index: 5;
......
...@@ -21,10 +21,13 @@ export class ProProfileAdvancedComponent implements OnInit { ...@@ -21,10 +21,13 @@ export class ProProfileAdvancedComponent implements OnInit {
monthtemp: {}; monthtemp: {};
monthhumid: {}; monthhumid: {};
monthtilt: {}; monthtilt: {};
weeklight: {};
monthlight: {};
trans = { trans = {
temp: '温度数据', temp: '温度数据',
humid: '湿度数据', humid: '湿度数据',
tilt: '倾斜数据', tilt: '倾斜数据',
light: '震动数据',
month: '近一月', month: '近一月',
week: '近一周', week: '近一周',
}; };
...@@ -117,6 +120,7 @@ export class ProProfileAdvancedComponent implements OnInit { ...@@ -117,6 +120,7 @@ export class ProProfileAdvancedComponent implements OnInit {
if (res && res.towerNo) { if (res && res.towerNo) {
this.base = res; this.base = res;
this.base.tiltWarn = (res.tilt && Number(res.tilt) < 20 && Number(res.tilt) > -20) || res.tilt === 'N/A' ? true : false; this.base.tiltWarn = (res.tilt && Number(res.tilt) < 20 && Number(res.tilt) > -20) || res.tilt === 'N/A' ? true : false;
this.base.lightWarn = (res.tilt && Number(res.tilt) < 20 && Number(res.tilt) > -20) || res.tilt === 'N/A' ? true : false;
} else { } else {
this.message.error(res.message); this.message.error(res.message);
} }
...@@ -126,7 +130,7 @@ export class ProProfileAdvancedComponent implements OnInit { ...@@ -126,7 +130,7 @@ export class ProProfileAdvancedComponent implements OnInit {
getWeekCharts() { getWeekCharts() {
this.isLoading = true; this.isLoading = true;
const param = ['tilt', 'temp', 'humid']; const param = ['tilt', 'temp', 'humid', 'light'];
param.map((item, index) => { param.map((item, index) => {
this.getChart(item, 'week', index); this.getChart(item, 'week', index);
}); });
...@@ -134,7 +138,7 @@ export class ProProfileAdvancedComponent implements OnInit { ...@@ -134,7 +138,7 @@ export class ProProfileAdvancedComponent implements OnInit {
getMonthCharts() { getMonthCharts() {
this.isLoading = true; this.isLoading = true;
const param = ['tilt', 'temp', 'humid']; const param = ['tilt', 'temp', 'humid', 'light'];
param.map((item, index) => { param.map((item, index) => {
this.getChart(item, 'month', index); this.getChart(item, 'month', index);
}); });
...@@ -170,7 +174,7 @@ export class ProProfileAdvancedComponent implements OnInit { ...@@ -170,7 +174,7 @@ export class ProProfileAdvancedComponent implements OnInit {
} }
}); });
} }
if (index === 2) { if (index === 3) {
this.isLoading = false; this.isLoading = false;
} }
}); });
......
...@@ -7,7 +7,7 @@ export const environment = { ...@@ -7,7 +7,7 @@ export const environment = {
production: false, production: false,
useHash: true, useHash: true,
hmr: false, hmr: false,
baseUrl: 'http://192.168.1.13:8092' baseUrl: 'http://192.168.1.52:8092'
}; };
/* /*
......
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