“基芯农育种”修改为“智慧育种”
This commit is contained in:
@@ -7,181 +7,181 @@ import local from '../utils/local'
|
||||
Vue.use(VueRouter)
|
||||
|
||||
const routes = [
|
||||
{
|
||||
path: '/login',
|
||||
component: Login,
|
||||
meta: { title: '登录', activeMenu: '/login' }
|
||||
},
|
||||
{
|
||||
path: '/',
|
||||
component: Layout,
|
||||
redirect: '/login',
|
||||
meta: { title: '', activeMenu: '/login' }
|
||||
}, {
|
||||
// 首页
|
||||
path: '/index',
|
||||
component: Layout,
|
||||
children: [
|
||||
{
|
||||
path: '/index/index',
|
||||
component: () =>
|
||||
import('../views/index/index.vue'),
|
||||
meta: { title: '首页', activeMenu: '/index/index' }
|
||||
}
|
||||
]
|
||||
}, {
|
||||
// 快速查询
|
||||
{
|
||||
path: '/login',
|
||||
component: Login,
|
||||
meta: { title: '登录', activeMenu: '/login' }
|
||||
},
|
||||
{
|
||||
path: '/',
|
||||
component: Layout,
|
||||
redirect: '/login',
|
||||
meta: { title: '', activeMenu: '/login' }
|
||||
}, {
|
||||
// 首页
|
||||
path: '/index',
|
||||
component: Layout,
|
||||
children: [
|
||||
{
|
||||
path: '/index/index',
|
||||
component: () =>
|
||||
import('../views/index/index.vue'),
|
||||
meta: { title: '首页', activeMenu: '/index/index' }
|
||||
}
|
||||
]
|
||||
}, {
|
||||
// 快速查询
|
||||
path: '/quick-Search/quick-Search',
|
||||
component: Layout,
|
||||
children: [
|
||||
{
|
||||
path: '/quick-Search/quick-Search',
|
||||
component: Layout,
|
||||
children: [
|
||||
{
|
||||
path: '/quick-Search/quick-Search',
|
||||
component: () =>
|
||||
import('../views/quick-Search/quick-Search.vue'),
|
||||
meta: { title: '快速查询', activeMenu: '/quick-Search/quick-Search' }
|
||||
}
|
||||
]
|
||||
}, {
|
||||
// 基因管理
|
||||
path: '/geneMgmt',
|
||||
component: Layout,
|
||||
children: [
|
||||
{
|
||||
path: '/geneMgmt/SPN',
|
||||
component: () =>
|
||||
import('../views/geneMgmt/SPN.vue'),
|
||||
meta: { title: 'SNP位点管理', activeMenu: '/geneMgmt/SPN' }
|
||||
},
|
||||
{
|
||||
path: '/geneMgmt/SPNPanel',
|
||||
component: () =>
|
||||
import('../views/geneMgmt/SPNPanel.vue'),
|
||||
meta: { title: 'SNP Panel位点管理', activeMenu: '/geneMgmt/SPNPanel' }
|
||||
},
|
||||
{
|
||||
path: '/geneMgmt/sequence',
|
||||
component: () =>
|
||||
import('../views/geneMgmt/sequence.vue'),
|
||||
meta: { title: '原始测序数据', activeMenu: '/geneMgmt/sequence' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
// 繁育管理
|
||||
path: '/breedMgmt',
|
||||
component: Layout,
|
||||
children: [
|
||||
{
|
||||
path: '/breedMgmt/BLUP',
|
||||
component: () =>
|
||||
import('../views/breedMgmt/BLUP.vue'),
|
||||
meta: { title: 'BLUP', activeMenu: '/breedMgmt/BLUP' }
|
||||
},
|
||||
{
|
||||
path: '/breedMgmt/paternityTest',
|
||||
component: () =>
|
||||
import('../views/breedMgmt/paternityTest.vue'),
|
||||
meta: { title: '亲子鉴定', activeMenu: '/breedMgmt/paternityTest' }
|
||||
},
|
||||
{
|
||||
path: '/breedMgmt/lineage',
|
||||
component: () =>
|
||||
import('../views/breedMgmt/lineage.vue'),
|
||||
meta: { title: '血统管理', activeMenu: '/breedMgmt/lineage' }
|
||||
}
|
||||
]
|
||||
},
|
||||
component: () =>
|
||||
import('../views/quick-Search/quick-Search.vue'),
|
||||
meta: { title: '快速查询', activeMenu: '/quick-Search/quick-Search' }
|
||||
}
|
||||
]
|
||||
}, {
|
||||
// 基因管理
|
||||
path: '/geneMgmt',
|
||||
component: Layout,
|
||||
children: [
|
||||
{
|
||||
path: '/geneMgmt/SPN',
|
||||
component: () =>
|
||||
import('../views/geneMgmt/SPN.vue'),
|
||||
meta: { title: 'SNP位点管理', activeMenu: '/geneMgmt/SPN' }
|
||||
},
|
||||
{
|
||||
path: '/geneMgmt/SPNPanel',
|
||||
component: () =>
|
||||
import('../views/geneMgmt/SPNPanel.vue'),
|
||||
meta: { title: 'SNP Panel位点管理', activeMenu: '/geneMgmt/SPNPanel' }
|
||||
},
|
||||
{
|
||||
path: '/geneMgmt/sequence',
|
||||
component: () =>
|
||||
import('../views/geneMgmt/sequence.vue'),
|
||||
meta: { title: '原始测序数据', activeMenu: '/geneMgmt/sequence' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
// 繁育管理
|
||||
path: '/breedMgmt',
|
||||
component: Layout,
|
||||
children: [
|
||||
{
|
||||
path: '/breedMgmt/BLUP',
|
||||
component: () =>
|
||||
import('../views/breedMgmt/BLUP.vue'),
|
||||
meta: { title: 'BLUP', activeMenu: '/breedMgmt/BLUP' }
|
||||
},
|
||||
{
|
||||
path: '/breedMgmt/paternityTest',
|
||||
component: () =>
|
||||
import('../views/breedMgmt/paternityTest.vue'),
|
||||
meta: { title: '亲子鉴定', activeMenu: '/breedMgmt/paternityTest' }
|
||||
},
|
||||
{
|
||||
path: '/breedMgmt/lineage',
|
||||
component: () =>
|
||||
import('../views/breedMgmt/lineage.vue'),
|
||||
meta: { title: '血统管理', activeMenu: '/breedMgmt/lineage' }
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
// 进化分析
|
||||
path: '/phylogeneticAnalysis',
|
||||
component: Layout,
|
||||
children: [
|
||||
{
|
||||
path: '/phylogeneticAnalysis/evolutionaryTree',
|
||||
component: () =>
|
||||
import('../views/phylogeneticAnalysis/evolutionaryTree.vue'),
|
||||
meta: { title: '进化树', activeMenu: '/phylogeneticAnalysis/evolutionaryTree' }
|
||||
},
|
||||
{
|
||||
path: '/phylogeneticAnalysis/pca',
|
||||
component: () =>
|
||||
import('../views/phylogeneticAnalysis/pca.vue'),
|
||||
meta: { title: 'PCA', activeMenu: '/phylogeneticAnalysis/pca' }
|
||||
},
|
||||
{
|
||||
path: '/phylogeneticAnalysis/admixture',
|
||||
component: () =>
|
||||
import('../views/phylogeneticAnalysis/admixture.vue'),
|
||||
meta: { title: 'ADMIXTURE', activeMenu: '/phylogeneticAnalysis/admixture' }
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
// 遗传病风险
|
||||
path: '/disease-resistance',
|
||||
component: Layout,
|
||||
children: [
|
||||
{
|
||||
path: '/disease-resistance/disease-resistance',
|
||||
component: () =>
|
||||
import('../views/disease-resistance/disease-resistance.vue'),
|
||||
meta: { title: '遗传病风险', activeMenu: '/disease-resistance/disease-resistance' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
// 档案信息
|
||||
path: '/archive-information',
|
||||
component: Layout,
|
||||
children: [
|
||||
{
|
||||
path: '/archive-information/archive-information',
|
||||
component: () =>
|
||||
import('../views/archive-information/archive-information.vue'),
|
||||
meta: { title: '档案信息', activeMenu: '/archive-information/archive-information' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
// 进化分析
|
||||
path: '/phylogeneticAnalysis',
|
||||
component: Layout,
|
||||
children: [
|
||||
{
|
||||
path: '/phylogeneticAnalysis/evolutionaryTree',
|
||||
component: () =>
|
||||
import('../views/phylogeneticAnalysis/evolutionaryTree.vue'),
|
||||
meta: { title: '进化树', activeMenu: '/phylogeneticAnalysis/evolutionaryTree' }
|
||||
},
|
||||
{
|
||||
path: '/phylogeneticAnalysis/pca',
|
||||
component: () =>
|
||||
import('../views/phylogeneticAnalysis/pca.vue'),
|
||||
meta: { title: 'PCA', activeMenu: '/phylogeneticAnalysis/pca' }
|
||||
},
|
||||
{
|
||||
path: '/phylogeneticAnalysis/admixture',
|
||||
component: () =>
|
||||
import('../views/phylogeneticAnalysis/admixture.vue'),
|
||||
meta: { title: 'ADMIXTURE', activeMenu: '/phylogeneticAnalysis/admixture' }
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
// 遗传病风险
|
||||
path: '/disease-resistance',
|
||||
component: Layout,
|
||||
children: [
|
||||
{
|
||||
path: '/disease-resistance/disease-resistance',
|
||||
component: () =>
|
||||
import('../views/disease-resistance/disease-resistance.vue'),
|
||||
meta: { title: '遗传病风险', activeMenu: '/disease-resistance/disease-resistance' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
// 档案信息
|
||||
path: '/archive-information',
|
||||
component: Layout,
|
||||
children: [
|
||||
{
|
||||
path: '/archive-information/archive-information',
|
||||
component: () =>
|
||||
import('../views/archive-information/archive-information.vue'),
|
||||
meta: { title: '档案信息', activeMenu: '/archive-information/archive-information' }
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
// 品种资源
|
||||
path: '/variety-resources',
|
||||
component: Layout,
|
||||
children: [
|
||||
{
|
||||
path: '/variety-resources/variety-resources',
|
||||
component: () =>
|
||||
import('../views/variety-resources/variety-resources.vue'),
|
||||
meta: { title: '品种资源', activeMenu: '/variety-resources/variety-resources' }
|
||||
},
|
||||
{
|
||||
path: '/variety-resources/pig-list',
|
||||
component: () =>
|
||||
import('../views/variety-resources/pig-list.vue'),
|
||||
meta: { title: '品种猪', activeMenu: '/variety-resources/pig-list' }
|
||||
},
|
||||
]
|
||||
}
|
||||
{
|
||||
// 品种资源
|
||||
path: '/variety-resources',
|
||||
component: Layout,
|
||||
children: [
|
||||
{
|
||||
path: '/variety-resources/variety-resources',
|
||||
component: () =>
|
||||
import('../views/variety-resources/variety-resources.vue'),
|
||||
meta: { title: '品种资源', activeMenu: '/variety-resources/variety-resources' }
|
||||
},
|
||||
{
|
||||
path: '/variety-resources/pig-list',
|
||||
component: () =>
|
||||
import('../views/variety-resources/pig-list.vue'),
|
||||
meta: { title: '品种猪', activeMenu: '/variety-resources/pig-list' }
|
||||
},
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
const router = new VueRouter({
|
||||
routes
|
||||
routes
|
||||
})
|
||||
// 前置路由守卫
|
||||
router.beforeEach((to, from, next) => {
|
||||
const token = local.get('token_sd')
|
||||
if (to.meta.title) { // 修改总标题
|
||||
document.title = '基芯农育种' + '-' + to.meta.title // routes数组中--meta是关键
|
||||
}
|
||||
if (token) { // ok
|
||||
next()
|
||||
} else { // no
|
||||
if (to.path === '/login') {
|
||||
next()
|
||||
}
|
||||
const token = local.get('token_sd')
|
||||
if (to.meta.title) { // 修改总标题
|
||||
document.title = '智慧育种' + '-' + to.meta.title // routes数组中--meta是关键
|
||||
}
|
||||
if (token) { // ok
|
||||
next()
|
||||
} else { // no
|
||||
if (to.path === '/login') {
|
||||
next()
|
||||
}
|
||||
}
|
||||
}
|
||||
// next('/login')
|
||||
// next('/login')
|
||||
)
|
||||
export default router
|
||||
|
||||
@@ -65,9 +65,7 @@
|
||||
<el-menu-item index="/phylogeneticAnalysis/evolutionaryTree"
|
||||
>进化树</el-menu-item
|
||||
>
|
||||
<el-menu-item index="/phylogeneticAnalysis/pca"
|
||||
>PCA</el-menu-item
|
||||
>
|
||||
<el-menu-item index="/phylogeneticAnalysis/pca">PCA</el-menu-item>
|
||||
<el-menu-item index="/phylogeneticAnalysis/admixture"
|
||||
>ADMIXTURE</el-menu-item
|
||||
>
|
||||
@@ -95,7 +93,7 @@ export default {
|
||||
return {
|
||||
activeIndex: '/',
|
||||
isCollapse: false,
|
||||
system_name: '基芯农育种',
|
||||
system_name: '智慧育种',
|
||||
logo: '',
|
||||
index: 0,
|
||||
menuList: [], // 菜单权限列表
|
||||
|
||||
@@ -78,7 +78,7 @@ module.exports = {
|
||||
chainWebpack: config => {
|
||||
// if (IS_PRODUCTION) {
|
||||
config.plugin('html').tap(args => {
|
||||
args[0].title = '基芯农育种'
|
||||
args[0].title = '智慧育种'
|
||||
args[0].cdn = cdn
|
||||
return args
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user