<template>
  <div class="PatentLeft  height_100" style="">

    <div
      style="display: flex;justify-content: space-evenly;height: 50px;line-height: 50px;border-bottom: 1px solid #ccc;">
      <div>总专利数量：{{ total }}</div>
    </div>
    <div class="list" v-if="[1,2,7].findIndex(item=>{return item == reportType}) == -1">
      <div class="left-patentNo"  v-for="(item,index) in patentList" :key="item.patentNo" :style="{background:(item.patentNo == patentNo)? '#cdd7eb':''}" @click="$emit('getPatentLeft',item.patentNo,index)">
        <div>{{ item.patentNo }}</div>
        <my-tooltip :content="item.title.filter(item=> item.if_origin)[0].text_content" placement="bottom-start">
          <div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{ item.title.filter(item=> item.if_origin)[0].text_content }}</div>
        </my-tooltip>
      </div>
    </div>
    <div class="list" v-else>
      <div class="left-patentNo"  v-for="(item,index) in patentList" :key="item.name" :style="{background:(item.literatureNo == patentNo)? '#cdd7eb':''}" @click="$emit('getPatentLeft',item,index,true)">
        <div>{{ item.name }}</div>
      </div>
    </div>
    

  </div>
</template>

<script>
export default {
  props: {
    patentList: {
      type: Array,
      default: () => {
        return []
      }
    },
    total: {
      type: Number,
      default: 0
    },
    patentNo:{
      default:''
    },
    reportType:{
      default:0
    }
  },
  data() {
    return {
     
    }
  },
  mounted() {

  },
  methods: {
    
  },
}
</script>

<style lang="scss" scoped>
.PatentLeft {
  .list{
    height: calc(100% - 50px);
    overflow-y: auto;
  }
  .list:empty::before{
    content:'无对比专利';
    color: #958b8b8c;
    font-size: 20px;
    display: flex;
    justify-content: center;
  }
  .left-patentNo {
    border-bottom: 1px solid #ccc;
    overflow: hidden;
    padding: 5px 10px;
    height: 60px;
    color: #333;
    font-size: 14px;
    padding-top: 10px;
  }

  .left-patentNo:hover {
    background: #cdd7eb;
  }
}
</style>