<template>
  <div>
    <el-row :gutter="12">
            <el-col :span="6" v-for="(item,itemIndex) in tableData" :key="itemIndex" style="height:420px">
                <el-card shadow="always" style="background:white;box-shadow:2px 2px 10px #909090" class="card">
                    <div style="display:flex;justify-content:space-between;align-items:center">
                        <p style="font-size:18px"><span># {{ (itemIndex + 1) + ((params.current - 1) * params.size) }}</span></p>
                        <div class="fun" style="color:blue;display:flex;justify-content: flex-end;" v-if="!projectId && !show">
                            <span style="margin-right: 10px;"  @click="handleEdit(item)" v-if="true">编辑</span>
                            <span style="margin-right: 10px;"  @click="handleEdit(item)" v-else>查看</span>
                            <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="1">新增专题库</el-dropdown-item>
                                <el-dropdown-item>
                                    <el-dropdown trigger="hover" placement="right-start">
                                        <span class="el-dropdown-link"> 新增报告 </span>
                                        <el-dropdown-menu  class="children_item" v-if="dictMessage.REPORT_TYPE">
                                            <el-dropdown-item v-for="item1 in dictMessage.REPORT_TYPE.filter(item1=>!['6'].includes(item1.dictChildValue))" :key="item1.dictChildValue"  @click.native="handleAnalyse(item1.dictChildValue,item)" v-if="$permission('/pcs/report/add/' + item1.permission)">{{item1.dictChildLabel}}</el-dropdown-item>
                                        </el-dropdown-menu>
                                    </el-dropdown>
                                </el-dropdown-item>
                                <el-dropdown-item command="3" divided class="color-red">删除</el-dropdown-item>
                            </el-dropdown-menu>
                            </el-dropdown>         
                        </div>
                    </div>
                    
                    <p >
                        <span style="font-weight:bolder">事件名称：</span> 
                        <el-tooltip class="item" effect="light"  placement="top" :content="item.questionName">
                            <el-link type="primary" @click="checkVisual(item.scenarioNames,item.id,item.questionName)">{{item.questionName}}</el-link>
                        </el-tooltip>
                    </p>
                    <p><span style="font-weight:bolder">相关报告数量：</span>  <span>{{item.reportNum||0}}</span> </p>
                    <p><span style="font-weight:bolder">相关专题库数量：</span>  <span>{{item.reportNum||0}}</span> </p>
                    <p>
                        <span style="font-weight:bolder">应用场景：</span> 
                        <el-tooltip class="item" effect="light"  placement="top">
                        <div slot="content"><span v-for="name in item.scenarioNames">{{name }}&nbsp;&nbsp;</span></div>
                            <span v-if="item.scenarioNames">{{item.scenarioNames[0]}}
                            <span v-if="item.scenarioNames.length>1">
                            
                            <span><img src="@/assets/img/更多.png" style="width:18px;vertical-align:bottom"/></span> 
                            </span>  
                            </span> 
                        </el-tooltip>
                    </p>
                    <p><span style="font-weight:bolder">事件时间：</span>  <span>{{item.eventDate}}</span> </p>
                    <p><span style="font-weight:bolder">描述：</span>  <span>{{item.description}}</span> </p>
                    <p><span style="font-weight:bolder">创建人：</span>  <span>{{item.createPersonName}}</span> </p>
                    <p><span style="font-weight:bolder">创建时间：</span>  <span>{{item.createTime}}</span> </p>
                </el-card>
            </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" scoped>
</style>