e-correspondence-head-list.vue 5.39 KB
<template>
  <div class="list-container">
    <modal2-comp :visible="showDownloadError" :close="()=>{showDownloadError = false}" :content="$t('glbalTips.sysError')"></modal2-comp>
    <filter-comp :items="checkList" @confirm="onCheckConfirmHandler" :visible="filterVisible" @close="filterVisible = false" :confirmText="$t('common.Confirm')" :cancelText="$t('common.Cancel')"></filter-comp>
    <div class="cell-group">
      <div class="table-contaner">
        <div class="table-header orange new">
          <div class="normal-header">
            <div class="td w1">
              {{$t('eCorrespondenceEnquiry.PolicyNumber')}}
              <!-- <div @click="onFilterHandler('bizNo')" class="down-arrow"></div> -->
              <el-dropdown @command="handleFiltBizNo" v-if="handleFiltLetterType">
                <div class="down-arrow"></div>
                <el-dropdown-menu slot="dropdown">
                  <el-dropdown-item v-for="(item,index) in bizNoCandidates" :key="index" :command="item.v">{{item.n}}</el-dropdown-item>
                </el-dropdown-menu>
              </el-dropdown>
              <div v-else class="down-arrow"></div>
            </div>
            <div class="td w2">{{$t('eCorrespondenceEnquiry.TypeOfCorrespondence')}}
              <!-- <div @click="onFilterHandler('letterType')" class="down-arrow"></div> -->
              <el-dropdown @command="handleFiltLetterType" v-if="handleFiltLetterType">
                <div class="down-arrow"></div>
                <el-dropdown-menu slot="dropdown">
                  <el-dropdown-item v-for="(item,index) in letterTypeCandiates" :key="index" :command="item.v">{{item.n}}</el-dropdown-item>
                </el-dropdown-menu>
              </el-dropdown>
              <div v-else class="down-arrow"></div>
            </div>
            <div class="td w3">{{$t('eCorrespondenceEnquiry.SentOutDate')}}
              <!-- <div @click="onFilterHandler('printTime')" class="down-arrow"></div> -->
              <el-dropdown @command="handleFiltPrintTime" v-if="printTimeCandidates">
                <div class="down-arrow"></div>
                <el-dropdown-menu slot="dropdown">
                  <el-dropdown-item v-for="(item,index) in printTimeCandidates" :key="index" :command="item.v">{{item.n}}</el-dropdown-item>
                </el-dropdown-menu>
              </el-dropdown>
              <div v-else class="down-arrow"></div>
            </div>
            <div class="td w4">{{$t('eCorrespondenceEnquiry.DownloadLink')}}

            </div>
            <div class="td w5">{{$t('eCorrespondenceEnquiry.Status')}}
              <!-- <div class="down-arrow"></div> -->
              <el-dropdown @command="handleFiltIsRead" v-if="handleFiltIsRead">
                <div class="down-arrow"></div>
                <el-dropdown-menu slot="dropdown">
                  <el-dropdown-item v-for="(item,index) in isReadCandiates" :key="index" :command="item.v">{{item.n}}</el-dropdown-item>
                </el-dropdown-menu>
              </el-dropdown>
              <div v-else class="down-arrow"></div>
            </div>
          </div>
        </div>
      </div>
      <div class="table-content" :class="{hide : hide}">
        <template v-if="contentList && contentList.length > 0">
          <div v-for="(item,index) in contentList" :key="index">
            <template v-if="index < maxShow">
              <div class="data-line">
                <div class="td w1">{{item.policyCode}}</div>
                <div class="td w2">{{$t("eCorrespondenceEnquiry.letterName")}}</div>
                <div class="td w3">{{item.printTime.split(" ")[0]}}</div>
                <div class="td w4 pointer" @click="downloadPolicy(item)">
                  <div class="download" @mouseover="onShowTipsOverHandler($event,item,index)" @mouseout="onShowTipsOutHandler($event,item,index)">
                    <div class="download-tips">
                      <div class="cont">{{$t('customService.insuranceQuery.downloadClick')}}</div>
                    </div>
                    <img class="icon-download" src="@/assets/images/insurance-query/icon-down-load.png" alt="">
                    <div class="desc">{{$t("eCorrespondenceEnquiry.DownloadDoc")}}</div>
                  </div>
                </div>
                <div class="td w5">{{item.isRead == "N" ? $t('eCorrespondenceEnquiry.UnRead') : $t('eCorrespondenceEnquiry.Read')}}</div>
              </div>
              <div class="separator-h" v-if="index < contentList.length - 1 && index < maxShow - 1"></div>
            </template>
          </div>
          <template v-if="maxShow < contentList.length">
            <div class="separator-h"></div>
            <div class="data-line show-more-btn" @click="maxShow = 1000">{{$t('eCorrespondenceEnquiry.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" @click="toContactUs">{{$t('customService.insuranceQuery.customService')}}</span>
              </div>
            </div>
          </div>
        </template>
      </div>
    </div>
  </div>
</template>


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