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

加入震动值

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