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.
94 lines
2.3 KiB
94 lines
2.3 KiB
<template> |
|
<div class="paramsDetails"> |
|
<div class="details-content"> |
|
<div class="details-header"> |
|
<el-tabs v-model="activeName" @tab-click="handleClick"> |
|
<el-tab-pane label="能耗" name="first"> |
|
<energy v-if="activeName === 'first'"></energy> |
|
</el-tab-pane> |
|
<el-tab-pane label="水表读数" name="second"> |
|
<water-reading v-if="activeName === 'second'"></water-reading> |
|
</el-tab-pane> |
|
<el-tab-pane label="电表读数" name="three"> |
|
<elect-reading v-if="activeName === 'three'"></elect-reading> |
|
</el-tab-pane> |
|
</el-tabs> |
|
</div> |
|
</div> |
|
</div> |
|
</template> |
|
|
|
<script> |
|
import ElectReading from "./components/electReading.vue"; |
|
import WaterReading from "./components/waterReading.vue"; |
|
import Energy from "./components/energy.vue"; |
|
|
|
export default { |
|
components: { Energy, ElectReading, WaterReading }, |
|
data() { |
|
return { |
|
activeName: "first", //能耗 |
|
}; |
|
}, |
|
methods: { |
|
handleClick(tab, event) { |
|
console.log(tab, event); |
|
}, |
|
|
|
//当在子页面中点击按钮时,会触发switch-tab事件, |
|
// 然后在父组件中监听到这个事件,并将activeName设置为'second',从而让第二个tab成为当前选中的tab。 |
|
switchToEquitesMess() { |
|
this.activeName = "second"; |
|
}, |
|
switchToPatrolTem() { |
|
// this.activeName = 'fourth'; |
|
}, |
|
// 记得请求冷水机组数据时,默认选中第一个冷水机组 |
|
}, |
|
}; |
|
</script> |
|
|
|
<style lang="scss" scoped> |
|
.paramsDetails { |
|
display: flex; |
|
flex-direction: row; |
|
align-items: stretch; |
|
justify-content: space-between; |
|
|
|
.details-content { |
|
width: 100%; |
|
// height: 0.42rem; |
|
position: relative; |
|
} |
|
} |
|
</style> |
|
<style scoped> |
|
.none-div { |
|
padding-top: 0.31rem; |
|
} |
|
|
|
.none-div >>> .el-tree { |
|
background: transparent; |
|
color: #789d9f; |
|
} |
|
|
|
.none-div >>> .el-tree-node:focus > .el-tree-node__content { |
|
background-color: #00be97; |
|
color: #fff; |
|
} |
|
|
|
.none-div >>> .el-tree-node__content:hover, |
|
.none-div >>> .el-upload-list__item:hover { |
|
background-color: #00be97; |
|
color: #fff; |
|
} |
|
|
|
.none-div >>> .el-tree-node__content { |
|
height: 0.48rem; |
|
justify-content: center; |
|
} |
|
|
|
.none-div >>> .el-tree-node__expand-icon.is-leaf { |
|
display: none !important; |
|
} |
|
</style>
|
|
|