调整仿真开始显示暂停中 & 南京二列监

This commit is contained in:
fan 2021-05-28 14:07:28 +08:00
parent 70ca57d26c
commit e09d5f4aff
4 changed files with 166 additions and 51 deletions

View File

@ -15,7 +15,7 @@ function handleSimulationStateMsg(state, type) {
store.dispatch('scriptRecord/updateSimulationPause', true);
break;
case 1:
store.dispatch('scriptRecord/updateSimulationPause', true);
store.dispatch('scriptRecord/updateSimulationPause', false);
state.simulationPause = false;
break;
case 4:

View File

@ -33,17 +33,17 @@
</el-row>
<div style="padding: 5px;height:20px;line-height: 20px;border-top: 2px solid #DDD9CA;display: flex;justify-content: space-between;">
<div>
<div class="div-simulate-button" style="width: 40px;" @click="rpsClick">背投</div>
<div class="div-simulate-button" style="width: 40px;" @click="handleCarPark">车场</div>
<div class="div-simulate-button" style="width: 40px;" @click="troClick">轨道</div>
<div class="div-simulate-button" style="width: 40px;" @click="handleDialogShow('rpsDialog')">背投</div>
<div class="div-simulate-button" style="width: 40px;" @click="handleDialogShow('carPack')">车场</div>
<div class="div-simulate-button" style="width: 40px;" @click="handleDialogShow('troDialog')">轨道</div>
<div class="div-simulate-button" style="width: 40px;">系统</div>
<div class="div-simulate-button" style="width: 40px;" @click="traClick">列车</div>
<div class="div-simulate-button" style="width: 40px;" @click="handleDialogShow('traDialog')">列车</div>
</div>
<div>
<div class="div-simulate-button" style="width: 40px;">联锁</div>
<div class="div-simulate-button" style="width: 40px;">列监</div>
<div class="div-simulate-button" style="width: 40px;" @click="handleDialogShow('tmtDialog')">列监</div>
<div class="div-simulate-button" style="width: 40px;">运图</div>
<div class="div-simulate-button" style="width: 55px;" @click="ttlClick">时刻表</div>
<div class="div-simulate-button" style="width: 55px;" @click="handleDialogShow('ttlDialog')">时刻表</div>
<div class="div-simulate-button" style="width: 40px;">编表</div>
<div class="div-simulate-button" style="width: 40px;">调度</div>
<div class="div-simulate-button" style="width: 40px;">站控</div>
@ -199,16 +199,7 @@ export default {
},
'$store.state.socket.simulationTimeSync': function (time) { // 仿
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(time)}`));
// const date = new Date(+new Date(`${new Date().toLocaleDateString()} ${timeFormat(time)}`));
// this.initDate(date);
},
// '$store.state.menuOperation.selectedCount':function(em) {
// const device = this.$store.state.menuOperation.selected;
// if (device && device._type === 'Station' && this.$store.state.menuOperation.subType === 'troButton') {
// this.$refs.troDialog.doClose();
// setTimeout(() => { this.goTroDetail(device.code); }, 5000);
// }
// },
'$store.state.socket.simulationAlarmInfo': function(val) {
(val || []).forEach(item => {
if (!item.confirmed) {
@ -281,21 +272,8 @@ export default {
}
}
},
rpsClick() {
this.$emit('rpsClick');
},
troClick() {
this.$emit('troClick');
},
traClick() {
this.$emit('traClick');
},
ttlClick() {
this.$emit('ttlClick');
},
//
handleCarPark() {
this.$emit('handleCarPark');
handleDialogShow(type) {
this.$emit('handleDialogShow', type);
},
selectBeginTime() {
this.$emit('selectBeginTime');

View File

@ -4,11 +4,7 @@
ref="baSiDi"
:is-disable="isDisable"
:data-error="dataError"
@rpsClick="rpsClick"
@troClick="troClick"
@traClick="traClick"
@ttlClick="ttlClick"
@handleCarPark="handleCarPark"
@handleDialogShow="handleDialogShow"
@end="end"
@back="back"
@selectBeginTime="selectBeginTime"
@ -19,6 +15,7 @@
<tro-detail ref="troDetail" :train-list="trainList" :station-list="stationList" @goTroDialog="troClick" />
<tra-dialog ref="traDialog" />
<ttl-dialog ref="ttlDialog" />
<tmt-dialog ref="tmtDialog" />
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
</div>
</template>
@ -42,6 +39,7 @@ import CarPack from './carPack';
import TroDetail from './troDetail';
import TraDialog from './tra';
import TtlDialog from './ttl';
import TmtDialog from './tmt';
import parseStatus from '@/utils/parseStatus';
export default {
@ -54,7 +52,8 @@ export default {
TroDialog,
TroDetail,
TraDialog,
TtlDialog
TtlDialog,
TmtDialog
},
data() {
return {
@ -162,9 +161,6 @@ export default {
this.clearSubscribeNew();
clearSimulation(this.group);
this.$store.dispatch('training/reset');
// this.$refs.rpsDialog.destroy();
// this.$refs.troDialog.destroy();
// this.$refs.troDetail.destroy();
},
async mounted() {
const _that = this;
@ -390,20 +386,11 @@ export default {
this.$messageBox(this.$t('display.demon.endSimulationFail'));
});
},
rpsClick() {
this.$refs.rpsDialog.doShow();
},
troClick() {
this.$refs.troDialog.doShow();
},
ttlClick() {
this.$refs.ttlDialog.doShow();
},
traClick() {
this.$refs.traDialog.doShow();
},
handleCarPark() {
this.$refs.carPack.doShow();
handleDialogShow(type) {
this.$refs[type].doShow;
}
}
};

View File

@ -0,0 +1,150 @@
<template>
<el-dialog
v-dialogDrag
class="route-setting"
:title="title"
:visible.sync="show"
width="900px"
label-position="top"
:before-close="doClose"
:z-index="2002"
:modal="false"
:close-on-click-modal="false"
>
<div style="padding: 5px;">
<el-row>
<el-col :span="12"><span>所选位置</span></el-col>
<el-col :span="12"><span>列车号</span></el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-input size="mini" style="width: 400px;" :disabled="true" />
</el-col>
<el-col :span="12">
<el-input size="mini" style="width: 400px;" />
</el-col>
</el-row>
<div style="display: flex;">
<el-button>显示列车信息</el-button>
<el-button>修改列车资料</el-button>
<el-button>创建列车号</el-button>
<el-button>删除列车号</el-button>
<el-button>步进列车号</el-button>
<el-button>重排列车号</el-button>
</div>
</div>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
// import { EventBus } from '@/scripts/event-bus';
// import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'RouteCreate',
data() {
return {
dialogShow: false,
loading: false,
selected: null
};
},
computed: {
...mapGetters('map', [
'map',
'stationList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '列监';
}
},
methods: {
loadInitData(map) {
console.log(map, 11111);
},
doShow(operate, selected) {
this.dialogShow = true;
this.selected = selected;
this.loadInitData(this.map);
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
handleSelect(tab) {
this.activeIndex = tab;
},
commit() {
// const operate = {
// send: true,
// operation: OperationEvent.Section.newtrain.menu.operation,
// cmdType: CMD.Section.CMD_NEW_TRAIN,
// val: '' + this.direction + '::' + this.trainCode
// };
// this.loading = true;
// this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
// this.loading = false;
// if (valid) {
// this.doClose();
// }
// }).catch(() => {
// this.loading = false;
// this.doClose();
// EventBus.$emit('sendMsg', {message: ''});
// });
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.route-setting {
.content_box {
margin-bottom: 10px;
.el-button{
&.active{
background: #969696;
}
}
}
.table_content_box{
margin-bottom: 20px;
}
/deep/ {
.table{
.table_header_box{
.cell{
text-align: center;
word-break: break-word;
}
}
}
}
}
</style>