You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
139 lines
3.3 KiB
Vue
139 lines
3.3 KiB
Vue
1 year ago
|
<template>
|
||
|
<div class="arresterbox">
|
||
|
<h3>{{ pageCardTitle }}</h3>
|
||
|
<div class="cardContent">
|
||
|
<el-table
|
||
|
:data="arresterData"
|
||
|
height="100%"
|
||
|
border
|
||
|
highlight-current-row
|
||
|
size="mini"
|
||
|
@row-click="handleRowClick"
|
||
|
>
|
||
|
<el-table-column prop="id" label="id" width="50"> </el-table-column>
|
||
|
<!-- <el-table-column prop="jgName" label="间隔"> </el-table-column> -->
|
||
|
<el-table-column prop="zsbName" label="主设备名称"> </el-table-column>
|
||
|
<el-table-column prop="name" label="名称"> </el-table-column>
|
||
|
</el-table>
|
||
|
</div>
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
import { monitoringListApi } from "@/utils/api/index";
|
||
|
|
||
|
export default {
|
||
|
name: "arrester",
|
||
|
components: {},
|
||
|
data() {
|
||
|
return {
|
||
|
pageCardTitle: "避雷器",
|
||
|
arresterData: [],
|
||
|
};
|
||
|
},
|
||
|
created() {
|
||
|
this.getarresterdata();
|
||
|
},
|
||
|
methods: {
|
||
|
getarresterdata() {
|
||
|
monitoringListApi({
|
||
|
typeId: 4,
|
||
|
})
|
||
|
.then((res) => {
|
||
|
console.log(res);
|
||
|
this.arresterData = res.data.content;
|
||
|
})
|
||
|
.catch((err) => {
|
||
|
console.log(err); //代码错误、请求失败捕获
|
||
|
});
|
||
|
},
|
||
|
//点击当前行
|
||
|
handleRowClick(row, column, event) {
|
||
|
console.log(row); // 这里会打印出被点击的行的数据
|
||
|
},
|
||
|
},
|
||
|
};
|
||
|
</script>
|
||
|
|
||
|
<style lang="less">
|
||
|
.arresterbox {
|
||
|
height: 100%;
|
||
|
h3 {
|
||
|
height: 50px;
|
||
|
line-height: 50px;
|
||
|
padding: 0px 60px 0px 20px;
|
||
|
box-sizing: border-box;
|
||
|
color: #03bcff;
|
||
|
font-weight: normal;
|
||
|
text-align: left;
|
||
|
display: flex;
|
||
|
font-size: 16px;
|
||
|
justify-content: space-between;
|
||
|
align-items: center;
|
||
|
}
|
||
|
.cardContent {
|
||
|
padding: 10px !important;
|
||
|
box-sizing: border-box;
|
||
|
height: calc(100% - 52px);
|
||
|
.el-table--mini .el-table__cell {
|
||
|
padding: 3px 0;
|
||
|
text-align: center;
|
||
|
color: #03bcff;
|
||
|
}
|
||
|
.el-table td.el-table__cell,
|
||
|
.el-table th.el-table__cell.is-leaf {
|
||
|
border-bottom: 1px solid #03bcff;
|
||
|
}
|
||
|
.el-table--border .el-table__cell {
|
||
|
border-right: 1px solid #03bcff;
|
||
|
}
|
||
|
.el-table {
|
||
|
border: 1px solid #03bcff;
|
||
|
background-color: transparent; /* 设置为透明背景 */
|
||
|
tr {
|
||
|
background-color: transparent; /* 设置为透明背景 */
|
||
|
}
|
||
|
th.el-table__cell {
|
||
|
background-color: transparent; /* 设置为透明背景 */
|
||
|
}
|
||
|
}
|
||
|
.el-table__row,
|
||
|
.el-table__body-wrapper {
|
||
|
background-color: transparent; /* 确保行和单元格也是透明的 */
|
||
|
}
|
||
|
}
|
||
|
.el-table::before {
|
||
|
height: 0px;
|
||
|
}
|
||
|
.el-table--border::after,
|
||
|
.el-table--group::after {
|
||
|
width: 0px;
|
||
|
}
|
||
|
.el-table--border th.el-table__cell.gutter:last-of-type {
|
||
|
//background: #03bcff !important;
|
||
|
border-bottom: 1px solid #03bcff;
|
||
|
}
|
||
|
.el-table--enable-row-hover .el-table__body tr:hover > td.el-table__cell {
|
||
|
background-color: #296479;
|
||
|
cursor: pointer;
|
||
|
}
|
||
|
.el-table__body tr.current-row > td.el-table__cell {
|
||
|
background-color: #296479;
|
||
|
}
|
||
|
::-webkit-scrollbar {
|
||
|
width: 6px !important;
|
||
|
height: 6px !important;
|
||
|
}
|
||
|
::-webkit-scrollbar-thumb {
|
||
|
background-color: #03bcff;
|
||
|
/* 关键代码 */
|
||
|
border-radius: 32px;
|
||
|
}
|
||
|
/* 滚动条轨道 */
|
||
|
::-webkit-scrollbar-track {
|
||
|
background-color: transparent;
|
||
|
border-radius: 32px;
|
||
|
}
|
||
|
}
|
||
|
</style>
|