<view>
  <view class="head flex-box flex-center-center">
    <view class="flex-1" data-index="1" onTap="openView">
      <view>{{userData.b.month_point}}</view>
      <view>本月B分</view>
    </view>
    <view class="flex-1" data-index="2" onTap="openView">
      <view>{{userData.a.month_point}}</view>
      <view>本月A分</view>
    </view>
  </view>
  <view class="headed margin-bottom">
    <view class="top"></view>
    <view class="headed-box">
          <view class="flex-box headed-box-item">
              <view class="flex-box flex-center-center flex-1 left" data-index="3" onTap="openView">
                <image mode="scaleToFill" src="../../../image/jkbf.png"/>
                <text>奖扣B分</text>
              </view>
              <view class="flex-box  flex-center-center flex-1" data-index="4" onTap="openView">
                <image mode="scaleToFill" src="../../../image/jkaf.png"/>
                <text>奖扣A分</text>
              </view>
          </view>
          <view class="flex-box headed-box-item">
              <view class="flex-box  flex-center-center flex-1 left" data-index="5" onTap="openView">
                <image mode="scaleToFill" src="../../../image/sqjf.png"/>
                <text>申请积分</text>
              </view>
              <view class="flex-box  flex-center-center flex-1" data-index="6" onTap="openView">
                <image mode="scaleToFill" src="../../../image/sp.png"/>
                <text>审批<text class="red">({{total}})</text></text>
              </view>
          </view>
    </view>

  </view>
  <!-- 奖扣展示 -->
  <view class="main margin-bottom" a:if="{{userData.task}}">
      <view class="main-title flex-box flex-v-ce">
          <text style="font-size:32rpx">本月B分奖扣</text>
          <text class="text2" catchTap="showText">?</text>
      </view>
      <view class="main-main flex-box flex-center-center" data-index="7" catchTap="openView">
        <view class="flex-1">
            <view>{{userData.task.reward.point}}</view>
            <view class="fontColorF" style="font-size:28rpx">奖分</view>
            <view>目标{{userData.task.reward.target_point}}</view>
        </view>
        <view class="flex-1">
            <view>{{userData.task.deduction.point}}</view>
            <view class="fontColorF" style="font-size:28rpx">扣分</view>
            <view>目标{{userData.task.deduction.target_point}}</view>
        </view>
        <view class="flex-1">
            <view>{{userData.ratio.ratio}}</view>
            <view class="fontColorF" style="font-size:28rpx">奖扣比例</view>
            <view>目标{{userData.ratio.target_ratio}}</view>
        </view>
        <view class="flex-1">
            <view>{{userData.task.exec.count}}</view>
            <view class="fontColorF" style="font-size:28rpx">奖扣人次</view>
            <view>目标{{userData.task.exec.target_count}}</view>
        </view>
      </view>
  </view>


  <view class="bottom margin-bottom">
    <view class="bottom-title">近30天B分趋势</view>
      <view class="f2-chart">
        <f2 onInit="onInitChart"></f2>
      </view>
  </view>

  <view class="bottom margin-bottom">
     <view class="bottom-title">积分构成</view>
     <view class="f2-chart" a:if="{{pieData.length>0}}">
        <f2 onInit="onInitChart2"></f2>
    </view>
    <no-data a:if="{{pieData.length==0}}" content="无数据" />
  </view>

  <view class="bottom">
    <view class="bottom-title">积分事件</view>
    <view class="flex-box bottom-time" a:for="{{incidentLsit}}" data-item="{{item}}" data-index="8" onTap="openView"> 
        <img-box name="{{item.employee_name}}" imgUrl="{{item.employee_img_url}}"/>
        <view class="flex-1 bottom-right">
          <view class="flex-box">
            <text class="flex-1 name">{{item.employee_name}}</text>
            <text class="num" a:if="{{item.point>0}}">+{{item.point}} {{item.ptObj.name}}</text>
            <text class="num green" a:else>{{item.point}} {{item.ptObj.name}}</text>
          </view>
          <view class="text">{{item.remark}}</view>
          <view class="date">{{item.event_time}}</view>
        </view>
    </view>
    <no-data a:if="{{incidentLsit.length==0}}"  />
  </view>
  <view data-index="9" onTap="openView" a:if="{{incidentLsitTotal>5}}" class="more">查看更多</view>
  <view class="windows" a:if="{{isBh}}" content="还没有积分事件">
    <view class="windows-box">
      <view class="windows-title">温馨提示</view>
      <view class="windows-content">作为管理者，管理执行力是关键，每月按要求完成奖分和扣分任务</view>
      <view class="windows-btn flex-box flex-v-ce">
        <view class="flex-1" catchTap="showText">我知道了</view>
      </view>
    </view>
  </view>
</view>