policy-head-list.vue 3.48 KB
<template>
  <div class="list-container">
    <div class="cell-group">
      <div class="table-header orange">
        <div class="normal-header">
          <div class="td w1">{{$t('customService.insuranceQuery.InsurantNumber')}}</div>
          <div class="td w2">{{$t('customService.insuranceQuery.Insurant')}}</div>
          <div class="td w1">{{$t('customService.insuranceQuery.InsurantName')}}</div>
          <div class="td w2">{{$t('customService.insuranceQuery.InsurantAmount')}}</div>
          <div class="td w2">{{$t('customService.insuranceQuery.effectiveDate')}}</div>
          <div class="td w2">{{$t('customService.insuranceQuery.period')}}</div>
        </div>
      </div>
      <div class="table-content">
        <template v-if="myPolicyList">
          <div v-for="(item,index) in myPolicyList" :key="index">
            <template v-if="index < maxShow">
              <div class="data-line" @click="handlePolicySelect(item,index)">
                <div class="td w1 pointer">
                  <template v-if="multiSelectable">
                    <img v-if="item.activity" class="icon-check pointer" src="@/assets/images/insurance-query/check.png">
                    <img v-else class="icon-check pointer" src="@/assets/images/insurance-query/un-check.png">
                    <span class="sp" :class="{ac: item.activity}">{{item.policyCode}}</span>
                  </template>
                  <template v-else>
                    <template v-if="model != 'download'">
                      <img v-if="selectPolicyCode == item.policyCode" class="icon-check pointer" src="@/assets/images/insurance-query/check.png">
                      <img v-else class="icon-check pointer" src="@/assets/images/insurance-query/un-check.png">
                    </template>
                    <span class="sp" :class="{ac: selectPolicyCode == item.policyCode}">{{item.policyCode}}</span>
                    <template v-if="model == 'download'">
                      <img class="icon-download" src="@/assets/images/insurance-query/icon-down-load.png" alt="">
                    </template>
                  </template>
                </div>
                <div class="td w2">{{item.insuredName}}</div>
                <div class="td w1">{{item.productName}}</div>
                <div class="td w2">{{item.moneyCode}}{{item.amount}}</div>
                <div class="td w2">{{item.expireAt}}</div>
                <div class="td w2">{{item.guaranteeAge}}</div>
              </div>
              <div class="separator-h" v-if="index < myPolicyList.length - 1 && index < maxShow - 1"></div>
            </template>
          </div>
          <template v-if="!policyList || maxShow < policyList.length">
            <div class="separator-h"></div>
            <div class="data-line show-more-btn" @click="maxShow = policyList.length">{{$t('customService.insuranceQuery.showMore')}}</div>
          </template>
        </template>

        <template v-else>
          <div class="empty">
            <div class="tips">
              <img class="icon" src="@/assets/images/common/icon-alert-i.png" alt="">
              <div class="txt">
                {{$t('customService.insuranceQuery.noPolicy')}}
                <span class="pointer btn">{{$t('customService.insuranceQuery.customService')}}</span>
              </div>
            </div>
          </div>
        </template>
      </div>
    </div>
  </div>
</template>


<script src="./policy-head-list.js"></script>
<style lang="scss" scoped>
@import "./policy-head-list.scss";
</style>