<template>
    <div>
        <el-container>
        <el-aside width="210px" style="overflow:hidden" class="patent-articles-menu">
          <el-menu class="theme-dark" :default-active="activeMenu" @select="handleSelect">
            <el-menu-item v-for="item in menuList" :index="item.path" v-if="item.show">
              <i class="el-icon-film"></i>
              <span slot="title">{{item.title}}</span>
            </el-menu-item>
          </el-menu>
        </el-aside>
        <el-container>
          <!-- <el-header></el-header> -->
          <el-main class="admin-main-box">
            <component :row="row" :is="activeMenu" :reportId="reportId" :patentNo="signPatentNo" :signPatentNo="signPatentNo" :reportId2="reportId"></component>
          </el-main>
        </el-container>
      </el-container>
    </div>
</template>

<script>
import BasicInformation from '@/views/report/reportDetails/components/basicMessage.vue';
import ProductMessage from '../components/ProductMessage.vue';
import ContrastFile from '@/views/report/reportDetails/components/SelectedPatent.vue';
import ContrastResult from '../components/ProductResult.vue';
// import ContrastPlan from './components/ContrastPlan.vue';
import ReportFile from '@/views/report/reportDetails/components/reportFile.vue';
// import referenceFile from './components/referenceFile.vue';
import TaskDetails from '@/views/report/reportDetails/components/taskDetails.vue';
export default {
    components:{
        BasicInformation,
        ProductMessage,
        ContrastFile,
        ContrastResult,
        // ContrastPlan,
        ReportFile,
        TaskDetails,
    // referenceFile
    },
    data() {
        return {
            activeMenu: "BasicInformation",
            menuList: [
                { title: '基本信息', path:"BasicInformation",show:true}, 
                { title: '标的产品信息', path:"ProductMessage",show:true}, 
                { title: '对比文件', path:"ContrastFile",show:this.$s.getSession('row').type == 4?false:true}, 
                // { title: '新对比文件', path:"referenceFile"}, 
                { title: '对比结果', path:"ContrastResult",show:true}, 
                // { title: '对比方案', path:"ContrastPlan"}, 
                { title: '报告文档', path:"ReportFile",show:true}, 
                { title: '任务清单', path:"TaskDetails",show:true}, 
            ],
        }
    },
    watch: {
  
    },
    computed:{
        dictMessage() {
            return this.$s.getSession('row').dictMessage.REPORT_TYPE
        },
        row(){
            return this.$s.getSession('row')
        },
        reportId(){
            return this.$s.getSession('row').id
        },
        signPatentNo(){
            return this.$s.getSession('row').signPatentNo
        }
    },
    mounted() {
        console.log(this.row)
        this.changePageTitle()
    },
    methods: {
        changePageTitle() {
            document.title = `${this.row.name} ${'报告详情'}`
        },
        handleSelect(index, path) {
            // console.log(index, path);
            this.activeMenu = index
        },
    },
}
</script>