大铁线路操作调整

This commit is contained in:
fan 2021-04-26 17:59:23 +08:00
parent cd84fbb4cd
commit 09781774c7
10 changed files with 49 additions and 28 deletions

View File

@ -236,9 +236,9 @@ export default class Switch extends Group {
const directx = this.triangle.drictx;
const rect = this.name.getBoundingRect();
const wLen = this.style.Switch.rectLock.rectWidth - (directx > 0 ? rect.width : rect.width / 2);
const hLen = this.style.Switch.rectLock.rectWidth - rect.height
const hLen = this.style.Switch.rectLock.rectWidth - rect.height;
x = rect.x - wLen / 2;
y = rect.y - hLen/2
y = rect.y - hLen / 2;
}
this.lockRect = new ELockRect({ // 单锁矩形框
@ -703,6 +703,9 @@ export default class Switch extends Group {
this.setInversionAction(model); /** 反位*/
} else {
this.setLossAction(model.fault); // 失去
if (model.switchSplit) {
this.setForkAction();
}
}
model.isCiConfirm && this.setCiConfirm(); // 道岔使能显示

View File

@ -197,6 +197,11 @@ export default {
{label: '挤岔', value: 'SQUEEZE'},
{label: '计轴故障', value: 'AXLE_FAULT'}
];
} else if (selected._type === 'Section') {
this.faultList = [
{label: '计轴故障', value: 'AXLE_FAULT'},
{label: '通信车占用', value: 'CBTC_OCCUPIED_FAULT'}
];
} else {
this.faultList = deviceFaultType[selected._type];
}

View File

@ -184,7 +184,6 @@ export default {
},
doShow(point) {
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}

View File

@ -384,6 +384,9 @@ const socket = {
},
clearSimulationRoleList: (state)=>{
state.simulationRoleList = [];
},
setSimulationTimeSync: (state, time) => {
state.simulationTimeSync = time;
}
},
@ -460,6 +463,9 @@ const socket = {
},
clearSimulationRoleList:({ commit }) => {
commit('clearSimulationRoleList');
},
setSimulationTimeSync:({ commit }, time) => {
commit('setSimulationTimeSync', time);
}
}
};

View File

@ -2,9 +2,9 @@ export function getBaseUrl() {
let BASE_API;
if (process.env.NODE_ENV === 'development') {
// 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.8.107:9000'; // 袁琪
// BASE_API = 'http://192.168.3.83:9000'; // 旭强 有线
BASE_API = 'http://192.168.3.83:9000'; // 旭强 有线
// BASE_API = 'http://192.168.8.114:9000'; // 旭强 无线
// BASE_API = 'http://192.168.3.120:9000'; // 张赛
// BASE_API = 'http://192.168.8.140:9000'; // 杜康

View File

@ -9,18 +9,22 @@ export default function parseStatus(deviceStatus) {
case 0:
elem.normalPosition = 0;
elem.reversePosition = 0;
elem.switchSplit = 0;
break;
case 1:
elem.normalPosition = 1;
elem.reversePosition = 0;
elem.switchSplit = 0;
break;
case 2:
elem.normalPosition = 0;
elem.reversePosition = 1;
elem.switchSplit = 0;
break;
case 4:
elem.normalPosition = 0;
elem.reversePosition = 0;
elem.switchSplit = 1;
break;
}
elem.blockade = msg[2];

View File

@ -26,6 +26,8 @@ function callback(Response) {
if (Response.headers.destination.includes('ats')) {
const data = {res:JSON.parse(Response.body), type:'ats' };
store.dispatch('socket/handleSock', data);
} else if (Response.headers.destination.includes('sysTime')) {
store.dispatch('socket/setSimulationTimeSync', Number.parseInt(Response.body));
} else {
const data = JSON.parse(Response.body);
store.dispatch('socket/setStomp', data);

View File

@ -188,7 +188,7 @@ export default {
if (!resp.data.dataError) {
this.$store.dispatch('scriptRecord/updateSimulationPause', resp.data.pause); //
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`));
this.$store.dispatch('training/countTime');
// this.$store.dispatch('training/countTime');
this.$store.dispatch('runPlan/setRunPlanInfo', resp.data.runPlan);
this.planRunning = resp.data.planRunning;
if (resp.data.planRunning) {

View File

@ -1,9 +1,9 @@
<template>
<div v-if="isShowSystemTime" class="display-card" :style="{top: top+'px', right: newRight+'px'}">
<template v-if="pause">
<span class="display-pause">{{ $t('display.systemTime.timePause') }}</span>
</template>
<template v-else>
<!--<template v-if="pause">-->
<!--<span class="display-pause">{{ $t('display.systemTime.timePause') }}</span>-->
<!--</template>-->
<!--<template v-else>-->
<system-time
class="display-time"
:time="time"
@ -12,7 +12,7 @@
<div class="display-date-box">{{ dateString }}</div>
<div class="display-date-box">{{ dayString }}</div>
</div>
</template>
<!--</template>-->
</div>
</template>
<script>

View File

@ -128,10 +128,12 @@ export default {
this.clearSubscribeNew();
const header = { 'X-Token': getToken() };
creatSubscribe(`/user/queue/simulation/${this.$route.query.group}/ats`, header);
creatSubscribe(`/user/queue/simulation/${this.$route.query.group}/sysTime`, header);
await this.$store.dispatch('training/setHasSubscribed');
},
clearSubscribeNew() {
clearSubscribe(`/user/queue/simulation/${this.$route.query.group}/ats`);
clearSubscribe(`/user/queue/simulation/${this.$route.query.group}/sysTime`);
},
clearSubscribe() {
clearSubscribe(`${displayTopic}\/${this.groupModel}`);