This commit is contained in:
fan 2020-05-15 15:58:19 +08:00
commit e4b14d96e5
12 changed files with 100 additions and 177 deletions

View File

@ -76,5 +76,7 @@ export default {
deviceManage: '设备管理',
iscsDraw: 'Iscs绘制',
iscsSystem: 'Iscs系统',
studentManage: '学生管理'
studentManage: '学生管理',
competitionManage: '竞赛管理',
refereeJManage: '裁判管理'
};

View File

@ -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();
});

View File

@ -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 = [

View File

@ -0,0 +1,20 @@
<template>
<div class="">
11
</div>
</template>
<script>
export default {
name: '',
data() {
return {
};
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
</style>

View File

@ -1,7 +1,7 @@
<template>
<div class="joylink-card">
<div class="lesson-header">
<div class="lesson-list">{{ $t('lesson.courseList') }}</div>
<div class="lesson-list">草稿{{ $t('lesson.courseList') }}</div>
<div class="but-group">
<el-button v-if="hasRelease" size="mini" @click="operationManage">{{ $t('lesson.trainingRule') }}</el-button>
<el-button v-if="hasRelease" size="mini" @click="trainingManage">{{ $t('lesson.trainingManage') }}</el-button>
@ -209,7 +209,7 @@ export default {
this.$router.push({path: `${UrlConfig.design.taskManage}`, query: {mapId: this.$route.params.mapId}});
},
trainingManage() {
if (this.$route.query.drawWay + '' === 'true') {
if (this.$route.query.drawWay + '' === 'true') {
this.$router.push({path: `${UrlConfig.design.trainingManage}`, query: {mapId: this.$route.params.mapId, drawWay: this.$route.query.drawWay, lineCode: this.$route.query.lineCode}});
} else {
this.$router.push({path: `${UrlConfig.design.trainingManageOld}`, query: {mapId: this.$route.params.mapId, drawWay: this.$route.query.drawWay, lineCode: this.$route.query.lineCode}});

View File

@ -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() {

View File

@ -1,161 +0,0 @@
<template>
<div>
<jlmap-canvas @onOffset="onDataZoom" @onSelect="onSelected" @onMenu="onContextMenu" @mapViewLoaded="mapViewLoaded" />
</div>
</template>
<script>
import JlmapCanvas from './cnavas';
import { mapGetters } from 'vuex';
import { TrainingMode } from '@/scripts/ConstDic';
import { EventBus } from '@/scripts/event-bus';
export default {
name: 'JlmapVisual',
components: {
JlmapCanvas
},
data() {
return {
loading: true,
dataZoom: {
offsetX: '0',
offsetY: '0',
scaleRate: '1'
},
showMode: '03'
};
},
computed: {
...mapGetters('training', [
'mode',
'offsetStationCode'
]),
...mapGetters('config', [
'canvasId'
]),
width() {
return this.$store.state.app.width;
},
height() {
return this.$store.state.app.height - 55;
},
show() {
if (this.mode == TrainingMode.EDIT || this.mode == TrainingMode.MAP_EDIT) {
return true;
}
return false;
},
isScreen() {
return this.$route.path.includes('displayBigScreen') || this.$route.path.includes('bigScreen');
},
maskOpen() {
return this.$store.state.config.maskOpen;
}
},
watch: {
},
created() {
EventBus.$on('viewProgressAt', (percentage) => {
this.mapViewProgressAt(percentage);
});
},
mounted() {
// this.initLoadPage();
},
beforeDestroy() {
EventBus.$off('viewProgressAt');
this.$store.dispatch('map/mapClear');
if (this.$jlmap) {
this.$jlmap.dispose();
}
},
methods: {
onDataZoom() {
},
onSelected() {
},
onContextMenu() {
},
mapViewLoaded() {
},
// jlmap
resetWidth(opt) {
console.log(opt, '-----');
this.$jlmap && this.$jlmap.resize({ width: opt.width, height: opt.height });
// this.$nextTick(() => {
// this.$jlmap && this.$jlmap.resize({ width: this.width, height: this.height });
// this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: this.offsetStationCode });
// setTimeout(() => {
// this.$store.dispatch('config/resetCanvasOffset');
// this.$store.dispatch('training/emitTipFresh');
// }, 100);
// });
},
//
mapViewProgressAt(percentage) {
this.$nextTick(() => {
this.$refs.progressBar.progressAt(percentage);
});
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.mask{
opacity: 0;
background: #000;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 9;
}
.jlmap-canvas {
position: relative;
-moz-user-select: none;
-o-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
}
.title{
text-align: right;
font-size: 14px;
color: #606266;
line-height: 32px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
font-weight: 700;
}
.zoom-view {
position: absolute;
bottom: 0;
background: #fff;
padding-top: 5px;
height: 42px;
border-bottom: 1px #f3f3f3 solid;
border-right: 1px #f3f3f3 solid;
}
/deep/ {
.el-form.el-form--inline {
height: 28px !important;
line-height: 28px !important
}
.el-loading-mask {
background-color: rgba(0, 0, 0, 0.3);
}
}
</style>

View File

@ -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);

View File

@ -17,8 +17,6 @@
<el-dropdown-item><span style="display:block;" :disabled="mapSaveing" @click="generateCIEvent">生成联锁</span></el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<!--<el-button v-if="isSave" type="text" style="float: right; padding: 3px 0; margin-right: 5px;" :disabled="mapSaveing" @click="generateCIEvent">生成联锁</el-button>-->
<!--<el-button v-if="isSave" type="text" style="float: right; padding: 3px 0; margin-right: 5px;" :disabled="mapSaveing" @click="verifyMapEvent">{{ $t('map.dataVerification') }}</el-button>-->
<el-button type="text" style="float: right; padding: 3px 0; margin-right: 5px;" @click="dataRelation">{{ $t('map.advanced') }}</el-button>
<el-button type="text" style="float: right; padding: 3px 0; margin-right: 5px;" @click="showMap">绘图显隐</el-button>
</div>

View File

@ -1,7 +1,7 @@
<template>
<div class="joylink-card">
<div class="runPlanHeader" style="width: 90%;margin-left:5%;margin-top:40px;display: inline-block;">
<div class="runPlanList">{{ $t('planMonitor.openRunPlan.runPlanList') }}</div>
<div class="runPlanList">草稿{{ $t('planMonitor.openRunPlan.runPlanList') }}</div>
<el-button v-if="isCreate" size="mini" type="primary" class="createRunPlan" @click="handleCreate">{{ $t('planMonitor.createRunningDiagram') }}</el-button>
</div>
<!--<QueryListPage ref="queryListPage" :query-form="queryForm" :pager-config="pagerConfig" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" />-->

View File

@ -1,7 +1,7 @@
<template>
<div class="joylink-card">
<div class="scriptHeader">
<div class="scriptList">{{ $t('scriptRecord.scriptList') }}</div>
<div class="scriptList">草稿{{ $t('scriptRecord.scriptList') }}</div>
<el-button size="small" type="primary" class="createScript" @click="handleCreate">{{ $t('scriptRecord.scriptCreate') }}</el-button>
</div>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" />

View File

@ -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