调整自动折返 type 类型 增加自动折返菜单流程
This commit is contained in:
parent
2fb74f520d
commit
0ceb0c2c65
@ -216,7 +216,7 @@ class SkinCode extends defaultStyle {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this[deviceType.MapCycleButtonVO] = {
|
this[deviceType.AutoTurnBack] = {
|
||||||
// 是否显示
|
// 是否显示
|
||||||
visibleConditions: '03',
|
visibleConditions: '03',
|
||||||
text: {
|
text: {
|
||||||
|
@ -292,7 +292,7 @@ class SkinCode extends defaultStyle {
|
|||||||
borderColor: '#FFFFFF' // 延迟解锁边框颜色
|
borderColor: '#FFFFFF' // 延迟解锁边框颜色
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this[deviceType.MapCycleButtonVO] = {
|
this[deviceType.AutoTurnBack] = {
|
||||||
// 是否显示
|
// 是否显示
|
||||||
visibleConditions: '03',
|
visibleConditions: '03',
|
||||||
text: {
|
text: {
|
||||||
|
@ -465,7 +465,7 @@ class SkinCode extends defaultStyle {
|
|||||||
controlColor: '#b5b3b3' // 控制灯颜色 (灰色)
|
controlColor: '#b5b3b3' // 控制灯颜色 (灰色)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this[deviceType.MapCycleButtonVO] = {
|
this[deviceType.AutoTurnBack] = {
|
||||||
// 是否显示
|
// 是否显示
|
||||||
visibleConditions: '03',
|
visibleConditions: '03',
|
||||||
text: {
|
text: {
|
||||||
|
@ -275,7 +275,7 @@ class SkinCode extends defaultStyle {
|
|||||||
borderColor: '#FFFFFF' // 延迟解锁边框颜色
|
borderColor: '#FFFFFF' // 延迟解锁边框颜色
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this[deviceType.MapCycleButtonVO] = {
|
this[deviceType.AutoTurnBack] = {
|
||||||
// 是否显示
|
// 是否显示
|
||||||
visibleConditions: '03',
|
visibleConditions: '03',
|
||||||
text: {
|
text: {
|
||||||
|
@ -290,7 +290,7 @@ class SkinCode extends defaultStyle {
|
|||||||
borderColor: '#FFFFFF' // 延迟解锁边框颜色
|
borderColor: '#FFFFFF' // 延迟解锁边框颜色
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this[deviceType.MapCycleButtonVO] = {
|
this[deviceType.AutoTurnBack] = {
|
||||||
// 是否显示
|
// 是否显示
|
||||||
visibleConditions: '03',
|
visibleConditions: '03',
|
||||||
text: {
|
text: {
|
||||||
|
@ -210,7 +210,7 @@ class SkinCode extends defaultStyle {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this[deviceType.MapCycleButtonVO] = {
|
this[deviceType.AutoTurnBack] = {
|
||||||
// 是否显示
|
// 是否显示
|
||||||
visibleConditions: '01',
|
visibleConditions: '01',
|
||||||
text: {
|
text: {
|
||||||
|
@ -117,8 +117,8 @@ deviceRender[deviceType.CheckBox] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/** Automactic渲染配置 自动折返*/
|
/** Automactic渲染配置 自动折返*/
|
||||||
deviceRender[deviceType.MapCycleButtonVO] = {
|
deviceRender[deviceType.AutoTurnBack] = {
|
||||||
_type: deviceType.MapCycleButtonVO,
|
_type: deviceType.AutoTurnBack,
|
||||||
zlevel: 1
|
zlevel: 1
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ const deviceType = {
|
|||||||
StationStand: 'StationStand',
|
StationStand: 'StationStand',
|
||||||
Esp: 'Esp',
|
Esp: 'Esp',
|
||||||
Psd: 'Psd',
|
Psd: 'Psd',
|
||||||
MapCycleButtonVO: 'MapCycleButtonVO',
|
AutoTurnBack: 'AutoTurnBack',
|
||||||
OutFrame: 'OutFrame',
|
OutFrame: 'OutFrame',
|
||||||
AxleReset: 'AxleReset',
|
AxleReset: 'AxleReset',
|
||||||
GuideLock: 'GuideLock',
|
GuideLock: 'GuideLock',
|
||||||
|
@ -114,7 +114,7 @@ class Status {
|
|||||||
handleLimitControl(device) {
|
handleLimitControl(device) {
|
||||||
this.statusObj = { };
|
this.statusObj = { };
|
||||||
}
|
}
|
||||||
handleMapCycleButtonVO(device) {
|
handleAutoTurnBack(device) {
|
||||||
this.statusObj = { };
|
this.statusObj = { };
|
||||||
}
|
}
|
||||||
handleAutomaticRoute(device) {
|
handleAutomaticRoute(device) {
|
||||||
|
@ -18,7 +18,7 @@ export default class Automactic extends Group {
|
|||||||
this.model = model;
|
this.model = model;
|
||||||
this.style = style;
|
this.style = style;
|
||||||
this.isShowShape = true;
|
this.isShowShape = true;
|
||||||
if (isShowThePrdType(model.prdType, style.MapCycleButtonVO.visibleConditions) || model.previewOrMapDraw) {
|
if (isShowThePrdType(model.prdType, style.AutoTurnBack.visibleConditions) || model.previewOrMapDraw) {
|
||||||
this.create();
|
this.create();
|
||||||
this.createMouseEvent();
|
this.createMouseEvent();
|
||||||
this.setState(model);
|
this.setState(model);
|
||||||
@ -37,11 +37,11 @@ export default class Automactic extends Group {
|
|||||||
shape: {
|
shape: {
|
||||||
cx: model.position.x,
|
cx: model.position.x,
|
||||||
cy: model.position.y,
|
cy: model.position.y,
|
||||||
r: this.style.MapCycleButtonVO.lamp.radiusR
|
r: this.style.AutoTurnBack.lamp.radiusR
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
lineWidth: 0,
|
lineWidth: 0,
|
||||||
fill: this.style.MapCycleButtonVO.lamp.controlColor
|
fill: this.style.AutoTurnBack.lamp.controlColor
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -52,9 +52,9 @@ export default class Automactic extends Group {
|
|||||||
position: [0, 0],
|
position: [0, 0],
|
||||||
style: {
|
style: {
|
||||||
x: model.position.x,
|
x: model.position.x,
|
||||||
y: model.position.y + this.style.MapCycleButtonVO.lamp.radiusR + this.style.MapCycleButtonVO.text.distance,
|
y: model.position.y + this.style.AutoTurnBack.lamp.radiusR + this.style.AutoTurnBack.text.distance,
|
||||||
fontWeight: this.style.MapCycleButtonVO.text.fontWeight,
|
fontWeight: this.style.AutoTurnBack.text.fontWeight,
|
||||||
fontSize: this.style.MapCycleButtonVO.text.fontSize,
|
fontSize: this.style.AutoTurnBack.text.fontSize,
|
||||||
fontFamily: this.style.fontFamily,
|
fontFamily: this.style.fontFamily,
|
||||||
text: model.name,
|
text: model.name,
|
||||||
textFill: '#fff',
|
textFill: '#fff',
|
||||||
@ -71,9 +71,9 @@ export default class Automactic extends Group {
|
|||||||
position: [0, 0],
|
position: [0, 0],
|
||||||
style: {
|
style: {
|
||||||
x: model.position.x,
|
x: model.position.x,
|
||||||
y: model.position.y + this.style.MapCycleButtonVO.lamp.radiusR + this.style.MapCycleButtonVO.subtitleText.distance,
|
y: model.position.y + this.style.AutoTurnBack.lamp.radiusR + this.style.AutoTurnBack.subtitleText.distance,
|
||||||
fontWeight: this.style.MapCycleButtonVO.subtitleText.fontWeight,
|
fontWeight: this.style.AutoTurnBack.subtitleText.fontWeight,
|
||||||
fontSize: this.style.MapCycleButtonVO.subtitleText.fontSize,
|
fontSize: this.style.AutoTurnBack.subtitleText.fontSize,
|
||||||
fontFamily: this.style.fontFamily,
|
fontFamily: this.style.fontFamily,
|
||||||
text: model.subtitleName,
|
text: model.subtitleName,
|
||||||
textFill: '#fff',
|
textFill: '#fff',
|
||||||
@ -84,7 +84,7 @@ export default class Automactic extends Group {
|
|||||||
this.add(this.subtitleText);
|
this.add(this.subtitleText);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.style.MapCycleButtonVO.lamp.borderShow) {
|
if (this.style.AutoTurnBack.lamp.borderShow) {
|
||||||
const arcRect = this.getArcBoundingRect();
|
const arcRect = this.getArcBoundingRect();
|
||||||
this.arcBorder = new Rect({
|
this.arcBorder = new Rect({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
@ -92,9 +92,9 @@ export default class Automactic extends Group {
|
|||||||
silent: true,
|
silent: true,
|
||||||
shape: arcRect,
|
shape: arcRect,
|
||||||
style: {
|
style: {
|
||||||
lineDash: this.style.MapCycleButtonVO.lamp.lineDash,
|
lineDash: this.style.AutoTurnBack.lamp.lineDash,
|
||||||
stroke: this.style.MapCycleButtonVO.lamp.stroke,
|
stroke: this.style.AutoTurnBack.lamp.stroke,
|
||||||
fill: this.style.MapCycleButtonVO.lamp.fill
|
fill: this.style.AutoTurnBack.lamp.fill
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.add(this.arcBorder);
|
this.add(this.arcBorder);
|
||||||
@ -141,7 +141,7 @@ export default class Automactic extends Group {
|
|||||||
}
|
}
|
||||||
setShowMode() {
|
setShowMode() {
|
||||||
const showMode = this.model.showMode;
|
const showMode = this.model.showMode;
|
||||||
const showConditions = this.style.MapCycleButtonVO.visibleConditions;
|
const showConditions = this.style.AutoTurnBack.visibleConditions;
|
||||||
if (!showConditions || showConditions === '01' || showMode === showConditions) {
|
if (!showConditions || showConditions === '01' || showMode === showConditions) {
|
||||||
this.show();
|
this.show();
|
||||||
} else {
|
} else {
|
||||||
|
@ -17,7 +17,7 @@ import Line from './Line/index.js';
|
|||||||
import Text2 from './Text/index.js';
|
import Text2 from './Text/index.js';
|
||||||
import AxleReset from './AxleReset/index';
|
import AxleReset from './AxleReset/index';
|
||||||
import GuideLock from './GuideLock/index';
|
import GuideLock from './GuideLock/index';
|
||||||
import MapCycleButtonVO from './Automactic/index.js';
|
import AutoTurnBack from './Automactic/index.js';
|
||||||
import OutFrame from './OutFrame/index.js';
|
import OutFrame from './OutFrame/index.js';
|
||||||
import CheckBox from './checkBox/checkBox.js';
|
import CheckBox from './checkBox/checkBox.js';
|
||||||
import AutomaticRoute from './AutomacticRoute/index.js';
|
import AutomaticRoute from './AutomacticRoute/index.js';
|
||||||
@ -40,7 +40,7 @@ mapShape[deviceType.TrainWindow] = TrainWindow;
|
|||||||
mapShape[deviceType.Train] = Train;
|
mapShape[deviceType.Train] = Train;
|
||||||
mapShape[deviceType.Line] = Line;
|
mapShape[deviceType.Line] = Line;
|
||||||
mapShape[deviceType.Text] = Text2;
|
mapShape[deviceType.Text] = Text2;
|
||||||
mapShape[deviceType.MapCycleButtonVO] = MapCycleButtonVO;
|
mapShape[deviceType.AutoTurnBack] = AutoTurnBack;
|
||||||
mapShape[deviceType.OutFrame] = OutFrame;
|
mapShape[deviceType.OutFrame] = OutFrame;
|
||||||
mapShape[deviceType.AxleReset] = AxleReset;
|
mapShape[deviceType.AxleReset] = AxleReset;
|
||||||
mapShape[deviceType.GuideLock] = GuideLock;
|
mapShape[deviceType.GuideLock] = GuideLock;
|
||||||
|
@ -356,7 +356,7 @@ export default {
|
|||||||
} else if (model._type === 'StationStand' && subType === 'CancelStopJumpLamp') {
|
} else if (model._type === 'StationStand' && subType === 'CancelStopJumpLamp') {
|
||||||
operate.cmdType = CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP;
|
operate.cmdType = CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP;
|
||||||
operate.param = {standCode: model.code, trainGroupNumber: ''};
|
operate.param = {standCode: model.code, trainGroupNumber: ''};
|
||||||
} else if (model._type === 'MapCycleButtonVO' ) {
|
} else if (model._type === 'AutoTurnBack' ) {
|
||||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK;
|
operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK;
|
||||||
operate.param = {cycleCode: model.cycleCode};
|
operate.param = {cycleCode: model.cycleCode};
|
||||||
} else if (model._type === 'AutomaticRoute') {
|
} else if (model._type === 'AutomaticRoute') {
|
||||||
@ -383,7 +383,7 @@ export default {
|
|||||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE;
|
operate.cmdType = CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE;
|
||||||
operate.param = {signalCode: model.code};
|
operate.param = {signalCode: model.code};
|
||||||
}
|
}
|
||||||
} else if (model._type === 'MapCycleButtonVO') {
|
} else if (model._type === 'AutoTurnBack') {
|
||||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK;
|
operate.cmdType = CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK;
|
||||||
operate.param = {cycleCode: model.cycleCode, cancelRoute: false};
|
operate.param = {cycleCode: model.cycleCode, cancelRoute: false};
|
||||||
} else if (model._type === 'AutomaticRoute') {
|
} else if (model._type === 'AutomaticRoute') {
|
||||||
|
@ -23,8 +23,8 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div v-if="passModel" style="margin: 12px 0;">
|
<div v-if="passModel" style="margin: 12px 0;">
|
||||||
<el-radio :id="upRadioId" v-model="passRadio" label="1" style="display: block; padding-left: 10px; margin-bottom: 10px;" @change="changeRadio" :disabled="passRadio == '2'">设置自动通过</el-radio>
|
<el-radio :id="upRadioId" v-model="passRadio" label="1" style="display: block; padding-left: 10px; margin-bottom: 10px;" :disabled="passRadio == '2'" @change="changeRadio">设置自动通过</el-radio>
|
||||||
<el-radio :id="upRadioId" v-model="passRadio" label="2" style="display: block; padding-left: 10px;" @change="changeRadio" :disabled="passRadio == '1'">取消自动通过</el-radio>
|
<el-radio :id="upRadioId" v-model="passRadio" label="2" style="display: block; padding-left: 10px;" :disabled="passRadio == '1'" @change="changeRadio">取消自动通过</el-radio>
|
||||||
</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">
|
||||||
|
174
src/jmapNew/theme/ningbo_01/menus/dialog/turnBackControl.vue
Normal file
174
src/jmapNew/theme/ningbo_01/menus/dialog/turnBackControl.vue
Normal file
@ -0,0 +1,174 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
v-dialogDrag
|
||||||
|
class="ningbo-01__systerm signal-control"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="300px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
|
<el-row class="header">
|
||||||
|
<el-col :span="11"><span>集中站</span></el-col>
|
||||||
|
<el-col :span="11" :offset="2"><span>信号机</span></el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="11">
|
||||||
|
<el-input v-model="stationName" size="small" disabled />
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="11" :offset="2">
|
||||||
|
<el-input v-model="signalName" size="small" disabled />
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<div style="margin: 12px 0;">
|
||||||
|
<el-radio :id="upRadioId" v-model="passRadio" label="1" style="display: block; padding-left: 10px; margin-bottom: 10px;" :disabled="passRadio == '2'">设置</el-radio>
|
||||||
|
<el-radio :id="upRadioId" v-model="passRadio" label="2" style="display: block; padding-left: 10px;" :disabled="passRadio == '1'">取消</el-radio>
|
||||||
|
</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-col>
|
||||||
|
<el-col :span="8" :offset="4">
|
||||||
|
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<confirm-control ref="confirmControl" />
|
||||||
|
<notice-info ref="noticeInfo" />
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import ConfirmControl from './childDialog/confirmControl';
|
||||||
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'RouteControl',
|
||||||
|
components: {
|
||||||
|
ConfirmControl,
|
||||||
|
NoticeInfo
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogShow: false,
|
||||||
|
loading: false,
|
||||||
|
selected: null,
|
||||||
|
operation: null,
|
||||||
|
stationName: '',
|
||||||
|
signalName: '',
|
||||||
|
passRadio: '1'
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
show() {
|
||||||
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
|
},
|
||||||
|
domIdCancel() {
|
||||||
|
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
||||||
|
},
|
||||||
|
domIdConfirm() {
|
||||||
|
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||||
|
},
|
||||||
|
title() {
|
||||||
|
return '自动折返';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$store.dispatch('training/tipReload');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
doShow(operate, selected) {
|
||||||
|
this.selected = selected;
|
||||||
|
if (!this.dialogShow) {
|
||||||
|
this.signalName = '';
|
||||||
|
this.stationName = '';
|
||||||
|
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||||
|
this.signalName = selected.name;
|
||||||
|
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||||
|
if (station) {
|
||||||
|
this.stationName = station.name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.operation = operate.operation;
|
||||||
|
|
||||||
|
if (this.operation == OperationEvent.AutoTurnBack.SetAutoTurnBackButton.menu.operation) {
|
||||||
|
this.passRadio = '1';
|
||||||
|
} else if (this.operation == OperationEvent.AutoTurnBack.CancelAutoTurnBackButton.menu.operation) {
|
||||||
|
this.passRadio = '2';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.dialogShow = true;
|
||||||
|
this.$nextTick(function () {
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
doClose() {
|
||||||
|
this.loading = false;
|
||||||
|
this.dialogShow = false;
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
this.mouseCancelState(this.selected);
|
||||||
|
},
|
||||||
|
commit() {
|
||||||
|
if (this.operation == OperationEvent.AutoTurnBack.SetAutoTurnBackButton.menu.operation) {
|
||||||
|
this.singalPassModel(); // 设置自动折返
|
||||||
|
} else if (this.operation == OperationEvent.AutoTurnBack.CancelAutoTurnBackButton.menu.operation) {
|
||||||
|
this.singalCancelPassModel(); // 取消自动折返
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 设置自动折返
|
||||||
|
singalPassModel() {
|
||||||
|
const operate = {
|
||||||
|
over: true,
|
||||||
|
operation: this.operation,
|
||||||
|
cmdType: CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK
|
||||||
|
};
|
||||||
|
|
||||||
|
this.sendCommand(operate);
|
||||||
|
},
|
||||||
|
// 取消自动折返
|
||||||
|
singalCancelPassModel() {
|
||||||
|
const operate = {
|
||||||
|
over: true,
|
||||||
|
operation: this.operation,
|
||||||
|
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK
|
||||||
|
};
|
||||||
|
|
||||||
|
this.sendCommand(operate);
|
||||||
|
},
|
||||||
|
sendCommand(operate) {
|
||||||
|
this.loading = true;
|
||||||
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
|
this.loading = false;
|
||||||
|
if (valid) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
this.loading = false;
|
||||||
|
this.doClose();
|
||||||
|
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消
|
||||||
|
cancel() {
|
||||||
|
const operate = {
|
||||||
|
operation: OperationEvent.Command.close.menu.operation
|
||||||
|
};
|
||||||
|
|
||||||
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.doClose();
|
||||||
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
@ -4,6 +4,7 @@
|
|||||||
<template v-show="isShowAll">
|
<template v-show="isShowAll">
|
||||||
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
||||||
<!-- <menu-button ref="menuButton" /> -->
|
<!-- <menu-button ref="menuButton" /> -->
|
||||||
|
<menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" />
|
||||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||||
<menu-station-control ref="menuStationControl" :selected="selected" />>
|
<menu-station-control ref="menuStationControl" :selected="selected" />>
|
||||||
<menu-switch ref="menuSwitch" :selected="selected" />
|
<menu-switch ref="menuSwitch" :selected="selected" />
|
||||||
@ -24,6 +25,7 @@ import { mapGetters } from 'vuex';
|
|||||||
import MenuCancel from './menuCancel';
|
import MenuCancel from './menuCancel';
|
||||||
import MenuSignal from './menuSignal';
|
import MenuSignal from './menuSignal';
|
||||||
// import MenuButton from './menuButton';
|
// import MenuButton from './menuButton';
|
||||||
|
import MenuAutoTrunRoute from './menuAutoTrunRoute';
|
||||||
import MenuStationStand from './menuStationStand';
|
import MenuStationStand from './menuStationStand';
|
||||||
import MenuStationControl from './menuStationControl';
|
import MenuStationControl from './menuStationControl';
|
||||||
import MenuSwitch from './menuSwitch';
|
import MenuSwitch from './menuSwitch';
|
||||||
@ -41,6 +43,7 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
MenuBar,
|
MenuBar,
|
||||||
// MenuButton,
|
// MenuButton,
|
||||||
|
MenuAutoTrunRoute,
|
||||||
MenuCancel,
|
MenuCancel,
|
||||||
MenuSignal,
|
MenuSignal,
|
||||||
MenuSwitch,
|
MenuSwitch,
|
||||||
|
145
src/jmapNew/theme/ningbo_01/menus/menuAutoTrunRoute.vue
Normal file
145
src/jmapNew/theme/ningbo_01/menus/menuAutoTrunRoute.vue
Normal file
@ -0,0 +1,145 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
|
<turn-back-control ref="turnBackControl" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import PopMenu from '@/components/PopMenu';
|
||||||
|
import TurnBackControl from './dialog/turnBackControl';
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
|
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'MenuLimit',
|
||||||
|
components: {
|
||||||
|
PopMenu,
|
||||||
|
TurnBackControl
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
selected: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
menu: [],
|
||||||
|
menuNormal: {
|
||||||
|
Local: [
|
||||||
|
{
|
||||||
|
label: '设置自动折返',
|
||||||
|
handler: this.handlerTurnBack,
|
||||||
|
cmdType: CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '取消自动折返',
|
||||||
|
handler: this.cancelTurnBack,
|
||||||
|
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK
|
||||||
|
}
|
||||||
|
],
|
||||||
|
Center: [
|
||||||
|
{
|
||||||
|
label: '设置自动折返',
|
||||||
|
handler: this.handlerTurnBack,
|
||||||
|
cmdType: CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '取消自动折返',
|
||||||
|
handler: this.cancelTurnBack,
|
||||||
|
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters('training', [
|
||||||
|
'mode',
|
||||||
|
'operatemode'
|
||||||
|
]),
|
||||||
|
...mapGetters('menuOperation', [
|
||||||
|
'buttonOperation'
|
||||||
|
])
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
'$store.state.menuOperation.menuCount': function (val) {
|
||||||
|
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.AutoTurnBack) && !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);
|
||||||
|
console.log(this.menu);
|
||||||
|
// 故障模式菜单列表
|
||||||
|
if (this.operatemode === OperateMode.FAULT) {
|
||||||
|
this.menu = this.menuForce;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 设置自动折返
|
||||||
|
handlerTurnBack() {
|
||||||
|
const operate = {
|
||||||
|
start: true,
|
||||||
|
code: this.selected.code,
|
||||||
|
operation: OperationEvent.AutoTurnBack.SetAutoTurnBackButton.menu.operation,
|
||||||
|
param: {
|
||||||
|
autoTurnBackCode: this.selected.code
|
||||||
|
}
|
||||||
|
};
|
||||||
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
this.$refs.turnBackControl.doShow(operate, this.selected);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消自动折返
|
||||||
|
cancelTurnBack() {
|
||||||
|
const operate = {
|
||||||
|
start: true,
|
||||||
|
code: this.selected.code,
|
||||||
|
operation: OperationEvent.AutoTurnBack.CancelAutoTurnBackButton.menu.operation,
|
||||||
|
param: {
|
||||||
|
autoTurnBackCode: this.selected.code
|
||||||
|
}
|
||||||
|
};
|
||||||
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
this.$refs.turnBackControl.doShow(operate, this.selected);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
@ -116,7 +116,7 @@ export function parser(data, skinCode, showConfig) {
|
|||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
zrUtil.each(data.cycleButtonList || [], elem => { // 自动折返列表
|
zrUtil.each(data.cycleButtonList || [], elem => { // 自动折返列表
|
||||||
mapDevice[elem.code] = createDevice(deviceType.MapCycleButtonVO, elem, propConvert, showConfig);
|
mapDevice[elem.code] = createDevice(deviceType.AutoTurnBack, elem, propConvert, showConfig);
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
zrUtil.each(data.axleCounterResetButtonList || [], elem => { // 计轴复位列表
|
zrUtil.each(data.axleCounterResetButtonList || [], elem => { // 计轴复位列表
|
||||||
@ -225,7 +225,7 @@ export function updateMapData(state, model) {
|
|||||||
case deviceType.Text: updateForList(model, state, 'textList'); break;
|
case deviceType.Text: updateForList(model, state, 'textList'); break;
|
||||||
case deviceType.Psd: updateForList(model, state, 'psdList'); break;
|
case deviceType.Psd: updateForList(model, state, 'psdList'); break;
|
||||||
case deviceType.Esp: updateForList(model, state, 'espList'); break;
|
case deviceType.Esp: updateForList(model, state, 'espList'); break;
|
||||||
case deviceType.MapCycleButtonVO: updateForList(model, state, 'cycleButtonList'); break;
|
case deviceType.AutoTurnBack: updateForList(model, state, 'cycleButtonList'); break;
|
||||||
case deviceType.AxleReset: updateForList(model, state, 'axleCounterResetButtonList'); break;
|
case deviceType.AxleReset: updateForList(model, state, 'axleCounterResetButtonList'); break;
|
||||||
case deviceType.GuideLock: updateForList(model, state, 'totalGuideLockButtonVOList'); break;
|
case deviceType.GuideLock: updateForList(model, state, 'totalGuideLockButtonVOList'); break;
|
||||||
case deviceType.OutFrame: updateForList(model, state, 'outerFrameList'); break;
|
case deviceType.OutFrame: updateForList(model, state, 'outerFrameList'); break;
|
||||||
|
@ -104,6 +104,7 @@ export const DeviceMenu = {
|
|||||||
Station: '08',
|
Station: '08',
|
||||||
TrainWindow: '09',
|
TrainWindow: '09',
|
||||||
LimitControl: '10',
|
LimitControl: '10',
|
||||||
|
AutoTurnBack: '11',
|
||||||
|
|
||||||
Map: '100',
|
Map: '100',
|
||||||
PrdCategory: '101',
|
PrdCategory: '101',
|
||||||
|
@ -1922,6 +1922,30 @@ export const OperationEvent = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 设置/取消自动折返
|
||||||
|
AutoTurnBack: {
|
||||||
|
SetAutoTurnBackButton: {
|
||||||
|
menu: {
|
||||||
|
operation: '900',
|
||||||
|
domId: '_Tips-Turn-Back-Menu'
|
||||||
|
},
|
||||||
|
confirm: {
|
||||||
|
operation: '9001',
|
||||||
|
domId: '_Tips-Turn-Back-confirm-Menu'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
CancelAutoTurnBackButton: {
|
||||||
|
menu: {
|
||||||
|
operation: '900',
|
||||||
|
domId: '_Tips-Turn-Back-Menu'
|
||||||
|
},
|
||||||
|
confirm: {
|
||||||
|
operation: '9001',
|
||||||
|
domId: '_Tips-Turn-Back-confirm-Menu'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
// 混合指令
|
// 混合指令
|
||||||
MixinCommand: {
|
MixinCommand: {
|
||||||
/** 控制模式操作 */
|
/** 控制模式操作 */
|
||||||
|
@ -55,7 +55,7 @@ export default {
|
|||||||
activeName: 'first',
|
activeName: 'first',
|
||||||
autoList: [],
|
autoList: [],
|
||||||
typeList: [
|
typeList: [
|
||||||
{ name: '自动折返', value: 'MapCycleButtonVO' },
|
{ name: '自动折返', value: 'AutoTurnBack' },
|
||||||
{ name: '计轴复位', value: 'AxleReset' },
|
{ name: '计轴复位', value: 'AxleReset' },
|
||||||
{ name: '自动进路', value: 'AutomaticRoute' },
|
{ name: '自动进路', value: 'AutomaticRoute' },
|
||||||
{ name: '引导总锁', value: 'GuideLock' },
|
{ name: '引导总锁', value: 'GuideLock' },
|
||||||
@ -131,8 +131,8 @@ export default {
|
|||||||
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
|
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
|
||||||
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
|
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
|
||||||
] },
|
] },
|
||||||
{ prop:'automaticRouteCode', label: '自动进路code:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.autoList, isHidden: !this.isHiddenAutomaticRoute, change: true, deviceChange: this.ChangeStation },
|
{ prop:'automaticRouteCode', label: '自动进路code:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.autoList, isHidden: !this.isHiddenAutomaticRoute, change: true, deviceChange: this.ChangeEditStation },
|
||||||
{ prop:'cycleCode', label: '自动折返进路code:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.autoList, isHidden: !this.isHiddenMapCycleButtonVO, change: true, deviceChange: this.ChangeStation },
|
{ prop:'cycleCode', label: '自动折返进路code:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.autoList, isHidden: !this.isHiddenMapCycleButtonVO, change: true, deviceChange: this.ChangeEditStation },
|
||||||
{ prop:'stationCode', label: '所属集中站:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList, disabled: this.isDisabledStation, isHidden: !this.isHiddenStation }
|
{ prop:'stationCode', label: '所属集中站:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList, disabled: this.isDisabledStation, isHidden: !this.isHiddenStation }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -177,30 +177,31 @@ export default {
|
|||||||
return this.editModel.type == 'AutomaticRoute';
|
return this.editModel.type == 'AutomaticRoute';
|
||||||
},
|
},
|
||||||
isHiddenMapCycleButtonVO() {
|
isHiddenMapCycleButtonVO() {
|
||||||
return this.editModel.type == 'MapCycleButtonVO';
|
return this.editModel.type == 'AutoTurnBack';
|
||||||
},
|
},
|
||||||
isDisabledStation() {
|
isDisabledStation() {
|
||||||
return this.editModel.type == 'MapCycleButtonVO' || this.editModel.type == 'AutomaticRoute';
|
return this.editModel.type == 'AutoTurnBack' || this.editModel.type == 'AutomaticRoute';
|
||||||
},
|
},
|
||||||
isHiddenStation() {
|
isHiddenStation() {
|
||||||
return this.editModel.type == 'MapCycleButtonVO' || this.editModel.type == 'AutomaticRoute' || this.editModel.type == 'AxleReset';
|
return this.editModel.type == 'AutoTurnBack' || this.editModel.type == 'AutomaticRoute' || this.editModel.type == 'AxleReset';
|
||||||
},
|
},
|
||||||
|
|
||||||
isHiddenCreateAutomaticRoute() {
|
isHiddenCreateAutomaticRoute() {
|
||||||
return this.addModel.type == 'AutomaticRoute';
|
return this.addModel.type == 'AutomaticRoute';
|
||||||
},
|
},
|
||||||
isHiddenCreateMapCycleButtonVO() {
|
isHiddenCreateMapCycleButtonVO() {
|
||||||
return this.addModel.type == 'MapCycleButtonVO';
|
return this.addModel.type == 'AutoTurnBack';
|
||||||
},
|
},
|
||||||
isDisabledCreateStation() {
|
isDisabledCreateStation() {
|
||||||
return this.addModel.type == 'MapCycleButtonVO' || this.addModel.type == 'AutomaticRoute';
|
return this.addModel.type == 'AutoTurnBack' || this.addModel.type == 'AutomaticRoute';
|
||||||
},
|
},
|
||||||
isHiddenCreateStation() {
|
isHiddenCreateStation() {
|
||||||
return this.addModel.type == 'MapCycleButtonVO' || this.addModel.type == 'AutomaticRoute' || this.addModel.type == 'AxleReset';
|
return this.addModel.type == 'AutoTurnBack' || this.addModel.type == 'AutomaticRoute' || this.addModel.type == 'AxleReset';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
selected(val, oldVal) {
|
selected(val, oldVal) {
|
||||||
|
this.handleTypes(val._type);
|
||||||
this.deviceSelect(val);
|
this.deviceSelect(val);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -219,7 +220,7 @@ export default {
|
|||||||
},
|
},
|
||||||
handleTypes(type) {
|
handleTypes(type) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'MapCycleButtonVO':
|
case 'AutoTurnBack':
|
||||||
this.selectLists = this.cycleButtonList;
|
this.selectLists = this.cycleButtonList;
|
||||||
this.getAutoTurnBackList();
|
this.getAutoTurnBackList();
|
||||||
break;
|
break;
|
||||||
@ -245,6 +246,13 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
ChangeEditStation(code) { // 选择对应的所属设备集中站
|
||||||
|
this.autoList.forEach(elem => {
|
||||||
|
if (elem.code == code) {
|
||||||
|
this.editModel.stationCode = elem.stationCode;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
deviceChange(code) {
|
deviceChange(code) {
|
||||||
this.$emit('setCenter', code);
|
this.$emit('setCenter', code);
|
||||||
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
||||||
@ -255,7 +263,7 @@ export default {
|
|||||||
deviceSelect(selected) {
|
deviceSelect(selected) {
|
||||||
this.$refs.dataform.resetFields();
|
this.$refs.dataform.resetFields();
|
||||||
this.$refs.make.resetFields();
|
this.$refs.make.resetFields();
|
||||||
if (selected && selected._type.toUpperCase() == 'AutomaticRoute'.toUpperCase() || selected._type.toUpperCase() == 'MapCycleButtonVO'.toUpperCase() || selected._type.toUpperCase() == 'AxleReset'.toUpperCase() || selected._type.toUpperCase() == 'LimitControl'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() == 'AutomaticRoute'.toUpperCase() || selected._type.toUpperCase() == 'AutoTurnBack'.toUpperCase() || selected._type.toUpperCase() == 'AxleReset'.toUpperCase() || selected._type.toUpperCase() == 'LimitControl'.toUpperCase()) {
|
||||||
this.activeName = 'first';
|
this.activeName = 'first';
|
||||||
this.editModel = deepAssign(this.editModel, selected);
|
this.editModel = deepAssign(this.editModel, selected);
|
||||||
this.editModel.type = selected._type;
|
this.editModel.type = selected._type;
|
||||||
@ -322,7 +330,7 @@ export default {
|
|||||||
// 删除对象
|
// 删除对象
|
||||||
deleteObj() {
|
deleteObj() {
|
||||||
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
||||||
if (selected && selected._type.toUpperCase() === 'AutomaticRoute'.toUpperCase() || selected._type.toUpperCase() === 'MapCycleButtonVO'.toUpperCase() || selected._type.toUpperCase() === 'AxleReset'.toUpperCase() || selected._type.toUpperCase() == 'LimitControl'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'AutomaticRoute'.toUpperCase() || selected._type.toUpperCase() === 'AutoTurnBack'.toUpperCase() || selected._type.toUpperCase() === 'AxleReset'.toUpperCase() || selected._type.toUpperCase() == 'LimitControl'.toUpperCase()) {
|
||||||
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||||
confirmButtonText: this.$t('tip.confirm'),
|
confirmButtonText: this.$t('tip.confirm'),
|
||||||
cancelButtonText: this.$t('tip.cancel'),
|
cancelButtonText: this.$t('tip.cancel'),
|
||||||
|
@ -301,7 +301,7 @@ export default {
|
|||||||
this.enabledTab = 'Esp';
|
this.enabledTab = 'Esp';
|
||||||
} else if (this.feild) {
|
} else if (this.feild) {
|
||||||
this.enabledTab = 'Section';
|
this.enabledTab = 'Section';
|
||||||
} else if (type == 'AutomaticRoute' || type == 'MapCycleButtonVO' || type == 'AxleReset' || type == 'LimitControl') {
|
} else if (type == 'AutomaticRoute' || type == 'AutoTurnBack' || type == 'AxleReset' || type == 'LimitControl') {
|
||||||
this.enabledTab = 'ControlDraft';
|
this.enabledTab = 'ControlDraft';
|
||||||
} else {
|
} else {
|
||||||
this.enabledTab = type;
|
this.enabledTab = type;
|
||||||
|
Loading…
Reference in New Issue
Block a user