<template>
    <div style="height:100%">
      <el-container>
        <el-header class="basic_header">
            <el-tabs v-model="activeName" type="card" @tab-click="handleClick" style="width:100%">
              <el-tab-pane v-for="item in menu" :key='item.path' :label="item.label" :name="item.path"></el-tab-pane>
            </el-tabs>
            <!-- <my-tabs v-model="activeName" tabs-type="card" :font-size="16" :border="true">
                <my-tabs-item v-for="item in menu" :key='item.path' :label="item.label" :name="item.path">
                </my-tabs-item>
            </my-tabs> -->
            
        </el-header>
        <el-main>
            <component :is='activeName' :type="type" :id="id" :name="name" :licenseRate="licenseRate" :categoryId="categoryId"></component>
        </el-main>
      </el-container>
    </div>
</template>
  
<script>
import basicMessage from './basicMessage.vue';
// import market from '../../market/index.vue'
import chart from '../../echarts/components/echarts.vue'
import marketAndTrend from './marketAndTrend.vue';
import framework from '../../framework/viewIndex.vue'
  export default {
    components: {
        basicMessage,
        chart,
        marketAndTrend,
        framework
    },
    props: {
        type:{

        },
        id:{

        },
        name:{

        },
        licenseRate:{

        },
        categoryId:{

        }
    },
    data() {
      return {
        menu:[],
        activeName:'basicMessage',
      };
    },
    watch: {},
    computed: {},
    created() {},
    mounted() {
        this.getMenu()
    },
    methods: {
        getMenu(){
            if(this.type == '1'){
                this.menu = [
                    {
                        label:'基本信息',
                        value:'1',
                        path:'basicMessage'
                    },
                    {
                        label:'趋势图',
                        value:'2',
                        path:'chart'
                    },
                    {
                        label:'分类架构',
                        value:'3',
                        path:'framework'
                    },
                    {
                        label:'专利布局可视化',
                        value:'3',
                        path:'jsMind'
                    },

                ]
            }else{
                this.menu = [
                    {
                        label:'基本信息',
                        value:'1',
                        path:'basicMessage'
                    },
                    {
                        label:'营销数据',
                        value:'2',
                        path:'marketAndTrend'
                    },
                    {
                        label:'商品化专利',
                        value:'3',
                        path:'RelatedPatents'
                    },
                    {
                        label:'产品架构',
                        value:'4',
                        path:'framework'
                    },
                    {
                        label:'专利布局可视化',
                        value:'5',
                        path:'jsMind'
                    }, 
                ]
            }
        },
        handleClick(tab){
    
        }
    },
  };
  </script>

  