路由菜单调整
This commit is contained in:
parent
22203d5b60
commit
1a2aa33168
19
src/App.vue
19
src/App.vue
@ -2,6 +2,8 @@
|
||||
<div id="app">
|
||||
<router-view />
|
||||
<deomon-topic ref="deomonTopic" />
|
||||
<deomon-list ref="deomonList" @enterQcode="qcodeEntry" />
|
||||
<qcode ref="qcode" />
|
||||
<img v-show="loading" :src="loadingImg" class="AppAll">
|
||||
<div
|
||||
v-if="!$store.state.user.baseUrl"
|
||||
@ -25,11 +27,15 @@ import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
||||
import LoadingImg from '@/assets/loading.gif';
|
||||
import AppLoading from '@/assets/appLoading.png';
|
||||
import { openIndexedDB } from '@/utils/indexedDb';
|
||||
import DeomonList from '@/views/demonstration/deomonList/index';
|
||||
import Qcode from '@/layout/components/Qcode.vue';
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
components: {
|
||||
DeomonTopic
|
||||
DeomonTopic,
|
||||
DeomonList,
|
||||
Qcode
|
||||
},
|
||||
mixins: [
|
||||
WindowResizeHandler
|
||||
@ -67,6 +73,11 @@ export default {
|
||||
},
|
||||
'$store.state.app.animationsCloseCount': function(val) {
|
||||
this.loading = false;
|
||||
},
|
||||
'$route': function(val) {
|
||||
if (val.path == '/trainingPlatform/multiplayerSimulation') {
|
||||
this.quickEntry();
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -100,6 +111,12 @@ export default {
|
||||
this.$store.dispatch('subscribe_un', {});
|
||||
},
|
||||
methods: {
|
||||
quickEntry() {
|
||||
this.$refs.deomonList.doShow();
|
||||
},
|
||||
qcodeEntry() {
|
||||
this.$refs.qcode.doShow();
|
||||
},
|
||||
resizeHandler() {
|
||||
this.$store.dispatch('app/resize', { width: this._clientWidth, height: this._clientHeight });
|
||||
},
|
||||
|
@ -29,6 +29,7 @@ import systemGenerate from './systemGenerate';
|
||||
import login from './login';
|
||||
import designPlatform from './designPlatform';
|
||||
import trainingManage from './trainingManage';
|
||||
import newRouter from './newRouter';
|
||||
|
||||
export default {
|
||||
enLocale,
|
||||
@ -61,5 +62,6 @@ export default {
|
||||
systemGenerate,
|
||||
login,
|
||||
designPlatform,
|
||||
trainingManage
|
||||
trainingManage,
|
||||
newRouter
|
||||
};
|
||||
|
44
src/i18n/langs/en/newRouter.js
Normal file
44
src/i18n/langs/en/newRouter.js
Normal file
@ -0,0 +1,44 @@
|
||||
export default {
|
||||
simulation: 'simulation',
|
||||
multiplayerSimulation: 'Many simulation',
|
||||
regulationSimulation: 'Regulation of the simulation',
|
||||
teachingManagement: 'teaching management',
|
||||
classroom: 'classroom management',
|
||||
student: 'student management',
|
||||
theory: 'The theory of management',
|
||||
training: 'Practical teaching management',
|
||||
exam: 'examination management',
|
||||
lineDesign: 'track design',
|
||||
case: 'case',
|
||||
SystemManagement: 'System management',
|
||||
SystemDataManagement: 'System data management',
|
||||
dataDictionary: 'Data dictionary',
|
||||
SystemAccountManagement: 'System Account Management',
|
||||
ThirdPartyAccounts: 'Configuring Third-Party Accounts',
|
||||
OnlineInformationManagement: 'Online information management',
|
||||
loginUser: 'Online users',
|
||||
cacheDataManage: 'Cache data management',
|
||||
simulationManage: 'simulation management',
|
||||
companyUserManage: 'Organization User Management',
|
||||
companyManage: 'Company manage',
|
||||
lineDataManage: 'Line data management',
|
||||
lineTypeManage: 'Line type management',
|
||||
linePacketManage: 'Line packet management',
|
||||
teachingDataManage: 'Teaching data management',
|
||||
theoryData: 'Theoretical topic data management',
|
||||
trainingDataManage: 'Training data management',
|
||||
examData: 'Examination data management',
|
||||
userTrainingDataManage: 'User training data management',
|
||||
userExamData: 'User test data management',
|
||||
projectDataManage: 'Project data management',
|
||||
projectManage: 'Project Manage',
|
||||
projectConfig: 'Project client configuration',
|
||||
projectDeviceManage: 'Project equipment management',
|
||||
permissionDataManage: 'Permission Data Management',
|
||||
permissionManage: 'Permission',
|
||||
authorityTransferManage: 'Privilege distribution management',
|
||||
userRulesManage: 'User Rights Statistics',
|
||||
fileManage: 'File Manage',
|
||||
frontResourceManage: 'Front-end Resource Management',
|
||||
iscsPrerecordManage: 'ISCS Advance record management'
|
||||
};
|
@ -29,6 +29,7 @@ import systemGenerate from './systemGenerate';
|
||||
import login from './login';
|
||||
import designPlatform from './designPlatform';
|
||||
import trainingManage from './trainingManage';
|
||||
import newRouter from './newRouter';
|
||||
|
||||
export default {
|
||||
cnLocale,
|
||||
@ -61,5 +62,6 @@ export default {
|
||||
systemGenerate,
|
||||
login,
|
||||
designPlatform,
|
||||
trainingManage
|
||||
trainingManage,
|
||||
newRouter
|
||||
};
|
||||
|
44
src/i18n/langs/zh/newRouter.js
Normal file
44
src/i18n/langs/zh/newRouter.js
Normal file
@ -0,0 +1,44 @@
|
||||
export default {
|
||||
simulation: '仿真',
|
||||
multiplayerSimulation: '多人仿真',
|
||||
regulationSimulation: '监管仿真',
|
||||
teachingManagement: '教学管理',
|
||||
classroom: '班级管理',
|
||||
student: '学生管理',
|
||||
theory: '理论题目管理',
|
||||
training: '实训教学管理',
|
||||
exam: '考试管理',
|
||||
lineDesign: '线路设计',
|
||||
case: '案例管理',
|
||||
SystemManagement: '系统管理',
|
||||
SystemDataManagement: '系统数据管理',
|
||||
dataDictionary: '数据字典',
|
||||
SystemAccountManagement: '系统账户管理',
|
||||
ThirdPartyAccounts: '第三方账户配置',
|
||||
OnlineInformationManagement: '在线信息管理',
|
||||
loginUser: '在线用户',
|
||||
cacheDataManage: '缓存数据管理',
|
||||
simulationManage: '仿真管理',
|
||||
companyUserManage: '组织用户管理',
|
||||
companyManage: '组织管理',
|
||||
lineDataManage: '线路数据管理',
|
||||
lineTypeManage: '线路类型管理',
|
||||
linePacketManage: '线路分组管理',
|
||||
teachingDataManage: '教学数据管理',
|
||||
theoryData: '理论题数据管理',
|
||||
trainingDataManage: '实训数据管理',
|
||||
examData: '考试数据管理',
|
||||
userTrainingDataManage: '用户实训数据管理',
|
||||
userExamData: '用户考试数据管理',
|
||||
projectDataManage: '项目数据管理',
|
||||
projectManage: '项目管理',
|
||||
projectConfig: '项目客户端配置',
|
||||
projectDeviceManage: '项目设备管理',
|
||||
permissionDataManage: '权限数据管理',
|
||||
permissionManage: '权限管理',
|
||||
authorityTransferManage: '权限分发管理',
|
||||
userRulesManage: '用户权限管理',
|
||||
fileManage: '文件管理',
|
||||
frontResourceManage: '前端资源管理',
|
||||
iscsPrerecordManage: 'ISCS预录管理'
|
||||
};
|
@ -11,6 +11,7 @@
|
||||
@select="handleSelect"
|
||||
>
|
||||
<system-title />
|
||||
<div class="centerNullMenu" />
|
||||
<template v-for="(item, idx) in routers">
|
||||
<template v-if="!item.hidden&&item.children">
|
||||
<template v-if="hasOneScreenShowingChildren(item.children) &&!item.alwaysShow">
|
||||
@ -41,13 +42,13 @@
|
||||
<template v-for="(child,cdx) in item.children">
|
||||
<template v-if="!child.hidden">
|
||||
<template v-if="child.children&&child.children.length>0&&hasShowingChildren(child.children)">
|
||||
<el-submenu :key="cdx" :index="child.path" :show-timeout="100">
|
||||
<el-submenu :key="cdx" :index="child.path" :show-timeout="100" popper-class="grandChildClass">
|
||||
<template slot="title">
|
||||
<span v-if="child.meta" slot="title">{{ $t(child.meta.i18n) }}</span>
|
||||
</template>
|
||||
<template v-for="(grandchild,gdx) in child.children">
|
||||
<template v-if="!grandchild.hidden">
|
||||
<template :to="child.path+'/'+grandchild.path">
|
||||
<template v-if="!grandchild.children" :to="child.path+'/'+grandchild.path">
|
||||
<el-menu-item :key="gdx" :index="item.redirect ? item.redirect : (child.path+'/'+grandchild.path)">
|
||||
<span
|
||||
v-if="grandchild.meta"
|
||||
@ -55,11 +56,25 @@
|
||||
>{{ $t(grandchild.meta.i18n) }}</span>
|
||||
</el-menu-item>
|
||||
</template>
|
||||
<template v-else :to="child.path+'/'+grandchild.path">
|
||||
<el-submenu v-for="(mgChild,mgdx) in grandchild.children" :key="mgdx" :index="mgChild.path" :show-timeout="100">
|
||||
<template slot="title">
|
||||
<span v-if="mgChild.meta" slot="title">{{ $t(mgChild.meta.i18n) }}</span>
|
||||
</template>
|
||||
<el-menu-item :key="mgdx" :index="item.redirect ? item.redirect : (child.path+'/'+grandchild.path + '/' + mgChild.path)">
|
||||
<span
|
||||
v-if="mgChild.meta"
|
||||
slot="title"
|
||||
>{{ $t(mgChild.meta.i18n) }}</span>
|
||||
</el-menu-item>
|
||||
</el-submenu>
|
||||
</template>
|
||||
</template>
|
||||
</template>
|
||||
</el-submenu>
|
||||
</template>
|
||||
<template v-else :to="item.path+'/'+child.path">
|
||||
<!-- <el-menu-item :key="cdx" :index="item.redirect ? item.redirect : (item.path+'/'+child.path)" :route="(child.route && child.route()) ? child.route() : null"> -->
|
||||
<el-menu-item :key="cdx" :index="item.redirect ? item.redirect : (item.path+'/'+child.path)">
|
||||
<span v-if="child.meta" slot="title">{{ $t(child.meta.i18n) }}</span>
|
||||
</el-menu-item>
|
||||
@ -70,7 +85,7 @@
|
||||
</template>
|
||||
</template>
|
||||
<div v-if="!thirdLogin" class="rightGroup">
|
||||
<quick-entry ref="quickEntry" />
|
||||
<!-- <quick-entry ref="quickEntry" /> -->
|
||||
<user-logout ref="userLogout" />
|
||||
</div>
|
||||
</el-menu>
|
||||
@ -171,9 +186,10 @@ export default {
|
||||
$height: 61px;
|
||||
|
||||
.rightGroup{
|
||||
position: absolute;
|
||||
right: 35px;
|
||||
// position: absolute;
|
||||
// right: 35px;
|
||||
display: inline-block;
|
||||
padding: 0 35px;
|
||||
}
|
||||
|
||||
.navbar {
|
||||
@ -181,7 +197,11 @@ export default {
|
||||
line-height: $height;
|
||||
padding-left: 30px;
|
||||
border-radius: 0px !important;
|
||||
|
||||
display: flex;
|
||||
.centerNullMenu {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
}
|
||||
.image-container {
|
||||
line-height: $height;
|
||||
height: $height;
|
||||
@ -214,4 +234,7 @@ export default {
|
||||
margin-right:20px;
|
||||
font-size:14px;
|
||||
}
|
||||
/deep/ .grandChildClass {
|
||||
left: -210px !important;
|
||||
}
|
||||
</style>
|
||||
|
@ -217,6 +217,9 @@ const IscsDeviceManage = () => import('@/views/system/iscsDeviceManage');
|
||||
const IscsResourcesManage = () => import('@/views/system/iscsResourcesManage');
|
||||
|
||||
const PisScreen = () => import('@/views/pis/index');
|
||||
const Case = () => import('@/views/case/index');
|
||||
const TransitionIndex = () => import('@/views/temporary/transitionIndex');
|
||||
const Temporary = () => import('@/views/temporary/index');
|
||||
|
||||
// import { GenerateRouteProjectList } from '@/scripts/ProjectConfig';
|
||||
// import { getSessionStorage } from '@/utils/auth';
|
||||
@ -1539,6 +1542,214 @@ export const asyncRouter = [
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{ // 新路由-仿真菜单
|
||||
path: '/trainingPlatform',
|
||||
component: Layout,
|
||||
meta: {
|
||||
i18n: 'newRouter.simulation',
|
||||
roles: [admin, user, userTrainingPlatform]
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
component: TrainingPlatform,
|
||||
// route: { path: '/simulation/trainingPlatform/detail' },
|
||||
meta: {
|
||||
i18n: 'newRouter.simulation'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'detail/:subSystem',
|
||||
component: DemonstrationDetail,
|
||||
meta: {},
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'multiplayerSimulation',
|
||||
// component: multiplayerSimulation,
|
||||
meta: {
|
||||
i18n: 'newRouter.multiplayerSimulation'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'regulationSimulation',
|
||||
component: Temporary,
|
||||
meta: {
|
||||
i18n: 'newRouter.regulationSimulation'
|
||||
}
|
||||
}
|
||||
|
||||
]
|
||||
},
|
||||
{ // 新路由-教学管理菜单
|
||||
path: '/teachingManagement',
|
||||
component: Layout,
|
||||
meta: {
|
||||
i18n: 'newRouter.teachingManagement',
|
||||
roles: [admin, user, userTrainingPlatform]
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'classroom',
|
||||
// component: Classroom,
|
||||
meta: {
|
||||
i18n: 'newRouter.classroom'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'student',
|
||||
// component: Student,
|
||||
meta: {
|
||||
i18n: 'newRouter.student'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'theory',
|
||||
// component: Theory,
|
||||
meta: {
|
||||
i18n: 'newRouter.theory'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'training',
|
||||
// component: Training,
|
||||
meta: {
|
||||
i18n: 'newRouter.training'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'exam',
|
||||
// component: Exam,
|
||||
meta: {
|
||||
i18n: 'newRouter.exam'
|
||||
}
|
||||
}
|
||||
|
||||
]
|
||||
},
|
||||
{ // 新路由-线路设计
|
||||
path: '/design',
|
||||
component: Layout,
|
||||
meta: {
|
||||
i18n: 'newRouter.lineDesign',
|
||||
roles: [admin, user, userTrainingPlatform]
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'usermap',
|
||||
redirect: '/design/usermap/home',
|
||||
component: NewDesignPlatformUser,
|
||||
meta: {
|
||||
i18n: 'newRouter.lineDesign'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'home',
|
||||
component: DesignPlatformHome,
|
||||
hidden: true,
|
||||
meta: {
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{ // 新路由-案例
|
||||
path: '/case',
|
||||
component: Layout,
|
||||
meta: {
|
||||
i18n: 'newRouter.case',
|
||||
roles: [admin, user, userTrainingPlatform]
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
component: Case,
|
||||
meta: {
|
||||
i18n: 'newRouter.case'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{ // 新路由-系统管理
|
||||
path: '/system',
|
||||
component: Layout,
|
||||
meta: {
|
||||
i18n: 'newRouter.SystemManagement',
|
||||
roles: [admin, userTrainingPlatform]
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '/systemDataManagement',
|
||||
component: TransitionIndex,
|
||||
meta: {
|
||||
i18n: 'newRouter.SystemDataManagement'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'dictionary',
|
||||
component: Dictionary,
|
||||
meta: {
|
||||
i18n: 'newRouter.dataDictionary'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'userManage',
|
||||
component: UserControl,
|
||||
meta: {
|
||||
i18n: 'newRouter.SystemAccountManagement'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'ThirdPartyAccounts',
|
||||
component: Temporary,
|
||||
meta: {
|
||||
i18n: 'newRouter.ThirdPartyAccounts'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/OnlineInformationManagement',
|
||||
component: TransitionIndex,
|
||||
meta: {
|
||||
i18n: 'newRouter.OnlineInformationManagement'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'loginUserManage',
|
||||
component: LoginUserControl,
|
||||
meta: {
|
||||
i18n: 'newRouter.loginUser'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'CacheControl',
|
||||
component: CacheControl,
|
||||
meta: {
|
||||
i18n: 'newRouter.cacheDataManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'existingSimulation',
|
||||
component: ExistingSimulation,
|
||||
meta: {
|
||||
i18n: 'newRouter.simulationManage'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'companyUserManage',
|
||||
component: DeviceManage,
|
||||
meta: {
|
||||
i18n: 'newRouter.companyUserManage'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
/* merge 是否再路由处理中与asyncRouter进行合并 mergeIndex合并进入asyncRouter【mergeIndex】 慎重调整asyncRouter顺序 */
|
||||
|
75
src/views/case/index.vue
Normal file
75
src/views/case/index.vue
Normal file
@ -0,0 +1,75 @@
|
||||
<template>
|
||||
<div class="quick-entry">
|
||||
<QueryListPage ref="queryListPage" :card-padding="10" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'Case',
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
caseList: [
|
||||
{
|
||||
name: '西安铁路职业技术学院',
|
||||
url: 'https://joylink.club/oss/portal/cases/西安铁路职业技术学院.pdf'
|
||||
},
|
||||
{
|
||||
name: '贵州装备制造职业学院',
|
||||
url: 'https://joylink.club/oss/portal/cases/贵州装备制造职业学院机电技术专业实训室建设.pdf'
|
||||
},
|
||||
{
|
||||
name: '江苏电子信息职业学院',
|
||||
url: 'https://joylink.club/oss/portal/cases/江苏电子信息职业学院-城市轨道交通行车组织综合实训室.pdf'
|
||||
}
|
||||
],
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '100px',
|
||||
reset: true,
|
||||
show:false
|
||||
},
|
||||
queryList: {
|
||||
data: [],
|
||||
selectCheckShow: false,
|
||||
paginationHiden: true,
|
||||
indexShow: true,
|
||||
height: 500,
|
||||
columns: [
|
||||
{
|
||||
title: '案例名称',
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: '描述',
|
||||
prop: 'description'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: '操作',
|
||||
width: '150',
|
||||
buttons: [
|
||||
{
|
||||
name: '查看',
|
||||
handleClick: this.handleClick,
|
||||
type: 'primary'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.queryList.data = this.caseList;
|
||||
},
|
||||
methods: {
|
||||
handleClick(index, row) {
|
||||
window.open(row.url, '_blank');
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
22
src/views/temporary/index.vue
Normal file
22
src/views/temporary/index.vue
Normal file
@ -0,0 +1,22 @@
|
||||
<template>
|
||||
<div class="temporary">
|
||||
<span>功能实现中......</span>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'Temporary',
|
||||
components: {},
|
||||
data() {
|
||||
return {};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.temporary {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
12
src/views/temporary/transitionIndex.vue
Normal file
12
src/views/temporary/transitionIndex.vue
Normal file
@ -0,0 +1,12 @@
|
||||
<template>
|
||||
<router-view />
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'NullIndex',
|
||||
components: {},
|
||||
data() {
|
||||
return {};
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user