信号机坐标编辑显示
This commit is contained in:
parent
edbd6d55cf
commit
5678d8dfad
@ -78,3 +78,17 @@ export function timesSpeedPlayback(group, speed) {
|
||||
method: 'put'
|
||||
});
|
||||
}
|
||||
/** 仿真暂停 */
|
||||
export function simulationPause(group) {
|
||||
return request({
|
||||
url: `/common/simulation/${group}/pause`,
|
||||
method: 'put'
|
||||
});
|
||||
}
|
||||
/** 仿真开始 */
|
||||
export function simulationStart(group) {
|
||||
return request({
|
||||
url: `/common/simulation/${group}/start`,
|
||||
method: 'put'
|
||||
});
|
||||
}
|
||||
|
@ -186,12 +186,13 @@ class SkinCode extends defaultStyle {
|
||||
blockColor: '#FFFFFF', // 信号灯字体锁定颜色
|
||||
checkColor: '#00FF00' // 信号保护区段检查颜色
|
||||
},
|
||||
remainTimeColor: '#F00',
|
||||
tText: {
|
||||
offsetX: 0,
|
||||
offsetY: -30,
|
||||
fontSize: 11, // 信号机名称字体大小
|
||||
fontWeight: 'bold', // 信号机名称字体粗细
|
||||
defaultColor: '#FFFFFF', // 信号灯字体默认色
|
||||
defaultColor: '#F00', // 信号灯字体默认色
|
||||
defaultText: 0
|
||||
},
|
||||
lamp: {
|
||||
|
@ -376,7 +376,7 @@ class Signal extends Group {
|
||||
fontWeight: style.Signal.text.fontWeight,
|
||||
fontSize: 12,
|
||||
fontFamily: style.fontFamily,
|
||||
textFill: '#FFF',
|
||||
textFill: style.Signal.remainTimeColor || '#FFF',
|
||||
textAlign: 'center',
|
||||
textVerticalAlign: 'middle'
|
||||
});
|
||||
|
@ -16,7 +16,7 @@
|
||||
<center><b>总取消</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Signal.humanTrainRoute.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.humanTrainRoute.button.operation, ['SignalButton'])">
|
||||
<button :id="Signal.humanTrainRoute.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.humanTrainRoute.button.operation, ['Signal','SignalButton'])">
|
||||
<span style="color: #800000">
|
||||
<center><b>总人解</b></center>
|
||||
</span>
|
||||
@ -503,7 +503,7 @@ export default {
|
||||
code: model.code,
|
||||
operation: this.$store.state.menuOperation.buttonOperation
|
||||
};
|
||||
const signal = this.$store.getters['map/getDeviceByCode'](model.signalCode);
|
||||
const signal = this.$store.getters['map/getDeviceByCode'](model.signalCode || model.code);
|
||||
if (model._type === 'SignalButton' && model.type === 'PICK' && signal.routeLock) {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE;
|
||||
operate.param = {signalId: model.signalCode};
|
||||
@ -513,6 +513,15 @@ export default {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}).finally(() =>{ this.clearOperate(); });
|
||||
} else if (model._type === 'Signal' && model.type === 'SHUNTING' && signal.routeLock) {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE;
|
||||
operate.param = {signalId: model.code};
|
||||
operate.val = model.code;
|
||||
this.deviceList = [];
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}).finally(() =>{ this.clearOperate(); });
|
||||
}
|
||||
},
|
||||
handelControlRoute(model) { // 自动控 人工控点击button 发送
|
||||
|
@ -11,11 +11,12 @@ function handleSockInfo(state, msg, type) {
|
||||
function handleSimulationStateMsg(state, type) {
|
||||
switch (type) {
|
||||
case 0:
|
||||
state.simulationPause = true;
|
||||
store.dispatch('scriptRecord/updateSimulationPause', true);
|
||||
break;
|
||||
case 1:
|
||||
state.simulationStart++;
|
||||
store.dispatch('scriptRecord/updateSimulationPause', false);
|
||||
store.dispatch('scriptRecord/updateSimulationPause', true);
|
||||
state.simulationPause = false;
|
||||
break;
|
||||
case 4:
|
||||
state.simulationError++;
|
||||
@ -331,7 +332,8 @@ const socket = {
|
||||
competitionPracticeFinish:0, // 竞赛场景结束标识
|
||||
simulationAlarmInfo: [], // 仿真报警信息
|
||||
deviceStateMessages: null, // 新版订阅设备状态消息
|
||||
simulationSpeed: 1 // 仿真倍速
|
||||
simulationSpeed: 1, // 仿真倍速
|
||||
simulationPause: false
|
||||
},
|
||||
getters: {
|
||||
},
|
||||
|
@ -25,6 +25,8 @@
|
||||
<el-button-group class="button-group-box">
|
||||
<template v-if="!dataError">
|
||||
<template v-if="!projectDevice">
|
||||
<el-button v-if="simulationPause" v-loading="pauseLoading" type="primary" size="small" @click="start">开始</el-button>
|
||||
<el-button v-if="!simulationPause" v-loading="pauseLoading" type="warning" size="small" @click="pause">暂停</el-button>
|
||||
<el-button type="danger" size="small" @click="end">{{ $t('display.demon.initialize') }}</el-button>
|
||||
</template>
|
||||
</template>
|
||||
@ -49,6 +51,7 @@ import { TrainingMode } from '@/scripts/ConstDic';
|
||||
import { setGoodsTryUse } from '@/api/management/goods';
|
||||
// import {loadScriptNew } from '@/api/simulation';
|
||||
import StatusIcon from '@/views/components/StatusIcon/statusIcon';
|
||||
import { simulationPause, simulationStart } from '../../../api/rtSimulation';
|
||||
// import Vue from 'vue';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
// import { EventBus } from '@/scripts/event-bus';
|
||||
@ -103,6 +106,7 @@ export default {
|
||||
isShow3dmodel :true,
|
||||
isGoback: false,
|
||||
runing:false,
|
||||
pauseLoading: false,
|
||||
prdTypeMap: {
|
||||
'01': '01', // 现地 => 现地
|
||||
'02': '02', // 行调 => 行调
|
||||
@ -126,6 +130,9 @@ export default {
|
||||
},
|
||||
project() {
|
||||
return getSessionStorage('project');
|
||||
},
|
||||
simulationPause() {
|
||||
return this.$store.state.socket.simulationPause;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -213,8 +220,22 @@ export default {
|
||||
selectBeginTime() {
|
||||
this.$refs.setTime.doShow();
|
||||
},
|
||||
start(model) {
|
||||
this.$emit('start', model);
|
||||
start() {
|
||||
this.pauseLoading = true;
|
||||
simulationStart(this.$route.query.group).then(resp => {
|
||||
this.pauseLoading = false;
|
||||
}).catch((e) =>{
|
||||
this.$message.error('仿真开始失败!');
|
||||
});
|
||||
},
|
||||
pause() {
|
||||
this.pauseLoading = true;
|
||||
simulationPause(this.$route.query.group).then(resp => {
|
||||
this.pauseLoading = false;
|
||||
}).catch((e) => {
|
||||
this.pauseLoading = false;
|
||||
this.$message.error('仿真暂停失败!');
|
||||
});
|
||||
},
|
||||
setRuning(run) {
|
||||
this.runing = run;
|
||||
|
Loading…
Reference in New Issue
Block a user