LearnStatistics.wxml 2.59 KB
<!--packageStudyCenter/pages/myTask/components/LearnStatistics/LearnStatistics.wxml-->
<view class="learn-statistics {{isBeisen ? 'big-height' : 'small-height'}}">
  <!-- 北森帐号显示累计时长 -->
  <view class="learn-statistics-title" wx:if="{{isBeisen}}">累计学习</view>
  <view class="statistics-content" wx:if="{{isBeisen}}">
    <view class="statistics-item">
      <view class="statistics-number blue-number">{{dataInfo.learnDurationTotal || 0}}</view>
      <view class="statistics-unit blue-number">小时</view>
    </view>
    <view class="statistics-item">
      <view class="text">排名</view>
      <view class="statistics-rank">{{dataInfo.learnDurationRank || '-'}}</view>
      <view class="statistics-unit">名</view>
    </view>
  </view>
  
  <view class="progress-box {{progressListFiltered.length === 1 ? 'only-one' : ''}}">
    <view 
      class="progress-item {{isBeisen ? 'bg' : ''}}" 
      wx:for="{{progressListFiltered}}" 
      wx:key="index"
    >
      <view class="progress-item-title {{isBeisen ? '' : 'title'}}">{{item.title}}</view>
      <view class="progress-item-value">
        <view class="number {{isBeisen ? '' : 'blue-number'}}">
          {{dataInfo[item.key] === 0 ? 0 : (dataInfo[item.key] || '-')}}
        </view>
        <view class="unit {{isBeisen ? '' : 'blue-unit'}}">{{item.unit}}</view>
      </view>
      
      <view class="progress-bar-box" wx:if="{{dataInfo[item.key] || dataInfo[item.key] == 0}}">
        <view class="progress-bar {{isBeisen ? '' : 'big-margin'}}"></view>
        <view 
          class="progress-bar-value {{isBeisen ? '' : 'big-top'}}"
          style="width: {{dataInfo[item.key] ? dataInfo[item.key] + '%' : '0'}}"
        ></view>
      </view>
      <view 
        class="progress-bar-box2 {{isBeisen ? '' : 'big-height'}}" 
        wx:else
      ></view>
      
      <view class="progress-item-finish {{isBeisen ? '' : 'big-margin'}}">
        <block wx:if="{{dataInfo[item.key] || dataInfo[item.key] == 0}}">
          <view>本周已有</view>
          <view class="progress-text">
            <view class="number">{{dataInfo[item.ratio] === 0 ? 0 : (dataInfo[item.ratio] || '-')}}%</view>学员完成学习
          </view>
        </block>
        <block wx:else>
          <block wx:if="{{item.type == 3}}">
            <view>你的表现很好</view>
            <view class="progress-text">暂无需短课程学习</view>
          </block>
          <block wx:elif="{{item.type == 4}}">
            <view class="no-finish-text">暂无长课程学习安排</view>
          </block>
        </block>
      </view>
    </view>
  </view>
</view>