提交代码

dev_xd
姜玉琦 2025-04-07 12:51:18 +08:00
parent e5c06edcee
commit 3d4515c56f
8 changed files with 153 additions and 64 deletions

View File

@ -60,7 +60,6 @@ body {
height: 1080px;
}
.img-openwin {
cursor: pointer;
width: 26px;
height: 26px;
}
@ -4116,7 +4115,7 @@ table {
}
.process-control-current-value-data p {
padding-top: 15px;
font-size: 25px;
font-size: 23px;
font-weight: bold;
color: #62cff8;
}

View File

@ -4186,7 +4186,7 @@ table{
}
.process-control-current-value-data p{
padding-top: 15px;
font-size: 25px;
font-size: 23px;
font-weight: bold;
color: #62cff8;
}

View File

@ -17,17 +17,17 @@ const findConfigPointInfo = (id) => {
};
// 查询配电箱数据统计
const findIotDatasMonitor = (proId,date) => {
const findIotDatasMonitor = (proId,pointId,date) => {
return request({
url: `/manage/iotDatas/findIotDatasMonitor/${proId}?date=${date}`,
url: `/manage/iotDatas/findIotDatasMonitor/${proId}?pointId=${pointId}&date=${date}`,
method: "get",
});
};
// 查询配电箱预警数据
const findIotWarnings = (proId) => {
const findIotWarnings = (proId,pointId) => {
return request({
url: `/manage/iotWarning/findIotWarnings/${proId}`,
url: `/manage/iotWarning/findIotWarnings/${proId}?pointId=${pointId}`,
method: "get",
});
};

View File

@ -9,8 +9,8 @@
<img src="images/hj_wendu.png" />
</div>
<div class="process-control-current-value-data">
<div>A相温度</div>
<p v-cloak>{{ powerRun.t1 }} <span></span></p>
<div>A相电压</div>
<p v-cloak>{{ runData.voltageA }} <span></span></p>
</div>
</div>
</el-col>
@ -20,8 +20,8 @@
<img src="images/hj_wendu.png" />
</div>
<div class="process-control-current-value-data">
<div>B相温度</div>
<p v-cloak>{{ powerRun.t2 }} <span></span></p>
<div>B相电压</div>
<p v-cloak>{{ runData.voltageB }} <span></span></p>
</div>
</div>
</el-col>
@ -31,8 +31,8 @@
<img src="images/hj_wendu.png" />
</div>
<div class="process-control-current-value-data">
<div>C相温度</div>
<p v-cloak>{{ powerRun.t3 }} <span></span></p>
<div>C相电压</div>
<p v-cloak>{{ runData.voltageC }} <span></span></p>
</div>
</div>
</el-col>
@ -43,7 +43,7 @@
</div>
<div class="process-control-current-value-data">
<div>零线温度</div>
<p v-cloak>{{ powerRun.t4 }} <span></span></p>
<p v-cloak>{{ runData.temperature }} <span></span></p>
</div>
</div>
</el-col>
@ -51,10 +51,12 @@
<div class="process-control-current-value-con">
<div class="process-control-current-value-data">
<div>温度阈值</div>
<p class="red-data">70 <span></span></p>
<p class="red-data">{{ powerRun.ratedTemperature }} <span></span></p>
</div>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="5">
<div class="process-control-current-value-con">
<div class="current-value-img">
@ -62,7 +64,7 @@
</div>
<div class="process-control-current-value-data">
<div>A相电流</div>
<p v-cloak>{{ powerRun.c1 }} <span>A</span></p>
<p v-cloak>{{ runData.currentA }} <span>A</span></p>
</div>
</div>
</el-col>
@ -73,7 +75,7 @@
</div>
<div class="process-control-current-value-data">
<div>B相电流</div>
<p v-cloak>{{ powerRun.c2 }} <span>A</span></p>
<p v-cloak>{{ runData.currentB }} <span>A</span></p>
</div>
</div>
</el-col>
@ -84,13 +86,13 @@
</div>
<div class="process-control-current-value-data">
<div>C相电流</div>
<p v-cloak>{{ powerRun.c3 }} <span>A</span></p>
<p v-cloak>{{ runData.currentC }} <span>A</span></p>
</div>
</div>
</el-col>
</el-row>
</module-one-1-3>
<module-one-1-3 label="温度监控">
<module-one-1-3 label="电压监控">
<div class="sjk-chart-line-title quality-button">
<div :class="trendBtnNav == 7 ? 'active' : ''" @click="initTrendData(7)">
近7天
@ -130,41 +132,45 @@
<td>
<div class="hj-moment-choice">
<div class="hj-moment-select">
<el-select v-model="powerRunId" @change="doIotSelect" popper-class="header-sel-project-pop">
<el-option v-for="item in powerRunList" :key="item.id" :label="item.deviceSn+'_'+item.deviceName"
:value="item.id"></el-option>
</el-select>
</div>
<div class="hj-moment-state">
<div class="state-tag state-zx" v-if="powerRun.online=='0'">线</div>
<div class="state-tag state-lx" v-else>线</div>
<div class="state-tag hj-moment-green" v-if="powerRun.onlineStatus=='0'">线</div>
<div class="state-tag hj-moment-orange" v-else>线</div>
</div>
</div>
</td>
</tr>
<tr>
<td>名称</td>
<td>电箱等级</td>
<td>
<div class="hj-moment-blue" v-cloak>
{{ powerRun.deviceId }}
<div class="hj-moment-blue">
{{ powerRun.levels }} 级配电箱
</div>
</td>
</tr>
<tr>
<td>安装位置</td>
<td>办公区</td>
<td>额定电流</td>
<td v-cloak>{{ powerRun.ratedCurrent }}</td>
</tr>
<tr>
<td>设备状态</td>
<td>
<div class="hj-moment-green" v-if="powerRun.deviceStatus=='0'">线</div>
<div class="hj-moment-orange" v-if="powerRun.deviceStatus!='0'">线</div>
</td>
<td>额定电压</td>
<td v-cloak>{{ powerRun.ratedVoltage }}</td>
</tr>
<tr>
<td>设备编码</td>
<td v-cloak>{{ powerRun.deviceId }}</td>
<td>联系人</td>
<td v-cloak>{{ powerRun.contactPerson }}</td>
</tr>
<tr>
<td>联系电话</td>
<td v-cloak>{{ powerRun.contactPersonPhone }}</td>
</tr>
<tr>
<td>更新时间</td>
<td v-cloak>{{ powerRun.time }}</td>
<td v-cloak>{{ powerRun.createTime }}</td>
</tr>
</table>
</div>
@ -187,21 +193,13 @@
:class="forIndex == i ? 'afoot-con-for active' : 'afoot-con-for '"
v-for="(item, i) in warningDataList"
>
<div class="afoot-machinery-nam" v-cloak>{{ item.type }}</div>
<div class="afoot-machinery-nam" v-cloak>{{ item.warningType }}</div>
<div class="afoot-machinery-info">
<div class="afoot-machinery-img">
<img :src="item.images" v-if="item.images" />
</div>
<div class="afoot-machinery-data">
<div class="afoot-machinery-state" v-cloak>{{ item.content }}</div>
<div class="afoot-machinery-time" v-cloak>{{ item.time }}</div>
<div class="afoot-machinery-state" v-cloak>{{ item.warningContent }}</div>
<div class="afoot-machinery-time" v-cloak>{{ item.createTime }}</div>
</div>
</div>
<div class="afoot-machinery-project">
异常传感器<span class="hj-moment-orange" v-cloak
>传感器-{{ item.deviceId }}</span
>
</div>
</div>
</div>
</div>
@ -214,7 +212,13 @@
export default {
data() {
return {
runData: {
voltageA:0.00,
voltageB:0.00,
voltageC:0.00,
},
powerRun: {},
powerRunId: 0,
powerRunList: [],
trendBtnNav: 7,
trendData: [],
@ -223,6 +227,7 @@ export default {
warningDataList: [],
forIndex: 0,
warningInterval: undefined,
};
},
mounted() {
@ -241,41 +246,105 @@ export default {
}
this.$api.powerIot.findProAllConfigPoint(this.selProject.id).then((res) => {
if (res.data.length > 0) {
this.powerRunId = res.data[0].id;
this.powerRun = res.data[0];
this.initTrendData();
this.initTumidityData();
this.initPowerWarning();
}
this.powerRunList = res.data;
});
this.initTrendData();
this.initTumidityData();
},
initTrendData(_date) {
if (_date) {
this.trendBtnNav = _data;
this.trendBtnNav = _date;
}
this.$api.powerIot
.findIotDatasMonitor(this.selProject.id, this.trendBtnNav)
.findIotDatasMonitor(this.selProject.id, this.powerRun.id, this.trendBtnNav)
.then((res) => {
if (res.data.length > 0) {
this.trendData = JSON.parse(
'{"lineData":[[6,7,6,6,6,7,7,6,7,9,9,9,9,10,10,9,10,9,8,9,10,11,10,10,8,7,7,7,7,7,6,7,6,6,6,5,5,6,9,10,10,10,11,11,12,12,13,11,9,8,8,7,6,5,5,5,5,5,5,5,5,6,9,12,11,11,12,12,13,13,13,13,11,9,7,6,5,5,4,3,3,2,2,1,1,4,7,7,8,8,9,10,11,13,12,11,11,9,9,9,8,7,6,6,6,6,5,4,4,6,8,10,12,12,13,14,14,15,15,15,12,11,9,8,8,7],[6,6,6,6,5,6,6,6,6,7,8,8,8,9,9,7,8,8,8,8,9,10,10,9,8,7,7,6,6,6,6,6,6,6,5,5,4,5,7,9,10,10,10,11,11,12,12,11,9,8,7,6,6,5,4,4,4,4,5,5,4,5,8,10,10,10,11,11,12,12,12,12,10,8,7,5,5,4,4,3,2,2,1,1,1,2,5,7,8,9,9,10,11,12,12,11,10,9,8,8,7,6,6,6,6,5,5,4,3,4,7,9,11,12,12,13,13,14,15,14,12,10,8,8,7,7],[5,6,5,5,5,6,6,6,7,8,9,9,9,9,9,9,10,9,8,8,9,11,10,10,8,7,7,6,6,6,6,6,6,6,5,5,4,6,8,11,11,11,11,11,12,12,13,12,9,9,7,7,6,5,4,4,5,4,5,5,4,5,8,11,10,11,11,11,12,13,13,12,11,9,7,5,5,4,4,3,2,2,1,1,1,4,6,8,8,9,9,10,11,12,12,11,10,8,8,8,7,6,6,5,5,5,4,4,3,5,7,9,11,12,12,13,14,14,15,15,12,10,8,8,7,7],[5,6,5,5,5,6,6,5,6,7,7,8,8,8,8,7,8,8,7,8,8,9,9,9,7,7,6,6,6,6,6,6,5,5,5,5,4,5,7,9,9,10,10,10,11,11,12,11,9,8,7,6,5,4,4,4,4,4,4,4,4,5,7,10,9,10,11,11,11,12,12,11,10,8,6,5,4,4,3,2,2,2,1,1,0,2,5,6,7,8,8,9,10,11,11,10,9,8,8,7,7,6,6,5,5,5,4,3,3,4,7,8,9,11,11,12,13,14,14,14,11,9,8,7,7,6],[70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70]],"color":["#008ffd","#f6d023","#5af9fd","#fc6902"],"legend":["A相温度","B相温度","C相温度","零线温度","温度阈值"],"unit":"℃","date":["2024-03-04 00:00","2024-03-04 01:00","2024-03-04 02:00","2024-03-04 03:00","2024-03-04 04:00","2024-03-04 05:00","2024-03-04 06:00","2024-03-04 07:00","2024-03-04 08:00","2024-03-04 09:00","2024-03-04 10:00","2024-03-04 11:00","2024-03-04 12:00","2024-03-04 13:00","2024-03-04 14:00","2024-03-05 10:00","2024-03-05 11:00","2024-03-05 12:00","2024-03-05 13:00","2024-03-05 14:00","2024-03-05 15:00","2024-03-05 16:00","2024-03-05 17:00","2024-03-05 18:00","2024-03-05 19:00","2024-03-05 20:00","2024-03-05 21:00","2024-03-05 22:00","2024-03-05 23:00","2024-03-06 00:00","2024-03-06 01:00","2024-03-06 02:00","2024-03-06 03:00","2024-03-06 04:00","2024-03-06 05:00","2024-03-06 06:00","2024-03-06 07:00","2024-03-06 08:00","2024-03-06 09:00","2024-03-06 10:00","2024-03-06 11:00","2024-03-06 12:00","2024-03-06 13:00","2024-03-06 14:00","2024-03-06 15:00","2024-03-06 16:00","2024-03-06 17:00","2024-03-06 18:00","2024-03-06 19:00","2024-03-06 20:00","2024-03-06 21:00","2024-03-06 22:00","2024-03-06 23:00","2024-03-07 00:00","2024-03-07 01:00","2024-03-07 02:00","2024-03-07 03:00","2024-03-07 04:00","2024-03-07 05:00","2024-03-07 06:00","2024-03-07 07:00","2024-03-07 08:00","2024-03-07 09:00","2024-03-07 10:00","2024-03-07 11:00","2024-03-07 12:00","2024-03-07 13:00","2024-03-07 14:00","2024-03-07 15:00","2024-03-07 16:00","2024-03-07 17:00","2024-03-07 18:00","2024-03-07 19:00","2024-03-07 20:00","2024-03-07 21:00","2024-03-07 22:00","2024-03-07 23:00","2024-03-08 00:00","2024-03-08 01:00","2024-03-08 02:00","2024-03-08 03:00","2024-03-08 04:00","2024-03-08 05:00","2024-03-08 06:00","2024-03-08 07:00","2024-03-08 08:00","2024-03-08 09:00","2024-03-08 10:00","2024-03-08 11:00","2024-03-08 12:00","2024-03-08 13:00","2024-03-08 14:00","2024-03-08 15:00","2024-03-08 16:00","2024-03-08 17:00","2024-03-08 18:00","2024-03-08 19:00","2024-03-08 20:00","2024-03-08 21:00","2024-03-08 22:00","2024-03-08 23:00","2024-03-09 00:00","2024-03-09 01:00","2024-03-09 02:00","2024-03-09 03:00","2024-03-09 04:00","2024-03-09 05:00","2024-03-09 06:00","2024-03-09 07:00","2024-03-09 08:00","2024-03-09 09:00","2024-03-09 10:00","2024-03-09 11:00","2024-03-09 12:00","2024-03-09 13:00","2024-03-09 14:00","2024-03-09 15:00","2024-03-09 16:00","2024-03-09 17:00","2024-03-09 18:00","2024-03-09 19:00","2024-03-09 20:00","2024-03-09 21:00","2024-03-09 22:00","2024-03-09 23:00","2024-03-10 00:00"]}'
);
this.runData = res.data[0];
res.data.reverse();
let _data1 = [];
let _data2 = [];
let _data3 = [];
let _data4 = [];
let _data5 = [];
let _data6 = [];
let _date8 = [];
res.data.forEach(item => {
_data1.push(item.voltageA);
_data2.push(item.voltageB);
_data3.push(item.voltageC);
_data4.push(item.voltageAb);
_data5.push(item.voltageBc);
_data6.push(item.voltageCa);
_date8.push(item.createTime);
});
let _lineData = [];
_lineData.push(_data1);
_lineData.push(_data2);
_lineData.push(_data3);
_lineData.push(_data4);
_lineData.push(_data5);
_lineData.push(_data6);
let _color = ['#0078e7','#f8e04d','#00bcd4','#008ffd','#f6d023','#5af9fd'];
let _legend = ['A相电压','B相电压','C相电压','AB相电压','BC相电压','CA相电压'];
let _trendData = {'lineData':_lineData,'color':_color,'legend':_legend,'unit':'V','date':_date8};
this.trendData = _trendData;
}
});
},
initTumidityData(_date) {
if (_date) {
this.tumidityBtnNav = _data;
this.tumidityBtnNav = _date;
}
let _ratedCurrent = this.powerRun.ratedCurrent;
this.$api.powerIot
.findIotDatasMonitor(this.selProject.id, this.tumidityBtnNav)
.findIotDatasMonitor(this.selProject.id, this.powerRun.id, this.tumidityBtnNav)
.then((res) => {
if (res.data.length > 0) {
this.tumidityData = JSON.parse(
'{"lineData":[[16.6,11.6,11.7,11.7,17,16.3,16.8,16.1,18.4,57.3,34.1,16.1,24.9,17,11.6,29.3,31.9,44.2,9.6,34.6,30.2,42.4,19.3,11.9,4.2,4.7,3.4,12,2.1,2.1,2.1,2.1,7,2.2,2,2.1,2,30,27,39.4,30.2,16.2,9.5,6.3,11.6,7.4,13.5,4.2,4.5,13.5,9.3,12.1,2.9,7.6,2.9,2.9,2.8,2.8,2.8,2.9,2.8,11.2,18.3,20.5,11.3,17.8,10.6,10.5,11.2,11.9,16.8,8.7,8.7,18.6,10.5,4.5,8.5,7.3,2.3,7.4,7.2,6.7,7.3,7.3,2.3,25.4,31.7,23.4,21.7,18.4,8.8,7,17.8,11,5.8,4.8,4.6,5.1,8.7,20.5,7.1,25,2.4,2.2,6.6,2.3,2.3,7.1,2.3,19.8,19.2,21.1,13.6,23.6,13.9,4.9,7.3,7.2,6.6,7.4,9.6,9.2,2.8,2.3,2.3,2.3],[6.7,1.4,1.4,9.8,1.4,11.3,18.1,6.4,24.2,37.1,25.6,21.2,30,5.7,21.2,40.2,23.3,39.1,30.7,28.9,19.5,34.3,12.9,15.8,14.9,9.9,10.2,7,2.6,7.1,2.1,14.5,2.2,2.1,2.1,15.9,14.5,36.2,36,31.5,25.6,26.9,17.9,14.4,19.8,14.9,22.9,27.9,21.5,28.4,22,19.6,8.6,8.3,13.4,18.2,12.5,8.1,12,8.2,8.2,26.1,17.7,9.4,9,18.9,19,11.3,17.8,19,24.7,10.4,20.9,13.6,13.5,6.9,7,1.4,7.5,6.3,16.5,5.9,5.9,2,14.3,36.3,34.4,23.8,23.1,26,14.6,16.2,4.2,8.7,2.9,6.6,4.4,10.4,6.7,14.6,6.5,1.4,6.9,1.4,12.1,6.8,6.1,14.9,6.4,25.5,20,15.1,26.6,14.9,7.8,6.2,13.4,9.6,25.8,12.6,12.4,6.8,5.9,4.6,9.3,3.5],[11.2,4.8,15.9,4,14.1,4,15.9,1.9,10.8,22.3,12,13.4,25.8,15.3,16.6,16.1,8.9,17,7.3,10.5,9.9,15.6,20.7,18.5,2.9,7,2.9,1.8,11.4,1.3,11.5,1.2,11.5,1.3,1.2,11.6,11.2,21,21.2,17.3,9.4,19.6,5.4,17.3,10.2,9.6,7.4,6.6,4,2.5,4.4,4.5,9.7,10.1,11.1,1.5,11.1,1.5,1.4,1.5,9.1,11,18.5,6.1,24.5,4.1,2.3,9.7,14.4,6.7,17.1,14,3.4,2.6,10.9,1.2,10.8,1.3,6.3,1.3,6.1,1.3,7.8,8.5,7.9,21.1,13.1,19.9,14.4,24.3,4.2,17.9,16.8,6,18.6,6.4,12.3,14.5,15,4.4,14.4,12.9,1.7,15.7,4.3,4.4,4.4,4.4,15.2,9.2,6.6,6.5,18,7.8,8.6,3.4,10,9.1,21.9,6.6,4,5.5,1.5,4.2,4.1,5.7],[131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131]],"color":["#008ffd","#f4f660","#5af9fd","#FF0016"],"legend":["A相电流","B相电流","C相电流","电流阈值"],"unit":"A","date":["2024-03-04 00:00","2024-03-04 01:00","2024-03-04 02:00","2024-03-04 03:00","2024-03-04 04:00","2024-03-04 05:00","2024-03-04 06:00","2024-03-04 07:00","2024-03-04 08:00","2024-03-04 09:00","2024-03-04 10:00","2024-03-04 11:00","2024-03-04 12:00","2024-03-04 13:00","2024-03-04 14:00","2024-03-05 10:00","2024-03-05 11:00","2024-03-05 12:00","2024-03-05 13:00","2024-03-05 14:00","2024-03-05 15:00","2024-03-05 16:00","2024-03-05 17:00","2024-03-05 18:00","2024-03-05 19:00","2024-03-05 20:00","2024-03-05 21:00","2024-03-05 22:00","2024-03-05 23:00","2024-03-06 00:00","2024-03-06 01:00","2024-03-06 02:00","2024-03-06 03:00","2024-03-06 04:00","2024-03-06 05:00","2024-03-06 06:00","2024-03-06 07:00","2024-03-06 08:00","2024-03-06 09:00","2024-03-06 10:00","2024-03-06 11:00","2024-03-06 12:00","2024-03-06 13:00","2024-03-06 14:00","2024-03-06 15:00","2024-03-06 16:00","2024-03-06 17:00","2024-03-06 18:00","2024-03-06 19:00","2024-03-06 20:00","2024-03-06 21:00","2024-03-06 22:00","2024-03-06 23:00","2024-03-07 00:00","2024-03-07 01:00","2024-03-07 02:00","2024-03-07 03:00","2024-03-07 04:00","2024-03-07 05:00","2024-03-07 06:00","2024-03-07 07:00","2024-03-07 08:00","2024-03-07 09:00","2024-03-07 10:00","2024-03-07 11:00","2024-03-07 12:00","2024-03-07 13:00","2024-03-07 14:00","2024-03-07 15:00","2024-03-07 16:00","2024-03-07 17:00","2024-03-07 18:00","2024-03-07 19:00","2024-03-07 20:00","2024-03-07 21:00","2024-03-07 22:00","2024-03-07 23:00","2024-03-08 00:00","2024-03-08 01:00","2024-03-08 02:00","2024-03-08 03:00","2024-03-08 04:00","2024-03-08 05:00","2024-03-08 06:00","2024-03-08 07:00","2024-03-08 08:00","2024-03-08 09:00","2024-03-08 10:00","2024-03-08 11:00","2024-03-08 12:00","2024-03-08 13:00","2024-03-08 14:00","2024-03-08 15:00","2024-03-08 16:00","2024-03-08 17:00","2024-03-08 18:00","2024-03-08 19:00","2024-03-08 20:00","2024-03-08 21:00","2024-03-08 22:00","2024-03-08 23:00","2024-03-09 00:00","2024-03-09 01:00","2024-03-09 02:00","2024-03-09 03:00","2024-03-09 04:00","2024-03-09 05:00","2024-03-09 06:00","2024-03-09 07:00","2024-03-09 08:00","2024-03-09 09:00","2024-03-09 10:00","2024-03-09 11:00","2024-03-09 12:00","2024-03-09 13:00","2024-03-09 14:00","2024-03-09 15:00","2024-03-09 16:00","2024-03-09 17:00","2024-03-09 18:00","2024-03-09 19:00","2024-03-09 20:00","2024-03-09 21:00","2024-03-09 22:00","2024-03-09 23:00","2024-03-10 00:00"]}'
);
res.data.reverse();
let _data1 = [];
let _data2 = [];
let _data3 = [];
let _data4 = [];
let _date8 = [];
res.data.forEach(item => {
_data1.push(item.currentA);
_data2.push(item.currentB);
_data3.push(item.currentC);
_data4.push(_ratedCurrent);
_date8.push(item.createTime);
});
let _lineData = [];
_lineData.push(_data1);
_lineData.push(_data2);
_lineData.push(_data3);
_lineData.push(_data4);
let _color = ['#008ffd','#f6d023','#5af9fd','#FF0016'];
let _legend = ['A相电流','B相电流','C相电流','电流阈值'];
let _tumidityData = {'lineData':_lineData,'color':_color,'legend':_legend,'unit':'A','date':_date8};
this.tumidityData = _tumidityData;
}
});
},
initPowerWarning(){
this.$api.powerIot
.findIotWarnings(this.selProject.id, this.powerRun.id)
.then((res) => {
this.warningDataList = res.data;
});
},
doIotSelect(){
let _iots = this.powerRunList.filter(detail => detail.id == this.powerRunId);
if (_iots.length > 0) {
this.powerRun = _iots[0];
this.initTrendData();
this.initTumidityData();
this.initPowerWarning();
}
},
automaticRoll() {
var height = $(".afoot-con-for").innerHeight()
if (this.forIndex == this.warningDataList.length) {

View File

@ -1,10 +1,13 @@
package com.yanzhu.device.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yanzhu.common.core.annotation.Excel;
import com.yanzhu.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.Date;
/**
* dev_iot_datas
*
@ -152,6 +155,10 @@ public class DevIotDatas extends BaseEntity
@Excel(name = "C相频率")
private String frequencyC;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
private Date createTime;
public void setId(Long id)
{
this.id = id;
@ -466,6 +473,16 @@ public class DevIotDatas extends BaseEntity
this.projectName = projectName;
}
@Override
public Date getCreateTime() {
return createTime;
}
@Override
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

View File

@ -105,14 +105,15 @@ public class DevIotDatasController extends BaseController
*
*/
@GetMapping("/findIotDatasMonitor/{proId}")
public AjaxResult findProAllConfigPoint(@PathVariable("proId") Long proId, Integer date)
public AjaxResult findProAllConfigPoint(@PathVariable("proId") Long proId, Long pointId, Integer date)
{
// 获取当前日期
LocalDate today = LocalDate.now();
// 获取最近${X}天的日期
LocalDate todayAgo = today.minusDays(date);
DevIotDatas datasQuery = new DevIotDatas();
datasQuery.setPointId(proId);
datasQuery.setPointId(pointId);
datasQuery.setProjectId(proId);
Map<String, Object> params = new HashMap<>();
params.put("beginCreateTime",today);
params.put("endCreateTime",todayAgo);

View File

@ -104,11 +104,12 @@ public class DevIotWarningController extends BaseController
*
*/
@GetMapping("/findIotWarnings/{proId}")
public AjaxResult findIotWarnings(@PathVariable("proId") Long proId)
public AjaxResult findIotWarnings(@PathVariable("proId") Long proId, Long pointId)
{
startPage(1,20);
DevIotWarning warningQuery = new DevIotWarning();
warningQuery.setPointId(proId);
warningQuery.setPointId(pointId);
warningQuery.setProjectId(proId);
List<DevIotWarning> list = devIotWarningService.selectDevIotWarningList(warningQuery);
return success(list);
}

View File

@ -50,8 +50,10 @@ public class DevIotWarningServiceImpl implements IDevIotWarningService
@Override
public List<DevIotWarning> selectDevIotWarningList(DevIotWarning devIotWarning)
{
if(devIotWarning.getProjectId()==null){
devIotWarning.setActiveComId(SecurityUtils.getLoginUser().getSysUser().getActiveComId());
devIotWarning.setActiveProjectId(SecurityUtils.getLoginUser().getSysUser().getActiveProjectId());
}
return devIotWarningMapper.selectDevIotWarningList(devIotWarning);
}