123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175 |
- <template>
- <view class="page" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
- <cus-header title='电表'></cus-header>
- <div class="nums">
- <div class="pre">电表:<span class="mr">{{2}}</span></div>
- <div class="pre">正常:<span class="zc">{{20}}</span></div>
- <div class="pre">离线:<span class="lx">{{1}}</span></div>
- </div>
- <div class="boxs" v-if="list.length">
- <div class="box" v-for="(item,index) in list" :key="index" @tap="toDetail(item)">
- <div class="name">{{item.name}}</div>
- <div class="tip">安装位置<span>{{item.place}}</span></div>
- <div class="tip">设备编号<span>{{item.deviceno}}</span></div>
- <div class="tip">实时读数<span>{{item.readnum}}</span></div>
- <div class="status" :class="item.status==1?'on':(item.status==2?'off':'mr')">
- {{item.status==1?'在线':(item.status==2?'离线':'异常')}}
- </div>
- <div class="btn">
- {{item.status==1?'断闸':(item.status==2?'合闸':'异常')}}
- </div>
- </div>
- </div>
- <template v-else>
- <page-empty :height="'calc(100vh - 200px)'"></page-empty>
- </template>
- </view>
- </template>
- <script>
- import pageEmpty from '@/components/pageEmpty/index.vue'
- export default {
- components:{
- pageEmpty
- },
- data(){
- return {
- list:[
- {
- name:'B座13楼生产车间电表A',
- place:'电商园四期B座-13层',
- deviceno:'A32445',
- readnum:'281kwh',
- status:1
- },
- {
- name:'B座13楼生产车间电表B',
- place:'电商园四期B座-13层',
- deviceno:'A32446',
- readnum:'285kwh',
- status:2
- }
- ]
- }
- },
- methods:{
-
- }
- }
- </script>
- <style scoped lang="less">
- .page{
- padding: 0 24rpx 20rpx;
- box-sizing: border-box;
- background: #F4F8FB;
-
- .nums{
- width: 100%;
- background: #FFFFFF;
- border-radius: 16rpx;
- padding: 37rpx 24rpx;
- box-sizing: border-box;
- display: flex;
- margin-top: 20rpx;
- .pre{
- width: calc(100% / 3);
- font-family: PingFangSC, PingFang SC;
- font-weight: 400;
- font-size: 30rpx;
- color: #4E5969;
- line-height: 36rpx;
- text-align: left;
- span{
- font-family: PingFang-SC, PingFang-SC;
- font-weight: bold;
- font-size: 32rpx;
- line-height: 36rpx;
- text-align: left;
- &.mr{
- color: #1D2129;
- }
- &.zc{
- color: #14CC8C;
- }
- &.lx{
- color: #F95050;
- }
- }
- }
- }
-
- .boxs{
- .box{
- background: #FFFFFF;
- border-radius: 16rpx;
- margin-top: 20rpx;
- padding: 36rpx 24rpx;
- position: relative;
- .name{
- font-family: PingFang-SC, PingFang-SC;
- font-weight: bold;
- font-size: 32rpx;
- color: #1D2129;
- line-height: 36rpx;
- text-align: left;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- .tip{
- margin-top: 20rpx;
- font-family: PingFangSC, PingFang SC;
- font-weight: 400;
- font-size: 24rpx;
- color: #4E5969;
- line-height: 36rpx;
- text-align: left;
- span{
- color: #1D2129;
- padding-left: 48rpx;
- }
- }
- .status{
- width: 90rpx;
- height: 48rpx;
- border-radius: 0rpx 16rpx 0rpx 16rpx;
- font-family: PingFangSC, PingFang SC;
- font-weight: 400;
- font-size: 26rpx;
- color: #FFFFFF;
- line-height: 48rpx;
- text-align: center;
- position: absolute;
- top: 0;
- right: 0;
- &.on{
- background: #14CC8C;
- }
- &.off{
- background: #B9C0C8;
- }
- &.mr{
- background: #666666;
- }
- }
- .btn{
- width: 114rpx;
- height: 64rpx;
- background: #198CFF;
- border-radius: 32rpx;
- font-family: PingFang-SC, PingFang-SC;
- font-weight: bold;
- font-size: 28rpx;
- color: #FFFFFF;
- line-height: 64rpx;
- text-align: center;
- letter-spacing: 2rpx;
- position: absolute;
- right: 24rpx;
- bottom: 36rpx;
- }
- }
- }
- }
- </style>
|