车站计轴复位(未完)
This commit is contained in:
parent
871b9beb5d
commit
fdf63db248
@ -273,7 +273,9 @@ class SkinCode extends defaultStyle {
|
||||
arrowShow: false,
|
||||
grayColor: '#7F7F7F',
|
||||
lightShow: true,
|
||||
lightText: '强制点灯'
|
||||
lightText: '强制点灯',
|
||||
preResetShow: true,
|
||||
preResetText: '计轴复位'
|
||||
},
|
||||
substationControl: { // 站控按钮
|
||||
show: true,
|
||||
|
@ -300,7 +300,7 @@ export default class Station extends Group {
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
point: {
|
||||
x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 6 / 2 + this.style.Station.StationControl.lamp.offset.x,
|
||||
x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 9 / 2 + this.style.Station.StationControl.lamp.offset.x,
|
||||
y: model.controlModePoint.y + this.style.Station.StationControl.lamp.offset.y
|
||||
},
|
||||
context: this.style.Station.StationControl.centerControl.lightText,
|
||||
@ -321,6 +321,34 @@ export default class Station extends Group {
|
||||
});
|
||||
this.add(this.lightArcBorder);
|
||||
}
|
||||
if (this.style.Station.StationControl.centerControl.preResetShow) {
|
||||
this.controlPreReset = new ESingleControl({
|
||||
_subType: 'preReset',
|
||||
style: this.style,
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
point: {
|
||||
x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 3 + this.style.Station.StationControl.lamp.offset.x,
|
||||
y: model.controlModePoint.y + this.style.Station.StationControl.lamp.offset.y
|
||||
},
|
||||
context: this.style.Station.StationControl.centerControl.preResetText,
|
||||
pop: false
|
||||
});
|
||||
this.add(this.controlPreReset);
|
||||
const arcRect = this.controlPreReset.getArcBoundingRect();
|
||||
this.preResetArcBorder = new Rect({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
silent: true,
|
||||
shape: arcRect,
|
||||
style: {
|
||||
lineDash: null,
|
||||
stroke: this.style.Station.StationControl.lamp.stroke,
|
||||
fill: this.style.Station.StationControl.lamp.fill
|
||||
}
|
||||
});
|
||||
this.add(this.preResetArcBorder);
|
||||
}
|
||||
}
|
||||
|
||||
createSubstationControl() { // 站控按钮
|
||||
@ -574,11 +602,11 @@ export default class Station extends Group {
|
||||
this.on('mouseout', e => { this.EMouse.mouseout(e); });
|
||||
this.on('mouseover', e => { this.EMouse.mouseover(e); });
|
||||
} else if (this.style.Station.StationControl.mouseOverStyle) {
|
||||
this.EMouse = new EMouse(this);
|
||||
this.EMouse = new EMouse(this);
|
||||
this.add(this.EMouse);
|
||||
this.on('mouseout', e => { this.EMouse.mouseout(e); });
|
||||
this.on('mouseover', e => { this.EMouse.mouseover(e); });
|
||||
}
|
||||
}
|
||||
}
|
||||
setShowMode() {
|
||||
}
|
||||
|
@ -416,12 +416,17 @@ export const menuOperate = {
|
||||
setAutoTrigger:{
|
||||
operation: OperationEvent.Station.setAutoTrigger.menu.operation,
|
||||
cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER
|
||||
},
|
||||
// 计轴预复位
|
||||
setPreReset: {
|
||||
operation: OperationEvent.Station.setPreReset.menu.operation,
|
||||
cmdType: CMD.Station.CMD_STATION_PRE_RESET
|
||||
}
|
||||
},
|
||||
// 设置/取消强制点灯
|
||||
StationLight: {
|
||||
setOrCancelForceLight: {
|
||||
operation: OperationEvent.Station,
|
||||
operation: OperationEvent.StationLight.SetOrCancelForceLight.menu,
|
||||
cmdType: CMD.Station.CMD_STATION_SET_OR_CANCEL_FORCE_PHYSICAL_SIGNAL
|
||||
}
|
||||
},
|
||||
|
125
src/jmapNew/theme/ningbo_01/menus/dialog/buttonDown.vue
Normal file
125
src/jmapNew/theme/ningbo_01/menus/dialog/buttonDown.vue
Normal file
@ -0,0 +1,125 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="ningbo-01__systerm confirm-control-speed"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="340px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<el-row>
|
||||
<el-col></el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-button @click="commit">确定</el-button>
|
||||
<el-button @click="doClose">关闭</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
export default {
|
||||
name: 'ConfirmTip',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
message: '',
|
||||
operation: '',
|
||||
title: '按钮按下',
|
||||
value1: '',
|
||||
value2: '',
|
||||
options: [
|
||||
{ label: '车站折返变通', value: '1' },
|
||||
{ label: '站遥控按钮', value: '2' },
|
||||
{ label: 'FSA', value: '3'},
|
||||
{ label: 'NJYXLZ', value: '4'},
|
||||
{ label: '强制点灯', value: '5' }
|
||||
],
|
||||
time: '',
|
||||
status: '',
|
||||
confirmIndex: false,
|
||||
timer: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
confirmId() {
|
||||
return this.operation.domId;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.message = operate.message || '';
|
||||
this.dialogShow = true;
|
||||
this.confirmIndex = false;
|
||||
this.operation = operate.operation;
|
||||
if (this.operation === OperationEvent.StationLight.SetOrCancelForceLight.confirm1.operation) {
|
||||
this.value1 = '5';
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
if (this.timer) { clearInterval(this.timer); }
|
||||
},
|
||||
confirm1() {
|
||||
this.status = '发送First request消息成功,请等待服务器!';
|
||||
setTimeout(() => {
|
||||
this.confirmIndex = true;
|
||||
this.time = 30;
|
||||
this.status = '收到First request消息!';
|
||||
this.timer = setInterval(() => {
|
||||
this.time = this.time - 1;
|
||||
if (this.time < 0) { this.doClose(); }
|
||||
}, 1000);
|
||||
}, 1000);
|
||||
},
|
||||
confirm2() {
|
||||
if (this.value1 !== this.value2) {
|
||||
this.status = '确认操作失败!';
|
||||
return;
|
||||
}
|
||||
if (this.operation === OperationEvent.StationLight.SetOrCancelForceLight.confirm1.operation) {
|
||||
commitOperate({operate: this.operation, cmdType: CMD.Station.CMD_STATION_SET_OR_CANCEL_FORCE_PHYSICAL_SIGNAL}, {}, 2).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.status = '发送 Second Confirm消息成功,请等待服务器!';
|
||||
setTimeout(() => {
|
||||
this.doClose();
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
.confirm-control-speed .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
.ningbo-01__systerm .el-dialog .el-button{
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.status-box {
|
||||
width: 100%;
|
||||
height: 70px;
|
||||
border-top: #928F92 1px solid;
|
||||
border-left: #928F92 1px solid;
|
||||
border-right: #E6E3E6 1px solid;
|
||||
border-bottom: #E6E3E6 1px solid;
|
||||
}
|
||||
</style>
|
141
src/jmapNew/theme/ningbo_01/menus/menuStationPreReset.vue
Normal file
141
src/jmapNew/theme/ningbo_01/menus/menuStationPreReset.vue
Normal file
@ -0,0 +1,141 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<password-input ref="passwordInput" @confirm="forceLightConfirm" />
|
||||
<operateConfirm ref="operateConfirm" @executeConfirm="forceLightConfirm1" />
|
||||
<button-confirm ref="buttonConfirm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import PasswordInput from './dialog/passwordInput';
|
||||
import { mapGetters } from 'vuex';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperateConfirm from './dialog/childDialog/operateConfirm';
|
||||
import ButtonConfirm from './dialog/childDialog/buttonConfirm';
|
||||
|
||||
export default {
|
||||
name: 'StationControlLight',
|
||||
components: {
|
||||
PopMenu,
|
||||
PasswordInput,
|
||||
OperateConfirm,
|
||||
ButtonConfirm
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: '设置',
|
||||
handler: this.setPreReset,
|
||||
cmdType: CMD.Station.CMD_STATION_PRE_RESET
|
||||
},
|
||||
{
|
||||
label: '取消',
|
||||
handler: this.cancelPreReset,
|
||||
cmdType: CMD.Station.CMD_STATION_PRE_RESET
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '设置',
|
||||
handler: this.setPreReset,
|
||||
cmdType: CMD.Station.CMD_STATION_PRE_RESET
|
||||
},
|
||||
{
|
||||
label: '取消',
|
||||
handler: this.cancelPreReset,
|
||||
cmdType: CMD.Station.CMD_STATION_PRE_RESET
|
||||
}
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationLight) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
this.getCurrentStateObject();
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
getCurrentStateObject() {
|
||||
this.selected = this.$store.getters['menuOperation/selected'];
|
||||
},
|
||||
setPreReset() {
|
||||
// 计轴复位
|
||||
commitOperate(menuOperate.Station.setPreReset, {stationCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
const nextOperate = {
|
||||
operation: OperationEvent.StationLight.SetOrCancelForceLight.password.operation
|
||||
};
|
||||
this.$refs.passwordInput.doShow(nextOperate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
cancelPreReset() {
|
||||
|
||||
},
|
||||
forceLightConfirm() {
|
||||
const nextOperate = {
|
||||
message: '是否执行设置/取消全站点灯命令?',
|
||||
operation: OperationEvent.StationLight.SetOrCancelForceLight.confirm.operation
|
||||
};
|
||||
this.$refs.operateConfirm.doShow(nextOperate);
|
||||
},
|
||||
forceLightConfirm1() {
|
||||
const nextOperate = {
|
||||
operation: OperationEvent.StationLight.SetOrCancelForceLight.confirm1.operation
|
||||
};
|
||||
this.$refs.buttonConfirm.doShow(nextOperate);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -2503,6 +2503,17 @@ export const OperationEvent = {
|
||||
operation: '6163',
|
||||
domId: '_Tips-Station-areaSelection-Confirm'
|
||||
}
|
||||
},
|
||||
// 计轴复位
|
||||
setPreReset: {
|
||||
menu: {
|
||||
operation: '617',
|
||||
domId: '_Tips-Station-setPreReset-Menu'
|
||||
},
|
||||
confirm: {
|
||||
operation: '6171',
|
||||
domId: '_Tips-Station-setPreReset-Confirm'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user