<!--pages/reportDetail/reportDetail.wxml-->
<!-- <wxs src="../../utils/tools.wxs" module="tools" /> -->
<view class="report-detail-page">
  <view class="tip">
    第一步：选择报告;第二步：选择证书
  </view>
  <view class="blueBg">
    <view class="topBar">
      <view class="reportName">{{report.reportName}}</view>
      <view class="reportCreateDate">生成时间：
        <filter type="parseTime" value="{{report.reportCreateDate}}" params="{{['{y}-{m}-{d} {h}:{i}']}}" />
      </view>
      <view class="reportRemark">报告备注：{{report.remark}}</view>
      <view class="btn_reportDetail" bindtap="goReport">查看报告</view>
    </view>
    <view class="reportList">
      <view class="reportItem" wx:for="{{report.electronicCertificateDataList}}" wx:key="{{item.electronicCertificateId}}">
        <view class="reportName">{{item.electronicCertificateName}} <view wx:if="{{item.checked}}" class="checked">已选择</view>
        </view>
        <view class="createDate">生成时间：
          <filter type="parseTime" value="{{item.electronicCertificateCreateDate}}" params="{{['{y}-{m}-{d} {h}:{i}']}}" />
        </view>
        <view class="reportDetail">访问次数/授权次数：<text class="red">{{item.usedTimes}}</text>/20</view>
        <view class="reportDetail">授权期限：
          <filter wx:if="{{item.endDate!==null}}" type="splitDates" value="{{item.endDate}}" />
          <text>不限</text>
        </view>
        <view class="reportDetail">授权对象：{{item.whiteList===null?'不限':item.whiteList}}</view>
        <view class="flex space-between">
          <view class="btn_certification" bindtap="goReport">查看证书>
          </view>
          <btn wx:if="{{!item.checked}}" fontSize="24rpx" width="266rpx" height="56rpx" bindtap="handleEtc" data-id="{{item.electronicCertificateId}}">添加至与评™个人主页</btn>
        </view>
      </view>
      <!-- <view class="reportItem">
        <view class="reportName">这是电子证书名</view>
        <view class="createDate">生成时间：2022-05-13 13:42</view>
        <view class="reportDetail">访问次数/授权次数：6/20</view>
        <view class="reportDetail">授权期限：2022-04-25 15:00至2022-04-25 15:00</view>
        <view class="reportDetail">授权对象：不限</view>
        <view class="flex space-between">
          <view class="btn_certification">查看证书>
          </view>
          <btn fontSize="24rpx" width="266rpx" height="56rpx">添加至与评™个人主页</btn>
        </view>
      </view> -->
    </view>
  </view>
</view>