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

更改一下设备的展示效果

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