Commit bb8f1325 authored by 纪泽龙's avatar 纪泽龙

更改一下设备的展示效果

parent cc9fb299
<!--
* @Author: your name
* @Date: 2022-01-26 20:07:52
* @LastEditTime: 2022-03-04 17:25:27
* @LastEditTime: 2022-03-07 18:09:02
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
......@@ -52,7 +52,7 @@
<div class="middle">{{ profile }}</div>
<div class="foot">
<div class="thead flex">
<div class="thead flex" v-if="list.length>0">
<div class="first">设备类型</div>
<div>设备数量</div>
<div>在线设备</div>
......@@ -90,7 +90,7 @@
</template>
</div>
<div class="btn">
<div class="btn" v-if="list.length>0">
<div @click="btnClick">感知设备</div>
</div>
</div>
......@@ -113,33 +113,33 @@ export default {
3: "探测器",
},
list: [
{
numberPressureGauges: "-",
onlineEquipment: "-",
offlineEquipment: "-",
historicalAlarm: "-",
alarmProcessed: "-",
inAlarm: "-",
dataType: 1,
},
{
numberPressureGauges: "-",
onlineEquipment: "-",
offlineEquipment: "-",
historicalAlarm: "-",
alarmProcessed: "-",
inAlarm: "-",
dataType: 2,
},
{
numberPressureGauges: "-",
onlineEquipment: "-",
offlineEquipment: "-",
historicalAlarm: "-",
alarmProcessed: "-",
inAlarm: "-",
dataType: 3,
},
// {
// numberPressureGauges: "-",
// onlineEquipment: "-",
// offlineEquipment: "-",
// historicalAlarm: "-",
// alarmProcessed: "-",
// inAlarm: "-",
// dataType: 1,
// },
// {
// numberPressureGauges: "-",
// onlineEquipment: "-",
// offlineEquipment: "-",
// historicalAlarm: "-",
// alarmProcessed: "-",
// inAlarm: "-",
// dataType: 2,
// },
// {
// numberPressureGauges: "-",
// onlineEquipment: "-",
// offlineEquipment: "-",
// historicalAlarm: "-",
// alarmProcessed: "-",
// inAlarm: "-",
// dataType: 3,
// },
],
};
},
......@@ -171,7 +171,7 @@ export default {
},
myHttp() {
getCzDevice({ deviceId: this.deviceData.siteStationId }).then((res) => {
this.list = res.data[0].subordinateEquipmentList;
this.list = res.data[0].subordinateEquipmentList.filter(item=>item.numberPressureGauges>0);
console.log("resresres",res)
});
},
......
<!--
* @Author: your name
* @Date: 2022-01-26 20:07:52
* @LastEditTime: 2022-03-04 17:27:21
* @LastEditTime: 2022-03-07 18:06:31
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
......@@ -52,7 +52,7 @@
<div class="middle">{{ profile }}</div>
<div class="foot">
<div class="thead flex">
<div class="thead flex" v-if="list.length > 0">
<div class="first">设备类型</div>
<div>设备数量</div>
<div>在线设备</div>
......@@ -65,7 +65,7 @@
<div
class="tbody flex"
v-for="deviceData in list"
:key="deviceData.inAlarm+Math.random()"
:key="deviceData.inAlarm + Math.random()"
>
<div v-unValue class="first zzz">
{{ typeList[deviceData.dataType] }}
......@@ -112,34 +112,33 @@ export default {
3: "探测器",
},
list: [
{
numberPressureGauges: "-",
onlineEquipment: "-",
offlineEquipment: "-",
historicalAlarm: "-",
alarmProcessed: "-",
inAlarm: "-",
dataType: 1,
},
{
numberPressureGauges: "-",
onlineEquipment: "-",
offlineEquipment: "-",
historicalAlarm: "-",
alarmProcessed: "-",
inAlarm: "-",
dataType: 2,
},
{
numberPressureGauges: "-",
onlineEquipment: "-",
offlineEquipment: "-",
historicalAlarm: "-",
alarmProcessed: "-",
inAlarm: "-",
dataType: 3,
},
// {
// numberPressureGauges: "-",
// onlineEquipment: "-",
// offlineEquipment: "-",
// historicalAlarm: "-",
// alarmProcessed: "-",
// inAlarm: "-",
// dataType: 1,
// },
// {
// numberPressureGauges: "-",
// onlineEquipment: "-",
// offlineEquipment: "-",
// historicalAlarm: "-",
// alarmProcessed: "-",
// inAlarm: "-",
// dataType: 2,
// },
// {
// numberPressureGauges: "-",
// onlineEquipment: "-",
// offlineEquipment: "-",
// historicalAlarm: "-",
// alarmProcessed: "-",
// inAlarm: "-",
// dataType: 3,
// },
],
};
},
......@@ -175,12 +174,18 @@ export default {
if (this.deviceData.iconType == 2) {
getTyxDevice({ deviceId: this.deviceData.deviceId }).then((res) => {
this.list = res.data[0].subordinateEquipmentList;
// 过滤设备数为0的
this.list = res.data[0].subordinateEquipmentList.filter(
(item) => item.numberPressureGauges > 0
);
console.log(this.list);
});
} else {
getFmDevice({ deviceId: this.deviceData.deviceId }).then((res) => {
this.list = res.data[0].subordinateEquipmentList;
// 过滤设备数为0的
this.list = res.data[0].subordinateEquipmentList.filter(
(item) => item.numberPressureGauges > 0
);
});
}
},
......
<!--
* @Author: your name
* @Date: 2022-01-26 20:07:52
* @LastEditTime: 2022-03-03 11:51:48
* @LastEditTime: 2022-03-07 14:02:43
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
......@@ -80,6 +80,7 @@
<script>
import { companyType, deviceType } from "@/utils/mapClass/config.js";
import { listDetectorInfo } from "@/api/detector/detectorInfo";
import { detectorUserList } from "@/api/detector/detectorUser";
export default {
......@@ -115,6 +116,7 @@ export default {
btnClick() {
// this.vueRoot.centerDataFunc(this.deviceData.pressureFlows);
this.vueRoot.getDetectorInfoList(
listDetectorInfo,
{ userId: this.deviceData.userId },
this.deviceData.nickName
);
......
<template>
<transition
>
<transition>
<div v-show="show" class="wrapper myCenter">
<div class="left">
<div class="title-wrapper">
......@@ -14,7 +13,6 @@
size="mini"
:data="tableData"
style="width: 100%"
class="el-bottom"
:key="Math.random()"
>
......@@ -73,12 +71,13 @@
<script>
// import Velocity from "velocity-animate";
// import { listDeviceAlarm } from "@/api/dataMonitoring/deviceAlarm";
import { listDetectorInfo } from "@/api/detector/detectorInfo";
export default {
props: {
detcetorList: {
type: Array,
default:()=>[],
default: () => [],
},
show: {
type: Boolean,
......@@ -109,7 +108,6 @@ export default {
// address: "上海市普陀区金沙江路",
// },
],
};
},
created() {
......@@ -134,6 +132,7 @@ export default {
},
handleCurrentChangvale(val) {
this.$parent.getDetectorInfoList(
listDetectorInfo,
{
userId: this.userId,
pageNum: val,
......
<!--
* @Author: your name
* @Date: 2022-01-11 13:44:17
* @LastEditTime: 2022-03-04 14:34:32
* @LastEditTime: 2022-03-07 15:40:59
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /test/hello-world/src/views/Home.vue
......@@ -450,13 +450,12 @@ export default {
this.map.allfilter(this.selarr, this.selarr1);
},
//用户的设备center
getDetectorInfoList(queryParams, title) {
getDetectorInfoList(httpFunc,queryParams, title) {
console.log(queryParams);
return listDetectorInfo(queryParams).then((res) => {
console.log("queryParams", res);
return httpFunc(queryParams).then((res) => {
// console.log("queryParams", res);
if (res.code == 200) {
this.detcetorList = res.rows;
this.centerUserId = queryParams.userId;
// 总数据
this.centerTotal = res.total;
......@@ -504,6 +503,7 @@ export default {
if (this.formatDate) {
clearInterval(this.formatDate); // 在Vue实例销毁前,清除时间定时器
}
// 报警
if (this.alarmTimer) {
clearInterval(this.alarmTimer);
}
......
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