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