提交 719999d5 authored 作者: 王鹏飞's avatar 王鹏飞

updates

上级 44e574ad
......@@ -3,3 +3,4 @@ VITE_BASE_URL=https://learn-api.ezijing.com
VITE_SECRET_ID=ezijing_f807b4fa39afd0f535260ebca7932676
VITE_SECRET_KEY=1c0bf69718c780bed64d522a76942dd2
VITE_X_TRAINING_URL=https://x-training.ezijing.com
VITE_QBS_URL=https://qbs.ezijing.com
......@@ -3,3 +3,4 @@ VITE_BASE_URL=https://learn-api.ezijing.com
VITE_SECRET_ID=ezijing_f807b4fa39afd0f535260ebca7932676
VITE_SECRET_KEY=1c0bf69718c780bed64d522a76942dd2
VITE_X_TRAINING_URL=https://x-training2.ezijing.com
VITE_QBS_URL=https://qbs.ezijing.com
......@@ -3,3 +3,4 @@ VITE_BASE_URL=https://learn-api2.ezijing.com
VITE_SECRET_ID=ezijing_f807b4fa39afd0f535260ebca7932676
VITE_SECRET_KEY=1c0bf69718c780bed64d522a76942dd2
VITE_X_TRAINING_URL=https://x-training2.ezijing.com
VITE_QBS_URL=https://qbs.ezijing.com
......@@ -18,7 +18,10 @@
</el-menu-item>
</el-submenu>
<el-menu-item :index="item.path" :key="item.path" v-permission="item.tag" v-else>
<i :class="item.icon"></i>{{ item.name }}
<template v-if="item.href">
<i :class="item.icon"></i><a :href="item.href" target="_blank">{{ item.name }}</a>
</template>
<template v-else> <i :class="item.icon"></i>{{ item.name }} </template>
</el-menu-item>
</template>
</el-menu>
......@@ -30,9 +33,12 @@
export default {
name: 'AppAside',
data() {
return {}
},
computed: {
menuList() {
const xtrainingUrl = import.meta.env.VITE_X_TRAINING_URL
return {
menuList: [
return [
{
name: '仪表台',
path: '/dashboard',
......@@ -80,6 +86,12 @@ export default {
path: xtrainingUrl,
children: [{ name: '实训课程库', path: xtrainingUrl, href: xtrainingUrl, tag: 'menu_tranining_test' }]
},
{
name: '题库系统',
icon: 'el-icon-collection',
tag: 'menu_qa',
href: this.qbsUrl
},
{
name: '系统管理',
path: '/system/safe',
......@@ -88,9 +100,7 @@ export default {
children: [{ name: '安全设置', path: '/system/safe', tag: 'menu_system_safe' }]
}
]
}
},
computed: {
defaultActive() {
// 扁平菜单
const flatMenuList = this.menuList.reduce((result, item) => {
......@@ -104,6 +114,12 @@ export default {
return this.$route.path.includes(item.path)
})
return found ? found.path : ''
},
appConfig() {
return this.$store.state.appConfig
},
qbsUrl() {
return `${import.meta.env.VITE_QBS_URL}?project_tag=${this.appConfig.tenant}`
}
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论