import Knowledge from '@/views/knowledge/index.vue' //管理器(实体类/实体)框架页面
import ManagerPage from '@/views/knowledge/graphEntity/manager.vue' //管理器(实体类/实体)框架页面

//实体管理器
import EntityTemplateManagerPageBak from '@/views/knowledge/graphEntity/entityTemplateList.vue'
import Relationship_class_blank from '@/views/knowledge/common/Relationship_class_blank.vue'
import EntityManagerPage from '@/views/knowledge/graphEntity/entity.vue' //管理器 -> 实体主页面
import EntityList from '@/views/knowledge/graphEntity/entityList.vue' //管理器 -> 实体列表(实体类页面不存在)
import EM_AttrEditor from '@/views/knowledge/graphEntity/attrEditor.vue' //管理器 -> 实体 -> 基本属性
// import EM_AttrEditor from '@/views/knowledge/graph/jqxAttrEditor.vue' //管理器 -> 实体 -> 基本属性(jqw新版)
import EM_RelationEditor from '@/views/knowledge/graphEntity/relationEditor.vue'  //管理器 ->实体 -> 关系属性
import entityListnew from '@/views/knowledge/graphEntity/entityListnew.vue'

//关系管理器
import EntityClassManagerPage from '@/views/knowledge/graphClass/entityClass.vue' //管理器 -> 实体类主页面
import ECM_AttrEditor from '@/views/knowledge/graphClass/attrEditor.vue' //管理器 -> 实体类 -> 基本属性
// import ECM_AttrEditor from '@/views/knowledge/graphClass/jqxAttrEditor.vue' //管理器 -> 实体类 -> 基本属性(jqw新版)
import ECM_RelationEditor from '@/views/knowledge/graphClass/relationEditor.vue' //管理器 -> 实体类 -> 关系
import ECM_RelationAttrEditor from '@/views/knowledge/graphClass/relationAttrEditor.vue' //管理器 -> 实体类 -> 关系 -> 关系属性列表
// import EM_ECM_TagEditor from '@/views/manager/common/tagEditor-bak.vue'


import BlankPage from '@/views/knowledge/common/blank.vue' // 空白页面

export default [
  {
    path: '/knowledge',
    name: 'manager',
    component: Knowledge,
    meta: { title: '知识图谱', icon: 'dashboard', activeMenu: '' },
    children: [
      /**
       * manager
       */
      {
        path: '/mng',
        name: 'manager',
        component: ManagerPage,
        hidden: true,
        children: [
          /**
           * manager -> entityClass
           */
          {
            name: 'ECM_home',
            path: 'class',
            meta: {
              msg: '请选中实体类'
            },
            components: {
              main: BlankPage,
            }
          },
          /**
           * manager -> entityClass -> :id
           */
          {
            name: 'ECM_item',
            path: 'class/:classId',
            components: {
              main: EntityClassManagerPage
            },
            children: [
              {
                path: '',
                name: 'base',
                component: ECM_AttrEditor,
                meta: {
                  type: 'ELEM'
                }
              },
              {
                path: 'relation',
                component: ECM_RelationEditor,
                children: [
                  {
                    path: '',
                    name: 'relation',
                    component: BlankPage,
                    meta: {
                      msg: '请选中关系'
                    }
                  },
                  {
                    path: ':relationId',
                    name: 'relation_edit',
                    component: ECM_RelationAttrEditor
                  }
                ]
              },
              {
                path: 'media',
                name: 'media',
                component: ECM_AttrEditor,
                meta: {
                  type: 'MIME',
                  code: 'entcls'
                }
              },
              {
                path: 'tag',
                name: 'tag',
                component: BlankPage,
                meta: {
                  type:'entityClass'
                  // type: '尚未开放'
                }
              },
              {
                path: 'notype',
                name: 'notype',
                component: ECM_AttrEditor,
                meta: {
                  type: 'NONE'
                }
              },
              {
                path: 'ability',
                name: 'ability',
                component: ECM_AttrEditor,
                meta: {
                  type: 'CIDX'
                }
              }
            ]
          },
          {
            path: 'class/unknow/entity_v2',
            meta: {
              code: 'ent'
            },
            components: {
              main: () => import('@/views/knowledge/common/Relationship_class_blank.vue') // 实体类新增空白页面
            }
          },
          {
            path: 'class/:classId/entity_v2',
            name: 'class_entity_v2',
            meta: {
              msg: '请选中实体',
              code: 'ent'
            },
            components: {
              // 如果是带实体模板的版本 EntityTemplateManagerPageBak
              main: EntityTemplateManagerPageBak,//管理器 -> 实体主页面
              entityList: () => import('@/views/knowledge/graphEntity/entityList.vue')//管理器 -> 实体列表(实体类页面不存在)
            },
          },
        ],
      },
      {
          path: '/entityListnew',
          name: 'entityListnew',
          hidden: true,
          component: entityListnew
      },
      {
        path: '/model/:classId/entity_model/:entityId', // 模板实体详情
        name: 'model_edit',
        meta: {
          code: 'ent'
        },
        hidden: true,
        component: () => import('@/views/knowledge/graphEntity/attrModelEditor.vue')
      },
    ]
  }
]
