代码整合调整
This commit is contained in:
parent
0118f94e6c
commit
11190ef66f
@ -114,7 +114,6 @@ import runPlanApproval from '@/views/approval/runPlan/index';
|
|||||||
import { loginTitle } from '@/scripts/ConstDic';
|
import { loginTitle } from '@/scripts/ConstDic';
|
||||||
import { getSessionStorage } from '@/utils/auth';
|
import { getSessionStorage } from '@/utils/auth';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Note: sub-menu only appear when route children.length >= 1
|
* Note: sub-menu only appear when route children.length >= 1
|
||||||
* Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
|
* Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
|
||||||
@ -176,36 +175,36 @@ export const UrlConfig = {
|
|||||||
plan: {
|
plan: {
|
||||||
prefix: '/plan',
|
prefix: '/plan',
|
||||||
tool: '/plan/tool',
|
tool: '/plan/tool',
|
||||||
usertool: '/plan/usertool',
|
usertool: '/plan/usertool',
|
||||||
detail: '/plan/detail',
|
detail: '/plan/detail',
|
||||||
pay: '/plan/pay'
|
pay: '/plan/pay'
|
||||||
},
|
},
|
||||||
design: {
|
design: {
|
||||||
prefix: '/design/home',
|
prefix: '/design/home',
|
||||||
// tool: '/design/tool',
|
// tool: '/design/tool',
|
||||||
// detail: '/plan/detail',
|
// detail: '/plan/detail',
|
||||||
// pay: '/plan/pay'
|
// pay: '/plan/pay'
|
||||||
mapDraw: '/design/map/draw',
|
mapDraw: '/design/map/draw',
|
||||||
lessonEdit: '/design/lesson/edit',
|
lessonEdit: '/design/lesson/edit',
|
||||||
lessonHome: '/design/lesson/home',
|
lessonHome: '/design/lesson/home',
|
||||||
lessonManage: '/design/lesson/manage',
|
lessonManage: '/design/lesson/manage',
|
||||||
taskManage: '/design/lesson/taskManage',
|
taskManage: '/design/lesson/taskManage',
|
||||||
trainingRule: '/design/lesson/trainingRule',
|
trainingRule: '/design/lesson/trainingRule',
|
||||||
trainingRuleDetail: '/design/lesson/trainingRule/detail',
|
trainingRuleDetail: '/design/lesson/trainingRule/detail',
|
||||||
trainingManage: '/design/lesson/trainingManage',
|
trainingManage: '/design/lesson/trainingManage',
|
||||||
lessonTraining: '/design/lesson/training',
|
lessonTraining: '/design/lesson/training',
|
||||||
trainingRecord: '/design/lesson/training',
|
trainingRecord: '/design/lesson/training',
|
||||||
runPlan: '/design/runPlan/detail',
|
runPlan: '/design/runPlan/detail',
|
||||||
scriptHome: '/design/script/home',
|
scriptHome: '/design/script/home',
|
||||||
display: '/design/display'
|
display: '/design/display'
|
||||||
},
|
},
|
||||||
designUser: {
|
designUser: {
|
||||||
prefix: '/design/userlist/home',
|
prefix: '/design/userlist/home',
|
||||||
scriptHome: '/design/userlist/script/home',
|
scriptHome: '/design/userlist/script/home',
|
||||||
mapDraw: '/design/userlist/map/draw',
|
mapDraw: '/design/userlist/map/draw',
|
||||||
lessonHome: '/design/userlist/lesson/home',
|
lessonHome: '/design/userlist/lesson/home',
|
||||||
runPlan: '/design/userlist/runPlan/detail'
|
runPlan: '/design/userlist/runPlan/detail'
|
||||||
},
|
},
|
||||||
replay: {
|
replay: {
|
||||||
prefix: '/replay'
|
prefix: '/replay'
|
||||||
},
|
},
|
||||||
@ -293,12 +292,12 @@ export const constantRoutes = [
|
|||||||
component: LoginPlan,
|
component: LoginPlan,
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
// 密码登录
|
// 密码登录
|
||||||
{
|
{
|
||||||
path: '/design/login1',
|
path: '/design/login1',
|
||||||
component: LoginDesign,
|
component: LoginDesign,
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/jlmap3d/edit',
|
path: '/jlmap3d/edit',
|
||||||
component: Jlmap3dedit,
|
component: Jlmap3dedit,
|
||||||
@ -319,151 +318,151 @@ export const constantRoutes = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
export const asyncRouter = [
|
export const asyncRouter = [
|
||||||
{
|
{
|
||||||
path: '/design',
|
path: '/design',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: '/design/home',
|
redirect: '/design/home',
|
||||||
meta: {
|
meta: {
|
||||||
roles: [admin, user, userDesign]
|
roles: [admin, user, userDesign]
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
redirect: '/design/home',
|
redirect: '/design/home',
|
||||||
component: DesignPlatform,
|
component: DesignPlatform,
|
||||||
meta: {
|
meta: {
|
||||||
i18n: 'router.designhomePage',
|
i18n: 'router.designhomePage',
|
||||||
icon: 'design'
|
icon: 'design'
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'home',
|
path: 'home',
|
||||||
component: DesignPlatformHome,
|
component: DesignPlatformHome,
|
||||||
meta: {
|
meta: {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'map/draw/:mapId/:view',
|
path: 'map/draw/:mapId/:view',
|
||||||
component: Mapedit,
|
component: Mapedit,
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'lesson/edit/:type',
|
path: 'lesson/edit/:type',
|
||||||
component: LessonEdit,
|
component: LessonEdit,
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'runPlan/detail/:mapId',
|
path: 'runPlan/detail/:mapId',
|
||||||
component: PlanMonitorDetail,
|
component: PlanMonitorDetail,
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'script/home/:mapId',
|
path: 'script/home/:mapId',
|
||||||
component: ScriptmanageHome,
|
component: ScriptmanageHome,
|
||||||
meta: {
|
meta: {
|
||||||
i18n: 'router.scriptManage'
|
i18n: 'router.scriptManage'
|
||||||
},
|
},
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'lesson/home/:mapId/:skinCode',
|
path: 'lesson/home/:mapId/:skinCode',
|
||||||
component: LessonHome,
|
component: LessonHome,
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'lesson/training/:trainingId/:trainingName',
|
path: 'lesson/training/:trainingId/:trainingName',
|
||||||
component: TrainingrecordManage,
|
component: TrainingrecordManage,
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'lesson/taskManage',
|
path: 'lesson/taskManage',
|
||||||
component: Taskmanage,
|
component: Taskmanage,
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'lesson/trainingRule',
|
path: 'lesson/trainingRule',
|
||||||
component: TrainingRuleList,
|
component: TrainingRuleList,
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'lesson/trainingRule/detail',
|
path: 'lesson/trainingRule/detail',
|
||||||
hidden: true,
|
hidden: true,
|
||||||
component: TrainingRuleEdit
|
component: TrainingRuleEdit
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'lesson/trainingManage/:skinCode',
|
path: 'lesson/trainingManage/:skinCode',
|
||||||
component: Trainingmanage,
|
component: Trainingmanage,
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'lesson/training/:trainingId/:trainingName',
|
path: 'lesson/training/:trainingId/:trainingName',
|
||||||
component: TrainingrecordManage,
|
component: TrainingrecordManage,
|
||||||
hidden: true
|
hidden: true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/design/userlist',
|
path: '/design/userlist',
|
||||||
redirect: '/design/userlist/home',
|
redirect: '/design/userlist/home',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
meta: {
|
meta: {
|
||||||
roles: [admin, user, userDesign]
|
roles: [admin, user, userDesign]
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
redirect: '/design/userlist/home',
|
redirect: '/design/userlist/home',
|
||||||
component: DesignPlatformUser,
|
component: DesignPlatformUser,
|
||||||
meta: {
|
meta: {
|
||||||
i18n: 'router.designUserPage',
|
i18n: 'router.designUserPage',
|
||||||
icon: 'design'
|
icon: 'design'
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'home',
|
path: 'home',
|
||||||
component: DesignPlatformHome,
|
component: DesignPlatformHome,
|
||||||
meta: {
|
meta: {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'map/draw/:mapId/:view',
|
path: 'map/draw/:mapId/:view',
|
||||||
component: Mapedit,
|
component: Mapedit,
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'lesson/edit/:type',
|
path: 'lesson/edit/:type',
|
||||||
component: LessonEdit,
|
component: LessonEdit,
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'runPlan/detail/:mapId',
|
path: 'runPlan/detail/:mapId',
|
||||||
component: PlanMonitorDetail,
|
component: PlanMonitorDetail,
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'script/home/:mapId',
|
path: 'script/home/:mapId',
|
||||||
component: ScriptmanageHome,
|
component: ScriptmanageHome,
|
||||||
meta: {
|
meta: {
|
||||||
i18n: 'router.scriptManage'
|
i18n: 'router.scriptManage'
|
||||||
},
|
},
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'lesson/home/:mapId',
|
path: 'lesson/home/:mapId',
|
||||||
component: LessonHome,
|
component: LessonHome,
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'lesson/training/:trainingId/:trainingName',
|
path: 'lesson/training/:trainingId/:trainingName',
|
||||||
component: TrainingrecordManage,
|
component: TrainingrecordManage,
|
||||||
hidden: true
|
hidden: true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/display/:mode',
|
path: '/display/:mode',
|
||||||
component: Display,
|
component: Display,
|
||||||
@ -471,13 +470,13 @@ export const asyncRouter = [
|
|||||||
},
|
},
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/design/display/:mode',
|
path: '/design/display/:mode',
|
||||||
component: Display,
|
component: Display,
|
||||||
meta: {
|
meta: {
|
||||||
},
|
},
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/scriptDisplay/:mode',
|
path: '/scriptDisplay/:mode',
|
||||||
component: ScriptDisplay,
|
component: ScriptDisplay,
|
||||||
@ -510,10 +509,10 @@ export const asyncRouter = [
|
|||||||
i18n: 'router.mapManage',
|
i18n: 'router.mapManage',
|
||||||
roles: [admin, mapCreater, userDesign]
|
roles: [admin, mapCreater, userDesign]
|
||||||
},
|
},
|
||||||
hidden: true,
|
hidden: true,
|
||||||
component: Layout,
|
component: Layout,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'draw',
|
path: 'draw',
|
||||||
redirect: '/map/draw/0/draft',
|
redirect: '/map/draw/0/draft',
|
||||||
component: Mapdraft,
|
component: Mapdraft,
|
||||||
@ -553,7 +552,7 @@ export const asyncRouter = [
|
|||||||
{
|
{
|
||||||
path: '/lesson',
|
path: '/lesson',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
meta: {
|
meta: {
|
||||||
i18n: 'router.lessaonManage',
|
i18n: 'router.lessaonManage',
|
||||||
roles: [admin, lessonCreater, userDesign]
|
roles: [admin, lessonCreater, userDesign]
|
||||||
@ -691,7 +690,7 @@ export const asyncRouter = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/dp',
|
path: '/dp',
|
||||||
hidden: true,
|
hidden: true,
|
||||||
redirect: '/dp/home',
|
redirect: '/dp/home',
|
||||||
component: ScreenMonitor,
|
component: ScreenMonitor,
|
||||||
meta: {
|
meta: {
|
||||||
@ -719,13 +718,13 @@ export const asyncRouter = [
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/plan/usertool',
|
path: '/plan/usertool',
|
||||||
component: PlanMonitorEditUserTool,
|
component: PlanMonitorEditUserTool,
|
||||||
meta: {
|
meta: {
|
||||||
},
|
},
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/plan/tool',
|
path: '/plan/tool',
|
||||||
component: PlanMonitorEditTool,
|
component: PlanMonitorEditTool,
|
||||||
meta: {
|
meta: {
|
||||||
@ -736,7 +735,7 @@ export const asyncRouter = [
|
|||||||
path: '/plan',
|
path: '/plan',
|
||||||
redirect: '/plan/home',
|
redirect: '/plan/home',
|
||||||
component: PlanMonitor,
|
component: PlanMonitor,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
meta: {
|
meta: {
|
||||||
roles: [admin, user, userDesign]
|
roles: [admin, user, userDesign]
|
||||||
},
|
},
|
||||||
@ -764,7 +763,7 @@ export const asyncRouter = [
|
|||||||
{
|
{
|
||||||
path: '/replay',
|
path: '/replay',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
meta: {
|
meta: {
|
||||||
roles: [admin, userDesign]
|
roles: [admin, userDesign]
|
||||||
},
|
},
|
||||||
@ -970,25 +969,25 @@ export const asyncRouter = [
|
|||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'skinCode',
|
path: 'skinCode',
|
||||||
component: SkinCode,
|
component: SkinCode,
|
||||||
meta: {
|
meta: {
|
||||||
i18n: 'router.skinManage'
|
i18n: 'router.skinManage'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'skinCode/draft/:mode/:skinCodeId',
|
path: 'skinCode/draft/:mode/:skinCodeId',
|
||||||
hidden: true,
|
hidden: true,
|
||||||
component: SkinCodeDraft
|
component: SkinCodeDraft
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'ibp/edit',
|
path: 'ibp/edit',
|
||||||
component: IbpEdit,
|
component: IbpEdit,
|
||||||
meta: {
|
meta: {
|
||||||
i18n: 'router.ibpDraw'
|
i18n: 'router.ibpDraw'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'dictionary',
|
path: 'dictionary',
|
||||||
component: Dictionary,
|
component: Dictionary,
|
||||||
meta: {
|
meta: {
|
||||||
@ -1046,37 +1045,37 @@ export const asyncRouter = [
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/apply',
|
path: '/apply',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
meta: {
|
meta: {
|
||||||
i18n: 'router.releaseApplication',
|
i18n: 'router.releaseApplication',
|
||||||
roles: [admin, userDesign]
|
roles: [admin, userDesign]
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'lesson',
|
path: 'lesson',
|
||||||
component: LessonApproval,
|
component: LessonApproval,
|
||||||
meta: {
|
meta: {
|
||||||
i18n: 'router.courseApplication'
|
i18n: 'router.courseApplication'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'script',
|
path: 'script',
|
||||||
component: ScriptApproval,
|
component: ScriptApproval,
|
||||||
meta: {
|
meta: {
|
||||||
i18n: 'router.scriptReleaseApplication'
|
i18n: 'router.scriptReleaseApplication'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'runGraph',
|
path: 'runGraph',
|
||||||
component: runPlanApproval,
|
component: runPlanApproval,
|
||||||
meta: {
|
meta: {
|
||||||
i18n: 'router.runGraphReleaseApplication'
|
i18n: 'router.runGraphReleaseApplication'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -67,9 +67,9 @@ export function handleToken() {
|
|||||||
const path = window.location.href;
|
const path = window.location.href;
|
||||||
if (path.includes('/dp/') || path.includes('/display/dp')) {
|
if (path.includes('/dp/') || path.includes('/display/dp')) {
|
||||||
return getScreenToken();
|
return getScreenToken();
|
||||||
} else if (path.includes('/design') || path.includes('/scriptDisplay') || path.includes('/publish') || path.includes('/orderauthor') || path.includes('/system') || path.includes('/display/plan') || path.includes('/display/manage') || path.includes('/apply/')) {
|
} else if (path.includes('/design') || path.includes('/scriptDisplay') || path.includes('/publish') || path.includes('/orderauthor') || path.includes('/system') || path.includes('/display/manage') || path.includes('/apply/')) {
|
||||||
return getDesignToken();
|
return getDesignToken();
|
||||||
} else if (path.includes('/plan')) {
|
} else if (path.includes('/plan') || path.includes('/display/plan')) {
|
||||||
return getDesignToken() || getToken();
|
return getDesignToken() || getToken();
|
||||||
} else {
|
} else {
|
||||||
return getToken();
|
return getToken();
|
||||||
|
@ -4,8 +4,8 @@ export function getBaseUrl() {
|
|||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
// BASE_API = 'https://joylink.club/jlcloud';
|
// BASE_API = 'https://joylink.club/jlcloud';
|
||||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||||
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
||||||
BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||||
// BASE_API = 'http://192.168.3.41:9000'; // 王兴杰
|
// BASE_API = 'http://192.168.3.41:9000'; // 王兴杰
|
||||||
} else {
|
} else {
|
||||||
BASE_API = process.env.VUE_APP_BASE_API;
|
BASE_API = process.env.VUE_APP_BASE_API;
|
||||||
|
@ -196,7 +196,7 @@ export default {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
},
|
},
|
||||||
statusMessage(val) {
|
statusMessage(val) {
|
||||||
this.$ibp.setDeviceStatus(val);
|
this.$ibp && this.$ibp.setDeviceStatus(val);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -278,7 +278,7 @@ export default {
|
|||||||
}else{
|
}else{
|
||||||
this.isNotUser=true;
|
this.isNotUser=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('training', [
|
...mapGetters('training', [
|
||||||
|
@ -27,11 +27,19 @@ export default {
|
|||||||
name: 'PlanStatusBar',
|
name: 'PlanStatusBar',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
isNotUser:true
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
||||||
},
|
},
|
||||||
|
created(){
|
||||||
|
if(/^\/plan\/usertool/.test(this.$route.fullPath)){
|
||||||
|
this.isNotUser=false;
|
||||||
|
}else{
|
||||||
|
this.isNotUser=true;
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showTrain() {
|
showTrain() {
|
||||||
this.$emit('showTrain');
|
this.$emit('showTrain');
|
||||||
|
Loading…
Reference in New Issue
Block a user