<!--pages/sleepReport/sleepReport.wxml-->
<view class="content">
    <view class="big-item" wx:for="{{mData}}" wx:key="index">
        <text class="date-title">{{item.dateTitle}}</text>
        <view class="sub-item" wx:for="{{item.subItem}}" wx:for-item="subItem" wx:for-index="subIndex" wx:key="subIndex"
            data-item="{{subItem}}" bindtap="toDetails">
            <view class="h-view" style="height: 80rpx;border-bottom: 1rpx solid #EEEEEE;">
                <image class="icon" src="/static/images/report/ic_smbg.png"></image>
                <text class="sub-time">{{subItem.rdate}}</text>
                <text class="name">{{subItem.hn}} | {{subItem.pos}}</text>
            </view>
            <view class="h-view" style="justify-content: space-around;">

                <view class="v-item">
                    <text class="t1">{{subItem.durations}}</text>
                    <text class="desc">睡眠时间</text>
                </view>
                <view class="v-item">
                    <text class="t3" style="color:{{subItem.color}};">{{subItem.rscore_value}}</text>
                    <text class="desc">香睡指数</text>
                </view>
                <view class="v-item">
                    <text class="t1">{{subItem.hours}}<text class="t2">小时</text>{{subItem.minutes}}<text
                            class="t2">分</text></text>
                    <text class="desc">在床时间</text>
                </view>

            </view>
        </view>
    </view>
    <text class="select_date_btn" bindtap="onDisplay">选择日期</text>

    <van-calendar show="{{ show }}" type="range" min-date="{{ minDate }}" defaultDate="{{defaultDate}}"
        max-date="{{ maxDate }}" allow-same-day="{{true}}" formatter="{{ formatter }}" color="#0ABCA4"
        bind:close="onClose" bind:confirm="onConfirm" />

</view>