From ae5916b90aed7b79a217f2b5416fac8f0c6362e4 Mon Sep 17 00:00:00 2001
From: zyy <1787816799@qq.com>
Date: Fri, 15 May 2020 14:50:05 +0800
Subject: [PATCH 01/13] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=AB=9E=E8=B5=9B?=
=?UTF-8?q?=E7=B3=BB=E7=BB=9F=E8=B7=AF=E7=94=B1=E9=85=8D=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/i18n/langs/zh/router.js | 4 +-
src/router/index_Common.js | 54 +++++-
src/scripts/ProjectConfig.js | 16 +-
src/views/competition/index.vue | 20 +++
src/views/login/index.vue | 5 +
src/views/newMap/jlmapNew/screen.vue | 161 ------------------
.../newMapdraft/mapoperate/ImageControl.vue | 4 +-
.../newMap/newMapdraft/mapoperate/index.vue | 2 -
vue.config.js | 3 +-
9 files changed, 96 insertions(+), 173 deletions(-)
create mode 100644 src/views/competition/index.vue
delete mode 100644 src/views/newMap/jlmapNew/screen.vue
diff --git a/src/i18n/langs/zh/router.js b/src/i18n/langs/zh/router.js
index a3f94eb3b..21292436d 100644
--- a/src/i18n/langs/zh/router.js
+++ b/src/i18n/langs/zh/router.js
@@ -76,5 +76,7 @@ export default {
deviceManage: '设备管理',
iscsDraw: 'Iscs绘制',
iscsSystem: 'Iscs系统',
- studentManage: '学生管理'
+ studentManage: '学生管理',
+ competitionManage: '竞赛管理',
+ refereeJManage: '裁判管理'
};
diff --git a/src/router/index_Common.js b/src/router/index_Common.js
index 98615ae25..6f9751af3 100644
--- a/src/router/index_Common.js
+++ b/src/router/index_Common.js
@@ -40,7 +40,7 @@ const News = () => import('@/views/system/news/index');
const CommandDictionary = () => import('@/views/system/commandDictionary/index');
const CommandDictionaryDetail = () => import('@/views/system/commandDictionary/edit');
const configLine = () => import('@/views/system/configLine/index');
-const Mapedit = () => import('@/views/mapdraft/index');
+// const Mapedit = () => import('@/views/mapdraft/index');
const IscsSystem = () => import('@/views/iscs/iscsSystem/index');
const IscsDraw = () => import('@/views/iscs/iscsDraw/index');
@@ -87,7 +87,7 @@ const MapPreview = () => import('@/views/designPlatform/mapPreview');
const MapPreviewNew = () => import('@/views/designPlatform/mapPreviewNew');
const BigScreen = () => import('@/views/designPlatform/bigScreen');
-const DesignPlatformUser = () => import('@/views/designUser/index');
+// const DesignPlatformUser = () => import('@/views/designUser/index');
const Package = () => import('@/views/package/index');
@@ -121,6 +121,8 @@ const DeviceManage = () => import('@/views/system/deviceManage/index');
const MapSort = () => import('@/views/publish/publishMap/mapSort');
const StudentManage = () => import('@/views/studentManage');
+const CompetitionManage = () => import('@/views/competition/index');
+
import { loginInfo, GenerateRouteProjectList } from '@/scripts/ProjectConfig';
import { getSessionStorage } from '@/utils/auth';
@@ -848,7 +850,6 @@ export const asyncRouter = [
},
{ // 新个人地图
path: '/design',
- // redirect: '/design/usermap/home',
component: Layout,
meta: {
i18n: 'router.newDesignUserPage',
@@ -980,6 +981,48 @@ export const asyncRouter = [
]
}
];
+const JSXT = [
+ {
+ path: '/jsxt',
+ component: Layout,
+ meta: {
+ i18n: 'router.competitionManage',
+ roles: [user, userTrainingPlatform]
+ },
+ hidden: getSessionStorage('project') ? !getSessionStorage('project').endsWith('jsxt') && !window.document.location.pathname.includes('jsxt') : !window.document.location.pathname.includes('jsxt'),
+ children: [
+ {
+ path: 'home',
+ component: CompetitionManage,
+ meta: {
+ i18n: 'router.competitionManage',
+ icon: 'design',
+ hidden: true
+ }
+ }
+ ]
+ },
+ {
+ path: '/refereeJsxt',
+ component: Layout,
+ meta: {
+ i18n: 'router.refereeJManage',
+ roles: [admin, userTrainingPlatform]
+ },
+ hidden: getSessionStorage('project') ? !getSessionStorage('project').endsWith('refereeJsxt') && !window.document.location.pathname.includes('refereeJsxt') : !window.document.location.pathname.includes('refereeJsxt'),
+ children: [
+ {
+ path: 'home',
+ component: CompetitionManage,
+ meta: {
+ i18n: 'router.refereeJManage',
+ icon: 'design',
+ hidden: true
+ }
+ }
+ ]
+ }
+];
const createRouter = () => new Router({
mode: 'history', // require service support
scrollBehavior: () => ({ y: 0 }),
@@ -990,6 +1033,11 @@ const router = createRouter();
router.beforeEach((to, from, next) => {
const project = getSessionStorage('project');
+ JSXT.forEach(route => {
+ if (from.path.includes(route.path)) {
+ asyncRouter.push(route);
+ }
+ });
document.title = loginInfo[project || 'login'].browserTitle || loginInfo[project || 'login'].title;
next();
});
diff --git a/src/scripts/ProjectConfig.js b/src/scripts/ProjectConfig.js
index 85b6f3267..ad9ecf7cf 100644
--- a/src/scripts/ProjectConfig.js
+++ b/src/scripts/ProjectConfig.js
@@ -55,7 +55,11 @@ export const loginInfo = { // 页面title & 退出登录跳转路径
},
jsxt:{
title: '城市轨道交通竞赛平台',
- loginPath: '/js/login'
+ loginPath: '/jsxt/login'
+ },
+ refereeJsxt:{
+ title: '城市轨道交通裁判平台',
+ loginPath: '/refereeJsxt/login'
}
};
@@ -70,7 +74,8 @@ export const ProjectIcon = {
designhyd: FaviconHyd,
xadt: FaviconXadt,
designxadt: FaviconXadt,
- jsxt: Favicon
+ jsxt: Favicon,
+ refereeJsxt: Favicon
};
export const ProjectCode = {
@@ -85,7 +90,7 @@ export const ProjectCode = {
};
export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt']; // 实训设计平台通过项目code获取地图列表的项目
export const CaseHideProjectList = ['hyd', 'designhyd']; // 案例展示隐藏的项目
-export const GenerateRouteProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'jsxt'];// 需要在公共路由中生成登录页面的项目&登录页样式
+export const GenerateRouteProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'jsxt', 'refereeJsxt'];// 需要在公共路由中生成登录页面的项目&登录页样式
export const goOtherPlatformMenu = { // 导航栏快速切换平台
login: '/design/login',
design: '/login',
@@ -133,6 +138,11 @@ export const PermissionParam = { // 路径权限处理所需参数配置(跳
whitePage: '/jsxt/login',
reg: /^\/jsxt/,
clientId: null
+ },
+ refereeJsxt: {
+ whitePage: '/refereeJsxt/login',
+ reg: /^\/refereeJsxt/,
+ clientId: null
}
};
export const ProjectList = [
diff --git a/src/views/competition/index.vue b/src/views/competition/index.vue
new file mode 100644
index 000000000..493f1ba8c
--- /dev/null
+++ b/src/views/competition/index.vue
@@ -0,0 +1,20 @@
+
+
+ 11
+
+
+
+
+
+
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index 761fde036..a6f04c819 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -215,6 +215,10 @@ export default {
this.modelType = 'design';
this.loginClient = 'Design';
this.path = UrlConfig.design.prefix;
+ } else if (this.project.startsWith('jsxt')) {
+ this.path = '/jsxt/home';
+ } else if (this.project.startsWith('refereeJsxt')) {
+ this.path = '/refereeJsxt/home';
}
const nowLang = LangStorage.getLang('zh');
@@ -326,6 +330,7 @@ export default {
this.loading = false;
this.tipsMsg = '';
removeSessionStorage('againEnter');
+ console.log(this.path, '=====');
this.$router.push({ path: this.path });
},
handleLanguage() {
diff --git a/src/views/newMap/jlmapNew/screen.vue b/src/views/newMap/jlmapNew/screen.vue
deleted file mode 100644
index 1632342b2..000000000
--- a/src/views/newMap/jlmapNew/screen.vue
+++ /dev/null
@@ -1,161 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/src/views/newMap/newMapdraft/mapoperate/ImageControl.vue b/src/views/newMap/newMapdraft/mapoperate/ImageControl.vue
index 6869fc7ef..5197fde13 100644
--- a/src/views/newMap/newMapdraft/mapoperate/ImageControl.vue
+++ b/src/views/newMap/newMapdraft/mapoperate/ImageControl.vue
@@ -184,8 +184,8 @@ export default {
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
},
deviceSelect(selected) {
- this.$refs.form && this.$refs.form.resetFields();
- this.$refs.make && this.$refs.make.resetFields();
+ this.$refs.form && this.$refs.form.resetFields();
+ this.$refs.make && this.$refs.make.resetFields();
if (selected && selected._type.toUpperCase() === 'Resource'.toUpperCase()) {
this.activeName = 'first';
this.editModel = deepAssign(this.editModel, selected);
diff --git a/src/views/newMap/newMapdraft/mapoperate/index.vue b/src/views/newMap/newMapdraft/mapoperate/index.vue
index bbdc23fbf..feaeb244d 100644
--- a/src/views/newMap/newMapdraft/mapoperate/index.vue
+++ b/src/views/newMap/newMapdraft/mapoperate/index.vue
@@ -17,8 +17,6 @@
生成联锁
-
-
{{ $t('map.advanced') }}
绘图显隐
diff --git a/vue.config.js b/vue.config.js
index a77409465..21c947aba 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -30,10 +30,11 @@ module.exports = {
assetsDir: 'static', // 相对于outputDir的静态资源(js、css、img、fonts)目录
lintOnSave: false,
// filenameHashing: true,
- productionSourceMap: false,
+ productionSourceMap: false, // 项目打包后是否压缩
devServer: {
port: port,
// open: true,
+ hotOnly: true,
overlay: {
warnings: false,
errors: true
From 399111c682bee04e26a27ab268fb4bb837ce2ba1 Mon Sep 17 00:00:00 2001
From: zyy <1787816799@qq.com>
Date: Fri, 15 May 2020 14:59:53 +0800
Subject: [PATCH 02/13] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=88=97=E8=A1=A8?=
=?UTF-8?q?=E5=AD=97=E6=AE=B5=E6=98=BE=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/lesson/home.vue | 4 ++--
src/views/planMonitor/detail.vue | 2 +-
src/views/scriptManage/home.vue | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/views/lesson/home.vue b/src/views/lesson/home.vue
index b915b162d..552883e41 100644
--- a/src/views/lesson/home.vue
+++ b/src/views/lesson/home.vue
@@ -1,7 +1,7 @@