<template>
  <div class="eventCard">
    <el-row :gutter="12">
      <el-col :span="6" v-for="(item, itemIndex) in tableData" :key="itemIndex" style="padding-bottom:10px">
        <myCard shadow="always">
          <div slot="head">
            <div style="font-size:18px">
              <span>{{ item.name }}</span>
            </div>
            <div>
              <el-dropdown @command="handleCommand($event, item)" trigger="click">
                <span class="el-dropdown-link">
                  <i class="el-icon-more" style="font-size: 16px;"></i>
                </span>
                <el-dropdown-menu slot="dropdown" class="text-align_center">
                  <el-dropdown-item command="0" v-if="$reportPermission(item.id,[0,1])">分享</el-dropdown-item>
                  <el-dropdown-item command="1" v-if="[2,3].includes(item.status) && $reportPermission(item.id,[0,1])">导出报告</el-dropdown-item>
                  <el-dropdown-item command="2" v-if="[2,3].includes(item.status) && $reportPermission(item.id,[0,1])">报告文档</el-dropdown-item>
                  <el-dropdown-item command="3" v-if="[2].includes(item.status)&&[0,1,2,3].includes(item.reportType) && $reportPermission(item.id,[0,1])">自定义字段</el-dropdown-item>
                  <el-dropdown-item command="5" v-if="[2].includes(item.status) && [0,1,2].includes(item.reportType) && $reportPermission(item.id,[0,1])">拆分特征</el-dropdown-item>
                  <el-dropdown-item command="15" v-if="[2].includes(item.status) && [3,4].includes(item.reportType) && $reportPermission(item.id,[0,1])">产品信息录入</el-dropdown-item>
                  <el-dropdown-item command="8" v-if="(item.reportType == 4 && [2].includes(item.status)) && $reportPermission(item.id,[0,1])">专利与产品关联比对</el-dropdown-item>
                  <el-dropdown-item command="9" v-if="(item.reportType == 5 && [2].includes(item.status)) && $reportPermission(item.id,[0,1])"> 规避方案填写</el-dropdown-item>
                  <el-dropdown-item command="10" v-if="[3].includes(item.reportType)&&[2].includes(item.status) && $reportPermission(item.id,[0,1])"> 相关对比文件</el-dropdown-item>
                  <el-dropdown-item command="11" v-if="[2].includes(item.status) && $reportPermission(item.id,[0,1])"> 完成报告</el-dropdown-item>
                  <el-dropdown-item command="12" v-if="[3].includes(item.status) && $reportPermission(item.id,[0,1])">添加追踪报告</el-dropdown-item>
                  <!-- <el-dropdown-item command="13" v-if="(item.reportType == 7 && [2,3].includes(item.status)) && $reportPermission(item.id,[0,1])">添加无效理由和证据</el-dropdown-item> -->
                  <el-dropdown-item command="14" v-if="(item.reportType == 7 && [2,3].includes(item.status)) && $reportPermission(item.id,[0,1])">证据文献</el-dropdown-item>
                  <el-dropdown-item command="7" divided style="color: red;" v-if=" $reportPermission(item.id,[0,1])">删除 </el-dropdown-item>
                </el-dropdown-menu>
              </el-dropdown>
            </div>
          </div>
          <div>
            <el-form label-position="left" label-width="130px">
              <el-form-item label="标的专利/产品：">
                <myTooltip :content="item.signPatentNo" >
                  <div v-html="$commonJS.getColumnData(item, {type:'String',value:'signPatentNo'})" class="noWrap"></div>
                </myTooltip>
              </el-form-item>
              <el-form-item label="相关事件：">
                <myTooltip :content="$commonJS.getColumnData(item, {type:'Array',value:'eventNames'})">
                  <div class="noWrap" v-html="$commonJS.getColumnData(item, {type:'Array',value:'eventNames'})"></div>
                </myTooltip>
              </el-form-item>
              <el-form-item label="委托方：">
                <myTooltip :content="item.entrustName" >
                  <div v-html="$commonJS.getColumnData(item, {type:'String',value:'entrustName'})" class="noWrap"></div>
                </myTooltip>
              </el-form-item>
              <el-form-item label="报告类型：">
                <myTooltip :content="item.reportTypeName" >
                  <div v-html="$commonJS.getColumnData(item, {type:'String',value:'reportTypeName'})" class="noWrap"></div>
                </myTooltip>
              </el-form-item>
              <el-form-item label="报告状态：">
                <myTooltip :content="item.statusName" >
                  <div v-html="$commonJS.getColumnData(item, {type:'String',value:'statusName'})" class="noWrap"></div>
                </myTooltip>
              </el-form-item>
            </el-form>
          </div>
          <div slot="foot">
            <div class="btn">
              <i class="el-icon-edit" @click="handleCommand('e',item)"></i>
              <i class="el-icon-delete" @click="handleCommand('7', item)"></i>
            </div>
          </div>
        </myCard>
      </el-col>
    </el-row>
  </div>
</template>
  
<script>
import mixins from '../mixins';
export default {
  components: {},
  props: {},
  mixins: [mixins],
  data() {
    return {
    };
  },
  watch: {},
  computed: {},
  created() { },
  mounted() { 
    
  },
  methods: {},
};
</script>
<style lang="scss">
.eventCard{
  
}
</style>
<style lang="scss" scoped>
  .eventCard{
    .btn{
      margin: 0;
      i{
        color: var(--color2);
        font-size: 16px;
        margin-right:16px
      }
    }
  }
</style>