Merge branch 'dev' of https://git.qcloud.com/joylink/jl-nclient into dev
This commit is contained in:
commit
f31026608a
@ -1,18 +1,16 @@
|
||||
<template>
|
||||
<div id="PlanMenuTool">
|
||||
<div class="nav">
|
||||
<div class="tool" v-for="(item,index) in tools" :key="index">
|
||||
<img :src="item.src" :alt="item.title" />
|
||||
<div v-for="(item,index) in tools" :key="index" class="tool">
|
||||
<img :src="item.src" :alt="item.title">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { prefixIntrger } from '@/utils/date';
|
||||
import logo_ from '@/assets/logo_.png';
|
||||
|
||||
|
||||
export default {
|
||||
name: 'PlanMenuTool',
|
||||
data() {
|
||||
@ -22,100 +20,100 @@
|
||||
title: '服务器1',
|
||||
operate: '',
|
||||
src: logo_,
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '服务器2',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '前置机1',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '前置机2',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '主调',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '调度台1',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '调度台2',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '调度台3',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '大屏',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '维护工作站',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '运行图显示人工站',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '跳停',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '扣车',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '列车报警',
|
||||
operate: '',
|
||||
src: logo_,
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.training.initTime': function (initTime) {
|
||||
let date = new Date(initTime);
|
||||
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}${prefixIntrger(date.getSeconds(), 2)}`
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
isShowSystemTime() {
|
||||
return this.$route.params.mode == 'demon' || this.$route.params.mode === 'dp' || !this.$route.params.mode;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.training.initTime': function (initTime) {
|
||||
const date = new Date(initTime);
|
||||
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}${prefixIntrger(date.getSeconds(), 2)}`;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initTools();
|
||||
},
|
||||
@ -124,7 +122,7 @@
|
||||
this.tools = [];
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped rel="stylesheet/scss" lang="scss" scoped>
|
||||
|
@ -2,7 +2,6 @@ import Vue from 'vue';
|
||||
import store from '@/store';
|
||||
import router from './router';
|
||||
import NProgress from 'nprogress'; // Progress 进度条
|
||||
// import 'nprogress/nprogress.css';// Progress 进度条样式
|
||||
import { admin, userDesign} from './router';
|
||||
import { getToken, getDesignToken} from '@/utils/auth'; // 验权
|
||||
import { LoginParams } from '@/utils/login';
|
||||
@ -17,6 +16,14 @@ function hasPermission(roles, permissionRoles) {
|
||||
|
||||
const whiteList = ['/login', '/design/login', '/xty/login', '/designxty/login']; // 不重定向白名单
|
||||
|
||||
const designPageRegex = [/^\/design/, /^\/scriptDisplay/, /^\/publish/, /^\/orderauthor/, /^\/system/, /^\/display\/record/, /^\/display\/manage/, /^\/apply/, /^\/plan/, /^\/display\/plan/];
|
||||
|
||||
function isDesignPage(toRoutePath) {
|
||||
return designPageRegex.some(item => {
|
||||
return item.test(toRoutePath);
|
||||
});
|
||||
}
|
||||
|
||||
const loginPage = whiteList[0];
|
||||
|
||||
const loginDesignPage = whiteList[1];
|
||||
@ -35,20 +42,10 @@ function getRouteInfo(to) {
|
||||
loginPath = loginDesignXtyPage;
|
||||
getTokenInfo = getDesignToken;
|
||||
clientId = LoginParams.Design.clientId;
|
||||
} else if (/^\/design/.test(toRoutePath) || /^\/scriptDisplay/.test(toRoutePath) || /^\/publish/.test(toRoutePath) || /^\/orderauthor/.test(toRoutePath) || /^\/system/.test(toRoutePath) || /^\/display\/record/.test(toRoutePath) || /^\/display\/manage/.test(toRoutePath) || /^\/apply/.test(toRoutePath)) {
|
||||
} else if (isDesignPage(toRoutePath)) {
|
||||
loginPath = getSessionStorage('project') === 'designxty' ? loginDesignXtyPage : loginDesignPage;
|
||||
getTokenInfo = getDesignToken;
|
||||
clientId = LoginParams.Design.clientId;
|
||||
} else if (/^\/plan/.test(toRoutePath) || /^\/display\/plan/.test(toRoutePath)) {
|
||||
if (getSessionStorage('project').startsWith('design')) {
|
||||
loginPath = getSessionStorage('project') === 'designxty' ? loginDesignXtyPage : loginDesignPage;
|
||||
getTokenInfo = getDesignToken;
|
||||
clientId = LoginParams.Design.clientId;
|
||||
} else {
|
||||
loginPath = getSessionStorage('project') === 'xty' ? loginXtyPage : loginPage;
|
||||
getTokenInfo = getToken;
|
||||
clientId = null;
|
||||
}
|
||||
} else if ( /^\/xty/.test(toRoutePath)) {
|
||||
loginPath = loginXtyPage;
|
||||
getTokenInfo = getToken;
|
||||
@ -58,7 +55,6 @@ function getRouteInfo(to) {
|
||||
getTokenInfo = getToken;
|
||||
clientId = null;
|
||||
}
|
||||
|
||||
return { clientId, loginPath, getTokenInfo };
|
||||
}
|
||||
|
||||
|
@ -526,11 +526,6 @@ export const asyncRouter = [
|
||||
path: 'draft',
|
||||
component: PackageDraft,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'runPlan/manage/:mapId',
|
||||
component: PlanMonitorDetail,
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -110,9 +110,6 @@ export default {
|
||||
this.queryList.reload();
|
||||
}
|
||||
},
|
||||
goDetail() {
|
||||
this.$router.push({path:``});
|
||||
},
|
||||
async loadInitData() {
|
||||
try {
|
||||
// 获取地图
|
||||
|
@ -232,7 +232,7 @@ export default {
|
||||
this.$emit('getUserRole');
|
||||
break;
|
||||
case 'Attendant':
|
||||
if (!item['stationCode']) {
|
||||
if (!item['deviceCode']) {
|
||||
this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'Attendant');
|
||||
break;
|
||||
}
|
||||
|
@ -3,7 +3,6 @@
|
||||
<menu-bar ref="menuBar" :plan-convert="PlanConvert" @dispatchDialog="dispatchDialog" />
|
||||
<schedule
|
||||
ref="schedule"
|
||||
:line-code="lineCode"
|
||||
:plan-convert="PlanConvert"
|
||||
:max-height="height"
|
||||
:max-width="width"
|
||||
@ -108,7 +107,7 @@ export default {
|
||||
mounted() {
|
||||
this.timeDemon = setInterval(() => {
|
||||
checkLoginLine();
|
||||
}, 3000 * 60);
|
||||
}, 5000 * 60);
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.timeDemon) {
|
||||
@ -116,11 +115,6 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
setPosition() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.schedule.setPosition();
|
||||
});
|
||||
},
|
||||
dispatchDialog(dialogObj) {
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs[dialogObj.name]) {
|
||||
|
@ -38,14 +38,10 @@ export default {
|
||||
DataTable
|
||||
},
|
||||
props: {
|
||||
lineCode: {
|
||||
type: String,
|
||||
planConvert: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
// planConvert: {
|
||||
// type: Object,
|
||||
// required: true
|
||||
// },
|
||||
maxWidth: {
|
||||
type: Number,
|
||||
required: true
|
||||
@ -57,7 +53,6 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
planConvert: null,
|
||||
top: 0,
|
||||
height: 0,
|
||||
mapName: '',
|
||||
@ -368,7 +363,7 @@ export default {
|
||||
this.mapName = `${resp.data.name} (${this.$route.query.planName || ''})`;
|
||||
});
|
||||
}
|
||||
this.planConvert = this.$theme.loadPlanConvert(this.lineCode);
|
||||
|
||||
this.$store.dispatch('runPlan/clear').then(() => {
|
||||
this.loadInitChart().then(() => {
|
||||
if (this.$route.query.mapId) {
|
||||
|
@ -145,9 +145,6 @@ export default {
|
||||
this.setLocalRoute(`${UrlConfig.trainingPlatform.prodDetail}/${obj.id}?mapId=${this.mapId}`);
|
||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.prodDetail}/${obj.id}`, query: { mapId: this.mapId}});
|
||||
break;
|
||||
case 'Plan':
|
||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.runPlan}/${this.mapId}`, query: {lineCode: '02'} });
|
||||
break;
|
||||
}
|
||||
}).catch((error) => {
|
||||
if (error.code === '40004') {
|
||||
|
Loading…
Reference in New Issue
Block a user