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

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();
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') {
this.doorFault();
this.doorFault(); // 故障
this.openDoor();
} else {
model.screenDoorOpenStatus == 0 && this.openDoor(); /** 开门*/
@ -94,18 +103,6 @@ export default class Line2 extends Group {
}
model.alarmStatus && this.alarm(); /** 收到警报(西安二号线样式) */
model.emergencyDepart && this.emergencyDepart(); /** 紧急出发按钮激活(西安二号线样式) */
// /** 设置屏蔽门状态*/
// switch (model.screenDoorStatus) {
// case '01':
// this.doorNormal(); /** 正常*/
// break;
// case '02':
// this.doorFault(); /** 故障*/
// break;
// case '03':
// this.doorSplit(); /** 切除*/
// }
}
drawSelected(selected) {
this.highlight && this.highlight.drawSelected(selected);

View File

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

View File

@ -4,7 +4,7 @@
<switch-control ref="switchControl" :pop-class="'xian-01__systerm'" />
<switch-cmd-control ref="switchCmdControl" />
<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" />
<set-fault ref="setFault" pop-class="xian-01__systerm" />
</div>
@ -16,14 +16,13 @@ import SwitchControl from '@/jmapNew/theme/components/menus/dialog/switchControl
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import SwitchCmdControl from './dialog/switchCmdControl';
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 CMD from '@/scripts/cmdPlugin/CommandEnum';
import { mapGetters } from 'vuex';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
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 {
name: 'SwitchMenu',
@ -160,25 +159,27 @@ export default {
label: '取消限速',
handler: this.cancelSpeed,
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: [
{
label: '设置故障',
handler: this.setStoppage,
cmdType: CMD.Fault.CMD_SET_FAULT
handler: this.setStoppage
},
{
label: '取消故障',
handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT
}
handler: this.cancelStoppage
},
{
label: '道岔钩锁',
handler: this.hookLock
},
]
};
},
@ -336,11 +337,12 @@ export default {
},
//
hookLock() {
commitOperate(menuOperate.Switch.hookLock, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.switchHookLock.doShow(operate, this.selected);
}
});
// commitOperate(menuOperate.Switch.hookLock, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
// if (valid) {
// 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-detail ref="trainDetail" />
<set-fault ref="setFault" pop-class="xian-01__systerm" />
<select-station ref="selectStation" @selectStationCode="selectStationCode" />
<!-- <select-station ref="selectStation" @selectStationCode="selectStationCode" /> -->
</div>
</template>
@ -17,7 +17,7 @@
import PopMenu from '@/components/PopMenu';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
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 { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
@ -42,8 +42,8 @@ export default {
TrainSwitch,
TrainEditNumber,
TrainDetail,
SetFault,
SelectStation
SetFault
// SelectStation
},
props: {
selected: {
@ -122,6 +122,14 @@ export default {
{
label: '进路闭塞法行车',
handler: this.routeBlockRun
},
{
label: '越引导信号行驶',
handler: this.handleOverFuideSignal
},
{
label: '越红灯行驶',
handler: this.handleOverEedLight
}
],
menuSpeed: [
@ -366,14 +374,38 @@ export default {
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 param = {
commandType: 'Route_Block_Drive',
commandType: 'Drive_Through_The_Guide_Signal',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {
stationCode: code
}
params: {}
};
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})=>{
}).catch((error) => {