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.
86 lines
3.4 KiB
Plaintext
86 lines
3.4 KiB
Plaintext
<!-- pages/index/index.wxml -->
|
|
<view class="page">
|
|
|
|
<!-- 顶部统计卡片 -->
|
|
<view class="top-card">
|
|
<view class="top-header">
|
|
<view class="time">刷新时间:12:49</view>
|
|
</view>
|
|
|
|
<view class="top-content">
|
|
<!-- 圆环 -->
|
|
<view class="circle-wrap">
|
|
<view class="circle">
|
|
<view class="inner">
|
|
<text class="total">{{requestList.length}}</text>
|
|
<text class="unit">设备总数(台)</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 右侧数据 -->
|
|
<view class="status-list">
|
|
<view class="status green">{{requestList.length}} <text>在线-运行</text></view>
|
|
<view wx:if="{{ num1 > 0 }}" class="status red"> {{num1}}<text>温度传感器</text></view>
|
|
<view wx:if="{{ num2 > 0 }}" class="status yellow"> {{num2}}<text>湿度传感器</text></view>
|
|
<view wx:if="{{ num3 > 0 }}" class="status gray"> {{num3}}<text>噪声传感器</text></view>
|
|
<view wx:if="{{ num4 > 0 }}" class="status yellow"> {{num4}}<text>光照传感器</text></view>
|
|
<view wx:if="{{ num5 > 0 }}" class="status red"> {{num5}}<text>速度传感器</text></view>
|
|
<view wx:if="{{ num6 > 0 }}" class="status gray"> {{num6}}<text>位移传感器</text></view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<!-- 筛选 -->
|
|
<view class="filter">
|
|
<!-- <text>全部传感器</text> -->
|
|
<picker mode="selector" range="{{typeList}}" range-key="label" value="{{index}}" bindchange="onChange">
|
|
<view class="picker">
|
|
<text>{{ typeList[index] ? typeList[index].label : '请选择' }}</text>
|
|
<image src="../../image/down.png" mode="aspectFit" class="pickerIcon" />
|
|
</view>
|
|
</picker>
|
|
</view>
|
|
|
|
<!-- 卡片列表 -->
|
|
<view class="card-list">
|
|
<view class="card" wx:for="{{deviceList}}" wx:key="key">
|
|
<text class="title">{{item.name}}</text>
|
|
|
|
<view class="value green" style="white-space: nowrap;">
|
|
<text style="display: inline-block;margin-right: 2px;">
|
|
{{item.value}}
|
|
</text>
|
|
<text wx:if="{{item.type === 1}}" style="display: inline-block;">
|
|
℃
|
|
</text>
|
|
<text wx:if="{{item.type === 2}}" style="display: inline-block;">
|
|
RH
|
|
</text>
|
|
<text wx:if="{{item.type === 3}}" style="display: inline-block;">
|
|
dB
|
|
</text>
|
|
<text wx:if="{{item.type === 4}}" style="display: inline-block;">
|
|
lx
|
|
</text>
|
|
<text wx:if="{{item.type === 5}}" style="display: inline-block;">
|
|
mm/s
|
|
</text>
|
|
<text wx:if="{{item.type === 6}}" style="display: inline-block;">
|
|
um
|
|
</text>
|
|
</view>
|
|
<view class="iconView">
|
|
<image wx:if="{{item.type === 1}}" src="../../image/infoIcon1.png" mode="aspectFit" class="icon" />
|
|
<image wx:if="{{item.type === 2}}" src="../../image/infoIcon2.png" mode="aspectFit" class="icon" />
|
|
<image wx:if="{{item.type === 3}}" src="../../image/infoIcon3.png" mode="aspectFit" class="icon" />
|
|
<image wx:if="{{item.type === 4}}" src="../../image/infoIcon4.png" mode="aspectFit" class="icon" />
|
|
<image wx:if="{{item.type === 5}}" src="../../image/infoIcon5.png" mode="aspectFit" class="icon" />
|
|
<image wx:if="{{item.type === 6}}" src="../../image/infoIcon6.png" mode="aspectFit" class="icon" />
|
|
</view>
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view> |