嘉禾二期设备管理
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

121 lines
2.8 KiB

2 years ago
<template>
<div class="equipmentLoad box">
<tit :title="'设备负载监控'">
2 years ago
<div class="tit-r" @click="visible=true">监测明细</div>
2 years ago
</tit>
<el-table :data="tableData" style="width: 100%;" height="92%" :stripe="true" :size="mini"
:row-class-name="tableRowClassName">
<el-table-column prop="name" label="设备名称" show-overflow-tooltip>
2 years ago
</el-table-column>
<el-table-column prop="address" label="负载率">
<template slot-scope="scope">
<span>{{ scope.row.loadRate }}%</span>
2 years ago
</template>
</el-table-column>
<el-table-column prop="sendTime" label="负载最长时段" show-overflow-tooltip>
2 years ago
</el-table-column>
</el-table>
2 years ago
<emodal :visible.sync="visible" @onvisible="v => visible = v" />
2 years ago
</div>
</template>
<script>
import tit from "./tit.vue";
2 years ago
import emodal from "./emodal.vue";
import { mapGetters } from "vuex";
import {getInstrumentActLoad} from "@/api/energySources/energySources"
2 years ago
export default {
data() {
return {
2 years ago
tableData: [],
visible: false
2 years ago
};
},
components: {
2 years ago
tit,
emodal
2 years ago
},
computed:{
...mapGetters(["userInfo", "permission"]),
},
2 years ago
created() {
this.getTableData()
2 years ago
},
methods: {
getTableData(){
getInstrumentActLoad({manufacturerBrand:this.userInfo.dept_name}).then(res =>{
this.tableData = res.data.data
})
},
2 years ago
tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 === 0) {
if (row.loadRate > 0) {
2 years ago
return 'trEven colorFB5E2D';
} else {
return 'trEven';
}
} else {
if (row.loadRate > 0) {
2 years ago
return 'trOdd colorFB5E2D';
} else {
return 'trOdd';
}
}
}
},
};
</script>
<style></style>
<style lang="scss" scoped>
.equipmentLoad /deep/ .el-table,
.equipmentLoad /deep/ .el-table__expanded-cell {
background-color: transparent;
border: 0 !important;
}
.equipmentLoad /deep/ .el-table th,
.equipmentLoad /deep/ .el-table tr,
.equipmentLoad /deep/ .el-table td {
background-color: transparent !important;
border: 0 !important;
}
.equipmentLoad /deep/ .el-table td span{
font-size: 0.14rem !important;
}
.equipmentLoad /deep/ .el-table::before {
height: 0 !important;
}
.equipmentLoad /deep/ .trOdd td {
color: #fff;
}
.equipmentLoad /deep/ .trEven td {
color: #fff;
background: rgba($color: #0de5ff, $alpha: 0.1) !important;
}
.equipmentLoad /deep/.colorFB5E2D td {
color: #FB5E2D !important;
}
.box {
width: 4.68rem;
height: 3.7rem;
box-sizing: border-box;
background: url("../../../../public/img/energySources/equipmentLoad.png");
background-size: 100% 100%;
margin-right: 0.22rem;
padding: 0.54rem 0.22rem 0 0.22rem;
position: relative;
.tit-r {
font-size: 0.14rem;
color: #0096FF;
margin-top: 0.04rem;
}
}
</style>