调整西安线路故障模式操作

This commit is contained in:
zyy 2020-07-22 11:23:02 +08:00
parent 63cecaef46
commit dd22ce9940
4 changed files with 113 additions and 101 deletions

View File

@ -85,8 +85,17 @@ export default class Line2 extends Group {
this.recover(); this.recover();
if (!this.isShowShape) return; if (!this.isShowShape) return;
/** 设置屏蔽门开关*/ /** 设置屏蔽门开关*/
// if (model.code == 'Psd99251') {
// console.log(model, model.fault == 'FAULT_PSD_OPEN', '是否故障状态', model.screenDoorOpenStatus, '0开门1关门', '02 上');
// } else if (model.code == 'Psd38731') {
// console.log(model, model.fault == 'FAULT_PSD_OPEN', '是否故障状态', model.screenDoorOpenStatus, '0开门1关门', '03 上');
// } else if (model.code == 'Psd68917') {
// console.log(model, model.fault == 'FAULT_PSD_OPEN', '是否故障状态', model.screenDoorOpenStatus, '0开门1关门', '04 上');
// } else if (model.code == 'Psd62436') {
// console.log(model, model.fault == 'FAULT_PSD_OPEN', '是否故障状态', model.screenDoorOpenStatus, '0开门1关门', '05 上');
// }
if (model.fault == 'FAULT_PSD_OPEN') { if (model.fault == 'FAULT_PSD_OPEN') {
this.doorFault(); this.doorFault(); // 故障
this.openDoor(); this.openDoor();
} else { } else {
model.screenDoorOpenStatus == 0 && this.openDoor(); /** 开门*/ model.screenDoorOpenStatus == 0 && this.openDoor(); /** 开门*/
@ -94,18 +103,6 @@ export default class Line2 extends Group {
} }
model.alarmStatus && this.alarm(); /** 收到警报(西安二号线样式) */ model.alarmStatus && this.alarm(); /** 收到警报(西安二号线样式) */
model.emergencyDepart && this.emergencyDepart(); /** 紧急出发按钮激活(西安二号线样式) */ model.emergencyDepart && this.emergencyDepart(); /** 紧急出发按钮激活(西安二号线样式) */
// /** 设置屏蔽门状态*/
// switch (model.screenDoorStatus) {
// case '01':
// this.doorNormal(); /** 正常*/
// break;
// case '02':
// this.doorFault(); /** 故障*/
// break;
// case '03':
// this.doorSplit(); /** 切除*/
// }
} }
drawSelected(selected) { drawSelected(selected) {
this.highlight && this.highlight.drawSelected(selected); this.highlight && this.highlight.drawSelected(selected);

View File

@ -1,8 +1,8 @@
<template> <template>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="xian-01__systerm switch-control" :class="popClass"
:title="title" title="道岔钩锁"
:visible.sync="show" :visible.sync="show"
width="300px" width="300px"
:before-close="doClose" :before-close="doClose"
@ -25,32 +25,40 @@
<div style="padding: 10px 15px; border: 1px double lightgray;height: 60px;margin-top: 15px;"> <div style="padding: 10px 15px; border: 1px double lightgray;height: 60px;margin-top: 15px;">
<span class="base-label" style="left:-10px;background:#f0f0f0;">钩锁位置</span> <span class="base-label" style="left:-10px;background:#f0f0f0;">钩锁位置</span>
<div style=" position: relative; top:-10px;"> <div style=" position: relative; top:-10px;">
<el-radio-group v-model="normal" @change="chooseNormal"> <el-radio-group v-model="normal">
<el-radio :id="normal? '': domIdChoose1" :label="true">定位</el-radio> <el-radio :label="true">定位</el-radio>
<el-radio :id="!normal? '': domIdChoose1" :label="false">反位</el-radio> <el-radio :label="false">反位</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
</div> </div>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-col :span="10" :offset="2"> <el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button> <el-button type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col> </el-col>
<el-col :span="8" :offset="4"> <el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-button @click="doClose"> </el-button>
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo" pop-class="xian-01__systerm" /> <notice-info ref="noticeInfo" pop-class="xian-01__systerm" />
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default { export default {
name: 'SwitchHookLock', name: 'SwitchHookLock',
components: { components: {
NoticeInfo NoticeInfo
}, },
props: {
popClass: {
type: String,
default() {
return '';
}
}
},
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
@ -59,24 +67,16 @@ export default {
operation: '', operation: '',
stationName: '', stationName: '',
switchName: '', switchName: '',
normal:false normal:false,
targetMemberId: ''
}; };
}, },
computed: { computed: {
...mapGetters('training', [
'memberList'
]),
show() { show() {
return this.dialogShow && !this.$store.state.menuOperation.break; return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Switch.hookLock.confirm.domId : '';
},
domIdChoose1() {
return this.dialogShow ? OperationEvent.Switch.hookLock.choose1.domId : '';
},
title() {
return '道岔钩锁';
} }
}, },
mounted() { mounted() {
@ -85,7 +85,7 @@ export default {
}); });
}, },
methods: { methods: {
doShow(operate, selected) { doShow(selected) {
this.selected = selected; this.selected = selected;
if (!this.dialogShow) { if (!this.dialogShow) {
this.switchName = ''; this.switchName = '';
@ -94,6 +94,7 @@ export default {
this.switchName = selected.name; this.switchName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode); const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) { if (station) {
this.targetMemberId = this.memberList.find(ele => ele.deviceCode == station.code).id;
this.stationName = station.name; this.stationName = station.name;
} }
} }
@ -102,26 +103,12 @@ export default {
} else { } else {
this.normal = false; this.normal = false;
} }
this.operation = operate.operation;
this.dialogShow = true; this.dialogShow = true;
this.$nextTick(function () { this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}); });
} }
}, },
chooseNormal(normal) {
const operate = {
operation: OperationEvent.StationStand.setStopTime.choose1.operation,
val: `${normal}`,
param: {}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
@ -129,25 +116,19 @@ export default {
}, },
commit() { commit() {
this.loading = true; this.loading = true;
commitOperate(menuOperate.Switch.hookLock, {normal: this.normal}, 2).then(({valid, operate})=>{ const group = this.$route.query.group;
if (valid) { const param = {
this.doClose(); commandType: 'Switch_Hook_Lock',
targetMemberId: this.targetMemberId,
params: {
switchCode: this.selected.code,
normal: this.normal
} }
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(error.message);
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { commitTrainSend(group, param).then(({valid, operate})=>{
if (valid) {
this.doClose(); this.doClose();
} }).catch((error) => {
}).catch(() => { this.$refs.noticeInfo.doShow(error.message);
this.doClose(); this.doClose();
}); });
} }

View File

@ -4,7 +4,7 @@
<switch-control ref="switchControl" :pop-class="'xian-01__systerm'" /> <switch-control ref="switchControl" :pop-class="'xian-01__systerm'" />
<switch-cmd-control ref="switchCmdControl" /> <switch-cmd-control ref="switchCmdControl" />
<speed-cmd-control ref="speedCmdControl" /> <speed-cmd-control ref="speedCmdControl" />
<switch-hook-lock ref="switchHookLock" /> <switch-hook-lock ref="switchHookLock" pop-class="xian-01__systerm" />
<notice-info ref="noticeInfo" pop-class="xian-01__systerm" /> <notice-info ref="noticeInfo" pop-class="xian-01__systerm" />
<set-fault ref="setFault" pop-class="xian-01__systerm" /> <set-fault ref="setFault" pop-class="xian-01__systerm" />
</div> </div>
@ -16,13 +16,12 @@ import SwitchControl from '@/jmapNew/theme/components/menus/dialog/switchControl
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault'; import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import SwitchCmdControl from './dialog/switchCmdControl'; import SwitchCmdControl from './dialog/switchCmdControl';
import SpeedCmdControl from './dialog/speedCmdControl'; import SpeedCmdControl from './dialog/speedCmdControl';
import SwitchHookLock from './dialog/switchHookLock'; import SwitchHookLock from '@/jmapNew/theme/components/menus/dialog/switchHookLock';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate'; import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
export default { export default {
@ -160,25 +159,27 @@ export default {
label: '取消限速', label: '取消限速',
handler: this.cancelSpeed, handler: this.cancelSpeed,
cmdType:CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED cmdType:CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED
},
{
label: '道岔钩锁',
handler: this.hookLock,
cmdType:CMD.Switch.CMD_SWITCH_HOOK_LOCK
} }
// {
// label: '',
// handler: this.hookLock,
// cmdType:CMD.Switch.CMD_SWITCH_HOOK_LOCK
// }
] ]
}, },
menuForce: [ menuForce: [
{ {
label: '设置故障', label: '设置故障',
handler: this.setStoppage, handler: this.setStoppage
cmdType: CMD.Fault.CMD_SET_FAULT
}, },
{ {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage, handler: this.cancelStoppage
cmdType: CMD.Fault.CMD_CANCEL_FAULT },
} {
label: '道岔钩锁',
handler: this.hookLock
},
] ]
}; };
}, },
@ -336,11 +337,12 @@ export default {
}, },
// //
hookLock() { hookLock() {
commitOperate(menuOperate.Switch.hookLock, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{ // commitOperate(menuOperate.Switch.hookLock, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) { // if (valid) {
this.$refs.switchHookLock.doShow(operate, this.selected); // this.$refs.switchHookLock.doShow(operate, this.selected);
} // }
}); // });
this.$refs.switchHookLock.doShow(this.selected);
} }
} }
}; };

View File

@ -9,7 +9,7 @@
<train-edit-number ref="trainEditNumber" /> <train-edit-number ref="trainEditNumber" />
<train-detail ref="trainDetail" /> <train-detail ref="trainDetail" />
<set-fault ref="setFault" pop-class="xian-01__systerm" /> <set-fault ref="setFault" pop-class="xian-01__systerm" />
<select-station ref="selectStation" @selectStationCode="selectStationCode" /> <!-- <select-station ref="selectStation" @selectStationCode="selectStationCode" /> -->
</div> </div>
</template> </template>
@ -17,7 +17,7 @@
import PopMenu from '@/components/PopMenu'; import PopMenu from '@/components/PopMenu';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault'; import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import SelectStation from '@/jmapNew/theme/components/menus/childDialog/selectStation'; // import SelectStation from '@/jmapNew/theme/components/menus/childDialog/selectStation';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
@ -42,8 +42,8 @@ export default {
TrainSwitch, TrainSwitch,
TrainEditNumber, TrainEditNumber,
TrainDetail, TrainDetail,
SetFault, SetFault
SelectStation // SelectStation
}, },
props: { props: {
selected: { selected: {
@ -122,6 +122,14 @@ export default {
{ {
label: '进路闭塞法行车', label: '进路闭塞法行车',
handler: this.routeBlockRun handler: this.routeBlockRun
},
{
label: '越引导信号行驶',
handler: this.handleOverFuideSignal
},
{
label: '越红灯行驶',
handler: this.handleOverEedLight
} }
], ],
menuSpeed: [ menuSpeed: [
@ -366,14 +374,38 @@ export default {
this.$refs.noticeInfo.doShow(error.message); this.$refs.noticeInfo.doShow(error.message);
}); });
}, },
selectStationCode(code) { // selectStationCode(code) {
// const group = this.$route.query.group;
// const param = {
// commandType: 'Route_Block_Drive',
// targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
// params: {
// stationCode: code
// }
// };
// commitTrainSend(group, param).then(({valid, operate})=>{
// }).catch((error) => {
// this.$refs.noticeInfo.doShow(error.message);
// });
// },
handleOverFuideSignal() {
const group = this.$route.query.group; const group = this.$route.query.group;
const param = { const param = {
commandType: 'Route_Block_Drive', commandType: 'Drive_Through_The_Guide_Signal',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: { params: {}
stationCode: code };
} commitTrainSend(group, param).then(({valid, operate})=>{
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
handleOverEedLight() {
const group = this.$route.query.group;
const param = {
commandType: 'Drive_Through_The_Red_Light',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
}; };
commitTrainSend(group, param).then(({valid, operate})=>{ commitTrainSend(group, param).then(({valid, operate})=>{
}).catch((error) => { }).catch((error) => {