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.
 
 
 
 

46 lines
2.4 KiB

<!--package/AIOTOverview/electricityMonitoring/electricityMonitoring.wxml-->
<view>
<!--结构物选择器-->
<view class="select">
<van-dropdown-menu active-color="#1989fa">
<van-dropdown-item title="{{ '结构物' }}" bind:close="onClose" bind:change="onStruChange" value="{{ curStruId }}" options="{{ structList }}" />
</van-dropdown-menu>
</view>
<!--渲染列表-->
<view wx:if="{{list.length}}">
<view class="card" wx:for="{{list}}" wx:key='index'>
<!--头部-->
<view class="top">
<view style="display: flex; align-items: center;">
<text class="fontStyle">{{item.structName}}</text>
</view>
<view>
<switch disabled="{{(!item.data.data||item.data.data.info&&item.data.data.info.includes('离线'))}}" bindchange="switch1Change" data-item="{{item}}"/>
</view>
</view>
<!--内容部分-->
<view class="card-content">
<view class="row flex flex-between detail">
<view class="content-left" style="font-weight: bold;">{{item.name}}</view>
</view>
<view class="row flex flex-between detail">
<view class="content-left">运行状态</view>
<view class="content-right" wx:if="{{!item.data.data}}">{{'离线'}}</view>
<view class="content-right" wx:elif="{{item.data.data&&item.data.data.info.includles('离线')}}">{{'离线'}}</view>
<view class="content-right" wx:else="{{item.data.data&&item.data.data.info.includles('1-在线')}}">{{'正常'}}</view>
</view>
<view class="row flex flex-between detail">
<view class="content-left">电源状态</view>
<view class="content-right" wx:if="{{!item.data.data}}">{{'离线'}}</view>
<view class="content-right" wx:elif="{{item.data.data&&item.data.data.info.includles('离线')}}">{{'离线'}}</view>
<view class="content-right" wx:else="{{item.data.data&&item.data.data.info.includles('1-在线')}}">{{'正常'}}</view>
</view>
</view>
</view>
</view>
<view wx:else>
<van-empty description="暂无数据" />
</view>
</view>