大铁线路调整
This commit is contained in:
parent
c8ba0b63b7
commit
7fbe309f70
@ -13,7 +13,8 @@ const mapDeviceStyle = {
|
||||
'12': 'ningbo_03', // 宁波三号线
|
||||
'13': 'race_01', // 2020国赛线路
|
||||
'14':'nanjing_02', // 南京二号线
|
||||
'15': 'datie_01' // 大铁线路一
|
||||
'15': 'datie_01', // 大铁线路一
|
||||
'16': 'datie_02' // 大铁线路二
|
||||
};
|
||||
|
||||
export function selectLineCode(code) {
|
||||
|
@ -394,17 +394,19 @@ class SkinCode extends defaultStyle {
|
||||
greenColor: '#00FF00', // 控制模式绿色
|
||||
redColor: '#FF0000', // 控制模式红色
|
||||
yellowColor: '#FFFF00', // 控制模式黄色
|
||||
purpleColor:'#840084' // 控制模式紫色
|
||||
purpleColor:'#840084', // 控制模式紫色
|
||||
strokeColor: '#fff',
|
||||
lineWidth: 1
|
||||
},
|
||||
emergencyControl: { // 紧急站控
|
||||
show: true,
|
||||
show: false,
|
||||
offset: { x: 0, y: 0 },
|
||||
text: '紧急站控',
|
||||
arrowShow: false,
|
||||
grayColor: '#7F7F7F'
|
||||
},
|
||||
centerControl: { // 中控
|
||||
show: true,
|
||||
show: false,
|
||||
offset: { x: 0, y: 0 },
|
||||
text: '中控',
|
||||
buttonShow: false,
|
||||
@ -412,19 +414,38 @@ class SkinCode extends defaultStyle {
|
||||
grayColor: '#7F7F7F'
|
||||
},
|
||||
substationControl: { // 站控按钮
|
||||
show: true,
|
||||
show: false,
|
||||
offset: { x: 0, y: 0 },
|
||||
text: '站控',
|
||||
arrowShow: false,
|
||||
grayColor: '#7F7F7F'
|
||||
},
|
||||
interconnectedControl: { // 联锁控
|
||||
show: true,
|
||||
show: false,
|
||||
offset: { x: 0, y: 0 },
|
||||
text: '联锁控',
|
||||
arrowShow: false,
|
||||
grayColor: '#7F7F7F'
|
||||
}
|
||||
},
|
||||
veryControl: {
|
||||
show: true,
|
||||
offset: { x: 0, y: 0 },
|
||||
text: '非常站控'
|
||||
},
|
||||
selfDiscipline: {
|
||||
show: true,
|
||||
offset: { x: 0, y: 0 },
|
||||
text: '允许自律'
|
||||
},
|
||||
selfDisciplineControl: {
|
||||
show: true,
|
||||
offset: { x: 0, y: 0 },
|
||||
text: '自律控制'
|
||||
},
|
||||
veryControlButton: {
|
||||
offset: { x: 0, y: 0 },
|
||||
text: '非常站控'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
1052
src/jmapNew/config/skinCode/datie_02.js
Normal file
1052
src/jmapNew/config/skinCode/datie_02.js
Normal file
File diff suppressed because it is too large
Load Diff
@ -285,4 +285,49 @@ deviceRender[deviceType.IndicatorLight] = {
|
||||
_type: deviceType.IndicatorLight,
|
||||
zlevel: 1
|
||||
};
|
||||
/** 接发车指示灯 */
|
||||
deviceRender[deviceType.PickOrDepartArrow] = {
|
||||
_type: deviceType.PickOrDepartArrow,
|
||||
zlevel: 1
|
||||
};
|
||||
/** 区间占用 区间监控 */
|
||||
deviceRender[deviceType.SectionOccupied] = {
|
||||
_type: deviceType.SectionOccupied,
|
||||
zlevel: 1
|
||||
};
|
||||
/** 辅助状态 */
|
||||
deviceRender[deviceType.AssistStatus] = {
|
||||
_type: deviceType.AssistStatus,
|
||||
zlevel: 1
|
||||
};
|
||||
/** 总辅助状态 */
|
||||
deviceRender[deviceType.TotalAssist] = {
|
||||
_type: deviceType.TotalAssist,
|
||||
zlevel: 1
|
||||
};
|
||||
/** 发车辅助 */
|
||||
deviceRender[deviceType.DepartAssist] = {
|
||||
_type: deviceType.DepartAssist,
|
||||
zlevel: 1
|
||||
};
|
||||
/** 接车辅助 */
|
||||
deviceRender[deviceType.PickAssist] = {
|
||||
_type: deviceType.PickAssist,
|
||||
zlevel: 1
|
||||
};
|
||||
/** 复原状态灯 */
|
||||
deviceRender[deviceType.Recovery] = {
|
||||
_type: deviceType.Recovery,
|
||||
zlevel: 1
|
||||
};
|
||||
/** 事故状态灯 */
|
||||
deviceRender[deviceType.Accident] = {
|
||||
_type: deviceType.Accident,
|
||||
zlevel: 1
|
||||
};
|
||||
/** 闭塞状态灯 */
|
||||
deviceRender[deviceType.Occlusion] = {
|
||||
_type: deviceType.Occlusion,
|
||||
zlevel: 1
|
||||
};
|
||||
export default deviceRender;
|
||||
|
@ -50,7 +50,15 @@ const deviceType = {
|
||||
FloodGate: 'FloodGate',
|
||||
DirectionRod: 'DirectionRod',
|
||||
Responder: 'Responder',
|
||||
SignalButton: 'SignalButton'
|
||||
SignalButton: 'SignalButton',
|
||||
PickOrDepartArrow: 'PickOrDepartArrow',
|
||||
Occlusion: 'Occlusion',
|
||||
Accident: 'Accident',
|
||||
Recovery: 'Recovery',
|
||||
PickAssist: 'PickAssist',
|
||||
DepartAssist: 'DepartAssist',
|
||||
TotalAssist: 'TotalAssist',
|
||||
AssistStatus: 'AssistStatus',
|
||||
SectionOccupied: 'SectionOccupied'
|
||||
};
|
||||
|
||||
export default deviceType;
|
||||
|
@ -350,6 +350,15 @@ export function updateMapData(state, model) {
|
||||
case deviceType.Axle: updateForList(model, state, 'indicatorLightList'); break;
|
||||
case deviceType.SwitchFault: updateForList(model, state, 'indicatorLightList'); break;
|
||||
case deviceType.IndicatorLight: updateForList(model, state, 'indicatorLightList'); break;
|
||||
case deviceType.PickOrDepartArrow: updateForList(model, state, 'indicatorLightList'); break;
|
||||
case deviceType.Occlusion: updateForList(model, state, 'indicatorLightList'); break;
|
||||
case deviceType.Accident: updateForList(model, state, 'indicatorLightList'); break;
|
||||
case deviceType.Recovery: updateForList(model, state, 'indicatorLightList'); break;
|
||||
case deviceType.PickAssist: updateForList(model, state, 'indicatorLightList'); break;
|
||||
case deviceType.DepartAssist: updateForList(model, state, 'indicatorLightList'); break;
|
||||
case deviceType.TotalAssist: updateForList(model, state, 'indicatorLightList'); break;
|
||||
case deviceType.AssistStatus: updateForList(model, state, 'indicatorLightList'); break;
|
||||
case deviceType.SectionOccupied: updateForList(model, state, 'indicatorLightList'); break;
|
||||
case deviceType.SplitStation: updateForList(model, state, 'splitStationList'); break;
|
||||
case deviceType.Arrow: updateForList(model, state, 'arrowList'); break;
|
||||
case deviceType.Power: updateForList(model, state, 'powerLineList'); break;
|
||||
|
56
src/jmapNew/shape/graph/SaidLamp/EPickOrDepartArrow.js
Normal file
56
src/jmapNew/shape/graph/SaidLamp/EPickOrDepartArrow.js
Normal file
@ -0,0 +1,56 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Text from 'zrender/src/graphic/Text';
|
||||
import Polygon from 'zrender/src/graphic/shape/Polygon';
|
||||
|
||||
export default class EPickOrDepartArrow extends Group {
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.zlevel = model.zlevel;
|
||||
this._subType = model._subType;
|
||||
this.z = model.z;
|
||||
this.create(model);
|
||||
}
|
||||
create(model) {
|
||||
const style = this.model.style;
|
||||
this.arrow = new Polygon({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
origin: [model.x + style.PickOrDepartArrow.length/2, model.y],
|
||||
rotation: model.right ? Math.PI : 0,
|
||||
shape: {
|
||||
points: [
|
||||
[model.x, model.y],
|
||||
[model.x + style.PickOrDepartArrow.triangleLength, model.y - style.PickOrDepartArrow.triangleLength / 2],
|
||||
[model.x + style.PickOrDepartArrow.triangleLength, model.y - style.PickOrDepartArrow.lineWidth / 2],
|
||||
[model.x + style.PickOrDepartArrow.length, model.y - style.PickOrDepartArrow.lineWidth / 2],
|
||||
[model.x + style.PickOrDepartArrow.length, model.y + style.PickOrDepartArrow.lineWidth / 2],
|
||||
[model.x + style.PickOrDepartArrow.triangleLength, model.y + style.PickOrDepartArrow.lineWidth / 2],
|
||||
[model.x + style.PickOrDepartArrow.triangleLength, model.y + style.PickOrDepartArrow.triangleLength / 2]
|
||||
]
|
||||
},
|
||||
style: {
|
||||
fill: style.PickOrDepartArrow.fill,
|
||||
stroke: style.PickOrDepartArrow.stroke,
|
||||
lineWidth: 1
|
||||
}
|
||||
});
|
||||
this.arrowText = new Text({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: {
|
||||
x: model.x + style.PickOrDepartArrow.length / 2,
|
||||
y: model.y + style.PickOrDepartArrow.distance,
|
||||
fontWeight: style.textStyle.fontWeight,
|
||||
fontSize: style.PickOrDepartArrow.fontSize,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.text,
|
||||
textFill: style.PickOrDepartArrow.defaultColor,
|
||||
textAlign: style.textStyle.textAlign,
|
||||
textVerticalAlign: style.textStyle.textVerticalAlign
|
||||
}
|
||||
});
|
||||
this.add(this.arrow);
|
||||
this.add(this.arrowText);
|
||||
}
|
||||
}
|
@ -10,6 +10,7 @@ import EModeStatus from './EModeStatus';
|
||||
import EUnmanned from './EUnmanned';
|
||||
import EAxle from './EAxle';
|
||||
import EIndicatorLight from './EIndicatorLight';
|
||||
import EPickOrDepartArrow from './EPickOrDepartArrow';
|
||||
import store from '@/store/index';
|
||||
|
||||
export default class SaidLamp extends Group {
|
||||
@ -31,7 +32,9 @@ export default class SaidLamp extends Group {
|
||||
|
||||
create() {
|
||||
const model = this.model;
|
||||
const lampDevice = ['LeuControl', 'IntersiteControl', 'CenterCommunication', 'AtsControl', 'LocalControl', 'ChainControl', 'Maintain', 'PowerSupply', 'MaintenanceLamps', 'ZcCommunication', 'SwitchFault'];
|
||||
const lampDevice = ['LeuControl', 'IntersiteControl', 'CenterCommunication', 'AtsControl', 'LocalControl', 'ChainControl', 'Maintain',
|
||||
'PowerSupply', 'MaintenanceLamps', 'ZcCommunication', 'SwitchFault', 'SectionOccupied', 'AssistStatus', 'TotalAssist', 'DepartAssist',
|
||||
'PickAssist', 'Recovery', 'Accident', 'Occlusion'];
|
||||
if (lampDevice.includes(this._type)) {
|
||||
this.control = new EControl({
|
||||
zlevel: this.zlevel,
|
||||
@ -176,10 +179,22 @@ export default class SaidLamp extends Group {
|
||||
_subType: 'IndicatorLight'
|
||||
});
|
||||
this.add(this.control);
|
||||
}
|
||||
} else if (this._type === 'PickOrDepartArrow') {
|
||||
this.control = new EPickOrDepartArrow({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
x: model.position.x,
|
||||
y: model.position.y,
|
||||
text: model.name,
|
||||
right: model.right,
|
||||
style: this.style,
|
||||
_subType: 'PickOrDepartArrow'
|
||||
});
|
||||
this.add(this.control);
|
||||
}
|
||||
}
|
||||
|
||||
// 设置状态
|
||||
// 设置状态 498
|
||||
setState(model) {
|
||||
this.recover();
|
||||
if (!store.getters['map/checkDeviceShow'](this._code)) {
|
||||
|
@ -100,15 +100,18 @@ export default class SignalButton extends Group {
|
||||
}
|
||||
getTypeColor() {
|
||||
let color = '';
|
||||
const list = ['ASSIST', 'ACCIDENT', 'PICK_ASSIST', 'DEPART_ASSIST', 'CHANGE_DIRECTION'];
|
||||
if (this.model.type === 'FLEXIBLE' || this.model.type === 'SHUNT_TERMINAL') {
|
||||
color = '#808080';
|
||||
} else if (this.model.type === 'GUIDE') {
|
||||
color = '#5050E1';
|
||||
} else {
|
||||
} else if (list.includes(this.model.type)) {
|
||||
color = '#ccc'
|
||||
} else {
|
||||
color = '#008000';
|
||||
}
|
||||
return color;
|
||||
}
|
||||
}//12
|
||||
recover() {
|
||||
this.stopAnimation();
|
||||
this.rectButton && this.rectButton.setStyle({ fill:this.getTypeColor() });
|
||||
|
@ -36,9 +36,9 @@ export default class ESingleControl extends Group {
|
||||
r: model.style.Station.StationControl.lamp.radiusR
|
||||
},
|
||||
style: {
|
||||
lineWidth: 0,
|
||||
lineWidth: model.style.Station.StationControl.lamp.lineWidth || 0,
|
||||
fill: model.style.Station.StationControl.lamp.grayColor,
|
||||
stroke: model.style.Station.StationControl.lamp.grayColor
|
||||
stroke: model.style.Station.StationControl.lamp.strokeColor
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -161,6 +161,8 @@ export default class Station extends Group {
|
||||
this.createCenterControl(); // 中控按钮
|
||||
this.createSubstationControl(); // 站控按钮
|
||||
this.createInterconnectedControl(); // 联锁控
|
||||
this.createVeryControl();
|
||||
this.createSelfDiscipline();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -304,7 +306,97 @@ export default class Station extends Group {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
createSelfDiscipline() {
|
||||
const model = this.model;
|
||||
if (this.style.Station.StationControl.selfDiscipline) {
|
||||
this.selfDiscipline = new ESingleControl({
|
||||
_subType: 'self_discipline',
|
||||
style: this.style,
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
point: {
|
||||
x: model.controlModePoint.x - this.style.Station.StationControl.lamp.distance * 2 + this.style.Station.StationControl.selfDiscipline.offset.x,
|
||||
y: model.controlModePoint.y + this.style.Station.StationControl.selfDiscipline.offset.y
|
||||
},
|
||||
context: this.style.Station.StationControl.selfDiscipline.text,
|
||||
pop: false
|
||||
});
|
||||
this.add(this.selfDiscipline);
|
||||
}
|
||||
if (this.style.Station.StationControl.selfDisciplineControl) {
|
||||
this.selfDisciplineControl = new ESingleControl({
|
||||
_subType: 'self_discipline_control',
|
||||
style: this.style,
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
point: {
|
||||
x: model.controlModePoint.x - this.style.Station.StationControl.lamp.distance + this.style.Station.StationControl.selfDisciplineControl.offset.x,
|
||||
y: model.controlModePoint.y + this.style.Station.StationControl.selfDisciplineControl.offset.y
|
||||
},
|
||||
context: this.style.Station.StationControl.selfDisciplineControl.text,
|
||||
pop: false
|
||||
});
|
||||
this.add(this.selfDisciplineControl);
|
||||
}
|
||||
}
|
||||
createVeryControl() {
|
||||
console.log('createVeryControl', this.style.Station.StationControl.veryControl);
|
||||
const model = this.model;
|
||||
if (this.style.Station.StationControl.veryControl) {
|
||||
this.veryControl = new ESingleControl({
|
||||
_subType: 'very',
|
||||
style: this.style,
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
point: {
|
||||
x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.veryControl.offset.x,
|
||||
y: model.controlModePoint.y + this.style.Station.StationControl.centerControl.offset.y
|
||||
},
|
||||
context: this.style.Station.StationControl.veryControl.text,
|
||||
pop: false
|
||||
});
|
||||
console.log(this.veryControl, 'veryContro');
|
||||
this.add(this.veryControl);
|
||||
}
|
||||
if (this.style.Station.StationControl.veryControlButton) {
|
||||
this.veryControlButton = new Rect({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
_subType: 'veryControlButton',
|
||||
shape: {
|
||||
x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 5 / 2 + this.style.Station.StationControl.veryControlButton.offset.x - this.style.Station.StationControl.lamp.radiusR,
|
||||
y: model.controlModePoint.y + this.style.Station.StationControl.veryControlButton.offset.y - this.style.Station.StationControl.lamp.radiusR,
|
||||
width: this.style.Station.StationControl.lamp.radiusR * 2,
|
||||
height: this.style.Station.StationControl.lamp.radiusR * 2
|
||||
},
|
||||
style: {
|
||||
lineWidth: 1,
|
||||
stroke: '#fff',
|
||||
fill: '#ccc'
|
||||
}
|
||||
});
|
||||
this.add(this.veryControlButton);
|
||||
this.veryControlButtonText = new Text({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
_subType: 'veryControlButtonText',
|
||||
position: [0, 0],
|
||||
style: {
|
||||
x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 5 / 2 + this.style.Station.StationControl.veryControlButton.offset.y,
|
||||
y: model.controlModePoint.y + this.style.Station.StationControl.veryControlButton.offset.y + this.style.Station.StationControl.lamp.radiusR + this.style.Station.StationControl.text.distance,
|
||||
fontWeight: this.style.Station.StationControl.text.fontWeight,
|
||||
fontSize: this.style.Station.StationControl.text.fontSize,
|
||||
fontFamily: this.style.fontFamily,
|
||||
text: this.style.Station.StationControl.veryControlButton.text,
|
||||
textFill: this.style.Station.StationControl.text.fontColor,
|
||||
textAlign: this.style.Station.StationControl.text.textAlign,
|
||||
textVerticalAlign: this.style.Station.StationControl.text.textVerticalAlign
|
||||
},
|
||||
pop: false,
|
||||
});
|
||||
this.add(this.veryControlButtonText);
|
||||
}
|
||||
}
|
||||
createCenterControl() { // 中控按钮
|
||||
const model = this.model;
|
||||
if (this.style.Station.StationControl.centerControl.show) {
|
||||
|
@ -77,6 +77,15 @@ mapShape[deviceType.ReturnModeGroup] = SaidLamp;
|
||||
mapShape[deviceType.Axle] = SaidLamp;
|
||||
mapShape[deviceType.SwitchFault] = SaidLamp;
|
||||
mapShape[deviceType.IndicatorLight] = SaidLamp;
|
||||
mapShape[deviceType.PickOrDepartArrow] = SaidLamp;
|
||||
mapShape[deviceType.Occlusion] = SaidLamp;
|
||||
mapShape[deviceType.Accident] = SaidLamp;
|
||||
mapShape[deviceType.Recovery] = SaidLamp;
|
||||
mapShape[deviceType.PickAssist] = SaidLamp;
|
||||
mapShape[deviceType.DepartAssist] = SaidLamp;
|
||||
mapShape[deviceType.TotalAssist] = SaidLamp;
|
||||
mapShape[deviceType.AssistStatus] = SaidLamp;
|
||||
mapShape[deviceType.SectionOccupied] = SaidLamp;
|
||||
mapShape[deviceType.SplitStation] = SplitStation;
|
||||
mapShape[deviceType.Arrow] = Arrow;
|
||||
mapShape[deviceType.Power] = Power;
|
||||
|
@ -0,0 +1,141 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm confirm-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<template v-for="(message, index) in messages">
|
||||
<span :key="index">{{ message }}</span>
|
||||
</template>
|
||||
</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>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'ConfirmControl',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: {},
|
||||
messages: '',
|
||||
operation: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||
return '信号关灯';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||
/** 信号关灯*/
|
||||
return OperationEvent.Signal.signalClose.confirm.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.operate = operate || {};
|
||||
this.messages = operate.messages;
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||
/** 信号关灯*/
|
||||
this.signalClose();
|
||||
}
|
||||
},
|
||||
// 信号关灯
|
||||
signalClose() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.signalClose.confirm.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||
};
|
||||
|
||||
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();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
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>
|
||||
.confirm-control .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,156 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm confirm-control-speed"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="540px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div style="height: 60px; padding-left: 20px">
|
||||
<span style="font-size: 18px">{{ message }}</span>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="6" :offset="6">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'ConfirmControlSpeed',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
type: '',
|
||||
operation: '',
|
||||
message: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||
return '区段设置限速';
|
||||
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
|
||||
return '区段取消限速';
|
||||
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
|
||||
return '道岔设置限速';
|
||||
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
|
||||
return '道岔取消限速';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||
/** 区段设置限速*/
|
||||
return OperationEvent.Section.setSpeed.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
|
||||
/** 区段取消限速*/
|
||||
return OperationEvent.Section.cancelSpeed.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
|
||||
/** 道岔设置限速*/
|
||||
return OperationEvent.Switch.setSpeed.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
|
||||
/** 道岔取消限速*/
|
||||
return OperationEvent.Switch.cancelSpeed.confirm.domId;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.type = operate.type;
|
||||
this.operation = operate.operation;
|
||||
this.message = operate.message;
|
||||
}
|
||||
|
||||
this.loading = false;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
type: this.type
|
||||
};
|
||||
|
||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||
/** 区段设置限速*/
|
||||
operate.operation = OperationEvent.Section.setSpeed.confirm.operation;
|
||||
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
|
||||
/** 区段取消限速*/
|
||||
operate.operation = OperationEvent.Section.cancelSpeed.confirm.operation;
|
||||
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
|
||||
/** 道岔设置限速*/
|
||||
operate.operation = OperationEvent.Switch.setSpeed.confirm.operation;
|
||||
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
|
||||
/** 道岔取消限速*/
|
||||
operate.operation = OperationEvent.Switch.cancelSpeed.confirm.operation;
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setOperate', { step: 1, success: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$emit('setOperate', { step: 0, success: false });
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setOperate', { step: 0, success: false });
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.confirm-control-speed .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,74 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__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
|
||||
>
|
||||
<div style="height: 60px; padding-left: 20px">
|
||||
<span style="font-size: 18px">{{ message }}</span>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="11">
|
||||
<el-button :id="confirmId" type="primary" @click="confirm">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ConfirmTip',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
message: '',
|
||||
confirmId: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
return '提示';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.message = operate.message;
|
||||
this.dialogShow = true;
|
||||
this.confirmId = operate.confirmId;
|
||||
},
|
||||
confirm() {
|
||||
this.$emit('close');
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
.confirm-control-speed .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
.chengdou-03__systerm .el-dialog .el-button{
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,173 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm confirm-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<template v-for="(message, index) in messages">
|
||||
<span :key="index">{{ message }}</span>
|
||||
</template>
|
||||
</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>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'ConfirmTrain',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: {},
|
||||
messages: '',
|
||||
operation: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
||||
return '添加列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
||||
return '修改列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
||||
return '删除列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
||||
return '移动列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
||||
return '交换列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
||||
return '修改车组号';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
||||
/** 添加列车识别号*/
|
||||
return OperationEvent.Train.addTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
||||
/** 修改列车识别号*/
|
||||
return OperationEvent.Train.editTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
||||
/** 删除列车识别号*/
|
||||
return OperationEvent.Train.delTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
||||
/** 移动列车识别号*/
|
||||
return OperationEvent.Train.moveTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
||||
/** 交换列车识别号*/
|
||||
return OperationEvent.Train.switchTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
||||
/** 修改车组号*/
|
||||
return OperationEvent.Train.editTrainNo.confirm.domId;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.operate = operate || {};
|
||||
this.messages = operate.messages;
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
||||
this.routeSetting();
|
||||
}
|
||||
},
|
||||
// 进路设置
|
||||
routeSetting() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Train.addTrainId.confirm.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.confirm-control .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,194 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
title="密码校验"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="22" :offset="1">
|
||||
<el-input v-model="encryptionPassword" placeholder="请使用软键盘输入" size="medium" :disabled="true" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="showMistake">
|
||||
<el-col :span="22" :offset="1">
|
||||
<span class="password-error">*密码输入错误请重新输入*</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button @click="inputNum">7</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="inputNum">8</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="inputNum">9</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button @click="inputNum">4</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="inputNum">5</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="inputNum">6</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button @click="inputNum">1</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="inputNum">2</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="inputNum">3</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button @click="inputNum">0</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="inputClear">C</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="backSpace"> < </el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="12">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'PasswordBox',
|
||||
data() {
|
||||
return {
|
||||
/* 写死的初始密码*/
|
||||
correctPassword: '123',
|
||||
dialogShow: false,
|
||||
operation: '',
|
||||
checkHasInput: false,
|
||||
/* 输入值*/
|
||||
passwordCheck: '',
|
||||
/* 输入值替换为对应长度的星号*/
|
||||
encryptionPassword: '',
|
||||
loading: false,
|
||||
showMistake: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.password.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
if (operate.operateNext) {
|
||||
this.operation = operate.operateNext;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.checkHasInput = false;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.showMistake = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() { // 确定
|
||||
if (this.passwordCheck === this.correctPassword) {
|
||||
this.$emit('checkOver', this.operate);
|
||||
this.doClose();
|
||||
this.inputClear();
|
||||
} else {
|
||||
this.showMistake = true;
|
||||
}
|
||||
},
|
||||
/* 软键盘输入*/
|
||||
inputNum(e) {
|
||||
this.showMistake = false;
|
||||
this.passwordCheck += e.path[0].innerText;
|
||||
this.encryptionPassword = this.passwordCheck.replace(/./g, '*');
|
||||
},
|
||||
/* 软键盘清除*/
|
||||
inputClear() {
|
||||
this.showMistake = false;
|
||||
this.passwordCheck = '';
|
||||
this.encryptionPassword = '';
|
||||
},
|
||||
/* 软键盘回退*/
|
||||
backSpace() {
|
||||
this.showMistake = false;
|
||||
const password = this.passwordCheck;
|
||||
if (password !== '') {
|
||||
this.passwordCheck = password.substring(0, password.length - 1);
|
||||
this.encryptionPassword = this.passwordCheck;
|
||||
}
|
||||
},
|
||||
|
||||
cancel() {
|
||||
const operate = {
|
||||
send: false,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.password.operation
|
||||
};
|
||||
this.$emit('checkCancel');
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.inputClear();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$refs.noticeInfo && this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.notice-info .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
|
||||
.password-error {
|
||||
|
||||
color: red;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,94 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm popup-alarm"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="500px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<el-row>
|
||||
<el-col :offset="2">
|
||||
<span v-for="(message, index) in messages" :key="index">{{ message }}</span><br>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="8">
|
||||
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'PopupAlarm',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
messages: [],
|
||||
operate: null,
|
||||
operation: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
return '弹出式告警';
|
||||
},
|
||||
domIdSure() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, messages) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
this.dialogShow = true;
|
||||
this.messages = messages || [];
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
// 确认计轴有效
|
||||
this.alxeEffective();
|
||||
}
|
||||
|
||||
},
|
||||
alxeEffective() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.alarm.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.popup-alarm .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
163
src/jmapNew/theme/datie_02/menus/dialog/drawSelect.vue
Normal file
163
src/jmapNew/theme/datie_02/menus/dialog/drawSelect.vue
Normal file
@ -0,0 +1,163 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="600px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div>
|
||||
<el-form v-if="selected" :inline="true" :model="form" class="demo-form-inline">
|
||||
<el-form-item label="设备类型:">
|
||||
<el-select v-model="form.deviceType" :disabled="true" style="width: 150px;">
|
||||
<el-option
|
||||
v-for="item in deviceTypeList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称:">
|
||||
<el-input v-model="form.deviceName" :disabled="true" style="width: 150px;" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column
|
||||
prop="fileName"
|
||||
label="文件"
|
||||
width="400"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="操作"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div class="text-button" @click="openPdf(scope.row)">打开</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import { getUploadFile } from '@/api/pdf';
|
||||
import { DrawingType } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'TrainMove',
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
selected: null,
|
||||
selectedType: '',
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
tableData: [],
|
||||
deviceTypeList: [
|
||||
{ label: '区段', value: 'Section' },
|
||||
{ label: '信号机', value: 'Signal' },
|
||||
{ label: '道岔', value: 'Switch' },
|
||||
{ label: '车站', value: 'Station' }
|
||||
],
|
||||
deviceIdList: [],
|
||||
form: {
|
||||
mapId: '',
|
||||
deviceId: '',
|
||||
deviceCode: '',
|
||||
deviceName: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.selectedType === 'normStudy') {
|
||||
return '规范学习';
|
||||
} else if (this.selectedType === 'clCaAn') {
|
||||
return '经典案例分析';
|
||||
} else if (this.selectedType === 'baDeTr') {
|
||||
return '基础设备培训';
|
||||
} else {
|
||||
return '图纸检索';
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(selected, selectedType) {
|
||||
this.selectedType = selectedType;
|
||||
const params = { mapId: this.$route.query.mapId, fileType: DrawingType[selectedType] };
|
||||
this.selected = selected;
|
||||
if (this.selected) {
|
||||
this.form.deviceName = selected.name;
|
||||
this.form.deviceType = selected._type;
|
||||
params.deviceType = selected._type.toUpperCase();
|
||||
params.deviceId = selected.code;
|
||||
}
|
||||
this.loading = true;
|
||||
getUploadFile(params).then(resp => {
|
||||
this.tableData = resp.data;
|
||||
this.loading = false;
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$message.error('图纸检索失败!');
|
||||
});
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
openPdf(row) {
|
||||
const url = `https://joylink.club/oss/joylink/${row.filePath}`;
|
||||
window.open(url, '_blank');
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
.text-button{
|
||||
color: #148ad0;
|
||||
cursor:pointer;
|
||||
}
|
||||
.text-button:active{
|
||||
color: #b938e1;
|
||||
text-decoration: underline;
|
||||
}
|
||||
.text-button:hover{
|
||||
color: #b938e1;
|
||||
text-decoration: underline;
|
||||
}
|
||||
</style>
|
196
src/jmapNew/theme/datie_02/menus/dialog/routeDetail.vue
Normal file
196
src/jmapNew/theme/datie_02/menus/dialog/routeDetail.vue
Normal file
@ -0,0 +1,196 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm route-detail"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="460px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="2"><span>车站</span></el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="1"><span>始端信号机</span></el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="signalName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div style="margin-top: 20px">
|
||||
<el-table
|
||||
ref="tempTable"
|
||||
:data="tempData"
|
||||
border
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
:height="140"
|
||||
>
|
||||
|
||||
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px;" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ handleRouteName(scope.row.name) }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="startSignalCode" label="方向" style="margin-left: 30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ handleDirection(scope.row.startSignalCode) }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="turnBack" label="属性" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ scope.row.turnBack ? '折返': '直通' }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="controlType" label="控制" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</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>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'RouteDetail',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
tempData: [],
|
||||
stationName: '',
|
||||
signalName: '',
|
||||
domIdChoose: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'signalList',
|
||||
'mapConfig'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.detail.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '查询进路状态';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected, tempData) {
|
||||
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.tempData = tempData || [];
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
handleRouteName(name) {
|
||||
return name.replace(/-/, '-->');
|
||||
},
|
||||
handleDirection(signalCode) {
|
||||
let signalDirection = '';
|
||||
this.signalList.some(item => {
|
||||
if (item.code === signalCode) {
|
||||
signalDirection = item.right;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
if ((signalDirection && this.mapConfig.upRight) || (!signalDirection && !this.mapConfig.upRight)) {
|
||||
return '上行';
|
||||
} else {
|
||||
return '下行';
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Signal.detail.menu.operation
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
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>
|
278
src/jmapNew/theme/datie_02/menus/dialog/routeGuide.vue
Normal file
278
src/jmapNew/theme/datie_02/menus/dialog/routeGuide.vue
Normal file
@ -0,0 +1,278 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm route-setting"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="460px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="2"><span class="item-lable">车站</span></el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="1"><span class="item-lable">始端信号机</span></el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="signalName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="route-table-box">
|
||||
<span class="route-table-tip">进路列表</span>
|
||||
<el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 99%;" size="mini" height="90" highlight-current-row @row-click="clickEvent">
|
||||
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px;" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ handleRouteName(scope.row.name) }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="startSignalCode" label="方向" style="margin-left: 30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ handleDirection(scope.row.startSignalCode) }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="turnBack" label="属性" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ scope.row.turnBack ? '折返': '直通' }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="controlType" label="控制" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<el-row justify="center" style="margin-top: 40px">
|
||||
<el-col :span="12" :offset="12">
|
||||
<el-button
|
||||
:id="domIdConfirm"
|
||||
type="primary"
|
||||
:loading="loading"
|
||||
:disabled="commitDisabled"
|
||||
@click="commit"
|
||||
>执行</el-button>
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
<!--<password-box ref="passwordBox" @checkOver="passWordCommit" />-->
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
// import PasswordBox from './childDialog/passwordInputBox.vue';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
export default {
|
||||
name: 'RouteSelection',
|
||||
components: {
|
||||
NoticeInfo
|
||||
// PasswordBox
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
tempData: [],
|
||||
beforeSectionList: [],
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
operation: '',
|
||||
display: true,
|
||||
stationName: '',
|
||||
signalName: '',
|
||||
tableStyle: {
|
||||
'border-bottom': 'none'
|
||||
},
|
||||
commitDisabled:true,
|
||||
controlTypeNameMap: {
|
||||
'01': '折返',
|
||||
'02': '直通'
|
||||
},
|
||||
row: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.Signal.guide.choose.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.guide.confirm.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '办理引导进路';
|
||||
},
|
||||
...mapGetters('map', [
|
||||
'signalList',
|
||||
'mapConfig'
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
getProtectedSectionName(row) {
|
||||
let name = '';
|
||||
if (row &&
|
||||
row.overlapSectionList &&
|
||||
row.overlapSectionList &&
|
||||
row.overlapSectionList.length > 0) {
|
||||
|
||||
const protect = row.overlapSectionList[0];
|
||||
name = `${protect.name}`;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
|
||||
if (station) {
|
||||
name = `${name}(${station.name})`;
|
||||
}
|
||||
}
|
||||
return name;
|
||||
},
|
||||
handleRouteName(name) {
|
||||
return name.replace(/-/, '-->');
|
||||
},
|
||||
handleDirection(signalCode) {
|
||||
let signalDirection = '';
|
||||
this.signalList.some(item => {
|
||||
if (item.code === signalCode) {
|
||||
signalDirection = item.right;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
if ((signalDirection && this.mapConfig.upRight) || (!signalDirection && !this.mapConfig.upRight)) {
|
||||
return '上行';
|
||||
} else {
|
||||
return '下行';
|
||||
}
|
||||
},
|
||||
doShow(operate, selected, tempData) {
|
||||
this.selected = selected;
|
||||
this.commitDisabled = true;
|
||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||
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.tempData = tempData || [];
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$refs.table.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
clickEvent(row, event, column) {
|
||||
this.commitDisabled = false;
|
||||
this.row = row;
|
||||
if (row) {
|
||||
const operate = {
|
||||
operation: OperationEvent.Signal.guide.choose.operation,
|
||||
val: row.code
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
// 办理引导进路
|
||||
commit() {
|
||||
if (this.row && this.row.code) {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.guide.confirm.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
|
||||
param: {
|
||||
routeCode: this.row.code
|
||||
}
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
} else {
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
},
|
||||
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 scoped>
|
||||
.route-table-tip {
|
||||
position: relative !important;
|
||||
color: #3C72DF !important;
|
||||
background: #ECE9D8 !important;
|
||||
font-size: 12px;
|
||||
top: -7px;
|
||||
left: 7px;
|
||||
}
|
||||
|
||||
.route-table-box {
|
||||
margin-top: 20px !important;
|
||||
line-height: 10px !important;
|
||||
border: 2px solid #FFFFFF !important;
|
||||
border-radius: 5px !important;
|
||||
z-index: 1;
|
||||
padding-bottom: 40px;
|
||||
}
|
||||
|
||||
.item-lable {
|
||||
line-height: 26px !important;
|
||||
font-size: 13px;
|
||||
}
|
||||
</style>
|
267
src/jmapNew/theme/datie_02/menus/dialog/routeHandControl.vue
Normal file
267
src/jmapNew/theme/datie_02/menus/dialog/routeHandControl.vue
Normal file
@ -0,0 +1,267 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog v-dialogDrag class="chengdou-03__systerm route-hand-control" :title="title" :visible.sync="show" width="500px" :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 class="table">
|
||||
<el-table ref="tempTable" :data="tempData" border style="width: 100%" size="mini" :highlight-current-row="highlight" :height="140" @row-click="clickEvent">
|
||||
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px;" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ handleRouteName(scope.row.name) }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="startSignalCode" label="方向" style="margin-left: 30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ handleDirection(scope.row.startSignalCode) }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="turnBack" label="属性" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ scope.row.turnBack ? '折返': '直通' }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="controlType" label="控制" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :disabled="commitDisabled" :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" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'RouteHandControl',
|
||||
components: {
|
||||
ConfirmControl,
|
||||
NoticeInfo
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
tempData: [],
|
||||
operation: null,
|
||||
selection: [],
|
||||
stationName: '',
|
||||
signalName: '',
|
||||
highlight: true,
|
||||
row: '',
|
||||
commitDisabled: true
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'signalList',
|
||||
'mapConfig'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdChoose() {
|
||||
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
||||
return OperationEvent.Signal.humanControl.choose.domId;
|
||||
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
return OperationEvent.Signal.atsAutoControl.choose.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
||||
return '进路收人工控';
|
||||
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
return '进路交自动控';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected, tempData) {
|
||||
this.selected = selected;
|
||||
this.selection = [];
|
||||
this.commitDisabled = true;
|
||||
// 如果不是断点激活,而是第一次显示则初始化
|
||||
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;
|
||||
}
|
||||
}
|
||||
if (tempData && tempData.length > 0) {
|
||||
tempData.forEach(elem => {
|
||||
elem.check = false;
|
||||
elem.disabled = false;
|
||||
// 设置禁用状态
|
||||
if (operate.operation === OperationEvent.Signal.humanControl.menu.operation &&
|
||||
(elem.atsControl == '0') ) {
|
||||
elem.disabled = true;
|
||||
} if (operate.operation === OperationEvent.Signal.atsAutoControl.menu.operation &&
|
||||
(elem.atsControl == '1') ) {
|
||||
elem.disabled = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.tempData = tempData || [];
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
handleRouteName(name) {
|
||||
return name.replace(/-/, '-->');
|
||||
},
|
||||
handleDirection(signalCode) {
|
||||
let signalDirection = '';
|
||||
this.signalList.some(item => {
|
||||
if (item.code === signalCode) {
|
||||
signalDirection = item.right;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
if ((signalDirection && this.mapConfig.upRight) || (!signalDirection && !this.mapConfig.upRight)) {
|
||||
return '上行';
|
||||
} else {
|
||||
return '下行';
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$refs.tempTable.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
|
||||
clickEvent(row, event, column) {
|
||||
this.highlight = false;
|
||||
if (row && row.code) {
|
||||
this.highlight = true;
|
||||
this.selection = [row];
|
||||
this.beforeSectionList = row.containSectionList || [];
|
||||
this.row = row;
|
||||
// 设置选中指令
|
||||
const operate = {
|
||||
operation: '',
|
||||
val: row.code
|
||||
};
|
||||
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
||||
/** 进路交人工控*/
|
||||
operate.operation = OperationEvent.Signal.humanControl.choose.operation;
|
||||
this.commitDisabled = !row.atsControl;
|
||||
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
/** 进路交自动控*/
|
||||
this.commitDisabled = Boolean(row.atsControl);
|
||||
operate.operation = OperationEvent.Signal.atsAutoControl.choose.operation;
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
commit() {
|
||||
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
||||
/** 进路交人工控*/
|
||||
this.humanControl();
|
||||
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
/** 进路交自动控*/
|
||||
this.atsAutoControl();
|
||||
}
|
||||
},
|
||||
// 进路交人工控
|
||||
humanControl() {
|
||||
commitOperate(menuOperate.Signal.humanControl, {routeCodeList: [this.row.code]}, 2).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 进路交自动控
|
||||
atsAutoControl() {
|
||||
commitOperate(menuOperate.Signal.atsAutoControl, {routeCodeList: [this.row.code]}, 2).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
325
src/jmapNew/theme/datie_02/menus/dialog/routeSelection.vue
Normal file
325
src/jmapNew/theme/datie_02/menus/dialog/routeSelection.vue
Normal file
@ -0,0 +1,325 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm route-setting"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="500px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="2"><span class="item-lable">车站</span></el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="1"><span class="item-lable">始端信号机</span></el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="signalName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="route-table-box">
|
||||
<span class="route-table-tip">进路列表</span>
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="tempData"
|
||||
border
|
||||
:cell-style="tableStyle"
|
||||
style="width: 99%;"
|
||||
size="mini"
|
||||
height="150"
|
||||
highlight-current-row
|
||||
@row-click="clickEvent"
|
||||
>
|
||||
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px;" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ handleRouteName(scope.row.name) }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="startSignalCode" label="方向" style="margin-left: 30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ handleDirection(scope.row.startSignalCode) }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="turnBack" label="属性" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ scope.row.turnBack ? '折返': '直通' }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="controlType" label="控制" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<el-row justify="center" style="margin-top: 70px">
|
||||
<el-col :span="12" :offset="12">
|
||||
<el-button
|
||||
:id="domIdConfirm"
|
||||
type="primary"
|
||||
:loading="loading"
|
||||
:disabled="commitDisabled"
|
||||
@click="commit"
|
||||
>执行</el-button>
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
<password-box ref="passwordBox" @checkOver="passWordCommit" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
import PasswordBox from './childDialog/passwordInputBox.vue';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'RouteSelection',
|
||||
components: {
|
||||
NoticeInfo,
|
||||
PasswordBox
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
tempData: [],
|
||||
beforeSectionList: [],
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
row: null,
|
||||
operation: '',
|
||||
display: true,
|
||||
stationName: '',
|
||||
signalName: '',
|
||||
commitDisabled:true,
|
||||
tableStyle: {
|
||||
'border-bottom': 'none'
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.confirm.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '办理进路';
|
||||
},
|
||||
...mapGetters('map', [
|
||||
'signalList',
|
||||
'sectionList',
|
||||
'mapConfig'
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
getProtectedSectionName(row) {
|
||||
let name = '';
|
||||
if (row &&
|
||||
row.overlapSectionList &&
|
||||
row.overlapSectionList &&
|
||||
row.overlapSectionList.length > 0) {
|
||||
|
||||
const protect = row.overlapSectionList[0];
|
||||
name = `${protect.name}`;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
|
||||
if (station) {
|
||||
name = `${name}(${station.name})`;
|
||||
}
|
||||
}
|
||||
return name;
|
||||
},
|
||||
handleRouteName(name) {
|
||||
return name.replace(/-/, '-->');
|
||||
},
|
||||
handleDirection(signalCode) {
|
||||
let signalDirection = '';
|
||||
this.signalList.some(item => {
|
||||
if (item.code === signalCode) {
|
||||
signalDirection = item.right;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
if ((signalDirection && this.mapConfig.upRight) || (!signalDirection && !this.mapConfig.upRight)) {
|
||||
return '上行';
|
||||
} else {
|
||||
return '下行';
|
||||
}
|
||||
},
|
||||
doShow(operate, selected, tempData) {
|
||||
this.selected = selected;
|
||||
this.commitDisabled = true;
|
||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||
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.tempData = tempData || [];
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.restoreBeforeDevices();
|
||||
this.$refs.table.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
restoreBeforeDevices() {
|
||||
// 恢复之前选中设备
|
||||
if (this.beforeSectionList && this.beforeSectionList.length) {
|
||||
this.beforeSectionList.forEach(elem => {
|
||||
elem.cutOff = false;
|
||||
});
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/updateMapState', [...this.beforeSectionList]);
|
||||
this.beforeSectionList = [];
|
||||
},
|
||||
clickEvent(row, event, column) {
|
||||
this.row = row;
|
||||
if (row) {
|
||||
// 恢复进路区段的切除状态
|
||||
this.restoreBeforeDevices();
|
||||
row.canSetting = true;
|
||||
this.commitDisabled = false;
|
||||
// 设置选中区段为切除状态
|
||||
const containSectionList = [];
|
||||
if (row.routeSectionList && row.routeSectionList.length) {
|
||||
// 设置新选的进路区段为切除状态
|
||||
row.routeSectionList.forEach(elem => {
|
||||
const section = deepAssign({}, this.$store.getters['map/getDeviceByCode'](elem));
|
||||
if (section.logicSectionCodeList && section.logicSectionCodeList.length) {
|
||||
section.logicSectionCodeList.forEach(item => {
|
||||
const sec = deepAssign({}, this.$store.getters['map/getDeviceByCode'](item));
|
||||
sec.cutOff = true;
|
||||
containSectionList.push(sec);
|
||||
});
|
||||
} else {
|
||||
section.cutOff = true;
|
||||
containSectionList.push(section);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/updateMapState', [...containSectionList]);
|
||||
this.beforeSectionList = containSectionList || [];
|
||||
|
||||
// 设置选中指令
|
||||
const operate = {
|
||||
operation: OperationEvent.Signal.arrangementRoute.choose.operation,
|
||||
val: row.code
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
commit() {
|
||||
if (this.row && this.row.canSetting) {
|
||||
this.loading = true;
|
||||
commitOperate({operation:OperationEvent.Signal.arrangementRoute.confirm.operation}, {routeCode: this.row.code}, 1).then(({valid, operate})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.$refs.passwordBox.doShow({operation:OperationEvent.Signal.arrangementRoute.menu.operation});
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
},
|
||||
passWordCommit(data) {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {}, 2).then(({valid, operate})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
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 scoped>
|
||||
.route-table-tip {
|
||||
position: relative !important;
|
||||
color: #3C72DF !important;
|
||||
background: #ECE9D8 !important;
|
||||
font-size: 12px;
|
||||
top: -7px;
|
||||
left: 7px;
|
||||
}
|
||||
|
||||
.route-table-box {
|
||||
margin-top: 15px !important;
|
||||
line-height: 10px !important;
|
||||
border: 2px solid #FFFFFF !important;
|
||||
border-radius: 5px !important;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.item-lable {
|
||||
line-height: 26px !important;
|
||||
font-size: 13px;
|
||||
}
|
||||
</style>
|
114
src/jmapNew/theme/datie_02/menus/dialog/sectionDetail.vue
Normal file
114
src/jmapNew/theme/datie_02/menus/dialog/sectionDetail.vue
Normal file
@ -0,0 +1,114 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm section-detail"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" label-position="left" :model="formModel" label-width="100px">
|
||||
<el-form-item label="区段名称">
|
||||
<el-input v-model="formModel.sectionName" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="车站名称">
|
||||
<el-input v-model="formModel.stationName" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="公里标(Km)">
|
||||
<el-input v-model="formModel.kmPost" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="长度(m)">
|
||||
<el-input v-model="formModel.lengthFact" disabled />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row justify="center" style="margin-top: 50px">
|
||||
<el-col :span="7" :offset="17">
|
||||
<el-button :id="domIdConfirm" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'RouteDetail',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
formModel: {
|
||||
sectionName: '',
|
||||
stationName: '',
|
||||
kmPost: '',
|
||||
lengthFact: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Section.detail.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '无岔区段属性对话框';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是因为断点激活则需要,初始化菜单初始值
|
||||
if (!this.dialogShow) {
|
||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||
const hasParentCode = (this.selected.type == '02');
|
||||
this.formModel.sectionName = hasParentCode ? selected.parentName + '-' + selected.name : selected.name;
|
||||
this.formModel.lengthFact = selected.lengthFact;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.formModel.stationName = station.name;
|
||||
this.formModel.kmPost = station.kmPost;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Section.detail.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
603
src/jmapNew/theme/datie_02/menus/dialog/standControl.vue
Normal file
603
src/jmapNew/theme/datie_02/menus/dialog/standControl.vue
Normal file
@ -0,0 +1,603 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-detain-train"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="400px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header">
|
||||
<el-col :span="11">
|
||||
<span>车站</span>
|
||||
<el-input v-model="stationName" style="width: 110px; margin-left: 10px;" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<span>站台</span>
|
||||
<el-input v-model="standName" style="width: 110px; margin-left: 10px;" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div v-if="DetainTrain">
|
||||
<div
|
||||
style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray;"
|
||||
>
|
||||
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">范围</span>
|
||||
<el-row style="margin-top: -13px;">
|
||||
<el-radio-group v-model="radio" @change="choose">
|
||||
<el-col :span="24">
|
||||
<el-radio
|
||||
:id="domIdDetainCar"
|
||||
label="01"
|
||||
style="display: block; text-align: left; float: left; margin-right: 10px;"
|
||||
>本站台
|
||||
</el-radio>
|
||||
<el-radio
|
||||
:id="isUpDirection? domIdDetainChoose: ''"
|
||||
v-if="radio1 == 2"
|
||||
:disabled="!isUpDirection"
|
||||
:label="`${isUpDirection}`"
|
||||
style="display: block; text-align: left; float: left; margin-right: 10px;"
|
||||
>上行全线
|
||||
</el-radio>
|
||||
<el-radio
|
||||
:id="isUpDirection ? '': domIdDetainChoose"
|
||||
v-if="radio1 == 2"
|
||||
:label="`${!isUpDirection}`"
|
||||
:disabled="isUpDirection"
|
||||
style="display: block; text-align: left; float: left;"
|
||||
>下行全线</el-radio>
|
||||
</el-col>
|
||||
</el-radio-group>
|
||||
</el-row>
|
||||
</div>
|
||||
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">功能</span>
|
||||
<el-row style="margin-top: -13px;">
|
||||
<el-col :span="11">
|
||||
<el-radio
|
||||
v-model="radio1"
|
||||
label="1"
|
||||
:disabled="radio1 == '2'"
|
||||
style="display: block; text-align: left;"
|
||||
>
|
||||
扣车</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-radio
|
||||
v-model="radio1"
|
||||
label="2"
|
||||
:disabled="radio1 == '1'"
|
||||
style="display: block; text-align: left;"
|
||||
>
|
||||
取消扣车</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="JumpStop">
|
||||
<div
|
||||
style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray; height: 115px;"
|
||||
>
|
||||
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">范围</span>
|
||||
<el-row style="margin-top: -13px;">
|
||||
<el-col :span="24">
|
||||
<el-radio-group v-model="radio" @change="chooseJumpStop">
|
||||
<el-radio
|
||||
:id="radio == '02' ? domIdChoose : ''"
|
||||
label="01"
|
||||
style="display: block; text-align: left; margin-right: 10px; margin-bottom: 20px; width: 80px;"
|
||||
>
|
||||
站台跳停
|
||||
</el-radio>
|
||||
<el-radio
|
||||
:id="radio == '01' ? domIdChoose : ''"
|
||||
label="02"
|
||||
style="display: block; text-align: left; margin-left: 0; float: left;"
|
||||
>
|
||||
指定列车跳停</el-radio>
|
||||
<div style="float: left;">
|
||||
<span>车组号</span>
|
||||
<el-select
|
||||
:id="domIdCancelJumpStop"
|
||||
v-model="tripNumber"
|
||||
style="width: 120px; margin-left: 20px;"
|
||||
size="mini"
|
||||
:disabled="radio == '01'"
|
||||
@change="trainNoSelectChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="option in trainList"
|
||||
:key="option.groupNumber"
|
||||
:label="option.groupNumber"
|
||||
:value="option.groupNumber"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-radio-group>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">功能</span>
|
||||
<el-row style="margin-top: -13px;">
|
||||
<el-col :span="11">
|
||||
<el-radio
|
||||
v-model="radio1"
|
||||
label="1"
|
||||
:disabled="radio1 == 2"
|
||||
style="display: block; text-align: left;"
|
||||
>
|
||||
跳停</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-radio
|
||||
v-model="radio1"
|
||||
label="2"
|
||||
:disabled="radio1 == 1"
|
||||
style="display: block; text-align: left;"
|
||||
>
|
||||
取消跳停</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="RunLevel">
|
||||
<div
|
||||
style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray; height: 105px;"
|
||||
>
|
||||
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">范围</span>
|
||||
<el-row style="margin-top: -13px;">
|
||||
<el-radio-group v-model="radio" @change="chooseStopTime">
|
||||
<el-col :span="24">
|
||||
<el-radio
|
||||
:id="radio == '02' ? domIdChoose1 : ''"
|
||||
label="01"
|
||||
style="display: block; text-align: left; margin-right: 10px; margin-bottom:10px; width: 60px;"
|
||||
>
|
||||
自动
|
||||
</el-radio>
|
||||
<el-radio
|
||||
:id="radio == '01' ? domIdChoose1 : ''"
|
||||
label="02"
|
||||
style="display: block; text-align: left; margin-left: 0; float: left;"
|
||||
>
|
||||
人工</el-radio>
|
||||
<div v-if="radio2 == 2" style="float: left; margin-left: 20px;">
|
||||
<span>运行等级</span>
|
||||
<el-select
|
||||
:id="domIdRunLevel"
|
||||
v-model="trainRunlevel"
|
||||
style="width: 120px; margin-left: 20px;"
|
||||
size="mini"
|
||||
:disabled="radio == '01'"
|
||||
@change="trainNoSelectLevel"
|
||||
>
|
||||
<el-option
|
||||
v-for="option in runLevelList"
|
||||
:key="option.value"
|
||||
:label="option.label"
|
||||
:value="option.value"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<div v-if="radio2 == 1" style="float: left; margin-left: 20px;">
|
||||
<span>停站时间</span>
|
||||
<el-input-number
|
||||
:id="domIdStopTime"
|
||||
v-model="trainStopTime"
|
||||
:min="15"
|
||||
:max="300"
|
||||
:step="1"
|
||||
size="mini"
|
||||
:controls="false"
|
||||
style="width:100px;display:inline-block;margin-left:10px;height:34px;"
|
||||
:disabled="radio == '01'"
|
||||
@blur="handleTrainStopTime"
|
||||
/>
|
||||
<div style="margin-left: 5px;display: inline-block;font-size: 14px;">秒</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-radio-group>
|
||||
</el-row>
|
||||
</div>
|
||||
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">功能</span>
|
||||
<el-row style="margin-top: -13px;">
|
||||
<el-radio-group v-model="effective" :disabled="disabledTime" @change="chooseEffective">
|
||||
<el-radio :id="effective === false? '': domIdChoose2" :label="false">一次有效</el-radio>
|
||||
<el-radio :id="effective === true? '': domIdChoose2" :label="true">一直有效</el-radio>
|
||||
</el-radio-group>
|
||||
<!-- <el-radio-group v-model="effective" :disabled="disabledTime" @change="chooseEffective">
|
||||
<el-col :span="11">
|
||||
<el-radio
|
||||
:id="effective == '02' ? '': domIdChoose2"
|
||||
label="01"
|
||||
style="display: block; text-align: left;"
|
||||
>
|
||||
一次有效</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-radio
|
||||
:id="effective == '01' ? '': domIdChoose2"
|
||||
label="02"
|
||||
style="display: block; text-align: left;"
|
||||
>
|
||||
一直有效</el-radio>
|
||||
</el-col>
|
||||
</el-radio-group> -->
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<el-row 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>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'StandDetainTrain',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
standName: '',
|
||||
stationName: '',
|
||||
selected: null,
|
||||
operation: null,
|
||||
isUpDirection:true,
|
||||
radio: '01',
|
||||
radio1: '1',
|
||||
radio2: '1',
|
||||
DetainTrain: false,
|
||||
JumpStop: false,
|
||||
RunLevel: false,
|
||||
trainList: [],
|
||||
runLevelList: [
|
||||
{ value: 2, label: '常速' },
|
||||
{ value: 1, label: '低速' },
|
||||
{ value: 3, label: '高速' }
|
||||
],
|
||||
tripNumber: '',
|
||||
effective: '01',
|
||||
trainRunlevel: 2,
|
||||
trainStopTime: 30,
|
||||
disabledTime: true
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'map',
|
||||
'mapConfig'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
domIdDetainCar() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.cancelDetainTrain.choose.domId : '';
|
||||
},
|
||||
domIdDetainChoose() {
|
||||
return this.dialogShow ? OperationEvent.Command.common.choose.domId : '';
|
||||
},
|
||||
domIdChoose() {
|
||||
if (this.radio1 == '1') { // 跳停
|
||||
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.select.domId : '';
|
||||
} else { // 取消跳停
|
||||
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.select.domId : '';
|
||||
}
|
||||
},
|
||||
// domIdJumpStop() {
|
||||
// return this.dialogShow ? OperationEvent.StationStand.setJumpStop.choose.domId : '';
|
||||
// },
|
||||
domIdCancelJumpStop() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.choose.domId : '';
|
||||
},
|
||||
domIdChoose1() {
|
||||
if (this.radio2 == '1') { // 设置停站时间
|
||||
return this.dialogShow ? OperationEvent.StationStand.setStopTime.choose1.domId : '';
|
||||
} else { // 设置站间运行等级
|
||||
return this.dialogShow ? OperationEvent.StationStand.setRunLevel.choose1.domId : '';
|
||||
}
|
||||
},
|
||||
domIdChoose2() {
|
||||
if (this.radio2 == '1') { // 设置停站时间
|
||||
return this.dialogShow ? OperationEvent.StationStand.setStopTime.choose2.domId : '';
|
||||
} else { // 设置站间运行等级
|
||||
return this.dialogShow ? OperationEvent.StationStand.setRunLevel.choose2.domId : '';
|
||||
}
|
||||
},
|
||||
domIdStopTime() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.setStopTime.input.domId : '';
|
||||
},
|
||||
domIdRunLevel() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.setRunLevel.chooseTrain.domId : '';
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
||||
return '扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation || this.operation == OperationEvent.StationStand.cancelDetainTrainAll.menu.operation) {
|
||||
return '取消扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
|
||||
return '设置跳停';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
|
||||
return '取消跳停';
|
||||
} else if (this.operation == OperationEvent.StationStand.setStopTime.menu.operation) {
|
||||
return '设置停站时间';
|
||||
} else if (this.operation == OperationEvent.StationStand.setRunLevel.menu.operation) {
|
||||
return '设置站间运行等级';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
operation(data) {
|
||||
if (data != OperationEvent.StationStand.cancelDetainTrainAll.menu.operation) {
|
||||
this.JumpStop = false;
|
||||
this.RunLevel = false;
|
||||
this.DetainTrain = false;
|
||||
this.radio = '01';
|
||||
this.radio1 = '1';
|
||||
this.radio2 = '1';
|
||||
if (data == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
||||
this.radio1 = '1';
|
||||
this.radio = '01';
|
||||
this.DetainTrain = true;
|
||||
} else if (data == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
|
||||
this.radio1 = '2';
|
||||
this.radio = '01';
|
||||
this.DetainTrain = true;
|
||||
} else if (data == OperationEvent.StationStand.setJumpStop.menu.operation) {
|
||||
this.JumpStop = true;
|
||||
this.radio1 = '1';
|
||||
} else if (data == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
|
||||
this.JumpStop = true;
|
||||
this.radio1 = '2';
|
||||
} else if (data == OperationEvent.StationStand.setStopTime.menu.operation) {
|
||||
this.RunLevel = true;
|
||||
this.radio2 = '1';
|
||||
} else if (data == OperationEvent.StationStand.setRunLevel.menu.operation) {
|
||||
this.RunLevel = true;
|
||||
this.radio2 = '2';
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected, tempDate = null) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.tripNumber = '';
|
||||
this.standName = '';
|
||||
this.stationName = '';
|
||||
this.operation = operate.operation;
|
||||
if (selected) {
|
||||
this.getDirection(selected);
|
||||
}
|
||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||
this.getDirection(selected);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation || this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
|
||||
this.radio = selected.direction;
|
||||
}
|
||||
this.effective = false;
|
||||
this.radio = '01';
|
||||
this.disabledTime = true;
|
||||
this.trainList = this.map.trainList; // 加载列车数据
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
getDirection(selected) {
|
||||
if (this.mapConfig.upRight) {
|
||||
this.standName = selected.right ? '上行' : '下行';
|
||||
this.isUpDirection = selected.right;
|
||||
} else if (!this.mapConfig.upRight) {
|
||||
this.standName = selected.right ? '下行' : '上行';
|
||||
this.isUpDirection = !selected.right;
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.operation = '';
|
||||
this.trainStopTime = 30;
|
||||
},
|
||||
choose(upDown) { // 取消扣车 请求code码
|
||||
const operate = {
|
||||
operation: upDown == '01'
|
||||
? OperationEvent.StationStand.cancelDetainTrain.choose.operation
|
||||
: OperationEvent.Command.common.choose.operation,
|
||||
val: this.radio
|
||||
};
|
||||
if (this.radio == '02' || this.radio == '03') {
|
||||
this.operation = OperationEvent.StationStand.cancelDetainTrainAll.menu.operation;
|
||||
} else {
|
||||
this.operation = OperationEvent.StationStand.cancelDetainTrain.menu.operation;
|
||||
}
|
||||
this.handleBreak(operate);
|
||||
},
|
||||
trainNoSelectChange(upDown) { // 跳停 选择车组号
|
||||
const operate = {
|
||||
operation: OperationEvent.StationStand.cancelDetainTrain.choose.operation
|
||||
};
|
||||
this.handleBreak(operate);
|
||||
},
|
||||
chooseJumpStop(upDown) {
|
||||
const operate = {
|
||||
operation: ''
|
||||
};
|
||||
if (this.radio1 == '1') { // 跳停选择
|
||||
operate.operation = OperationEvent.StationStand.setJumpStop.select.operation;
|
||||
} else { // 取消跳停选择
|
||||
operate.operation = OperationEvent.StationStand.cancelJumpStop.select.operation;
|
||||
}
|
||||
this.handleBreak(operate);
|
||||
},
|
||||
chooseEffective(effective) {
|
||||
const operate = {
|
||||
operation: '',
|
||||
val: effective
|
||||
};
|
||||
if (this.radio2 == '1') { // 设置停站时间
|
||||
operate.operation = OperationEvent.StationStand.setStopTime.choose2.operation;
|
||||
} else { // 设置站间运行等级
|
||||
operate.operation = OperationEvent.StationStand.setRunLevel.choose2.operation;
|
||||
}
|
||||
this.handleBreak(operate);
|
||||
},
|
||||
chooseStopTime(upDown) {
|
||||
const operate = {
|
||||
operation: '',
|
||||
val: this.radio
|
||||
};
|
||||
if (this.radio2 == '1') { // 设置停站时间
|
||||
operate.operation = OperationEvent.StationStand.setStopTime.choose1.operation;
|
||||
} else { // 设置站间运行等级
|
||||
operate.operation = OperationEvent.StationStand.setRunLevel.choose1.operation;
|
||||
}
|
||||
if (this.radio === '01') {
|
||||
this.disabledTime = true;
|
||||
this.trainRunlevel = 2;
|
||||
this.effective = false;
|
||||
} else {
|
||||
this.disabledTime = false;
|
||||
this.effective = true;
|
||||
}
|
||||
this.handleBreak(operate);
|
||||
},
|
||||
trainNoSelectLevel(upDown) {
|
||||
const operate = {
|
||||
operation: OperationEvent.StationStand.setRunLevel.chooseTrain.operation,
|
||||
val: `${upDown}`,
|
||||
param: {
|
||||
standRunLevel: `${upDown}`
|
||||
}
|
||||
};
|
||||
this.handleBreak(operate);
|
||||
},
|
||||
handleTrainStopTime() {
|
||||
const operate = {
|
||||
operation: OperationEvent.StationStand.setStopTime.input.operation,
|
||||
val: `${this.trainStopTime}`
|
||||
};
|
||||
this.handleBreak(operate);
|
||||
},
|
||||
handleBreak(operate) { // 断点记录
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
valid && this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
||||
this.setDetainTrain(); /** 设置扣车*/
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation || this.operation == OperationEvent.StationStand.cancelDetainTrainAll.menu.operation) {
|
||||
this.cancelDetainTrain(); /** 取消扣车*/
|
||||
} else if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
|
||||
this.setJumpStop(); /** 设置跳停*/
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
|
||||
this.cancelJumpStop(); /** 取消跳停*/
|
||||
} else if (this.operation == OperationEvent.StationStand.setStopTime.menu.operation) {
|
||||
this.setStopTime(); /** 设置停站时间*/
|
||||
} else if (this.operation == OperationEvent.StationStand.setRunLevel.menu.operation) {
|
||||
this.setRunLevel(); /** 设置站间运行等级*/
|
||||
}
|
||||
},
|
||||
// 设置扣车
|
||||
setDetainTrain() {
|
||||
this.sendCommand(menuOperate.StationStand.setDetainTrain);
|
||||
},
|
||||
// 取消扣车
|
||||
cancelDetainTrain() {
|
||||
if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
|
||||
this.sendCommand(menuOperate.StationStand.cancelDetainTrain);
|
||||
} else {
|
||||
this.sendCommand(menuOperate.StationStand.cancelDetainTrainAll);
|
||||
}
|
||||
},
|
||||
// 设置跳停
|
||||
setJumpStop() {
|
||||
this.sendCommand(menuOperate.StationStand.setJumpStop, {trainGroupNumber:this.tripNumber});
|
||||
},
|
||||
// 取消跳停
|
||||
cancelJumpStop() {
|
||||
this.sendCommand(menuOperate.StationStand.cancelJumpStop, {trainGroupNumber:this.tripNumber});
|
||||
},
|
||||
// 设置停站时间
|
||||
setStopTime() {
|
||||
this.sendCommand(menuOperate.StationStand.setStopTime, {parkingTime: this.radio == '01' ? -1 : this.trainStopTime, parkingAlwaysValid: this.effective});
|
||||
},
|
||||
// 设置运行速度
|
||||
setRunLevel() {
|
||||
this.sendCommand(menuOperate.StationStand.setRunLevel, {runLevelTime:this.radio === '02' ? this.trainRunlevel : 2, runLevelTimeForever: this.effective});
|
||||
},
|
||||
sendCommand(operate, param) {
|
||||
this.loading = true;
|
||||
commitOperate(operate, param, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
this.loading = false;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.stand-detain-train .context {
|
||||
height: 80px !important;
|
||||
}
|
||||
/deep/ {
|
||||
.el-input--mini .el-input__icon{
|
||||
line-height: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
217
src/jmapNew/theme/datie_02/menus/dialog/standDetail.vue
Normal file
217
src/jmapNew/theme/datie_02/menus/dialog/standDetail.vue
Normal file
@ -0,0 +1,217 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-detail"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="380px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header">
|
||||
<el-col :span="10">
|
||||
<span>车站</span>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<span>站台</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="header">
|
||||
<el-col :span="10">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-input v-model="standName" style="padding: 0 3px;" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="content">
|
||||
<el-col :span="6">
|
||||
<span>停站时间</span>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-input v-model="modelData.stopTime" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="content">
|
||||
<el-col :span="6">
|
||||
<span>运行等级</span>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-input v-model="modelData.runLevel" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="content">
|
||||
<el-col :span="6">
|
||||
<span>扣车</span>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-input v-model="modelData.detainCar" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="content">
|
||||
<el-col :span="6">
|
||||
<span>跳停</span>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-input v-model="modelData.jumpStop" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="18">
|
||||
<span style="opacity: 0;">1</span>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">退出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
// import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
|
||||
export default {
|
||||
name: 'StandDetail',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
tempData: [],
|
||||
stationName: '',
|
||||
standName: '',
|
||||
runLevelList: [
|
||||
'自动',
|
||||
'低速',
|
||||
'常速',
|
||||
'高速'
|
||||
],
|
||||
modelData: {
|
||||
stopTime: '自动',
|
||||
runLevel: '自动',
|
||||
detainCar: '无扣车',
|
||||
jumpStop: '无跳停'
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'mapConfig',
|
||||
'stationList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '站台信息';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadInitData(selected, opts) {
|
||||
this.tempData = [];
|
||||
|
||||
// const stationList = this.stationList.slice();
|
||||
// const index = this.stationList.findIndex(n => n.code == selected.stationCode);
|
||||
// let stationStand, station;
|
||||
// if (selected.direction == '01') { // 下行
|
||||
// // 下行时,此站不是最后一站
|
||||
// if (index != 0) {
|
||||
// stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code);
|
||||
// station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||
// }
|
||||
// } else {
|
||||
// // 上行时,此站不是最后一站
|
||||
// if (index != this.stationList.length - 1) {
|
||||
// stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index + 1].code);
|
||||
// station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||
// }
|
||||
// }
|
||||
this.modelData = {
|
||||
stopTime: selected.parkingTime < 0 ? '自动' : `${selected.parkingTime} 秒`,
|
||||
runLevel: this.runLevelList[selected.runLevelTime],
|
||||
detainCar: selected.stationHoldTrain || selected.centerHoldTrain ? '已设置' : '无扣车',
|
||||
jumpStop: selected.allSkip || selected.assignSkip ? '已设置' : '无跳停'
|
||||
};
|
||||
},
|
||||
doShow(operate, selected, opts) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.standName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||
if (this.mapConfig.upRight) {
|
||||
this.standName = selected.right ? '上行' : '下行';
|
||||
} else if (!this.mapConfig.upRight) {
|
||||
this.standName = selected.right ? '下行' : '上行';
|
||||
}
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
this.loadInitData(selected, opts);
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.close.confirm.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
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>
|
||||
.content {
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
332
src/jmapNew/theme/datie_02/menus/dialog/trainControl.vue
Normal file
332
src/jmapNew/theme/datie_02/menus/dialog/trainControl.vue
Normal file
@ -0,0 +1,332 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm train-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="480px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="el-dialog-div">
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="stationName">
|
||||
<span slot="label">车站</span>
|
||||
<el-input v-model="addModel.stationName" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item v-if="operation != '70c'" prop="sectionCode">
|
||||
<span slot="label">轨道</span>
|
||||
<el-input v-model="addModel.sectionCode" />
|
||||
</el-form-item>
|
||||
<el-form-item v-else prop="trainWindowCode">
|
||||
<span slot="label">车次窗</span>
|
||||
<el-input v-model="addModel.trainWindowCode" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="车组号:" prop="groupNumber">
|
||||
<el-select v-model="addModel.groupNumber" filterable>
|
||||
<el-option
|
||||
v-for="train in trainList"
|
||||
:key="train.groupNumber"
|
||||
:label="train.groupNumber"
|
||||
:value="train.groupNumber"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item v-if="operation == '708'" prop="serviceNumber">
|
||||
<span slot="label">服务号</span>
|
||||
<el-input v-model="addModel.serviceNumber" />
|
||||
</el-form-item>
|
||||
<el-form-item v-else-if="operation == '70c'" prop="targetCode">
|
||||
<span slot="label">目的地</span>
|
||||
<el-input v-model="addModel.targetCode" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item v-if="operation == '708'" prop="trainCode">
|
||||
<span slot="label">序列号</span>
|
||||
<el-input v-model="addModel.trainCode" />
|
||||
</el-form-item>
|
||||
<el-form-item v-else-if="operation == '70c'" prop="serviceNumber">
|
||||
<span slot="label">服务号</span>
|
||||
<el-input v-model="addModel.serviceNumber" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-form-item v-if="operation == '70c'" prop="trainType">
|
||||
<span slot="label">运行模式</span>
|
||||
<br>
|
||||
<el-radio-group v-model="addModel.runningMode" style="margin-left: 15px;">
|
||||
<el-radio :label="'01'">普通</el-radio>
|
||||
<el-radio :label="'02'">专列</el-radio>
|
||||
<el-radio :label="'03'">不停站直达</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</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-train ref="confirmTrain" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import ConfirmTrain from './childDialog/confirmTrain';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'TrainControl',
|
||||
components: {
|
||||
ConfirmTrain,
|
||||
NoticeInfo
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
stationName: '',
|
||||
sectionCode: '',
|
||||
trainWindowCode: '',
|
||||
groupNumber: '',
|
||||
serviceNumber: '',
|
||||
targetCode: '',
|
||||
trainCode: '',
|
||||
runningMode: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
stationName: [
|
||||
{ required: true, message: '请输入车站', trigger: 'blur'}
|
||||
],
|
||||
sectionCode: [
|
||||
{ required: true, message: '请输入轨道', trigger: 'blur'}
|
||||
],
|
||||
trainWindowCode: [
|
||||
{ required: true, message: '请输入车次窗', trigger: 'blur'}
|
||||
],
|
||||
groupNumber: [
|
||||
{ required: true, message: '请选择车组号', trigger: 'change' }
|
||||
],
|
||||
serviceNumber: [
|
||||
{ required: true, message: '请输入服务号', trigger: 'blur'}
|
||||
],
|
||||
targetCode: [
|
||||
{ required: true, message: '请输入目的地号', trigger: 'blur'}
|
||||
],
|
||||
trainCode: [
|
||||
{ required: true, message: '请输入序列号', trigger: 'blur'}
|
||||
],
|
||||
runningMode: [
|
||||
{ required: true, message: '请选择运行模式', trigger: 'blur'}
|
||||
]
|
||||
},
|
||||
operation: null,
|
||||
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
direction: 0
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'map'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Train.destinationTrainId.menu.operation) {
|
||||
/* 设目的地*/
|
||||
return OperationEvent.Train.destinationTrainId.menu.domId;
|
||||
} else if (this.operation == OperationEvent.Train.setPlanTrainId.menu.operation) {
|
||||
/* 设计划车*/
|
||||
return OperationEvent.Train.setPlanTrainId.menu.domId;
|
||||
} else if (this.operation == OperationEvent.Train.artificialTrainId.menu.operation) {
|
||||
/* 设人工车*/
|
||||
return OperationEvent.Train.artificialTrainId.menu.domId;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
title() {
|
||||
if ( this.operation == OperationEvent.Train.destinationTrainId.menu.operation) {
|
||||
return '设目的地车';
|
||||
} else if ( this.operation == OperationEvent.Train.setPlanTrainId.menu.operation ) {
|
||||
return '设计划车';
|
||||
} else if ( this.operation == OperationEvent.Train.artificialTrainId.menu.operation ) {
|
||||
return '设人工车';
|
||||
}
|
||||
return '';
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.addModel = {
|
||||
tripNumber: '',
|
||||
groupNumber: '',
|
||||
trainType: '01',
|
||||
serviceNumber: '',
|
||||
targetCode: ''
|
||||
};
|
||||
/** 加载列车数据*/
|
||||
this.loadInitData(this.map);
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
if ( this.operation == OperationEvent.Train.destinationTrainId.menu.operation ) {
|
||||
this.destinationTrainId();
|
||||
} else if (this.operation == OperationEvent.Train.setPlanTrainId.menu.operation ) {
|
||||
this.setPlanTrainId();
|
||||
} else if (this.operation == OperationEvent.Train.artificialTrainId.menu.operation ) {
|
||||
this.artificialTrainId();
|
||||
}
|
||||
},
|
||||
// 设目的地车
|
||||
destinationTrainId() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Train.destinationTrainId.menu.operation,
|
||||
message: [`设目的地车:成功`],
|
||||
val: ''
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.doClose();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设计划车
|
||||
setPlanTrainId() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Train.setPlanTrainId.menu.operation,
|
||||
message: [`设计划车:成功`],
|
||||
val: ''
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.doClose();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设人工车
|
||||
artificialTrainId() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Train.artificialTrainId.menu.operation,
|
||||
message: [`设人工车:成功`],
|
||||
val: ''
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.doClose();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
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 scoped>
|
||||
.el-dialog-div {
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
133
src/jmapNew/theme/datie_02/menus/dialog/trainCreate.vue
Normal file
133
src/jmapNew/theme/datie_02/menus/dialog/trainCreate.vue
Normal file
@ -0,0 +1,133 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="chengdou-03__systerm route-create" :title="title" :visible.sync="show" width="380px" label-position="top" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||
<el-form size="small" label-width="100px">
|
||||
<el-form-item label="列车:" prop="trainCode">
|
||||
<el-select v-model="trainCode" filterable placeholder="列车">
|
||||
<el-option
|
||||
v-for="item in trainList"
|
||||
:key="item.code"
|
||||
:label="item.groupNumber"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="列车方向:" prop="direction">
|
||||
<el-select v-model="direction" filterable placeholder="列车方向">
|
||||
<el-option v-for="no in directionList" :key="no.value" :label="no.label" :value="no.value" />
|
||||
</el-select>
|
||||
<!-- <div style="font-size: 12px;">(上行路线车次号选择偶数,下行路线车次号选择基数)</div> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row>
|
||||
<el-col style="text-align: right;">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'RouteCreate',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
trainList: [],
|
||||
trainNoList: [],
|
||||
directionList: [
|
||||
{
|
||||
value: '2',
|
||||
label: '上行'
|
||||
},
|
||||
{
|
||||
value: '1',
|
||||
label: '下行'
|
||||
}
|
||||
],
|
||||
trainCode: '',
|
||||
tripNumber: '',
|
||||
direction: '',
|
||||
selected: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'map'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return OperationEvent.Section.newtrain.menu.domId;
|
||||
},
|
||||
title() {
|
||||
return '设置列车';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.dialogShow = true;
|
||||
this.selected = selected;
|
||||
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.trainCode = '';
|
||||
this.direction = '';
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
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();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
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>
|
181
src/jmapNew/theme/datie_02/menus/dialog/trainCreateNumber.vue
Normal file
181
src/jmapNew/theme/datie_02/menus/dialog/trainCreateNumber.vue
Normal file
@ -0,0 +1,181 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="480px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="el-dialog-div">
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="stationName">
|
||||
<span slot="label">车站</span>
|
||||
<el-input v-model="addModel.stationName" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="trainWindowCode">
|
||||
<span slot="label">车次窗</span>
|
||||
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="车 组 号:" prop="groupNumber">
|
||||
<el-select v-model="addModel.groupNumber" filterable>
|
||||
<el-option
|
||||
v-for="train in trainList"
|
||||
:key="train.groupNumber"
|
||||
:label="train.groupNumber"
|
||||
:value="train.groupNumber"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</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>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
|
||||
export default {
|
||||
name: 'TrainCreateNumber',
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
trainList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
stationName:'',
|
||||
trainWindowCode: '',
|
||||
groupNumber:''
|
||||
},
|
||||
|
||||
rules: {
|
||||
groupNumber: [
|
||||
{ required: true, message: '请输入车组号', trigger: 'blur'}
|
||||
]
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '新建车组号';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.addModel = {
|
||||
stationName:'',
|
||||
trainWindowCode: '',
|
||||
groupNumber:''
|
||||
};
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Train.createTrainNo.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
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 scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
.el-dialog-div {
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
150
src/jmapNew/theme/datie_02/menus/dialog/trainDelete.vue
Normal file
150
src/jmapNew/theme/datie_02/menus/dialog/trainDelete.vue
Normal file
@ -0,0 +1,150 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="90px" :model="addModel" :rules="rules">
|
||||
<el-form-item label="车 组 号:" prop="groupNumber">
|
||||
<el-input v-model="addModel.groupNumber" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<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" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
// import { getPublishMapTrainNos } from '@/api/runplan';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'TrainDelete',
|
||||
components: {
|
||||
ConfirmControl,
|
||||
NoticeInfo
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
groupNumber: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
groupNumber: [
|
||||
{ required: true, message: '请输入车组号', trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'map'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.delTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '删除列车识别号';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
if (map) {
|
||||
// getPublishMapTrainNos(map.skinCode).then(response => {
|
||||
// this.trainNoList = response.data;
|
||||
// }).catch(() => {
|
||||
// this.$messageBox(`获取列车车组号失败`);
|
||||
// });
|
||||
}
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Train.delTrainId.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
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>
|
176
src/jmapNew/theme/datie_02/menus/dialog/trainDeleteNumber.vue
Normal file
176
src/jmapNew/theme/datie_02/menus/dialog/trainDeleteNumber.vue
Normal file
@ -0,0 +1,176 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="480px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="el-dialog-div">
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="stationName">
|
||||
<span slot="label">车站</span>
|
||||
<el-input v-model="addModel.stationName" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="trainWindowCode">
|
||||
<span slot="label">车次窗</span>
|
||||
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="车 组 号:" prop="groupNumber">
|
||||
<el-select v-model="addModel.groupNumber" filterable disabled>
|
||||
<el-option
|
||||
v-for="train in trainList"
|
||||
:key="train.groupNumber"
|
||||
:label="train.groupNumber"
|
||||
:value="train.groupNumber"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</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>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
|
||||
export default {
|
||||
name: 'TrainDeleteNumber',
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
trainList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
stationName:'',
|
||||
trainWindowCode: '',
|
||||
groupNumber:''
|
||||
},
|
||||
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '删除车组号';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.addModel = {
|
||||
stationName:'',
|
||||
trainWindowCode: '',
|
||||
groupNumber:''
|
||||
};
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Train.deleteTrainNo.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
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 scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
.el-dialog-div {
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
378
src/jmapNew/theme/datie_02/menus/dialog/trainDetailInfo.vue
Normal file
378
src/jmapNew/theme/datie_02/menus/dialog/trainDetailInfo.vue
Normal file
@ -0,0 +1,378 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="480px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="el-dialog-div">
|
||||
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
||||
<el-tab-pane :id="domIdBasicInfo" label="基本信息" name="first">
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="groupNumber">
|
||||
<span slot="label">车组号</span>
|
||||
<el-input v-model="addModel.groupNumber" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="type">
|
||||
<span slot="label">服务类型</span>
|
||||
<el-input v-model="addModel.type" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="serviceNumber">
|
||||
<span slot="label">服务号</span>
|
||||
<el-input v-model="addModel.serviceNumber" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="trainCode">
|
||||
<span slot="label">序列号</span>
|
||||
<el-input v-model="addModel.trainCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="driverCode">
|
||||
<span slot="label">司机号</span>
|
||||
<el-input v-model="addModel.driverCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="targetCode">
|
||||
<span slot="label">目的地号</span>
|
||||
<el-input v-model="addModel.targetCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="stationName">
|
||||
<span slot="label">车站</span>
|
||||
<el-input v-model="addModel.stationName" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="sectionCode">
|
||||
<span slot="label">轨道</span>
|
||||
<el-input v-model="addModel.sectionCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="nextStation">
|
||||
<span slot="label">下一站</span>
|
||||
<el-input v-model="addModel.nextStation" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="targetName">
|
||||
<span slot="label">目的地</span>
|
||||
<el-input v-model="addModel.targetName" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="trackingMode">
|
||||
<span slot="label">跟踪模式</span>
|
||||
<el-input v-model="addModel.trackingMode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="runStatus">
|
||||
<span slot="label">运行状态</span>
|
||||
<el-input v-model="addModel.runStatus" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="departureTime">
|
||||
<span slot="label">出发时刻</span>
|
||||
<el-input v-model="addModel.departureTime" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="arrivedTime">
|
||||
<span slot="label">到达时刻</span>
|
||||
<el-input v-model="addModel.arrivedTime" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="planDeviation">
|
||||
<span slot="label">计划偏离</span>
|
||||
<el-input v-model="addModel.planDeviation" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :id="domIdMarshalInfo" label="编组信息" name="second">
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="marshallingNo">
|
||||
<span slot="label">编组号</span>
|
||||
<el-input v-model="addModel.marshallingNo" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="carNo1">
|
||||
<span slot="label">车头号1</span>
|
||||
<el-input v-model="addModel.carNo1" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="carNo2">
|
||||
<span slot="label">车头号2</span>
|
||||
<el-input v-model="addModel.carNo2" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-table :data="tableData" style="width: 100%" height="250">
|
||||
<el-table-column prop="carriage" label="车厢" width="80" />
|
||||
<el-table-column prop="carriageNumber" label="车厢号" width="80" />
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :id="domIdAtpInfo" label="ATP信息" name="third">
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="trainId">
|
||||
<span slot="label">车载ID</span>
|
||||
<el-input v-model="addModel.trainId" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="directionType">
|
||||
<span slot="label">运行方向</span>
|
||||
<el-input v-model="addModel.directionType" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="drivingMode">
|
||||
<span slot="label">驾驶模式</span>
|
||||
<el-input v-model="addModel.drivingMode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="speed">
|
||||
<span slot="label">速度</span>
|
||||
<el-input v-model="addModel.speed" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="stopQuasiState">
|
||||
<span slot="label">停准状态</span>
|
||||
<el-input v-model="addModel.stopQuasiState" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="doorStatus">
|
||||
<span slot="label">车门状态</span>
|
||||
<el-input v-model="addModel.doorStatus" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="runLevel">
|
||||
<span slot="label">运行等级</span>
|
||||
<el-input v-model="addModel.runLevel" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="stopState">
|
||||
<span slot="label">停跳状态</span>
|
||||
<el-input v-model="addModel.stopState" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="position">
|
||||
<span slot="label">车头位置</span>
|
||||
<el-input v-model="addModel.position" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="loadingRate">
|
||||
<span slot="label">载重率</span>
|
||||
<el-input v-model="addModel.loadingRate" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :id="domIdCarAlarm" label="车辆报警" name="fourth" />
|
||||
</el-tabs>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="19">
|
||||
<el-button :id="domIdCancel" @click="cancel">退出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
|
||||
export default {
|
||||
name: 'TrainDetailInfo',
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
trainList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
stationName:'',
|
||||
groupNumber:'',
|
||||
type:'',
|
||||
serviceNumber:'',
|
||||
trainCode:'',
|
||||
driverCode:'',
|
||||
targetCode:'',
|
||||
sectionCode:'',
|
||||
nextStation:'',
|
||||
targetName:'',
|
||||
trackingMode:'',
|
||||
runStatus:'',
|
||||
departureTime:'',
|
||||
arrivedTime:'',
|
||||
planDeviation:'',
|
||||
marshallingNo:'',
|
||||
carNo1:'',
|
||||
carNo2:'',
|
||||
trainId:'',
|
||||
directionType:'',
|
||||
drivingMode:'',
|
||||
speed:'',
|
||||
stopQuasiState:'',
|
||||
doorStatus:'',
|
||||
runLevel:'',
|
||||
stopState:'',
|
||||
position:'',
|
||||
loadingRate:''
|
||||
},
|
||||
activeName:'first',
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
tableData:[
|
||||
{carriage:'1', carriageNumber:'101'},
|
||||
{carriage:'2', carriageNumber:'102'},
|
||||
{carriage:'3', carriageNumber:'103'},
|
||||
{carriage:'4', carriageNumber:'104'},
|
||||
{carriage:'5', carriageNumber:'105'},
|
||||
{carriage:'6', carriageNumber:'106'}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdCarAlarm() {
|
||||
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.carAlarm.domId : '';
|
||||
},
|
||||
domIdBasicInfo() {
|
||||
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.basicInfo.domId : '';
|
||||
},
|
||||
domIdMarshalInfo() {
|
||||
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.marshalInfo.domId : '';
|
||||
},
|
||||
domIdAtpInfo() {
|
||||
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.atpInfo.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '列车信息显示';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.addModel = {
|
||||
stationName:'',
|
||||
tripNumber: '',
|
||||
groupNumber:''
|
||||
};
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
handleClick() {
|
||||
|
||||
},
|
||||
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 scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
.el-dialog-div {
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
174
src/jmapNew/theme/datie_02/menus/dialog/trainEditNumber.vue
Normal file
174
src/jmapNew/theme/datie_02/menus/dialog/trainEditNumber.vue
Normal file
@ -0,0 +1,174 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="chengdou-03__systerm stand-stop-time" :title="title" :visible.sync="show" width="480px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<div class="el-dialog-div">
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules" label-position="left">
|
||||
<el-form-item>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="stationName">
|
||||
<span slot="label">车站</span>
|
||||
<el-input v-model="addModel.stationName" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="trainWindowCode">
|
||||
<span slot="label">车次窗</span>
|
||||
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="旧车组号" prop="oldGroupNumber">
|
||||
<el-select v-model="addModel.oldGroupNumber" filterable disabled>
|
||||
<el-option v-for="train in trainList" :key="train.oldGroupNumber" :label="train.oldGroupNumber" :value="train.oldGroupNumber" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item label="新车组号" prop="newGroupNumber">
|
||||
<el-select v-model="addModel.newGroupNumber">
|
||||
<el-option v-for="train in trainList" :key="train.newGroupNumber" :label="train.newGroupNumber" :value="train.newGroupNumber" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group-train">
|
||||
<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>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
|
||||
export default {
|
||||
name: 'TrainEditNumber',
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
trainList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
stationName: '',
|
||||
trainWindowCode: '',
|
||||
oldGroupNumber: '',
|
||||
newGroupNumber: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
newGroupNumber: [
|
||||
{ required: true, message: '请输入新车组号', trigger: 'blur'}
|
||||
]
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '修改车组号';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.addModel = {
|
||||
stationName: '',
|
||||
trainWindowCode: '',
|
||||
oldGroupNumber: '',
|
||||
newGroupNumber: ''
|
||||
};
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Train.editTrainNo.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
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 scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
.el-dialog-div {
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
200
src/jmapNew/theme/datie_02/menus/dialog/trainMove.vue
Normal file
200
src/jmapNew/theme/datie_02/menus/dialog/trainMove.vue
Normal file
@ -0,0 +1,200 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="640px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
|
||||
<div style="width: 46%;">
|
||||
<el-form-item label="车 组 号:" label-width="95px" prop="tripNumber">
|
||||
<el-input v-model="addModel.tripNumber" disabled />
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div style="overflow: hidden;">
|
||||
<div
|
||||
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px; margin-right: 4%;"
|
||||
>
|
||||
<span class="base-label">源车次窗</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item prop="stationStandSource">
|
||||
<span slot="label">车  站:</span>
|
||||
<el-select v-model="addModel.stationStandSource" filterable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in stationStandList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 窗:" prop="trainSource">
|
||||
<el-input v-model="addModel.trainSource" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;"
|
||||
>
|
||||
<span class="base-label">目的车次窗</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item prop="stationStandGoal">
|
||||
<span slot="label">车  站:</span>
|
||||
<el-select v-model="addModel.stationStandGoal" filterable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in stationStandList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 窗:" prop="trainGoal">
|
||||
<el-input v-model="addModel.trainGoal" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<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>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
|
||||
export default {
|
||||
name: 'TrainMove',
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
tripNumber: '',
|
||||
trainSource: '',
|
||||
stationStandSource: '',
|
||||
trainGoal: '',
|
||||
stationStandGoal: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
tripNumber: [
|
||||
{ required: true, message: '请输入车组号', trigger: 'blur' }
|
||||
],
|
||||
trainSource: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
stationStandSource: [
|
||||
{ required: true, message: '请选择车站', trigger: 'change' }
|
||||
],
|
||||
trainGoal: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
stationStandGoal: [
|
||||
{ required: true, message: '请选择车站', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '移动列车识别号';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Train.moveTrainId.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
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 scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
193
src/jmapNew/theme/datie_02/menus/dialog/trainMoveNumber.vue
Normal file
193
src/jmapNew/theme/datie_02/menus/dialog/trainMoveNumber.vue
Normal file
@ -0,0 +1,193 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="480px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="el-dialog-div">
|
||||
<el-form ref="form" size="small" label-width="90px" :model="addModel" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="stationName">
|
||||
<span slot="label">车站</span>
|
||||
<el-input v-model="addModel.stationName" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="trainWindowCode">
|
||||
<span slot="label">车次窗</span>
|
||||
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="车 组 号:" prop="groupNumber">
|
||||
<el-select v-model="addModel.groupNumber" filterable disabled>
|
||||
<el-option
|
||||
v-for="train in trainList"
|
||||
:key="train.groupNumber"
|
||||
:label="train.groupNumber"
|
||||
:value="train.groupNumber"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="purposeStationName">
|
||||
<span slot="label">车站</span>
|
||||
<el-input v-model="addModel.purposeStationName" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="purposeTrainWindowCode">
|
||||
<span slot="label">目的车次窗</span>
|
||||
<el-input v-model="addModel.purposeTrainWindowCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</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>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
|
||||
export default {
|
||||
name: 'TrainMoveNumber',
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
trainList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
stationName: '',
|
||||
trainWindowCode: '',
|
||||
groupNumber: '',
|
||||
purposeStationName: '',
|
||||
purposeTrainWindowCode: ''
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '移动车组号';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.addModel = {
|
||||
stationName: '',
|
||||
trainWindowCode: '',
|
||||
groupNumber: '',
|
||||
purposeStationName: '',
|
||||
purposeTrainWindowCode: ''
|
||||
};
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Train.moveTrainNo.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
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 scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
.el-dialog-div {
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
209
src/jmapNew/theme/datie_02/menus/dialog/trainSwitch.vue
Normal file
209
src/jmapNew/theme/datie_02/menus/dialog/trainSwitch.vue
Normal file
@ -0,0 +1,209 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="640px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
|
||||
<div style="overflow: hidden;">
|
||||
<div
|
||||
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 177px; margin-right: 4%;"
|
||||
>
|
||||
<span class="base-label">源车次窗</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item label="车 组 号:" prop="trainNumberSource">
|
||||
<el-input v-model="addModel.trainNumberSource" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="stationStandSource">
|
||||
<span slot="label">车  站:</span>
|
||||
<el-select v-model="addModel.stationStandSource" filterable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in stationStandList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 窗:" prop="trainSource">
|
||||
<el-input v-model="addModel.trainSource" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 177px;"
|
||||
>
|
||||
<span class="base-label">目的车次窗</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item label="车 组 号:" prop="trainNumberGoal">
|
||||
<el-input v-model="addModel.trainNumberGoal" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="stationStandGoal">
|
||||
<span slot="label">车  站:</span>
|
||||
<el-select v-model="addModel.stationStandGoal" filterable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in stationStandList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 窗:" prop="trainGoal">
|
||||
<el-input v-model="addModel.trainGoal" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<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>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
|
||||
export default {
|
||||
name: 'TrainSwitch',
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
trainNumberSource: '',
|
||||
trainSource: '',
|
||||
stationStandSource: '',
|
||||
trainGoal: '',
|
||||
stationStandGoal: '',
|
||||
trainNumberGoal: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
trainNumberSource: [
|
||||
{ required: true, message: '请输入车组号', trigger: 'blur' }
|
||||
],
|
||||
trainSource: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
stationStandSource: [
|
||||
{ required: true, message: '请选择车站', trigger: 'change' }
|
||||
],
|
||||
trainNumberGoal: [
|
||||
{ required: true, message: '请输入车组号', trigger: 'blur' }
|
||||
],
|
||||
trainGoal: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
stationStandGoal: [
|
||||
{ required: true, message: '请选择车站', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '移动列车识别号';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Train.moveTrainId.menu.operation
|
||||
};
|
||||
|
||||
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();
|
||||
console.error(error);
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
478
src/jmapNew/theme/datie_02/menus/index.vue
Normal file
478
src/jmapNew/theme/datie_02/menus/index.vue
Normal file
@ -0,0 +1,478 @@
|
||||
<template>
|
||||
<div class="menus" :style="{width: width + 'px'}">
|
||||
<!--<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />-->
|
||||
<div class="alarm-window">
|
||||
<div v-for="elem in alarmMessages" :key="elem.id" style="font-size: 14px;">
|
||||
{{ elem.message }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="device-status-window">
|
||||
<div class="device-status-button" style="background: #0f0;">联锁I</div>
|
||||
<div class="device-status-button" style="background: #f00;">联锁II</div>
|
||||
<div class="device-status-button" style="background: #0f0;">操作A</div>
|
||||
<div class="device-status-button" style="background: #ff0;">操作B</div>
|
||||
<div class="device-status-button" style="background: #f00;">维修机</div>
|
||||
</div>
|
||||
<div class="warning-window">
|
||||
<div v-for="elem in warningMessages" :key="elem.id" style="font-size: 14px;color: #ff0">
|
||||
{{ elem.message }}
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: calc(100% - 200px);position: fixed;height: 30px;background: #808080;z-index: 9;bottom: 0;left: 0;display: flex;">
|
||||
<div style="width: 60%;height: 30px;line-height: 30px;text-align: center;">提示信息窗</div>
|
||||
<div style="width: 40%;height: 30px;line-height: 30px;text-align: center;border-left: 2px #ccc solid;">{{ '操控A:主机' + ' ' + dateString + ' ' + time }}</div>
|
||||
</div>
|
||||
<menu-button ref="menuButton" :selected="selected" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||
<menu-switch ref="menuSwitch" :selected="selected" />
|
||||
<menu-signal ref="menuSignal" :selected="selected" />
|
||||
<menu-section ref="menuSection" :selected="selected" />
|
||||
<menu-train ref="menuTrain" :selected="selected" />
|
||||
<menu-station ref="menuStation" :selected="selected" />
|
||||
<passive-alarm ref="passiveAlarm" />
|
||||
<passive-contorl ref="passiveControl" pop-class="chengdou-03__systerm" />
|
||||
<passive-Timeout ref="passiveTimeout" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import MenuSignal from './menuSignal';
|
||||
import MenuButton from './menuButton';
|
||||
import MenuStationStand from './menuStationStand';
|
||||
import MenuSwitch from './menuSwitch';
|
||||
import MenuSection from './menuSection';
|
||||
import MenuTrain from './menuTrain';
|
||||
import MenuStation from './menuStation';
|
||||
import MenuBar from './menuBar';
|
||||
import PassiveAlarm from './passiveDialog/alarm';
|
||||
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
|
||||
import PassiveTimeout from './passiveDialog/timeout';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
import { prefixIntrger } from '@/utils/date';
|
||||
export default {
|
||||
name: 'Menus',
|
||||
components: {
|
||||
MenuBar,
|
||||
MenuButton,
|
||||
MenuSignal,
|
||||
MenuSwitch,
|
||||
MenuSection,
|
||||
MenuStationStand,
|
||||
MenuStation,
|
||||
MenuTrain,
|
||||
PassiveAlarm,
|
||||
PassiveContorl,
|
||||
PassiveTimeout
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
alarmMessages: [
|
||||
{ id: 1, message: '这是告警信息一' },
|
||||
{ id: 2, message: '这是告警信息二' },
|
||||
{ id: 3, message: '这是告警信息三' },
|
||||
{ id: 4, message: '这是告警信息四' },
|
||||
{ id: 5, message: '这是告警信息五' },
|
||||
{ id: 6, message: '这是告警信息六' },
|
||||
{ id: 7, message: '这是告警信息七' },
|
||||
],
|
||||
warningMessages: [
|
||||
{ id: 1, message: '这是预警信息一' },
|
||||
{ id: 2, message: '这是预警信息二' },
|
||||
{ id: 3, message: '这是预警信息三' },
|
||||
{ id: 4, message: '这是预警信息四' },
|
||||
{ id: 5, message: '这是预警信息五' },
|
||||
{ id: 6, message: '这是预警信息六' },
|
||||
{ id: 7, message: '这是预警信息七' },
|
||||
],
|
||||
time: '00:00:00',
|
||||
dateString: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('config', [
|
||||
'width'
|
||||
]),
|
||||
isShowBar() {
|
||||
return this.$store.state.training.prdType && this.$store.state.training.prdType !== '07';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
isShowBar(val) {
|
||||
val && this.$store.dispatch('config/updateMenuBar');
|
||||
},
|
||||
'$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);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('config/updateMenuBar');
|
||||
const _that = this;
|
||||
window.onclick = function (e) {
|
||||
if (!_that.$store.state.training.trainingStart) {
|
||||
_that.$refs.menuBar && _that.$refs.menuBar.blankClickClose();
|
||||
}
|
||||
_that.$refs.menuStationStand.doClose();
|
||||
_that.$refs.menuSwitch.doClose();
|
||||
_that.$refs.menuSignal.doClose();
|
||||
_that.$refs.menuSection.doClose();
|
||||
_that.$refs.menuTrain.doClose();
|
||||
_that.$refs.menuStation.doClose();
|
||||
};
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.onclick = function (e) {};
|
||||
},
|
||||
methods: {
|
||||
initDate(date) {
|
||||
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}:${prefixIntrger(date.getSeconds(), 2)}`;
|
||||
const years = date.getFullYear() + '';
|
||||
let months = date.getMonth() + 1 + '';
|
||||
let dates = date.getDate() + '';
|
||||
if (months.length < 2) { months = '0' + months; }
|
||||
if (dates.length < 2) { dates = '0' + dates; }
|
||||
this.dateString = years + months + dates;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.menus .pop-menu {
|
||||
background: #F0F0F0;
|
||||
}
|
||||
|
||||
.menus .pop-menu span {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.menus .pop-menu .is-disabled span {
|
||||
color: #B4B3B8;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm {
|
||||
overflow: hidden !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog {
|
||||
background: #0055E8;
|
||||
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
|
||||
border: 1px solid rgb(69, 134, 247);
|
||||
border-radius: 6px;
|
||||
font-size: 13px !important;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog span {
|
||||
font-size: 13px !important;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog span .el-icon-arrow-up{
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-dialog__footer {
|
||||
background: #ECE9D8;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-dialog__body {
|
||||
padding: 20px;
|
||||
margin: 0px 3px 3px;
|
||||
border: 2px solid rgba(120, 121, 123, 0.5);
|
||||
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
|
||||
background: #ECE9D8;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-dialog__title {
|
||||
font-size: 16px;
|
||||
color: #fff;
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
left: 7px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-dialog__headerbtn {
|
||||
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
|
||||
border: 1px solid #fff;
|
||||
border-radius: 4px;
|
||||
top: 6px;
|
||||
right: 3px;
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-dialog__headerbtn .el-icon-close:before {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-dialog__headerbtn .el-dialog__close {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-button {
|
||||
height: 24px;
|
||||
line-height: 22px;
|
||||
padding: 0px;
|
||||
width: 80px;
|
||||
border: 2px outset #E2E2E2;
|
||||
border-radius: 4px !important;
|
||||
color: #000;
|
||||
background: #F0F0F0;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .expand {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-button:focus span {
|
||||
border: 1px dashed gray;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-button:active {
|
||||
border: 2px inset #E2E2E2;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-button:disabled {
|
||||
border: 2px inset #E2E2E2;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-button:disabled span {
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-input {
|
||||
border: 2px inset #E9E9E9;
|
||||
height: 22px !important;
|
||||
line-height: 22px !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-input__inner {
|
||||
color: #000;
|
||||
background: #fff !important;
|
||||
border: 0px;
|
||||
border-radius: 0px !important;
|
||||
box-sizing: border-box;
|
||||
height: 22px !important;
|
||||
line-height: 22px !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-input.is-disabled .el-input__inner {
|
||||
background: #F0F0F0 !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-textarea {
|
||||
border: 2px inset #E9E9E9;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-textarea .el-textarea__inner {
|
||||
color: #000;
|
||||
background: #fff !important;
|
||||
border: 0px;
|
||||
border-radius: 0px !important;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-textarea.is-disabled .el-textarea__inner {
|
||||
background: #F0F0F0 !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-table--border th.gutter {
|
||||
background: #EBEADB !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-table {
|
||||
border: 2px inset #E9E9E9;
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-table .cell {
|
||||
height: 22px;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-table th.is-leaf {
|
||||
background: #F0F0F0 !important;
|
||||
border-right: 1px solid #BDBDBD !important;
|
||||
border-bottom: 1px solid #BDBDBD !important;
|
||||
color: #000 !important;
|
||||
height: 20px !important;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-table tr td {
|
||||
height: 20px !important;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-table .el-table__empty-text {
|
||||
top: 15px !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .current-row>td {
|
||||
background: #3399FF !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-checkbox__inner {
|
||||
border: 1px inset #dcdfe6 !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-checkbox__label {
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
|
||||
background: #E6E6E6 !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
|
||||
color: #C5C9CC !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
|
||||
background: #fff !important;
|
||||
border: 1px inset #dcdfe6 !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner::after {
|
||||
position: absolute;
|
||||
-webkit-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
content: "";
|
||||
border: 1px solid #000;
|
||||
border-left: 0;
|
||||
border-top: 0;
|
||||
height: 7px;
|
||||
left: 4px;
|
||||
top: 1px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-radio__inner {
|
||||
border: 1px inset #dcdfe6 !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-radio__label {
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner {
|
||||
background: #fff !important;
|
||||
border: 1px inset #dcdfe6 !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner::after {
|
||||
width: 4px;
|
||||
height: 4px;
|
||||
border-radius: 100%;
|
||||
background-color: #000 !important;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-radio.is-disabled .el-radio__inner {
|
||||
background: #E6E6E6 !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-radio.is-disabled .el-radio__label {
|
||||
color: #C5C9CC !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -15px;
|
||||
top: -18px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .el-form-item label {
|
||||
font-weight: normal !important;
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .context {
|
||||
height: 100px;
|
||||
border: 2px inset #E2E2E2;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .table {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .notice {
|
||||
margin-left: 62px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.chengdou-03__systerm .el-dialog .button-group {
|
||||
margin-top: 20px;
|
||||
}
|
||||
.alarm-window {
|
||||
width: 450px;
|
||||
height: 100px;
|
||||
position: fixed;
|
||||
top: 10px;
|
||||
left: 55px;
|
||||
background: #f00;
|
||||
z-index: 10;
|
||||
overflow-y: scroll;
|
||||
border-bottom: 6px #ccc solid;
|
||||
border-top: 6px #ccc solid;
|
||||
border-right: 3px #ccc solid;
|
||||
border-left: 3px #ccc solid;
|
||||
padding: 5px;
|
||||
}
|
||||
.device-status-window {
|
||||
width: 400px;
|
||||
height: 35px;
|
||||
position: fixed;
|
||||
top: 50px;
|
||||
right: 10px;
|
||||
z-index: 10;
|
||||
display: flex;
|
||||
border: 2px #FBFCFB solid;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.device-status-button {
|
||||
border-top: 2px #808080 solid;
|
||||
border-left: 2px #808080 solid;
|
||||
border-right: 2px #FDFBF9 solid;
|
||||
border-bottom: 2px #FDFBF9 solid;
|
||||
width: 79px;
|
||||
height: 30px;
|
||||
text-align: center;
|
||||
line-height: 30px;
|
||||
}
|
||||
.warning-window {
|
||||
width: 400px;
|
||||
height: 100px;
|
||||
position: fixed;
|
||||
right: 10px;
|
||||
top: 90px;
|
||||
background: #808080;
|
||||
z-index: 10;
|
||||
overflow-y: scroll;
|
||||
border-bottom: 6px #ccc solid;
|
||||
border-top: 6px #ccc solid;
|
||||
border-right: 3px #ccc solid;
|
||||
border-left: 3px #ccc solid;
|
||||
padding: 5px;
|
||||
}
|
||||
</style>
|
685
src/jmapNew/theme/datie_02/menus/menuBar.vue
Normal file
685
src/jmapNew/theme/datie_02/menus/menuBar.vue
Normal file
@ -0,0 +1,685 @@
|
||||
<template>
|
||||
<div id="menuBarChengdu3">
|
||||
<menu-bar ref="menuBar" :menu-normal="menuNormal" style="width:100%" />
|
||||
<station-control-convert ref="stationControlConvert" />
|
||||
<password-box ref="passwordBox" @setLoginResult="getLoginResult" />
|
||||
<view-name ref="viewName" />
|
||||
<train-add ref="trainAdd" />
|
||||
<train-transtalet ref="trainTranstalet" />
|
||||
<train-delete ref="trainDelete" />
|
||||
<manage-user ref="manageUser" />
|
||||
<help-about ref="helpAbout" />
|
||||
<set-limit-speed ref="setLimitSpeed" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import MenuBar from '@/jmapNew/theme/components/menus/menuBar';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import StationControlConvert from './menuDialog/stationControlConvert';
|
||||
import TrainAdd from './menuDialog/trainAdd';
|
||||
import TrainTranstalet from './menuDialog/trainTranstalet';
|
||||
import TrainDelete from './menuDialog/trainDelete';
|
||||
import PasswordBox from './menuDialog/passwordBox';
|
||||
import ViewName from './menuDialog/viewName';
|
||||
import ManageUser from './menuDialog/manageUser';
|
||||
import HelpAbout from './menuDialog/helpAbout';
|
||||
import SetLimitSpeed from './menuDialog/setLimitSpeed';
|
||||
|
||||
export default {
|
||||
name: 'MenuBarChengdu03',
|
||||
components: {
|
||||
MenuBar,
|
||||
StationControlConvert,
|
||||
PasswordBox,
|
||||
ViewName,
|
||||
TrainAdd,
|
||||
TrainTranstalet,
|
||||
TrainDelete,
|
||||
ManageUser,
|
||||
HelpAbout,
|
||||
SetLimitSpeed
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
title: '系统',
|
||||
// operate: OperationEvent.Command.mBar.system,
|
||||
operate: '',
|
||||
children: [
|
||||
{
|
||||
title: '登录',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '注销',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
title: '连接主用中心',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '连接备用中心',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
title: '退出',
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '临时限速',
|
||||
operate: OperationEvent.Command.mBar.limitSpeed,
|
||||
children: [
|
||||
{
|
||||
title: '设置临时限速',
|
||||
operate: OperationEvent.Section.setLimitSpeed,
|
||||
click: this.setLimitSpeed
|
||||
},
|
||||
{
|
||||
title: '取消临时限速',
|
||||
operate: OperationEvent.Section.cancelSpeed,
|
||||
click: this.cancleLimitSpeed
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '查看',
|
||||
// operate: OperationEvent.Command.mBar.check,
|
||||
operate: '',
|
||||
children: [
|
||||
{
|
||||
title: '运行图',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '报告分析',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
title: '视图',
|
||||
click: this.undeveloped,
|
||||
operate: '',
|
||||
children: [{
|
||||
title: '报警',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '列车运行信息',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '设备状态',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '列车详细信息',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '站台详细信息',
|
||||
click: this.undeveloped
|
||||
}]
|
||||
},
|
||||
{
|
||||
title: '终端站发车列表',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '详细设备状态',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '查找列车',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
title: '显示目的地号',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '显示轨道名',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '显示道岔名',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '显示信号机名',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '显示车次窗位置',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
title: '显示车次号',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '显示车组号',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
title: '全屏',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '放大',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '缩小',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '恢复',
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
// {
|
||||
// title: '车站定位',
|
||||
// operate: '',
|
||||
// children: [
|
||||
// ]
|
||||
// },
|
||||
{
|
||||
title: '显示',
|
||||
// operate: OperationEvent.Command.mBar.view,
|
||||
operate: '',
|
||||
hide: true,
|
||||
children: [
|
||||
{
|
||||
title: '设置列车识别号显示',
|
||||
click: this.setTrainIdDisplay,
|
||||
operate: OperationEvent.Command.view.setTrainIdDisplay
|
||||
},
|
||||
{
|
||||
title: '设置名称显示',
|
||||
click: this.setNameDisplay,
|
||||
operate: OperationEvent.Command.view.setNameDisplay
|
||||
},
|
||||
{
|
||||
title: '设置设备显示',
|
||||
click: this.setDeviceDisplay,
|
||||
operate: OperationEvent.Command.view.setDeviceDisplay
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: 'ATS终端操作',
|
||||
operate: '',
|
||||
children: [
|
||||
{
|
||||
title: '当天运行车计划',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '出入库预告',
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '计划车操作',
|
||||
operate: '',
|
||||
children: [
|
||||
{
|
||||
title: '添加计划车',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '平移计划车',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '删除计划车',
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '批处理命令',
|
||||
operate: '',
|
||||
children: [
|
||||
{
|
||||
title: '全线扣车',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '取消全线扣车',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '取消上行全线扣车',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '取消下行全线扣车',
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '信息管理',
|
||||
operate: '',
|
||||
children: [
|
||||
{
|
||||
title: '调度日志',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '调度留言提醒',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '报警设置',
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '帮助',
|
||||
operate: '',
|
||||
children: [
|
||||
{
|
||||
title: '关于ITS GPC 工作站',
|
||||
click: this.about,
|
||||
operate: OperationEvent.Command.help.about
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
title: '系统',
|
||||
operate: OperationEvent.Command.mBar.system,
|
||||
children: [
|
||||
{
|
||||
title: '登录',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '注销',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
title: '连接主用中心',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '连接备用中心',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
title: '退出',
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '临时限速',
|
||||
operate: OperationEvent.Command.mBar.limitSpeed,
|
||||
children: [
|
||||
{
|
||||
title: '设置临时限速',
|
||||
operate: OperationEvent.Section.setLimitSpeed,
|
||||
click: this.setLimitSpeed
|
||||
},
|
||||
{
|
||||
title: '取消临时限速',
|
||||
operate: OperationEvent.Section.cancelSpeed,
|
||||
click: this.cancleLimitSpeed
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '查看',
|
||||
operate: OperationEvent.Command.mBar.check,
|
||||
children: [
|
||||
{
|
||||
title: '运行图',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '报告分析',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
title: '视图',
|
||||
click: this.undeveloped,
|
||||
operate: '',
|
||||
children: [{
|
||||
title: '报警',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '列车运行信息',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '设备状态',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '列车详细信息',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '站台详细信息',
|
||||
click: this.undeveloped
|
||||
}]
|
||||
},
|
||||
{
|
||||
title: '终端站发车列表',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '详细设备状态',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '查找列车',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
title: '显示目的地号',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '显示轨道名',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '显示道岔名',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '显示信号机名',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '显示车次窗位置',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
title: '显示车次号',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '显示车组号',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
title: '全屏',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '放大',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '缩小',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '恢复',
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '车站定位',
|
||||
operate: '',
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '显示',
|
||||
operate: OperationEvent.Command.mBar.view,
|
||||
hide: true,
|
||||
children: [
|
||||
{
|
||||
title: '设置列车识别号显示',
|
||||
click: this.setTrainIdDisplay,
|
||||
operate: OperationEvent.Command.view.setTrainIdDisplay
|
||||
},
|
||||
{
|
||||
title: '设置名称显示',
|
||||
click: this.setNameDisplay,
|
||||
operate: OperationEvent.Command.view.setNameDisplay
|
||||
},
|
||||
{
|
||||
title: '设置设备显示',
|
||||
click: this.setDeviceDisplay,
|
||||
operate: OperationEvent.Command.view.setDeviceDisplay
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: 'ATS终端操作',
|
||||
operate: '',
|
||||
children: [
|
||||
{
|
||||
title: '当天运行车计划',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '出入库预告',
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '计划车操作',
|
||||
operate: '',
|
||||
children: [
|
||||
{
|
||||
title: '添加计划车',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '平移计划车',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '删除计划车',
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '批处理命令',
|
||||
operate: '',
|
||||
children: [
|
||||
{
|
||||
title: '全线扣车',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '取消全线扣车',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '取消上行全线扣车',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '取消下行全线扣车',
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '信息管理',
|
||||
operate: '',
|
||||
children: [
|
||||
{
|
||||
title: '调度日志',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '调度留言提醒',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '报警设置',
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '帮助',
|
||||
operate: '',
|
||||
children: [
|
||||
{
|
||||
title: '关于ITS GPC 工作站',
|
||||
click: this.about,
|
||||
operate: OperationEvent.Command.help.about
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.menuNormal['Center'][3].children = this.initStationList();
|
||||
},
|
||||
methods: {
|
||||
initStationList() {
|
||||
const list = [];
|
||||
this.stationList.forEach(station => {
|
||||
if (station.visible) {
|
||||
const node = {
|
||||
title: station.name,
|
||||
operate: station.code,
|
||||
show: true,
|
||||
click: this.mapLocation,
|
||||
code: station.code
|
||||
};
|
||||
|
||||
list.push(node);
|
||||
}
|
||||
});
|
||||
return list;
|
||||
},
|
||||
// 设置地图定位
|
||||
mapLocation(code) {
|
||||
if (code) {
|
||||
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: code });
|
||||
|
||||
}
|
||||
},
|
||||
// 关于
|
||||
about(order) {
|
||||
const operate = {
|
||||
operation: order.operate
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.helpAbout.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
getLoginResult(operate) {
|
||||
/** 密码校验*/
|
||||
if (operate.operation == OperationEvent.StationControl.forcedStationControl.passwordConfirm.operation) {
|
||||
if (operate.success) {
|
||||
/** 校验成功*/
|
||||
this.$refs.stationControlConvert.doShow({ operation: OperationEvent.StationControl.forcedStationControl.mbar.operation });
|
||||
}
|
||||
}
|
||||
},
|
||||
setLimitSpeed(order) {
|
||||
const operate = {
|
||||
operation: order.operate
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.setLimitSpeed.doShow(operate, true);
|
||||
}
|
||||
});
|
||||
},
|
||||
blankClickClose() {
|
||||
this.$refs.menuBar.doClose();
|
||||
},
|
||||
cancleLimitSpeed(order) {
|
||||
const operate = {
|
||||
operation: order.operate
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.setLimitSpeed.doShow(operate, false);
|
||||
}
|
||||
});
|
||||
},
|
||||
undeveloped() {
|
||||
this.$refs.menuBar.doClose();
|
||||
this.$alert('实现中......', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss">
|
||||
#menuBarChengdu3{
|
||||
line-height:30px;
|
||||
}
|
||||
#menuBarChengdu3 #menuBar .menu-li-block .label{
|
||||
padding: 0px 30px 0px 5px !important;
|
||||
}
|
||||
</style>
|
692
src/jmapNew/theme/datie_02/menus/menuButton.vue
Normal file
692
src/jmapNew/theme/datie_02/menus/menuButton.vue
Normal file
@ -0,0 +1,692 @@
|
||||
<template>
|
||||
<div v-if="isShowBtn" id="menuButtons_box" class="menu menuButton" style="height: 35px;" :style="{left: point.x+'px', bottom: point.y+'px' }">
|
||||
<button :id="Station.guideLock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor: guideLockRightFlag? guideColorDown: guideColorUp}" @click="guideLockRightButtonDown()">
|
||||
<span style="color: #800000">
|
||||
<center><b>X引导总锁</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Station.guideLock.button.domId" style="cursor: not-allowed;" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Station.guideLock.button.operation, ['GuideLock'])">
|
||||
<!--<span style="color: #800000">-->
|
||||
<span style="color: #808080">
|
||||
<center><b>坡道解锁</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="MixinCommand.totalCancel.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(MixinCommand.totalCancel.button.operation, ['Signal','SignalButton'])">
|
||||
<span style="color: black">
|
||||
<center><b>总取消</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Signal.humanTrainRoute.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.humanTrainRoute.button.operation, ['Signal','SignalButton'])">
|
||||
<span style="color: #800000">
|
||||
<center><b>总人解</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Section.fault.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Section.fault.button.operation, ['Section'])">
|
||||
<span style="color: #800000">
|
||||
<center><b>区故解</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Switch.locate.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Switch.locate.button.operation, ['Switch'])">
|
||||
<span style="color: black">
|
||||
<center><b>总定位</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Switch.reverse.button.domId" class="button_box" :style="{width: width+'px',backgroundColor:buttonUpColor}" @click="buttonDown(Switch.reverse.button.operation, ['Switch'])">
|
||||
<span style="color: black">
|
||||
<center><b>总反位</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Command.cancel.clearMbm.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Command.cancel.clearMbm.operation)">
|
||||
<span style="color: black">
|
||||
<center><b>清除</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Switch.lock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Switch.lock.button.operation, ['Switch'])">
|
||||
<span style="color: black">
|
||||
<center><b>单锁</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Switch.unlock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Switch.unlock.button.operation, ['Switch'])">
|
||||
<span style="color: black">
|
||||
<center><b>单解</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Signal.lock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.lock.button.operation, ['Signal', 'SignalButton'])">
|
||||
<span style="color: black">
|
||||
<center><b>按钮封锁</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Signal.unlock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.unlock.button.operation, ['Signal', 'SignalButton'])">
|
||||
<span style="color: black">
|
||||
<center><b>按钮解封</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Switch.block.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Switch.block.button.operation, ['Switch'])">
|
||||
<span style="color: black">
|
||||
<center><b>道岔封锁</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Switch.unblock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Switch.unblock.button.operation, ['Switch'])">
|
||||
<span style="color: black">
|
||||
<center><b>道岔解封</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Signal.signalLight.menuButton.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.signalLight.menuButton.operation, ['Signal'])">
|
||||
<span style="color: black">
|
||||
<center><b>点灯</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Signal.signalDestroy.menuButton.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.signalDestroy.menuButton.operation, ['Signal'])">
|
||||
<span style="color:#800000">
|
||||
<center><b>灭灯</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Station.guideLock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor: guideLockLeftFlag? guideColorDown: guideColorUp}" @click="guideLockLeftButtonDown()">
|
||||
<span style="color: #800000">
|
||||
<center><b>S引导总锁</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Command.cancel.clearMbm.domId" :disabled="true" class="button_box" style="cursor: not-allowed;" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Command.cancel.clearMbm.operation)">
|
||||
<!--<span style="color: #800000">-->
|
||||
<span style="color: #808080">
|
||||
<center><b>上电解锁</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :disabled="true" style="cursor: not-allowed;" class="button_box" :style="{width: width+'px',backgroundColor:buttonUpColor}" @click="buttonDown()">
|
||||
<!--<span style="color: black">-->
|
||||
<span style="color: #808080">
|
||||
<center><b>辅助菜单</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :disabled="true" style="cursor: not-allowed;" class="button_box" :style="{width: width+'px',backgroundColor:buttonUpColor}" @click="buttonDown()">
|
||||
<!--<span style="color: #800000">-->
|
||||
<span style="color: #808080">
|
||||
<center><b>分路不良</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :disabled="true" style="cursor: not-allowed;" class="button_box" :style="{width: width+'px',backgroundColor:buttonUpColor}" @click="buttonDown()">
|
||||
<!--<span style="color: black">-->
|
||||
<span style="color: #808080">
|
||||
<center><b>标记窗</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button class="button_box" :style="{width: width + 'px', backgroundColor:buttonUpColor}" @click="buttonDown()">
|
||||
<span style="color: #800000">
|
||||
<center><b>故障通知</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<password-box ref="password" @checkOver="passWordCommit" @checkCancel="clearOperate" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import Handler from '@/scripts/cmdPlugin/Handler';
|
||||
import PasswordBox from './dialog/childDialog/passwordInputBox.vue';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { mapGetters } from 'vuex';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { MouseEvent } from '@/scripts/ConstDic';
|
||||
// import { OperateMode } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'MapButtonMenu',
|
||||
components: {
|
||||
PasswordBox,
|
||||
NoticeInfo
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
point: {
|
||||
x: 0,
|
||||
y: 30
|
||||
},
|
||||
operation: '0',
|
||||
buttonName: '',
|
||||
guideColorDown: '#FEEE1A',
|
||||
guideColorUp: '#DCDCDC',
|
||||
buttonDownColor: '#FEEE1A',
|
||||
buttonUpColor: '#DCDCDC',
|
||||
width: 78,
|
||||
tempData: null,
|
||||
offset: {},
|
||||
commandTypeList: [],
|
||||
cmdTypeList: [],
|
||||
deviceList: [],
|
||||
timeNode: 0, // 按钮 15秒 计时
|
||||
deviceTimeNode: 0, // 信号按钮设备15秒 计时
|
||||
routeDataMap: null, // btnCodeList 为key
|
||||
routeButtonCodeList: [], // btnCodeList 拼接code list
|
||||
guideLockRightFlag: false,
|
||||
guideLockLeftFlag: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('map', [
|
||||
'routeList',
|
||||
'routeData',
|
||||
'signalList',
|
||||
'autoReentryList',
|
||||
'autoReentryData'
|
||||
]),
|
||||
Switch() {
|
||||
return OperationEvent.Switch;
|
||||
},
|
||||
Section() {
|
||||
return OperationEvent.Section;
|
||||
},
|
||||
Station() {
|
||||
return OperationEvent.Station;
|
||||
},
|
||||
Signal() {
|
||||
return OperationEvent.Signal;
|
||||
},
|
||||
MixinCommand() {
|
||||
return OperationEvent.MixinCommand;
|
||||
},
|
||||
Command() {
|
||||
return OperationEvent.Command;
|
||||
},
|
||||
isShowBtn() {
|
||||
return this.$store.state.training.prdType == '01';
|
||||
},
|
||||
CMD() {
|
||||
return CMD;
|
||||
},
|
||||
cmdType() {
|
||||
switch (this.operation) {
|
||||
case this.Switch.lock.button.operation: // 道岔单锁
|
||||
return CMD.Switch.CMD_SWITCH_SINGLE_LOCK;
|
||||
case this.Switch.unlock.button.operation: // 道岔解锁
|
||||
return CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK;
|
||||
case this.Switch.locate.button.operation: // 道岔定位
|
||||
return CMD.Switch.CMD_SWITCH_NORMAL_POSITION;
|
||||
case this.Switch.reverse.button.operation: // 道岔反位
|
||||
return CMD.Switch.CMD_SWITCH_REVERSE_POSITION;
|
||||
case this.Switch.block.button.operation: // 道岔封锁
|
||||
return CMD.Switch.CMD_SWITCH_BLOCK;
|
||||
case this.Switch.unblock.button.operation:
|
||||
return CMD.Switch.CMD_SWITCH_UNBLOCK;
|
||||
case this.Section.fault.button.operation: // 区故解
|
||||
return CMD.Section.CMD_SECTION_FAULT_UNLOCK;
|
||||
case this.Signal.humanTrainRoute.button.operation: // 总人解 (取消引导进路)
|
||||
return CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE;
|
||||
case this.Signal.arrangementRoute.button.operation: // 排列进路
|
||||
return CMD.Signal.CMD_SIGNAL_SET_ROUTE;
|
||||
case this.Signal.guide.button.operation: // 办理引导
|
||||
return CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.buttonOperation': function (val, old) {
|
||||
this.updateButtonShow(val, old);
|
||||
},
|
||||
'$store.state.menuOperation.selectedCount': function (val) {
|
||||
this.selectedChange();
|
||||
},
|
||||
'$store.state.map.clearButtonCount': function(val) {
|
||||
this.commandTypeList = [];
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
this.clearOperate();
|
||||
this.guideLockRightFlag = false;
|
||||
this.guideLockLeftFlag = false;
|
||||
},
|
||||
'$store.state.socket.simulationTimeSync': function (val) {
|
||||
if (this.timeNode && val - this.timeNode >= 15) {
|
||||
this.clearOperate();
|
||||
}
|
||||
if (this.deviceTimeNode && val - this.deviceTimeNode >= 15) {
|
||||
if (this.deviceList && this.deviceList.length && this.deviceList[0]._type === 'SignalButton') {
|
||||
this.$store.dispatch('training/updateMapState', [{code: this.deviceList[0].code, _type: 'SignalButton', hasSelected: 0}]);
|
||||
} else if (this.deviceList && this.deviceList.length && this.deviceList[0]._type === 'Signal' && this.deviceList[0].type === 'SHUNTING') {
|
||||
this.$store.dispatch('training/updateMapState', [{code: this.deviceList[0].code, _type: 'Signal', hasSelected: 0}]);
|
||||
}
|
||||
this.deviceList = [];
|
||||
}
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.routeDataMap = null;
|
||||
this.routeButtonCodeList = [];
|
||||
},
|
||||
methods: {
|
||||
// 输入密码正确回调
|
||||
passWordCommit(data) {
|
||||
let operate = {};
|
||||
if (data.nextCmdType) {
|
||||
operate = {
|
||||
over: true,
|
||||
operation: data.operation,
|
||||
cmdType: data.nextCmdType,
|
||||
param: data.param
|
||||
};
|
||||
} else {
|
||||
operate = {
|
||||
operationPre: data.operation,
|
||||
operation: data.operateNext
|
||||
};
|
||||
}
|
||||
this.trainingOperation(operate);
|
||||
},
|
||||
// 执行操作
|
||||
trainingOperation(operate) {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
/* 引导总锁输入面后 处理按钮选中状态 */
|
||||
if (operate.operationPre === this.Switch.guideLock.leftButton.operation || operate.operation === this.Switch.guideLock.leftButton.operation) {
|
||||
this.guideLockLeftFlag = !this.guideLockLeftFlag;
|
||||
} else if (operate.operationPre === this.Switch.guideLock.rightButton.operation || operate.operation === this.Switch.guideLock.rightButton.operation) {
|
||||
this.guideLockRightFlag = !this.guideLockRightFlag;
|
||||
}
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
updateButtonShow(val, old) {
|
||||
if (old) {
|
||||
// 恢复旧按钮显示
|
||||
const domId = OperationHandler.getDomIdByOperation(old);
|
||||
const dom = document.getElementById(domId);
|
||||
if (dom) {
|
||||
dom.disabled = false;
|
||||
dom.style.backgroundColor = this.buttonUpColor;
|
||||
}
|
||||
}
|
||||
if (val) {
|
||||
// 新按钮按下效果
|
||||
const domId = OperationHandler.getDomIdByOperation(val);
|
||||
const dom = document.getElementById(domId);
|
||||
if (dom) {
|
||||
dom.disabled = true;
|
||||
dom.style.backgroundColor = this.buttonDownColor;
|
||||
}
|
||||
}
|
||||
},
|
||||
// S引导总锁按钮点击
|
||||
guideLockLeftButtonDown() {
|
||||
const operate = {
|
||||
operation: this.Switch.guideLock.leftButton.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
// 引导总锁弹出 调用取消引导总锁指令
|
||||
if (this.guideLockRightFlag) {
|
||||
operate.nextCmdType = CMD.Switch.CMD_SWITCH_MASTER_UNBLOCK;
|
||||
operate.param = {right: false};
|
||||
}
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
operate['operateNext'] = this.Command.close.password.operation;
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// X引导总锁按钮点击
|
||||
guideLockRightButtonDown() {
|
||||
const operate = {
|
||||
operation: this.Switch.guideLock.rightButton.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
// 引导总锁弹出 调用取消引导总锁指令
|
||||
if (this.guideLockRightFlag) {
|
||||
operate.nextCmdType = CMD.Switch.CMD_SWITCH_MASTER_UNBLOCK;
|
||||
operate.param = {right: true};
|
||||
}
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
operate['operateNext'] = this.Command.close.password.operation;
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
buttonDown(operation, commandTypeList) {
|
||||
this.clearOperate();
|
||||
if (operation != this.Command.cancel.clearMbm.operation) {
|
||||
const operate = {
|
||||
operation: operation
|
||||
};
|
||||
// 以下 会弹出密码框 (总人解,区故解) 铅封按钮
|
||||
const operationList = [this.Signal.humanTrainRoute.button.operation, this.Section.fault.button.operation];
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.operation = operation;
|
||||
this.commandTypeList = commandTypeList;
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', operation); // 按钮菜单是否被按下
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// 判断是否需要 弹窗密码框
|
||||
if (operationList.includes(operation)) {
|
||||
operate['operateNext'] = this.Command.close.password.operation;
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
this.timeNode = this.$store.state.socket.simulationTimeSync;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// 清除按钮
|
||||
const operate = {
|
||||
start: true,
|
||||
operation: operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.commandTypeList = [];
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
// 解析进路数据
|
||||
handleRouteDataMap() {
|
||||
this.routeDataMap = {};
|
||||
this.routeButtonCodeList = [];
|
||||
this.routeList.forEach(item => {
|
||||
const name = item.btnCodeList.join('-');
|
||||
this.routeDataMap[name] = item;
|
||||
this.routeButtonCodeList.push(name);
|
||||
});
|
||||
},
|
||||
// 校验已点击的信号按钮code 是否有符合条件的进路
|
||||
checkHaveRoute(deviceList) {
|
||||
let name = '';
|
||||
deviceList.forEach((device, index) =>{
|
||||
name = name + (index ? '-' : '') + device.code;
|
||||
});
|
||||
return this.routeButtonCodeList.some(item => item.includes(name));
|
||||
},
|
||||
// 排列进路 OR 信号重开操作
|
||||
arrangementRouteOperation(deviceList) {
|
||||
const operate = {
|
||||
operation: this.Signal.arrangementRoute.button.operation
|
||||
};
|
||||
if (!this.routeDataMap) { this.handleRouteDataMap(); }
|
||||
|
||||
if (!this.checkHaveRoute(deviceList)) { // 无效的进路按钮选择 清除deviceList
|
||||
this.$message.error('无效的进路按钮');
|
||||
this.clearOperate();
|
||||
return;
|
||||
}
|
||||
this.deviceTimeNode = this.$store.state.socket.simulationTimeSync;
|
||||
const signal = this.$store.getters['map/getDeviceByCode'](deviceList[0].signalCode || deviceList[0].code);// deviceList[0] 为 SignalButton || Signal
|
||||
if (deviceList.length === 1 && !signal.routeLock) { // 排列进路 处理始端信号机状态
|
||||
operate.code = deviceList[0].code;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
// 仅信号按钮调车信号机有状态
|
||||
if (deviceList[0]._type === 'SignalButton' || (deviceList[0]._type === 'Signal' && deviceList[0].type === 'SHUNTING')) {
|
||||
this.$store.dispatch('training/updateMapState', [{code: deviceList[0].code, _type: deviceList[0]._type, hasSelected: 1}]);
|
||||
}
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else if (deviceList.length === 1 && signal.routeLock) { // 信号重开
|
||||
operate.operation = this.Signal.reopenSignal.button.operation;
|
||||
operate.over = true;
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL;
|
||||
operate.code = signal.code;
|
||||
operate.param = {signalId: signal.code};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {
|
||||
this.clearOperate();
|
||||
}).catch(() => this.$refs.noticeInfo.doShow() );
|
||||
} else if (deviceList.length > 1) {
|
||||
let key = '';
|
||||
deviceList.forEach((item, index) => {
|
||||
key = key + (index ? '-' : '') + item.code;
|
||||
});
|
||||
const route = this.routeDataMap[key];
|
||||
if (route) {
|
||||
operate.over = true;
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_ROUTE;
|
||||
operate.code = deviceList[deviceList.length - 1].code;
|
||||
operate.param = {routeId: route.code};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
this.deviceTimeNode = 0;
|
||||
}).catch(() => {
|
||||
this.deviceTimeNode = 0;
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}).finally(() => { this.clearOperate(); });
|
||||
}
|
||||
}
|
||||
},
|
||||
// 总取消
|
||||
handelTotalCancel(model) {
|
||||
const operate = {
|
||||
over: true,
|
||||
code: model.code,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE,
|
||||
param: {
|
||||
signalId: model._type === 'Signal' ? model.code : model.signalCode
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
this.clearOperate();
|
||||
}).catch((error) => {
|
||||
this.clearOperate();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 引导信号
|
||||
handleGuideSignal(model) {
|
||||
const operate = {
|
||||
over: true,
|
||||
code: model.code,
|
||||
operation: this.Signal.guide.button.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
|
||||
param: {signalId: model.signalCode}
|
||||
};
|
||||
const signal = this.$store.getters['map/getDeviceByCode'](model.signalCode);
|
||||
// 信号机引导时间15s以内再次点击引导不需要进行密码输入
|
||||
if (signal.guideTime) {
|
||||
this.sendCommand(operate);
|
||||
} else {
|
||||
operate.nextCmdType = CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE;
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
},
|
||||
// 人解进路
|
||||
handleTotalHumanSolution(model) {
|
||||
const operate = {
|
||||
over: true,
|
||||
code: model.code,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
val: model.code,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE
|
||||
};
|
||||
const signal = this.$store.getters['map/getDeviceByCode'](model.signalCode || model.code);
|
||||
if (model._type === 'SignalButton' && model.type === 'PICK' && signal.routeLock) {
|
||||
operate.param = {signalId: model.signalCode};
|
||||
this.sendCommand(operate);
|
||||
} else if (model._type === 'Signal' && model.type === 'SHUNTING' && signal.routeLock) {
|
||||
operate.param = {signalId: model.code};
|
||||
this.sendCommand(operate);
|
||||
}
|
||||
},
|
||||
handelSwitchOperate(model) {
|
||||
const operate = {
|
||||
over: true,
|
||||
code: model.code,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
cmdType: this.cmdType,
|
||||
param: { id: model.code}
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
// 发送指令
|
||||
sendCommand(operate) {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}).finally(() =>{ this.clearOperate(); });
|
||||
},
|
||||
// 校验是否有列车(接车)按钮
|
||||
checkHasTrainButton(model) {
|
||||
if (model.signalButtonList && model.signalButtonList.length > 0) {
|
||||
let flag = false;
|
||||
model.signalButtonList.forEach(item => {
|
||||
const signalButton = this.$store.getters['map/getDeviceByCode'](item);
|
||||
flag = flag || signalButton.type === 'PICK';
|
||||
});
|
||||
return flag;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
handelSignalBlockOrUnblock(model) {
|
||||
const buttonOperation = this.$store.state.menuOperation.buttonOperation;
|
||||
const operate = {
|
||||
over: true,
|
||||
code: model.code,
|
||||
operation: buttonOperation,
|
||||
cmdType: '',
|
||||
param: {}
|
||||
};
|
||||
if (model._type === 'Signal' && !this.checkHasTrainButton(model)) {
|
||||
if (buttonOperation === this.Signal.lock.button.operation) {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_BLOCK;
|
||||
operate.param = {signalId: model.code};
|
||||
} else if (buttonOperation === this.Signal.unlock.button.operation) {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_UNBLOCK;
|
||||
operate.param = {signalId: model.code};
|
||||
}
|
||||
} else if (model._type === 'SignalButton' && model.type === 'PICK') {
|
||||
if (buttonOperation === this.Signal.lock.button.operation) {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_BLOCK;
|
||||
operate.param = {signalId: model.signalCode};
|
||||
} else if (buttonOperation === this.Signal.unlock.button.operation) {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_UNBLOCK;
|
||||
operate.param = {signalId: model.signalCode};
|
||||
}
|
||||
}
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
handleGuideLock(model) {
|
||||
const signal = this.$store.getters['map/getDeviceByCode'](model.signalCode);
|
||||
if (signal && (this.guideLockRightFlag && signal.right) || (this.guideLockLeftFlag && !signal.right)) {
|
||||
const operate = {
|
||||
over: true,
|
||||
code: model.code,
|
||||
operation: this.guideLockRightFlag ? this.Switch.guideLock.rightButton : this.Switch.guideLock.leftButton,
|
||||
nextCmdType: CMD.Switch.CMD_SWITCH_MASTER_LOCK,
|
||||
param: {signalId: model.signalCode}
|
||||
};
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
},
|
||||
handelFaultSection(model) {
|
||||
if (model._type === 'Section') {
|
||||
const operate = {
|
||||
over: true,
|
||||
code: model.code,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK,
|
||||
param: {id: model.code}
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
}
|
||||
},
|
||||
selectedChange() {
|
||||
// 按钮按下时
|
||||
const model = this.selected; // 选择设备
|
||||
if (this.$store.state.training.prdType != '01' || this.selected._event !== MouseEvent.Left || (!model._type && !model._code)) {
|
||||
return;
|
||||
}
|
||||
const buttonOperation = this.$store.state.menuOperation.buttonOperation;
|
||||
const switchOperation = [
|
||||
this.Switch.lock.button.operation,
|
||||
this.Switch.unlock.button.operation,
|
||||
this.Switch.locate.button.operation,
|
||||
this.Switch.reverse.button.operation,
|
||||
this.Switch.block.button.operation,
|
||||
this.Switch.unblock.button.operation
|
||||
];
|
||||
if ((this.guideLockLeftFlag || this.guideLockRightFlag) && model._type === 'SignalButton' && model.type === 'GUIDE') {
|
||||
this.handleGuideLock(model);
|
||||
} else if (buttonOperation && this.commandTypeList.includes(model._type)) {
|
||||
if (buttonOperation === this.MixinCommand.totalCancel.button.operation) {
|
||||
this.handelTotalCancel(model);
|
||||
} else if (buttonOperation === this.Signal.humanTrainRoute.button.operation) {
|
||||
this.handleTotalHumanSolution(model);
|
||||
} else if (switchOperation.includes(buttonOperation)) {
|
||||
this.handelSwitchOperate(model);
|
||||
} else if (buttonOperation === this.Signal.lock.button.operation || buttonOperation === this.Signal.unlock.button.operation) {
|
||||
this.handelSignalBlockOrUnblock(model);
|
||||
} else if (buttonOperation === this.Section.fault.button.operation) {
|
||||
this.handelFaultSection(model);
|
||||
} else {
|
||||
this.clearOperate();
|
||||
}
|
||||
} else if (!buttonOperation) {
|
||||
if (model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode) && model.type === 'GUIDE' ) {
|
||||
this.handleGuideSignal(model);
|
||||
} else if (model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode) || (model._type === 'Signal' && !model.blockade)) {
|
||||
this.deviceList.push(model);
|
||||
this.arrangementRouteOperation(this.deviceList);
|
||||
} else {
|
||||
this.clearOperate();
|
||||
}
|
||||
} else { this.clearOperate(); }
|
||||
if (this.timeNode) { this.timeNode = 0; }
|
||||
},
|
||||
checkSignalBlock(code) { // 校验信号是否锁闭
|
||||
if (code) {
|
||||
const signal = this.$store.getters['map/getDeviceByCode'](code);
|
||||
return signal && signal.blockade;
|
||||
} else { return false; }
|
||||
},
|
||||
clearOperate() { // 清除操作
|
||||
this.deviceList && this.deviceList.length && this.$store.dispatch('training/updateMapState', [{code: this.deviceList[0].code, _type: this.deviceList[0]._type, hasSelected: 0}]);
|
||||
this.deviceList = [];
|
||||
Handler.clear(); // 清空操作组
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
$bg: #fff;
|
||||
$hoverBg: #FEEE1A;
|
||||
.button_box{
|
||||
display: block;
|
||||
float: left;
|
||||
font-size: 13px;
|
||||
height: 35px;
|
||||
}
|
||||
.menu {
|
||||
background-color: $bg;
|
||||
position: fixed;
|
||||
border: 1px solid gray;
|
||||
z-index: 10;
|
||||
display: block;
|
||||
|
||||
.dsp-block {
|
||||
display: block;
|
||||
text-align: center;
|
||||
border-radius: unset;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.dsp-block:hover {
|
||||
background-color: $hoverBg;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,133 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm two-confirmation"
|
||||
title="二次确认"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:show-close="false"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<template v-for="(message, index) in messages">
|
||||
<span :key="index">{{ message }}</span>
|
||||
</template>
|
||||
</div>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="10" :offset="3">
|
||||
<el-button :id="show? domIdConfirm: ''" :loading="loading" @click="commit">确认</el-button>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">关闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'TwoConfirmation',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: '',
|
||||
timer: null,
|
||||
domIdConfirm: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
},
|
||||
messages() {
|
||||
if (this.operate) {
|
||||
return this.operate.messages;
|
||||
}
|
||||
return [];
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.domIdConfirm = '';
|
||||
if (OperationHandler.checkOperationIsCurrentOperate(operate.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||
this.domIdConfirm = OperationEvent.StationControl.forcedStationControl.confirm.domId;
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(operate.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||
this.domIdConfirm = OperationEvent.StationControl.requestStationControl.confirm.domId;
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||
this.domIdConfirm = OperationEvent.StationControl.requestCentralControl.confirm.domId;
|
||||
}
|
||||
|
||||
this.operate = operate || {};
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation
|
||||
};
|
||||
|
||||
this.$emit('setOperate', { selection: this.operate.selection, cancel: true });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
if (this.operate && this.operate.selection) {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: this.operate.type,
|
||||
val: this.operate.val,
|
||||
selection: this.operate.selection
|
||||
};
|
||||
|
||||
if (OperationHandler.checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||
operate.operation = OperationEvent.StationControl.forcedStationControl.confirm.operation;
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||
operate.operation = OperationEvent.StationControl.requestStationControl.confirm.operation;
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||
operate.operation = OperationEvent.StationControl.requestCentralControl.confirm.operation;
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.doClose();
|
||||
this.$emit('setOperate', { selection: this.operate.selection, commit: true });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
this.loading = false;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}, 1000).catch(() => {
|
||||
this.loading = true;
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,157 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm user-add" :title="title" :visible.sync="show" width="420px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<div style="padding: 15px 40px; border: 1px double lightgray; margin: 20px 10px; ">
|
||||
<el-form size="small" label-width="90px" :model="model" label-position="left" :rules="rules" ref="form">
|
||||
<el-form-item label="工号:" prop="jobNumber">
|
||||
<el-input v-model="model.jobNumber"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户名:" prop="userName">
|
||||
<el-input v-model="model.userName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="密码:" prop="password">
|
||||
<el-input type="password" v-model="model.password"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="确认密码:" prop="confirm">
|
||||
<el-input type="password" v-model="model.confirm"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="8" :offset="6">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="0">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'UserAdd',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
operate: {},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
model: {
|
||||
type: 'ADD',
|
||||
jobNumber: '',
|
||||
userName: '',
|
||||
password: '',
|
||||
confirm: '',
|
||||
},
|
||||
rules: {
|
||||
jobNumber: [
|
||||
{ required: true, message: '请输入工号', trigger: 'blur' }
|
||||
],
|
||||
userName: [
|
||||
{ required: true, message: '请输入用户名', trigger: 'blur' }
|
||||
],
|
||||
password: [
|
||||
{ required: true, message: '请输入密码', trigger: 'change' }
|
||||
],
|
||||
confirm: [
|
||||
{ required: true, message: '请再次输入密码', trigger: 'change' }
|
||||
],
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '增加用户'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
//非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.form.resetFields();
|
||||
});
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
if (this.model.password === this.model.confirm) {
|
||||
this.doClose();
|
||||
this.$emit('operateUser', this.model);
|
||||
} else {
|
||||
this.$messageBox('二次输入密码不一致');
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); this.model });
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -10px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,129 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm user-delete" :title="title" :visible.sync="show" width="260px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<div style="padding-left: 10px; padding-bottom: 10px">
|
||||
<i class="el-icon-info"></i>
|
||||
<template v-for="message in messages">
|
||||
<span>{{message}}</span>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="8" :offset="3">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'UserDelete',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
operate: {},
|
||||
messages: [],
|
||||
model: {
|
||||
type: 'DELETE',
|
||||
jobNumber: '',
|
||||
userName: '',
|
||||
},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '删除用户'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
//非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
this.messages = operate.messages;
|
||||
this.model.userName = '';
|
||||
this.model.jobNumber = '';
|
||||
if (selected) {
|
||||
this.model.userName = selected.userName;
|
||||
this.model.jobNumber = selected.jobNumber;
|
||||
}
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
if (this.model.userName && this.model.jobNumber) {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$emit('operateUser', this.model);
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$messageBox('选择的用户名或工号为空');
|
||||
}
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -10px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,173 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm user-edit" :title="title" :visible.sync="show" width="420px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<div style="padding: 15px 40px; border: 1px double lightgray; margin: 20px 10px; ">
|
||||
<el-form size="small" label-width="90px" :model="model" label-position="left" :rules="rules" ref="form">
|
||||
<el-form-item label="工号:" prop="jobNumber">
|
||||
<el-input v-model="model.jobNumber" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户名:" prop="userName">
|
||||
<el-input v-model="model.userName" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="原始密码:" prop="oldPassword">
|
||||
<el-input type="oldPassword" v-model="model.oldPassword"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="密码:" prop="password">
|
||||
<el-input type="password" v-model="model.password"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="确认密码:" prop="confirm">
|
||||
<el-input type="password" v-model="model.confirm"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="8" :offset="6">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="0">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'UserEdit',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
operate: {},
|
||||
selected: {},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
model: {
|
||||
type: 'EDIT',
|
||||
jobNumber: '',
|
||||
userName: '',
|
||||
oldPassword: '',
|
||||
password: '',
|
||||
confirm: '',
|
||||
},
|
||||
rules: {
|
||||
jobNumber: [
|
||||
{ required: true, message: '请输入工号', trigger: 'blur' }
|
||||
],
|
||||
userName: [
|
||||
{ required: true, message: '请输入用户名', trigger: 'blur' }
|
||||
],
|
||||
oldPassword: [
|
||||
{ required: true, message: '请输入原始密码', trigger: 'change' }
|
||||
],
|
||||
password: [
|
||||
{ required: true, message: '请输入新密码', trigger: 'change' }
|
||||
],
|
||||
confirm: [
|
||||
{ required: true, message: '请再次输入新密码', trigger: 'change' }
|
||||
],
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '用户编辑页面'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
//非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.form.resetFields();
|
||||
this.selected = selected;
|
||||
if (selected) {
|
||||
this.model.jobNumber = selected.jobNumber;
|
||||
this.model.userName = selected.userName;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid)
|
||||
if (this.selected.password !== this.model.oldPassword) {
|
||||
this.$messageBox('原始密码错误');
|
||||
} else if (this.model.password !== this.model.confirm) {
|
||||
this.$messageBox('二次输入的密码错误');
|
||||
} else if (this.model.oldPassword === this.model.password) {
|
||||
this.$messageBox('老密码和新密相同');
|
||||
} else {
|
||||
this.doClose();
|
||||
this.$emit('operateUser', this.model);
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -10px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
126
src/jmapNew/theme/datie_02/menus/menuDialog/helpAbout.vue
Normal file
126
src/jmapNew/theme/datie_02/menus/menuDialog/helpAbout.vue
Normal file
@ -0,0 +1,126 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm manage-user" :title="title" :visible.sync="show" width="600px" :before-close="doClose"
|
||||
:zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<div style="height: 70px;">
|
||||
<div style="position: relative; left: 10px;">
|
||||
</div>
|
||||
<div style="position: relative; left: 80px;">
|
||||
<div style="width:100%">
|
||||
<span style="padding-left: 60px">ControlMonitor 1.3.5.0</span>
|
||||
<el-button style="position: absolute; right: 95px;" :id="domIdConfirm" type="primary"
|
||||
:loading="loading" @click="commit">确定</el-button>
|
||||
</div>
|
||||
<div style="width:100%; padding-top: 20px">
|
||||
<span> 版权所有(C)2010-2011 北京玖琏科技有限公司</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 10px; margin: 5px; ">
|
||||
<el-table :data="tableData" style="width: 100%;" height="400">
|
||||
<el-table-column prop="moduleName" label="模块名称" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="version" label="版本" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="updateDate" label="修改日期">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'ManageUser',
|
||||
data() {
|
||||
return {
|
||||
tableData: [
|
||||
{
|
||||
moduleName: '主程序版本:',
|
||||
version: '123',
|
||||
updateDate: '123'
|
||||
}
|
||||
],
|
||||
operate: {},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '关于ControlMonitor'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
//非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.menu.operation,
|
||||
}
|
||||
|
||||
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();
|
||||
})
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -10px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
138
src/jmapNew/theme/datie_02/menus/menuDialog/limitSpeed.vue
Normal file
138
src/jmapNew/theme/datie_02/menus/menuDialog/limitSpeed.vue
Normal file
@ -0,0 +1,138 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<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>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'TrainAdd',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
addModel: {
|
||||
|
||||
},
|
||||
|
||||
rules: {
|
||||
// groupNumber: [
|
||||
// { required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
// ],
|
||||
// stationStandCode: [
|
||||
// { required: true, message: '请选择终端', trigger: 'change' }
|
||||
// ],
|
||||
},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.planTrain.addPlanTrain.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '设置限速';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Command.planTrain.addPlanTrain.operation
|
||||
};
|
||||
|
||||
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();
|
||||
console.error(error);
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
285
src/jmapNew/theme/datie_02/menus/menuDialog/manageUser.vue
Normal file
285
src/jmapNew/theme/datie_02/menus/menuDialog/manageUser.vue
Normal file
@ -0,0 +1,285 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm manage-user" :title="title" :visible.sync="show" width="420px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<div style="padding: 5px 5px; border: 1px double lightgray; margin: 20px 0px; ">
|
||||
<span class="base-label">用户列表</span>
|
||||
<el-row>
|
||||
<el-col :span="18">
|
||||
<el-table ref="multipleTable" :data="tableData" border row-key="code" style="width: 100%"
|
||||
height="450" center size="mini" highlight-current-row @row-click="chooseUser">
|
||||
<el-table-column prop="jobNumber" label="工号" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.jobNumber}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="userName" label="用户名">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.userName}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="20">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button style="margin-top: 140px; margin-left: 10px;" :id="domIdFreshUser" @click="freshUser">刷新
|
||||
</el-button>
|
||||
<el-button style="margin-top: 30px; margin-left: 10px;" :id="domIdAddUser" @click="addUser">增加
|
||||
</el-button>
|
||||
<el-button style="margin-top: 30px; margin-left: 10px;" :id="domIdEditUser" @click="editUser">修改
|
||||
</el-button>
|
||||
<el-button style="margin-top: 30px; margin-left: 10px;" :id="domIdDelUser" @click="delUser">删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="8" :offset="6">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="0">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<user-add ref="userAdd" @operateUser="operateUser"></user-add>
|
||||
<user-edit ref="userEdit" @operateUser="operateUser"></user-edit>
|
||||
<user-delete ref="userDelete" @operateUser="operateUser"></user-delete>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import UserAdd from './childDialog/userAdd';
|
||||
import UserEdit from './childDialog/userEdit';
|
||||
import UserDelete from './childDialog/userDelete';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'ManageUser',
|
||||
components: {
|
||||
UserAdd,
|
||||
UserEdit,
|
||||
UserDelete
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
operate: {},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdAddUser() {
|
||||
return this.dialogShow ? OperationEvent.Command.manage.addUser.domId : '';
|
||||
},
|
||||
domIdEditUser() {
|
||||
return this.dialogShow ? OperationEvent.Command.manage.editUser.domId : '';
|
||||
},
|
||||
domIdDelUser() {
|
||||
return this.dialogShow ? OperationEvent.Command.manage.delUser.domId : '';
|
||||
},
|
||||
domIdFreshUser() {
|
||||
return this.dialogShow ? OperationEvent.Command.manage.freshUser.domId : '';
|
||||
},
|
||||
domIdChooseUser() {
|
||||
return this.dialogShow ? OperationEvent.Command.manage.chooseUser.domId : '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '用户管理'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
//非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
//添加用户
|
||||
addUser() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.manage.addUser.operation,
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.$refs.userAdd.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
})
|
||||
},
|
||||
//编辑用户
|
||||
editUser() {
|
||||
if (this.selected) {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.manage.editUser.operation,
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.$refs.userEdit.doShow(operate, this.selected);
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
})
|
||||
} else {
|
||||
this.$messageBox('请先选择用户');
|
||||
}
|
||||
},
|
||||
//删除用户
|
||||
delUser() {
|
||||
if (this.selected) {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.manage.delUser.operation,
|
||||
messages: [`你确定删除用户${this.selected.userName}吗?`]
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.$refs.userDelete.doShow(operate, this.selected);
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
})
|
||||
} else {
|
||||
this.$messageBox('请先选择用户');
|
||||
}
|
||||
},
|
||||
//刷新用户
|
||||
freshUser() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.manage.freshUser.operation,
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
})
|
||||
},
|
||||
//选择用户
|
||||
chooseUser(row) {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.manage.chooseUser.operation,
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.selected = row;
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
})
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.menu.operation,
|
||||
}
|
||||
|
||||
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();
|
||||
})
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
},
|
||||
//增删改函数处理
|
||||
operateUser(data) {
|
||||
if (data && data.type === 'ADD') {
|
||||
let index = this.tableData.indexOf(this.tableData.find(elem => { return elem.jobNumber === data.jobNumber }));
|
||||
if (index < 0) {
|
||||
this.tableData.push({
|
||||
jobNumber: data.jobNumber,
|
||||
userName: data.userName,
|
||||
password: data.password
|
||||
});
|
||||
} else {
|
||||
this.$messageBox('添加失败,存在相同工号的用户');
|
||||
}
|
||||
} else if (data && data.type === 'EDIT') {
|
||||
let index = this.tableData.indexOf(this.tableData.find(elem => { return elem.jobNumber === data.jobNumber }));
|
||||
if (index >= 0) {
|
||||
this.tableData[index].password = data.password;
|
||||
this.tableData[index].userName = data.userName;
|
||||
} else {
|
||||
this.$messageBox('修改失败');
|
||||
}
|
||||
} else if (data && data.type === 'DELETE') {
|
||||
let index = this.tableData.indexOf(this.tableData.find(elem => { return elem.jobNumber === data.jobNumber }));
|
||||
if (index >= 0) {
|
||||
this.tableData.splice(index, 1);
|
||||
} else {
|
||||
this.$messageBox('删除失败');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -10px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
221
src/jmapNew/theme/datie_02/menus/menuDialog/passwordBox.vue
Normal file
221
src/jmapNew/theme/datie_02/menus/menuDialog/passwordBox.vue
Normal file
@ -0,0 +1,221 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm password-box"
|
||||
title="密码框"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="context" style="overflow:hidden">
|
||||
<el-form label-width="80px" size="mini">
|
||||
<el-form-item prop="username">
|
||||
<span slot="label">用户名:</span>
|
||||
<el-input v-model="model.username" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<span slot="label">密 码:</span>
|
||||
<el-input v-model="model.password" type="password" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="operate">
|
||||
<el-button-group v-model="key" class="left" size="mini">
|
||||
<el-button size="mini" @click="click(1)">1</el-button>
|
||||
<el-button size="mini" @click="click(2)">2</el-button>
|
||||
<el-button size="mini" @click="click(3)">3</el-button>
|
||||
<el-button size="mini" @click="click(4)">4</el-button>
|
||||
<el-button size="mini" @click="click(5)">5</el-button>
|
||||
</el-button-group>
|
||||
<el-button-group v-model="key" class="right" size="mini">
|
||||
<el-button @click="esc">回退</el-button>
|
||||
</el-button-group>
|
||||
<el-button-group v-model="key" class="left" size="mini">
|
||||
<el-button size="mini" @click="click(6)">6</el-button>
|
||||
<el-button size="mini" @click="click(7)">7</el-button>
|
||||
<el-button size="mini" @click="click(8)">8</el-button>
|
||||
<el-button size="mini" @click="click(9)">9</el-button>
|
||||
<el-button size="mini" @click="click(0)">0</el-button>
|
||||
</el-button-group>
|
||||
<el-button-group v-model="key" class="right" size="mini">
|
||||
<el-button @click="clr">清空</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
</div>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="6" :offset="4">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'PasswordBox',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
operation: null,
|
||||
model: {
|
||||
username: '',
|
||||
password: ''
|
||||
},
|
||||
key: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.password.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||
/** 强制站控*/
|
||||
return OperationEvent.StationControl.forcedStationControl.passwordConfirm.domId;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadInitData(operate) {
|
||||
this.model.username = '';
|
||||
this.model.password = '';
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
this.model.username = this.$store.state.user.name;
|
||||
},
|
||||
doShow(operate) {
|
||||
/** 如果不是断点激活,而是第一次显示需要初始化数据*/
|
||||
if (!this.dialogShow) {
|
||||
this.loadInitData(operate);
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.password.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
type: this.operate.type
|
||||
};
|
||||
|
||||
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||
/** 强制站控*/
|
||||
operate.operation = OperationEvent.StationControl.forcedStationControl.passwordConfirm.operation;
|
||||
}
|
||||
|
||||
if (this.model.password == '123456') {
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setLoginResult', {
|
||||
operation: operate.operation,
|
||||
success: valid
|
||||
});
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$emit('setLoginResult', {
|
||||
operation: operate.operation,
|
||||
success: false
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow('密码输入错误!');
|
||||
}
|
||||
},
|
||||
click(key) {
|
||||
if (!this.model.password) {
|
||||
this.model.password = '';
|
||||
}
|
||||
this.model.password += key;
|
||||
},
|
||||
esc() {
|
||||
if (this.model.password) {
|
||||
this.model.password = this.model.password.substring(0, this.model.password.length - 1);
|
||||
}
|
||||
},
|
||||
clr() {
|
||||
this.model.password = '';
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
.password-box .el-form {
|
||||
margin-top: 10px !important;
|
||||
margin-right: 20px !important;
|
||||
}
|
||||
|
||||
.password-box .el-form-item {
|
||||
margin-bottom: 5px !important;
|
||||
}
|
||||
|
||||
.password-box .context {
|
||||
height: 170px !important;
|
||||
}
|
||||
|
||||
.password-box .operate {
|
||||
margin-top: 10px !important;
|
||||
padding-bottom: 10px !important;
|
||||
}
|
||||
|
||||
.password-box .left {
|
||||
margin-left: 10px !important;
|
||||
}
|
||||
|
||||
.password-box .left .el-button {
|
||||
color: #000;
|
||||
background: #F0F0F0;
|
||||
text-align: center;
|
||||
width: 30px !important;
|
||||
}
|
||||
|
||||
.password-box .right {
|
||||
color: #000;
|
||||
margin-left: 10px !important;
|
||||
background: #F0F0F0;
|
||||
width: 80px !important;
|
||||
}
|
||||
</style>
|
286
src/jmapNew/theme/datie_02/menus/menuDialog/setLimitSpeed.vue
Normal file
286
src/jmapNew/theme/datie_02/menus/menuDialog/setLimitSpeed.vue
Normal file
@ -0,0 +1,286 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="800px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="14">
|
||||
<div class="card-box">
|
||||
<span class="tip-label">请求</span>
|
||||
<el-row style="margin: 5px">
|
||||
<el-col :span="6" class="item-label">线路选择</el-col>
|
||||
<el-col :span="6">
|
||||
<el-select v-model="data.path">
|
||||
<el-option
|
||||
v-for="item in pathList"
|
||||
:key="item.value"
|
||||
:label="item.name"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="6" class="item-label">限制速度</el-col>
|
||||
<el-col :span="6">
|
||||
<el-select v-model="data.speed">
|
||||
<el-option
|
||||
v-for="item in speedList"
|
||||
:key="item.value"
|
||||
:label="item.name"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6" class="item-label">起始公里标</el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="data.begKmPost" />
|
||||
</el-col>
|
||||
<el-col :span="6" class="item-label">结束公里标</el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="data.endKmPost" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6" class="item-label">限速区段长度</el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="data.length" />
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-button>查看</el-button>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-button>请求</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="card-box">
|
||||
<span class="tip-label">执行</span>
|
||||
<el-row style="margin: 5px">
|
||||
<el-col :span="6" class="item-label">线路选择</el-col>
|
||||
<el-col :span="6">
|
||||
<el-select v-model="form.path">
|
||||
<el-option
|
||||
v-for="item in pathList"
|
||||
:key="item.value"
|
||||
:label="item.name"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="6" class="item-label">限制速度</el-col>
|
||||
<el-col :span="6">
|
||||
<el-select v-model="form.speed">
|
||||
<el-option
|
||||
v-for="item in speedList"
|
||||
:key="item.value"
|
||||
:label="item.name"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6" class="item-label">起始公里标</el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="form.begKmPost" />
|
||||
</el-col>
|
||||
<el-col :span="6" class="item-label">结束公里标</el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="form.endKmPost" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6" class="item-label">限速区段长度</el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="form.length" />
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-button>查看</el-button>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-button>请求</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="card-box">
|
||||
<span class="tip-label">操作提示</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="9" :offset="1">
|
||||
<div class="card-box">
|
||||
<span class="tip-label">设备列表</span>
|
||||
<el-table class="card-table" :data="deviceData" border style="width: 100%" height="300">
|
||||
<el-table-column prop="stationName" label="站名" />
|
||||
<el-table-column prop="deviceCode" label="设备号" />
|
||||
<el-table-column prop="deviceName" label="设备名" />
|
||||
</el-table>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<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>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'TrainAdd',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
data: {
|
||||
path: '',
|
||||
speed: '',
|
||||
begKmPost: '',
|
||||
endKmPost: '',
|
||||
length: ''
|
||||
},
|
||||
form: {
|
||||
path: '',
|
||||
speed: '',
|
||||
begKmPost: '',
|
||||
endKmPost: '',
|
||||
length: ''
|
||||
},
|
||||
pathList: [
|
||||
{ name: '上行站线', value: '01' },
|
||||
{ name: '下行站线', value: '02' }
|
||||
],
|
||||
speedList: [
|
||||
{ name: '10Km/h', value: '10' },
|
||||
{ name: '15Km/h', value: '15' },
|
||||
{ name: '20Km/h', value: '20' },
|
||||
{ name: '25Km/h', value: '25' }
|
||||
],
|
||||
deviceData: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.planTrain.addPlanTrain.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '设置临时限速';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Command.planTrain.addPlanTrain.operation
|
||||
};
|
||||
|
||||
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();
|
||||
console.error(error);
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
|
||||
.card-box {
|
||||
border: 1px solid #c0c0c0;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.card-table {
|
||||
position: relative;
|
||||
top: -15px;
|
||||
}
|
||||
|
||||
.tip-label {
|
||||
position: relative;
|
||||
left: 5px;
|
||||
top: -15px;
|
||||
background: #ECE9D8;
|
||||
}
|
||||
|
||||
.item-label {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,433 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm station-control-convert"
|
||||
title="控制模式转换"
|
||||
:visible.sync="show"
|
||||
width="700px"
|
||||
:before-close="doClose"
|
||||
:show-close="true"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
:data="tableData"
|
||||
border
|
||||
row-key="code"
|
||||
style="width: 100%"
|
||||
height="250"
|
||||
center
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column :id="domIdChoose" prop="check" label="选择" width="60" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox ref="check" v-model="scope.row.check" :disabled="scope.row.disabled" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="operate" label="操作区域" width="140">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.operate }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="control" label="控制模式" width="80">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.control }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="中心-车站通信状态" width="140">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.status }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="result" label="转换执行状态">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.result }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="10" :offset="3">
|
||||
<el-button v-if="isFork" :id="domIdFork" :disabled="disabledCommit" @click="forkCommit">强制站控</el-button>
|
||||
<el-button v-if="isRequest" :id="domIdRequest" :disabled="disabledCommit" @click="requestCommit">请求站控
|
||||
</el-button>
|
||||
<el-button v-if="isConter" :id="domIdConter" :disabled="disabledCommit" @click="conterCommit">请求中控
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="4">
|
||||
<el-button :id="domIdCancel" :disabled="disabledClose" @click="cancel">关闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<two-confirmation ref="twoConfirmation" @setOperate="getOperate" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import TwoConfirmation from './childDialog/twoConfirmation';
|
||||
|
||||
export default {
|
||||
name: 'StationControlConvert',
|
||||
components: {
|
||||
TwoConfirmation
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
operate: null,
|
||||
dialogShow: false,
|
||||
disabledSend: false,
|
||||
disabledSure: false,
|
||||
disabledClose: false,
|
||||
operation: '',
|
||||
controlProps: {
|
||||
'01': '中控',
|
||||
'02': '站控'
|
||||
},
|
||||
selection: [],
|
||||
tableData: [],
|
||||
timer: null,
|
||||
count: 0,
|
||||
backOperate: '',
|
||||
timeout: 61
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
]),
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'started'
|
||||
]),
|
||||
disabledCommit() {
|
||||
return this.disabledSend || this.disabledSure;
|
||||
},
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
isFork() {
|
||||
if (this.dialogShow) {
|
||||
return OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl);
|
||||
}
|
||||
return '';
|
||||
},
|
||||
isRequest() {
|
||||
if (this.dialogShow) {
|
||||
return OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl);
|
||||
}
|
||||
return '';
|
||||
},
|
||||
isConter() {
|
||||
if (this.dialogShow) {
|
||||
return OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl);
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdChoose() {
|
||||
if (this.dialogShow) {
|
||||
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||
return OperationEvent.StationControl.forcedStationControl.choose.domId;
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||
return OperationEvent.StationControl.requestStationControl.choose.domId;
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||
return OperationEvent.StationControl.requestCentralControl.choose.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdConter() {
|
||||
return this.dialogShow ? OperationEvent.StationControl.requestCentralControl.menu.domId : '';
|
||||
},
|
||||
domIdFork() {
|
||||
return this.dialogShow ? OperationEvent.StationControl.forcedStationControl.menu.domId : '';
|
||||
},
|
||||
domIdRequest() {
|
||||
return this.dialogShow ? OperationEvent.StationControl.requestStationControl.menu.domId : '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.socket.msgHead': function (elem) {
|
||||
if (elem) {
|
||||
if (elem.hasOwnProperty('timeout')) {
|
||||
this.updateTableValue(elem.stationControlCode, { result: `接受转换应答超时` }, false);
|
||||
} else if (elem.hasOwnProperty('success')) {
|
||||
if (elem.success) {
|
||||
this.updateTableValue(elem.stationControlCode, { result: '控制模式转换成功' }, true);
|
||||
} else {
|
||||
this.updateTableValue(elem.stationControlCode, { result: `控制模式转换失败` }, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
backOperate: function (operate) {
|
||||
if (this.dialogShow && operate) {
|
||||
if (operate.selection && operate.selection.length) {
|
||||
operate.selection.forEach(elem => {
|
||||
if (operate.commit) {
|
||||
this.updateTableValue(elem.code, { result: `已发送转换请求,${this.timeout}秒后超时.` }, false);
|
||||
} else if (operate.cancel) {
|
||||
this.updateTableValue(elem.code, { result: '' }, false);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
// 深度数据状态
|
||||
tableData: {
|
||||
handler(val, oldVal) {
|
||||
this.checkTableDataSelction(val);
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loadTableData();
|
||||
},
|
||||
methods: {
|
||||
updateTableValue(code, result, success) {
|
||||
this.tableData.forEach((row, index) => {
|
||||
if (row.code == code) {
|
||||
for (const prop in result) {
|
||||
row[prop] = result[prop];
|
||||
}
|
||||
if (success) {
|
||||
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl) || OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||
row.control = this.controlProps['02']; // 01:中控, 02:站控
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||
row.control = this.controlProps['01']; // 01:中控, 02:站控
|
||||
}
|
||||
row.disabled = true;
|
||||
row.check = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
checkTableDataSelction(data) {
|
||||
const selection = [];
|
||||
if (data && data.length > 0) {
|
||||
data.forEach(row => {
|
||||
if (row.check && !row.disabled) {
|
||||
selection.push(row);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.disabledSend = !selection.length;
|
||||
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
|
||||
this.handleChooseChange(selection);
|
||||
this.selection = selection;
|
||||
}
|
||||
},
|
||||
checkBoxDisabled(row) {
|
||||
const control = (this.$store.getters('map/getDeviceByCode')(row.code) || {});
|
||||
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl) || OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||
if (control && control.status == '02') { // 01:中控, 02:站控
|
||||
return true;
|
||||
}
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||
if (control && control.status == '01') { // 01:中控, 02:站控
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
loadTableData() {
|
||||
this.tableData = [];
|
||||
this.stationList.forEach(station => {
|
||||
// const station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
|
||||
this.tableData.push({
|
||||
code: station.code,
|
||||
operate: station.name || '',
|
||||
control: '',
|
||||
check: false,
|
||||
disabled: false,
|
||||
status: '正常',
|
||||
result: ''
|
||||
});
|
||||
});
|
||||
},
|
||||
initTableDataStatus() {
|
||||
this.tableData.forEach(row => {
|
||||
row.disabled = this.checkBoxDisabled(row);
|
||||
row.check = false;
|
||||
row.result = '';
|
||||
const control = (this.$store.getters('map/getDeviceByCode')(row.code) || {}).state;
|
||||
if (control) {
|
||||
row.control = this.controlProps[control.status];
|
||||
}
|
||||
});
|
||||
},
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
this.disabledSure = false;
|
||||
this.initTableDataStatus();
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$refs.multipleTable.setCurrentRow();
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: 'bar',
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
clearTimer() {
|
||||
this.count = 0;
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
},
|
||||
serializeCodeListWithSeparator(sep) {
|
||||
const codeList = [];
|
||||
if (this.selection && this.selection.length) {
|
||||
this.selection.forEach(elem => {
|
||||
codeList.push(elem.code);
|
||||
});
|
||||
}
|
||||
return codeList.join(sep);
|
||||
},
|
||||
handleChooseChange(selection) {
|
||||
this.selection = selection;
|
||||
if (selection && selection.length) {
|
||||
const operate = {
|
||||
|
||||
operation: '',
|
||||
val: this.serializeCodeListWithSeparator('::'),
|
||||
selection: selection
|
||||
};
|
||||
|
||||
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||
operate.operation = OperationEvent.StationControl.forcedStationControl.choose.operation;
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||
operate.operation = OperationEvent.StationControl.requestStationControl.choose.operation;
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||
operate.operation = OperationEvent.StationControl.requestCentralControl.choose.operation;
|
||||
}
|
||||
|
||||
this.disabledSure = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.disabledSure = false;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
} else if (!selection) {
|
||||
this.$messageBox('请选择一条数据');
|
||||
}
|
||||
},
|
||||
requestCommit() {
|
||||
const operate = {
|
||||
|
||||
messages: ['确认将如下操作区域的控制模式由中控转为站控:'],
|
||||
operation: OperationEvent.StationControl.requestStationControl.menu.operation,
|
||||
val: this.serializeCodeListWithSeparator('::'),
|
||||
selection: this.selection
|
||||
};
|
||||
|
||||
this.selection.forEach((elem, index) => {
|
||||
operate.messages.push(`操作区域${index + 1}:${elem.operate}`);
|
||||
});
|
||||
|
||||
this.disabledSure = true;
|
||||
this.disabledClose = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.twoConfirmation.doShow(operate);
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.disabledSure = false;
|
||||
this.disabledClose = false;
|
||||
});
|
||||
},
|
||||
forkCommit() {
|
||||
const operate = {
|
||||
|
||||
messages: ['确认将如下操作区域的控制模式由中控转为站控:'],
|
||||
operation: OperationEvent.StationControl.forcedStationControl.menu.operation,
|
||||
val: this.serializeCodeListWithSeparator('::'),
|
||||
selection: this.selection
|
||||
};
|
||||
|
||||
this.selection.forEach((elem, index) => {
|
||||
operate.messages.push(`操作区域${index + 1}:${elem.operate}`);
|
||||
});
|
||||
|
||||
this.disabledSure = true;
|
||||
this.disabledClose = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.twoConfirmation.doShow(operate);
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.disabledSure = false;
|
||||
this.disabledClose = false;
|
||||
});
|
||||
},
|
||||
conterCommit() { // 请求中控
|
||||
const operate = {
|
||||
|
||||
messages: ['确认将如下操作区域的控制模式由站控转为中控:'],
|
||||
operation: OperationEvent.StationControl.requestCentralControl.menu.operation,
|
||||
val: this.serializeCodeListWithSeparator('::'),
|
||||
selection: this.selection
|
||||
};
|
||||
|
||||
this.selection.forEach((elem, index) => {
|
||||
operate.messages.push(`操作区域${index + 1}:${elem.operate}`);
|
||||
});
|
||||
|
||||
this.disabledSure = true;
|
||||
this.disabledClose = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.twoConfirmation.doShow(operate);
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.disabledSure = false;
|
||||
this.disabledClose = false;
|
||||
});
|
||||
},
|
||||
getOperate(operate) {
|
||||
this.backOperate = operate;
|
||||
if (operate.cancel) {
|
||||
this.disabledClose = false;
|
||||
this.disabledSure = this.disabledSend = false;
|
||||
}
|
||||
if (operate.commit || operate.timeout) {
|
||||
this.disabledSend = this.disabledSure = true;
|
||||
this.disabledClose = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
168
src/jmapNew/theme/datie_02/menus/menuDialog/trainAdd.vue
Normal file
168
src/jmapNew/theme/datie_02/menus/menuDialog/trainAdd.vue
Normal file
@ -0,0 +1,168 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules">
|
||||
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
|
||||
<span class="base-label">添加位置</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item prop="stationStandCode">
|
||||
<span slot="label">终   端:</span>
|
||||
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in stationStandList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="前车车次号:" prop="trainNumberLimber">
|
||||
<el-input v-model="addModel.trainNumberLimber" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
<el-form-item label="添加车次号:" label-width="115px" prop="groupNumber">
|
||||
<el-input v-model="addModel.groupNumber" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<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>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'TrainAdd',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
addModel: {
|
||||
groupNumber: '',
|
||||
stationStandCode: '',
|
||||
trainNumberLimber: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
groupNumber: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
// trainNumberLimber: [
|
||||
// { required: true, message: '请输入前车车次号', trigger: 'blur' }
|
||||
// ],
|
||||
stationStandCode: [
|
||||
{ required: true, message: '请选择终端', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.planTrain.addPlanTrain.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '添加计划车';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
|
||||
// 非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Command.planTrain.addPlanTrain.operation
|
||||
};
|
||||
|
||||
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();
|
||||
console.error(error);
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
151
src/jmapNew/theme/datie_02/menus/menuDialog/trainDelete.vue
Normal file
151
src/jmapNew/theme/datie_02/menus/menuDialog/trainDelete.vue
Normal file
@ -0,0 +1,151 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules">
|
||||
<el-form-item prop="stationStandCode">
|
||||
<span slot="label">终  端:</span>
|
||||
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择">
|
||||
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name" :value="item.code" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 号:" prop="groupNumber">
|
||||
<el-input v-model="addModel.groupNumber" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<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>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'TrainAdd',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
addModel: {
|
||||
groupNumber: '',
|
||||
stationStandCode: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
groupNumber: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
stationStandCode: [
|
||||
{ required: true, message: '请选择终端', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.planTrain.delPlanTrain.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '删除计划车';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
|
||||
// 非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Command.planTrain.delPlanTrain.operation
|
||||
};
|
||||
|
||||
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();
|
||||
console.error(error);
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
158
src/jmapNew/theme/datie_02/menus/menuDialog/trainTranstalet.vue
Normal file
158
src/jmapNew/theme/datie_02/menus/menuDialog/trainTranstalet.vue
Normal file
@ -0,0 +1,158 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules">
|
||||
<el-form-item label="车 次 号:" label-width="115px" prop="groupNumber">
|
||||
<el-input v-model="addModel.groupNumber" />
|
||||
</el-form-item>
|
||||
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
|
||||
<span class="base-label">目的</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item prop="stationStandCode">
|
||||
<span slot="label">终  端:</span>
|
||||
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in stationStandList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 号:" prop="trainNumberLimber">
|
||||
<el-input v-model="addModel.trainNumberLimber" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<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>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'TrainTranstalet',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
addModel: {
|
||||
groupNumber: '',
|
||||
stationStandCode: '',
|
||||
trainNumberLimber: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
groupNumber: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
trainNumberLimber: [
|
||||
{ required: true, message: '请输入前车车次号', trigger: 'blur' }
|
||||
],
|
||||
stationStandCode: [
|
||||
{ required: true, message: '请选择终端', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.planTrain.translatPlanTrain.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '平移计划车';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
|
||||
// 非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Command.planTrain.translatPlanTrain.operation
|
||||
};
|
||||
|
||||
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();
|
||||
console.error(error);
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
256
src/jmapNew/theme/datie_02/menus/menuDialog/viewName.vue
Normal file
256
src/jmapNew/theme/datie_02/menus/menuDialog/viewName.vue
Normal file
@ -0,0 +1,256 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm view-name"
|
||||
title="名称显示设置"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-checkbox-group v-model="nameLevels">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="1">信号机名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox :label="2">站台轨名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="3" disabled>按钮名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox :label="4">折返轨名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="5">轨道名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="6">转换轨名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="7">道岔名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="8">标识灯名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="9">道岔区段名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="10">目的地名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="11">计轴区段名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="12">公里标</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-checkbox-group>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="6" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="8">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'ViewName',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
nameLevels: [1, 2, 4, 5, 6, 7, 8, 9, 10, 11]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.setNameDisplay();
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
// 如果不是断点激活显示,而是第一次显示时,需要初始化参数
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
val: this.nameLevels.sort().join('::')
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.setNameDisplay();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
setNameDisplay() {
|
||||
const deviceList = [];
|
||||
|
||||
// 信号机
|
||||
let nameShow = this.nameLevels.includes(1);
|
||||
const signalList = this.$store.getters['map/signalList'];
|
||||
if (signalList && signalList.length > 0) {
|
||||
signalList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow }));
|
||||
});
|
||||
}
|
||||
|
||||
// 按钮名称
|
||||
nameShow = this.nameLevels.includes(3);
|
||||
|
||||
// 道岔
|
||||
nameShow = this.nameLevels.includes(7); // 道岔名称
|
||||
const switchSectionNameShow = this.nameLevels.includes(9); // 道岔轨名称
|
||||
const switchList = this.$store.getters['map/switchList'];
|
||||
if (switchList && switchList.length > 0) {
|
||||
switchList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, switchSectionNameShow }));
|
||||
});
|
||||
}
|
||||
|
||||
// 控制模式
|
||||
const indicatorShow = this.nameLevels.includes(8);
|
||||
const control = this.$store.getters['map/stationControlList'];
|
||||
if (control && control.length > 0) {
|
||||
control.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { indicatorShow })); // 标识灯名称
|
||||
});
|
||||
}
|
||||
|
||||
// 区段
|
||||
nameShow = false;
|
||||
let standTrackNameShow = false;
|
||||
let reentryTrackNameShow = false;
|
||||
let transferTrackNameShow = false;
|
||||
const sectionList = this.$store.getters['map/sectionList'];
|
||||
if (sectionList && sectionList.length > 0) {
|
||||
sectionList.forEach(elem => {
|
||||
// if (elem.switchSection && elem.parentCode) {
|
||||
// // 道岔轨的区段名称默认不显示
|
||||
// nameShow = false;
|
||||
if (elem.type == '03') {
|
||||
nameShow = false;
|
||||
} else if (elem.type === '01') {
|
||||
// 计轴区段名称
|
||||
nameShow = this.nameLevels.includes(11);
|
||||
} else if (elem.type === '02') {
|
||||
// 轨道轨名称
|
||||
nameShow = this.nameLevels.includes(5);
|
||||
} else if (elem.type === '04') {
|
||||
// 道岔区段名称
|
||||
nameShow = this.nameLevels.includes(9);
|
||||
}
|
||||
|
||||
// 站台轨名称
|
||||
if (elem.standTrack) {
|
||||
standTrackNameShow = this.nameLevels.includes(2);
|
||||
}
|
||||
|
||||
// 折返轨名称
|
||||
if (elem.reentryTrack) {
|
||||
reentryTrackNameShow = this.nameLevels.includes(4);
|
||||
}
|
||||
|
||||
// 转换轨名称
|
||||
if (elem.transferTrack) {
|
||||
transferTrackNameShow = this.nameLevels.includes(6);
|
||||
}
|
||||
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, standTrackNameShow, reentryTrackNameShow, transferTrackNameShow }));
|
||||
});
|
||||
}
|
||||
|
||||
// 停车点
|
||||
const destCodeShow = this.nameLevels.includes(10);
|
||||
const stopPointList = this.$store.getters['map/stopPointList'];
|
||||
if (stopPointList && stopPointList.length > 0) {
|
||||
stopPointList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { destCodeShow }));
|
||||
});
|
||||
}
|
||||
|
||||
// 车站
|
||||
const kmPostShow = this.nameLevels.includes(12);
|
||||
const stationList = this.$store.getters['map/stationList'];
|
||||
if (stationList && stationList.length > 0) {
|
||||
stationList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { kmPostShow })); // 公里标
|
||||
});
|
||||
}
|
||||
|
||||
this.$store.dispatch('map/updateMapDevices', deviceList);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
239
src/jmapNew/theme/datie_02/menus/menuSection.vue
Normal file
239
src/jmapNew/theme/datie_02/menus/menuSection.vue
Normal file
@ -0,0 +1,239 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<section-control ref="sectionControl" pop-class="chengdou-03__systerm" />
|
||||
<section-detail ref="sectionDetail" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
<train-add-plan ref="trainAddPlan" pop-class="chengdou-03__systerm" />
|
||||
<set-fault ref="setFault" pop-class="chengdou-03__systerm" />
|
||||
<load-spare-train ref="loadSpareTrain" pop-class="chengdou-03__systerm" />
|
||||
<draw-select ref="drawSelect" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import SectionControl from '@/jmapNew/theme/components/menus/dialog/sectionControl';
|
||||
import TrainAddPlan from '@/jmapNew/theme/components/menus/dialog/trainAddPlan';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFaultNew';
|
||||
import SectionDetail from './dialog/sectionDetail';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain';
|
||||
import DrawSelect from './dialog/drawSelect';
|
||||
|
||||
export default {
|
||||
name: 'SectionMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
SectionControl,
|
||||
SectionDetail,
|
||||
NoticeInfo,
|
||||
TrainAddPlan,
|
||||
SetFault,
|
||||
LoadSpareTrain,
|
||||
DrawSelect
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: '图纸调用',
|
||||
handler: this.drawingCall
|
||||
},
|
||||
{
|
||||
label: '基础设备培训',
|
||||
handler: this.baDeTrCall
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
// {
|
||||
// label: '区故解',
|
||||
// handler: this.fault,
|
||||
// cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||
// },
|
||||
// {
|
||||
// label: '属性',
|
||||
// handler: this.detail,
|
||||
// cmdType: CMD.Section.CMD_SECTION_DETAILS
|
||||
// }
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
},
|
||||
{
|
||||
label: '触发故障管理',
|
||||
handler: this.triggerFaultManagement,
|
||||
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
|
||||
},
|
||||
{
|
||||
label: '设置备用车',
|
||||
handler: this.loadSpare,
|
||||
cmdType: CMD.Section.CMD_TRAIN_LOAD_SPARE_TRAIN
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Section) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
const isDev = process.env.NODE_ENV === 'development';
|
||||
if (isDev) {
|
||||
this.menuNormal.Center.push( {
|
||||
label: '新建计划列车',
|
||||
handler: this.createPlanTrain,
|
||||
cmdType: CMD.Section.CMD_Train_Init_Plan
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
if (this.selected.type != '04') {
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = this.menuNormal.Local;
|
||||
} else {
|
||||
this.menu = [];
|
||||
}
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT && this.selected.type != '04') {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
},
|
||||
drawingCall() {
|
||||
this.$refs.drawSelect.doShow(this.selected, 'drawing');
|
||||
},
|
||||
baDeTrCall() {
|
||||
this.$refs.drawSelect.doShow(this.selected, 'baDeTr');
|
||||
},
|
||||
doShow(point) {
|
||||
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();
|
||||
}
|
||||
},
|
||||
loadSpare() {
|
||||
commitOperate(menuOperate.Section.loadSpareTrain, {sectionCode:this.selected.code}).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.loadSpareTrain.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置计轴失效
|
||||
alxeFailure() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Section.alxeFailure.menu.operation,
|
||||
cmdType: '',
|
||||
param: {
|
||||
sectionCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 故障解锁
|
||||
fault() {
|
||||
commitOperate(menuOperate.Section.fault, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
detail() {
|
||||
commitOperate(menuOperate.Section.detail, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.sectionDetail.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
undeveloped() {
|
||||
this.doClose();
|
||||
this.$alert('实现中......', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 新建计划车(开发专用)
|
||||
createPlanTrain() {
|
||||
commitOperate(menuOperate.Train.createPlanTrain, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.trainAddPlan.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
triggerFaultManagement() {
|
||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
366
src/jmapNew/theme/datie_02/menus/menuSignal.vue
Normal file
366
src/jmapNew/theme/datie_02/menus/menuSignal.vue
Normal file
@ -0,0 +1,366 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<route-selection ref="routeSelection" />
|
||||
<route-control ref="routeControl" pop-class="chengdou-03__systerm" />
|
||||
<route-detail ref="routeDetail" />
|
||||
<route-guide ref="routeGuide" />
|
||||
<route-hand-control ref="routeHandControl" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
<password-box ref="passwordBox" pop-class="chengdou-03__systerm" @checkOver="passWordCommit" />
|
||||
<draw-select ref="drawSelect" />
|
||||
<set-fault ref="setFault" pop-class="chengdou-03__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import RouteControl from '@/jmapNew/theme/components/menus/dialog/routeControl';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFaultNew';
|
||||
import RouteSelection from './dialog/routeSelection';
|
||||
import RouteDetail from './dialog/routeDetail';
|
||||
import RouteHandControl from './dialog/routeHandControl';
|
||||
import RouteGuide from './dialog/routeGuide';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import PasswordBox from '@/jmapNew/theme/components/menus/childDialog/passwordInputBox';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import DrawSelect from './dialog/drawSelect';
|
||||
|
||||
export default {
|
||||
name: 'SignalMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
RouteControl,
|
||||
RouteSelection,
|
||||
RouteHandControl,
|
||||
RouteDetail,
|
||||
RouteGuide,
|
||||
NoticeInfo,
|
||||
PasswordBox,
|
||||
SetFault,
|
||||
DrawSelect
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: '图纸调用',
|
||||
handler: this.drawingCall
|
||||
},
|
||||
{
|
||||
label: '基础设备培训',
|
||||
handler: this.baDeTrCall
|
||||
}
|
||||
// {
|
||||
// label: '办理进路',
|
||||
// handler: this.arrangementRoute,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||
// },
|
||||
// {
|
||||
// label: '办理引导进路',
|
||||
// handler: this.guide,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
||||
// },
|
||||
// {
|
||||
// label: '取消进路',
|
||||
// handler: this.cancelTrainRoute,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||
// },
|
||||
// {
|
||||
// label: '总人解', // 取消引导进路
|
||||
// handler: this.humanTrainRoute,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE
|
||||
// },
|
||||
// {
|
||||
// label: '进路收人工控',
|
||||
// handler: this.humanControl,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
|
||||
// },
|
||||
// {
|
||||
// label: '进路交自动控',
|
||||
// handler: this.atsAutoControl,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
||||
// },
|
||||
// {
|
||||
// label: '进路信息',
|
||||
// handler: this.detail,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
||||
// }
|
||||
],
|
||||
Center: [
|
||||
// {
|
||||
// label: '办理进路',
|
||||
// handler: this.arrangementRoute,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||
// },
|
||||
// {
|
||||
// label: '办理引导进路',
|
||||
// handler: this.guide,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
||||
// },
|
||||
// {
|
||||
// label: '取消进路',
|
||||
// handler: this.cancelTrainRoute,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||
// },
|
||||
// {
|
||||
// label: '总人解',
|
||||
// handler: this.humanTrainRoute,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE
|
||||
// },
|
||||
// {
|
||||
// label: '信号重开',
|
||||
// handler: this.reopenSignal,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||
// },
|
||||
// {
|
||||
// label: '信号封锁',
|
||||
// handler: this.lock,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
|
||||
// },
|
||||
// {
|
||||
// label: '信号解封',
|
||||
// handler: this.unlock,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
|
||||
// },
|
||||
// {
|
||||
// label: '进路收人工控',
|
||||
// handler: this.humanControl,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
|
||||
// },
|
||||
// {
|
||||
// label: '进路交自动控',
|
||||
// handler: this.atsAutoControl,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
||||
// },
|
||||
// {
|
||||
// label: '进路信息',
|
||||
// handler: this.detail,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
||||
// }
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
},
|
||||
{
|
||||
label: '触发故障管理',
|
||||
handler: this.triggerFaultManagement,
|
||||
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
]),
|
||||
...mapGetters('map', [
|
||||
'routeList'
|
||||
]),
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = this.menuNormal.Local;
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
},
|
||||
drawingCall() {
|
||||
this.$refs.drawSelect.doShow(this.selected, 'drawing');
|
||||
},
|
||||
baDeTrCall() {
|
||||
this.$refs.drawSelect.doShow(this.selected, 'baDeTr');
|
||||
},
|
||||
doShow(point) {
|
||||
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();
|
||||
}
|
||||
},
|
||||
// 信号关灯
|
||||
signalClose() {
|
||||
commitOperate(menuOperate.Signal.signalClose, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取进路列表
|
||||
getRouteList(selectType) {
|
||||
const routes = [];
|
||||
this.routeList.forEach(elem => {
|
||||
if (elem.startSignalCode === selectType.code) {
|
||||
routes.push(elem);
|
||||
}
|
||||
});
|
||||
return routes;
|
||||
},
|
||||
// 设置进路
|
||||
arrangementRoute() {
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.routeSelection.doShow(operate, this.selected, this.getRouteList(this.selected));
|
||||
}
|
||||
});
|
||||
},
|
||||
// 进路引导
|
||||
guide() {
|
||||
commitOperate(menuOperate.Signal.guide, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.passwordBox.doShow({...operate, ...{selected: this.selected}, ...{routesList: this.getRouteList(this.selected)}});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消进路
|
||||
cancelTrainRoute() {
|
||||
commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 总人解
|
||||
humanTrainRoute() {
|
||||
commitOperate(menuOperate.Signal.humanTrainRoute, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
Object.assign(operate, {operation: OperationEvent.Signal.humanTrainRoute.button.operation });
|
||||
this.$refs.passwordBox.doShow({...operate, ...{selected: this.selected}});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 信号重开
|
||||
reopenSignal() {
|
||||
commitOperate(menuOperate.Signal.reopenSignal, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 信号封锁
|
||||
lock() {
|
||||
commitOperate(menuOperate.Signal.lock, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 信号解封
|
||||
unlock() {
|
||||
commitOperate(menuOperate.Signal.unlock, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 进路交人工控
|
||||
humanControl() {
|
||||
commitOperate(menuOperate.Signal.humanControl, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.routeHandControl.doShow(operate, this.selected, this.getRouteList(this.selected));
|
||||
}
|
||||
});
|
||||
},
|
||||
// 查询进路状态
|
||||
detail() {
|
||||
commitOperate(menuOperate.Signal.detail, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeDetail.doShow(operate, this.selected, this.getRouteList(this.selected));
|
||||
}
|
||||
});
|
||||
},
|
||||
// 进路交自动控
|
||||
atsAutoControl() {
|
||||
commitOperate(menuOperate.Signal.atsAutoControl, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.routeHandControl.doShow(operate, this.selected, this.getRouteList(this.selected));
|
||||
}
|
||||
});
|
||||
},
|
||||
passWordCommit(data) {
|
||||
const step = {
|
||||
operation: data.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
switch (data.operation) {
|
||||
case OperationEvent.Signal.guide.menu.operation:
|
||||
this.$refs.routeGuide.doShow(data, data.selected, data.routesList);
|
||||
break;
|
||||
case OperationEvent.Signal.humanTrainRoute.button.operation:
|
||||
Object.assign(data, {operation: OperationEvent.Signal.humanTrainRoute.menu.operation});
|
||||
this.$refs.routeControl.doShow(data, data.selected);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
triggerFaultManagement() {
|
||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
162
src/jmapNew/theme/datie_02/menus/menuStation.vue
Normal file
162
src/jmapNew/theme/datie_02/menus/menuStation.vue
Normal file
@ -0,0 +1,162 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<draw-select ref="drawSelect" />
|
||||
<set-fault ref="setFault" pop-class="chengdou-03__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import DrawSelect from './dialog/drawSelect';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFaultNew';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'StationMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
SetFault,
|
||||
NoticeInfo,
|
||||
DrawSelect
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: '图纸调用',
|
||||
handler: this.drawingCall
|
||||
},
|
||||
{
|
||||
label: '基础设备培训',
|
||||
handler: this.baDeTrCall
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置ZC故障',
|
||||
handler: this.setStoppage
|
||||
},
|
||||
{
|
||||
label: '取消ZC故障',
|
||||
handler: this.cancelStoppage
|
||||
},
|
||||
{
|
||||
label: '重启联锁机',
|
||||
handler: this.restartInterlock,
|
||||
cmdType: CMD.Station.CMD_STATION_RESTART_INTERLOCK_MACHINE
|
||||
},
|
||||
{
|
||||
label: '触发故障管理',
|
||||
handler: this.triggerFaultManagement,
|
||||
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Station) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = this.menuNormal.Local;
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
},
|
||||
drawingCall() {
|
||||
this.$refs.drawSelect.doShow(this.selected, 'drawing');
|
||||
},
|
||||
baDeTrCall() {
|
||||
this.$refs.drawSelect.doShow(this.selected, 'baDeTr');
|
||||
},
|
||||
doShow(point) {
|
||||
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();
|
||||
}
|
||||
},
|
||||
restartInterlock() {
|
||||
commitOperate(menuOperate.Station.restartInterlockMachine, { stationCode: this.selected.code }, 3).then(({valid, operate}) => {
|
||||
}).catch(error=>{
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
|
||||
if (valid && this.selected.zcCode) {
|
||||
const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, zcSelected);
|
||||
} else if (!this.selected.zcCode) {
|
||||
console.error('该车站无zc设备');
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
|
||||
if (valid && this.selected.zcCode) {
|
||||
const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, zcSelected);
|
||||
} else if (!this.selected.zcCode) {
|
||||
console.error('该车站无zc设备');
|
||||
}
|
||||
});
|
||||
},
|
||||
triggerFaultManagement() {
|
||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
||||
},
|
||||
handlerOpenPdf(elem) {
|
||||
const url = `https://joylink.club/oss/projects/wjls/${this.selected.jp}/${elem.file}`;
|
||||
window.open(url, '_blank');
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
220
src/jmapNew/theme/datie_02/menus/menuStationStand.vue
Normal file
220
src/jmapNew/theme/datie_02/menus/menuStationStand.vue
Normal file
@ -0,0 +1,220 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<stand-control ref="standControl" />
|
||||
<stand-detail ref="standDetail" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
<set-fault ref="setFault" pop-class="chengdou-03__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import StandControl from './dialog/standControl';
|
||||
import StandDetail from './dialog/standDetail';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFaultNew';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'StationStandMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
StandControl,
|
||||
StandDetail,
|
||||
NoticeInfo,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
],
|
||||
Center: [
|
||||
// {
|
||||
// label: '设置扣车',
|
||||
// handler: this.setDetainTrain,
|
||||
// cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
|
||||
// },
|
||||
// {
|
||||
// label: '取消扣车',
|
||||
// handler: this.cancelDetainTrain,
|
||||
// cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
||||
// },
|
||||
// {
|
||||
// label: '设置跳停',
|
||||
// handler: this.setJumpStop,
|
||||
// cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP
|
||||
// },
|
||||
// {
|
||||
// label: '取消跳停',
|
||||
// handler: this.cancelJumpStop,
|
||||
// cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
|
||||
// },
|
||||
// {
|
||||
// label: '设置停站时间',
|
||||
// handler: this.setStopTime,
|
||||
// cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME
|
||||
// },
|
||||
// {
|
||||
// label: '设置站间运行等级',
|
||||
// handler: this.setRunLevel,
|
||||
// cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME
|
||||
// },
|
||||
// {
|
||||
// label: '显示站台信息',
|
||||
// handler: this.detail,
|
||||
// cmdType: CMD.Stand.CMD_STAND_VIEW_STATUS
|
||||
// }
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Stand.CMD_STAND_ADD_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT
|
||||
},
|
||||
{
|
||||
label: '触发故障管理',
|
||||
handler: this.triggerFaultManagement,
|
||||
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationStand) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
|
||||
},
|
||||
doShow(point) {
|
||||
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();
|
||||
}
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置扣车
|
||||
setDetainTrain() {
|
||||
commitOperate(menuOperate.StationStand.setDetainTrain, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消扣车
|
||||
cancelDetainTrain() {
|
||||
commitOperate(menuOperate.StationStand.cancelDetainTrain, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置跳停
|
||||
setJumpStop() {
|
||||
commitOperate(menuOperate.StationStand.setJumpStop, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消跳停
|
||||
cancelJumpStop() {
|
||||
commitOperate(menuOperate.StationStand.cancelJumpStop, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 停站时间控制
|
||||
setStopTime() {
|
||||
commitOperate(menuOperate.StationStand.setStopTime, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standControl.doShow(operate, this.selected, []);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置运行等级
|
||||
setRunLevel() {
|
||||
commitOperate(menuOperate.StationStand.setRunLevel, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standControl.doShow(operate, this.selected, []);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 查询站台状态
|
||||
detail() {
|
||||
commitOperate(menuOperate.StationStand.detail, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standDetail.doShow(operate, this.selected, []);
|
||||
}
|
||||
});
|
||||
},
|
||||
triggerFaultManagement() {
|
||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
275
src/jmapNew/theme/datie_02/menus/menuSwitch.vue
Normal file
275
src/jmapNew/theme/datie_02/menus/menuSwitch.vue
Normal file
@ -0,0 +1,275 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<section-control ref="sectionControl" pop-class="chengdou-03__systerm" />
|
||||
<switch-control ref="switchControl" pop-class="chengdou-03__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
<switch-hook-lock ref="switchHookLock" pop-class="chengdou-03__systerm" />
|
||||
<set-fault ref="setFault" pop-class="chengdou-03__systerm" />
|
||||
<draw-select ref="drawSelect" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import DrawSelect from './dialog/drawSelect';
|
||||
import SectionControl from '@/jmapNew/theme/components/menus/dialog/sectionControl';
|
||||
import SwitchControl from '@/jmapNew/theme/components/menus/dialog/switchControl';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFaultNew';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import SwitchHookLock from '@/jmapNew/theme/components/menus/dialog/switchHookLock';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'SwitchMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
SectionControl,
|
||||
SwitchControl,
|
||||
NoticeInfo,
|
||||
SetFault,
|
||||
SwitchHookLock,
|
||||
DrawSelect
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: '图纸调用',
|
||||
handler: this.drawingCall
|
||||
},
|
||||
{
|
||||
label: '基础设备培训',
|
||||
handler: this.baDeTrCall
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
// {
|
||||
// label: '单操到定位',
|
||||
// handler: this.locate,
|
||||
// cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
|
||||
// },
|
||||
// {
|
||||
// label: '单操到反位',
|
||||
// handler: this.reverse,
|
||||
// cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
|
||||
// },
|
||||
// {
|
||||
// label: '道岔单锁',
|
||||
// handler: this.lock,
|
||||
// cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||
// },
|
||||
// {
|
||||
// label: '道岔解锁',
|
||||
// handler: this.unlock,
|
||||
// cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||
// },
|
||||
// {
|
||||
// label: '道岔封锁',
|
||||
// handler: this.block,
|
||||
// cmdType: CMD.Switch.CMD_SWITCH_BLOCK
|
||||
// },
|
||||
// {
|
||||
// label: '道岔解封',
|
||||
// handler: this.unblock,
|
||||
// cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
|
||||
// },
|
||||
// {
|
||||
// label: '区故解',
|
||||
// handler: this.fault,
|
||||
// cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
|
||||
// }
|
||||
// {
|
||||
// label: '属性',
|
||||
// handler: this.undeveloped,
|
||||
// auth: { station: true, center: true },
|
||||
// cmdType: CMD.Switch.
|
||||
// }
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage
|
||||
},
|
||||
{
|
||||
label: '触发故障管理',
|
||||
handler: this.triggerFaultManagement,
|
||||
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = this.menuNormal.Local;
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
if (!this.$store.state.scriptRecord.bgSet) {
|
||||
const menuHook = [{
|
||||
label: '道岔钩锁',
|
||||
handler: this.hookLock
|
||||
}];
|
||||
this.menu = [...this.menuForce, ...menuHook];
|
||||
} else {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
drawingCall() {
|
||||
this.$refs.drawSelect.doShow(this.selected, 'drawing');
|
||||
},
|
||||
baDeTrCall() {
|
||||
this.$refs.drawSelect.doShow(this.selected, 'baDeTr');
|
||||
},
|
||||
doShow(point) {
|
||||
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();
|
||||
}
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔单锁
|
||||
lock() {
|
||||
commitOperate(menuOperate.Switch.lock, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔解锁
|
||||
unlock() {
|
||||
commitOperate(menuOperate.Switch.unlock, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔封锁
|
||||
block() {
|
||||
commitOperate(menuOperate.Switch.block, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔解封
|
||||
unblock() {
|
||||
commitOperate(menuOperate.Switch.unblock, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔故障解锁/ 区故解
|
||||
fault() {
|
||||
commitOperate(menuOperate.Switch.fault, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段激活
|
||||
active() {
|
||||
commitOperate(menuOperate.Switch.active, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 单操到定位
|
||||
locate() {
|
||||
commitOperate(menuOperate.Switch.locate, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 单操到反位
|
||||
reverse() {
|
||||
commitOperate(menuOperate.Switch.reverse, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔钩锁
|
||||
hookLock() {
|
||||
this.$refs.switchHookLock.doShow(this.selected);
|
||||
},
|
||||
undeveloped() {
|
||||
this.doClose();
|
||||
this.$alert('实现中......', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => {
|
||||
}
|
||||
});
|
||||
},
|
||||
triggerFaultManagement() {
|
||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
211
src/jmapNew/theme/datie_02/menus/menuTool.vue
Normal file
211
src/jmapNew/theme/datie_02/menus/menuTool.vue
Normal file
@ -0,0 +1,211 @@
|
||||
<template>
|
||||
<div id="menuTool">
|
||||
<div class="nav">
|
||||
<div v-for="(item,index) in tools" :key="index" class="tool">
|
||||
<img :src="item.src" :alt="item.title">
|
||||
</div>
|
||||
<img class="logo" :src="logoImg">
|
||||
<system-time
|
||||
v-if="isShowSystemTime"
|
||||
class="time"
|
||||
:time="time"
|
||||
:zoom="2"
|
||||
:width="180"
|
||||
:height="48"
|
||||
:fine="2"
|
||||
:top="6"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { prefixIntrger } from '@/utils/date';
|
||||
import SystemTime from '@/views/components/systemTime/index';
|
||||
import logo_ from '@/assets/logo_.png';
|
||||
|
||||
export default {
|
||||
name: 'MenuTool',
|
||||
components: {
|
||||
SystemTime
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
logoImg: logo_,
|
||||
time: '00:0000',
|
||||
tools: [
|
||||
{
|
||||
title: '服务器1',
|
||||
operate: '',
|
||||
src: logo_,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '服务器2',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '前置机1',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '前置机2',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '主调',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '调度台1',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '调度台2',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '调度台3',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '大屏',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '维护工作站',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '运行图显示人工站',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '跳停',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '扣车',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '列车报警',
|
||||
operate: '',
|
||||
src: logo_,
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
isShowSystemTime() {
|
||||
return this.$route.params.mode == 'demon' || this.$route.params.mode === 'dp' || !this.$route.params.mode;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.training.initTime': function (initTime) {
|
||||
const date = new Date(initTime);
|
||||
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}${prefixIntrger(date.getSeconds(), 2)}`;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initTools();
|
||||
},
|
||||
methods: {
|
||||
initTools() {
|
||||
this.tools = [];
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped rel="stylesheet/scss" lang="scss">
|
||||
@import "src/styles/mixin.scss";
|
||||
$top: 30px;
|
||||
$width: 50px;
|
||||
$height: 50px;
|
||||
|
||||
#menuTool {
|
||||
z-index: 5;
|
||||
position: absolute;
|
||||
top: $top;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.nav {
|
||||
display: block;
|
||||
height: $height;
|
||||
line-height: $height;
|
||||
color: #0000;
|
||||
background: #ECE9D8;
|
||||
border: 1px solid #B6BCCC !important;
|
||||
border-bottom: 2px solid #B6BCCC !important;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.tool {
|
||||
background: #808080;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
float: left;
|
||||
height: $height - 2;
|
||||
width: $width + 15;
|
||||
margin: 1px;
|
||||
|
||||
img {
|
||||
display: block;
|
||||
text-align: center;
|
||||
padding-top: 4px;
|
||||
height: $height - 10;
|
||||
width: $width - 10;
|
||||
}
|
||||
}
|
||||
|
||||
.time {
|
||||
position: relative;
|
||||
float: right;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.logo {
|
||||
position: relative;
|
||||
float: right;
|
||||
text-align: center;
|
||||
margin: 1px 10px;
|
||||
height: $height - 4;
|
||||
width: $width - 4;
|
||||
}
|
||||
</style>
|
428
src/jmapNew/theme/datie_02/menus/menuTrain.vue
Normal file
428
src/jmapNew/theme/datie_02/menus/menuTrain.vue
Normal file
@ -0,0 +1,428 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
<train-control ref="trainControl" />
|
||||
<train-edit-number ref="trainEditNumber" />
|
||||
<train-create-number ref="trainCreateNumber" />
|
||||
<train-move-number ref="trainMoveNumber" />
|
||||
<train-delete-number ref="trainDeleteNumber" />
|
||||
<train-detail-info ref="trainDetailInfo" />
|
||||
<set-fault ref="setFault" pop-class="chengdou-03__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFaultNew';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import TrainControl from './dialog/trainControl';
|
||||
import TrainEditNumber from './dialog/trainEditNumber';
|
||||
import TrainMoveNumber from './dialog/trainMoveNumber';
|
||||
import TrainCreateNumber from './dialog/trainCreateNumber';
|
||||
import TrainDeleteNumber from './dialog/trainDeleteNumber';
|
||||
import TrainDetailInfo from './dialog/trainDetailInfo';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'MenuTrain',
|
||||
components: {
|
||||
PopMenu,
|
||||
NoticeInfo,
|
||||
TrainControl,
|
||||
TrainEditNumber,
|
||||
TrainMoveNumber,
|
||||
TrainCreateNumber,
|
||||
TrainDeleteNumber,
|
||||
TrainDetailInfo,
|
||||
SetFault
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: '新建计划列车',
|
||||
handler: this.createPlanTrain,
|
||||
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '新建车组号',
|
||||
handler: this.createTrainNo
|
||||
},
|
||||
{
|
||||
label: '移动车组号',
|
||||
handler: this.moveTrainNo
|
||||
},
|
||||
{
|
||||
label: '删除车组号',
|
||||
handler: this.deleteTrainNo
|
||||
},
|
||||
{
|
||||
label: '修改车组号',
|
||||
handler: this.editTrainNo
|
||||
},
|
||||
{
|
||||
label: '设计划车',
|
||||
handler: this.setPlanTrainId
|
||||
},
|
||||
{
|
||||
label: '设目的地',
|
||||
handler: this.destinationTrainId
|
||||
},
|
||||
{
|
||||
label: '设人工车',
|
||||
handler: this.artificialTrainId
|
||||
},
|
||||
{
|
||||
label: '设特殊人工车',
|
||||
handler: this.undeveloped
|
||||
},
|
||||
{
|
||||
label: '详细列车信息',
|
||||
handler: this.detailTrainInfo
|
||||
},
|
||||
{
|
||||
label: '属性',
|
||||
handler: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage
|
||||
},
|
||||
{
|
||||
label: '触发故障管理',
|
||||
handler: this.triggerFaultManagement
|
||||
}
|
||||
],
|
||||
menuDirective: [
|
||||
{
|
||||
label: '确认运行至前方站',
|
||||
handler: this.nextStation
|
||||
},
|
||||
{
|
||||
label: '进路闭塞法行车',
|
||||
handler: this.routeBlockRun
|
||||
},
|
||||
{
|
||||
label: '越引导信号行驶',
|
||||
handler: this.handleOverFuideSignal
|
||||
},
|
||||
{
|
||||
label: '越红灯行驶',
|
||||
handler: this.handleOverEedLight
|
||||
}
|
||||
],
|
||||
menuSpeed: [
|
||||
{
|
||||
label: '确认运行至前方站',
|
||||
handler: this.limitSpeed
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode',
|
||||
'memberList'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function () {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Train) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
if (!this.$store.state.scriptRecord.bgSet) {
|
||||
this.menu = [...this.menuForce, ...this.menuDirective];
|
||||
} else {
|
||||
this.menu = [...this.menuForce];
|
||||
}
|
||||
}
|
||||
// 指令模式列表
|
||||
if (this.operatemode === OperateMode.DIRECTIVE) {
|
||||
if (!this.$store.state.scriptRecord.bgSet) {
|
||||
this.menu = [...this.menuDirective];
|
||||
}
|
||||
}
|
||||
},
|
||||
doShow(point) {
|
||||
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();
|
||||
}
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
triggerFaultManagement() {
|
||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
||||
},
|
||||
nextStation() {
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: 'Drive_Ahead',
|
||||
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
|
||||
params: {}
|
||||
};
|
||||
commitTrainSend(group, param).then(({valid, operate})=>{
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
routeBlockRun() {
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: 'Route_Block_Drive',
|
||||
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
|
||||
params: {}
|
||||
};
|
||||
commitTrainSend(group, param).then(({valid, operate})=>{
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
handleOverFuideSignal() {
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: 'Drive_Through_The_Guide_Signal',
|
||||
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
|
||||
params: {}
|
||||
};
|
||||
commitTrainSend(group, param).then(({valid, operate})=>{
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
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) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 限速行驶
|
||||
limitSpeed() {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
|
||||
operation: OperationEvent.Train.limitSpeed.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 设计划车
|
||||
setPlanTrainId() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
|
||||
operation: OperationEvent.Train.setPlanTrainId.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainControl.doShow(operate, this.selected);
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设目的地车
|
||||
destinationTrainId() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
|
||||
operation: OperationEvent.Train.destinationTrainId.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainControl.doShow(operate, this.selected);
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设人工车
|
||||
artificialTrainId() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
|
||||
operation: OperationEvent.Train.artificialTrainId.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainControl.doShow(operate, this.selected);
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 详细列车信息
|
||||
detailTrainInfo() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
|
||||
operation: OperationEvent.Train.detailTrainInfo.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainDetailInfo.doShow(operate, this.selected);
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 创建车组号
|
||||
createTrainNo() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
|
||||
operation: OperationEvent.Train.createTrainNo.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainCreateNumber.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 删除车组号
|
||||
deleteTrainNo() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
|
||||
operation: OperationEvent.Train.deleteTrainNo.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainDeleteNumber.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 修改车组号
|
||||
editTrainNo() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
|
||||
operation: OperationEvent.Train.editTrainNo.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainEditNumber.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 移动车组号
|
||||
moveTrainNo() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
|
||||
operation: OperationEvent.Train.moveTrainNo.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainMoveNumber.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
undeveloped() {
|
||||
this.doClose();
|
||||
this.$alert('实现中......', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
216
src/jmapNew/theme/datie_02/menus/passiveDialog/alarm.vue
Normal file
216
src/jmapNew/theme/datie_02/menus/passiveDialog/alarm.vue
Normal file
@ -0,0 +1,216 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm alarm-detail"
|
||||
:title="level+'级告警详细信息'"
|
||||
:visible.sync="show"
|
||||
width="760px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form label-width="80px" size="mini">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="线路名称">
|
||||
<el-input v-model="model.lineName" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单位名称">
|
||||
<el-input v-model="model.unitName" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="模块名称">
|
||||
<el-input v-model="model.moduleName" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="9">
|
||||
<el-form-item label="报警时间">
|
||||
<el-date-picker v-model="model.alarmDate" type="datetime" placeholder="选择日期时间" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item>
|
||||
<span slot="label">等 级</span>
|
||||
<el-input v-model="model.level" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="确认状态">
|
||||
<el-input v-model="model.confirm" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="9" class="alarm-type">
|
||||
<el-form-item>
|
||||
<span slot="label">类  型</span>
|
||||
<el-input v-model="model.type" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="15" class="alarm-child-type">
|
||||
<el-form-item label="子类型">
|
||||
<el-input v-model="model.childType" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="时间摘要">
|
||||
<el-input v-model="model.timeSummary" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="推荐操作">
|
||||
<el-input v-model="model.recommendedOperation" disabled />
|
||||
</el-form-item>
|
||||
<div class="alarm-detail-description">
|
||||
<span> 报警详细描述</span><br>
|
||||
<el-input v-model="model.alarmDetail" type="textarea" :rows="5" placeholder="请输入内容" disabled />
|
||||
</div>
|
||||
</el-form>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="3" :offset="9">
|
||||
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit">确 定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<span style="line-height:26px">未确认{{ level }}级报警数目:1</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'AlarmDetail',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
level: 0,
|
||||
operate: null,
|
||||
controlProps: {
|
||||
'01': '中控',
|
||||
'02': '站控'
|
||||
},
|
||||
model: {
|
||||
lineName: '',
|
||||
unitName: '',
|
||||
moduleName: '',
|
||||
level: '',
|
||||
confirm: '',
|
||||
alarmDate: '',
|
||||
type: '',
|
||||
childType: '',
|
||||
timeSummary: '',
|
||||
recommendedOperation: '',
|
||||
alarmDetail: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'name'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// '$store.state.socket.msgHead': function (elem) {
|
||||
// if (elem && elem.hasOwnProperty('success')) {
|
||||
// if (elem.success) {
|
||||
// const operate = this.$store.state.training.operate;
|
||||
// console.log(elem);
|
||||
// elem.stationCodes.forEach(stationCode => {
|
||||
// const station = this.$store.getters['map/getDeviceByCode'](elem.stationCodes);
|
||||
// const newOperate = {
|
||||
// type: operate.type,
|
||||
// name: station.name
|
||||
// };
|
||||
|
||||
// this.doShow(newOperate);
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.model = {
|
||||
lineName: this.name,
|
||||
unitName: this.operate.name,
|
||||
moduleName: 'CMM控制模式转换模式',
|
||||
level: '0级告警',
|
||||
confirm: '确认状态',
|
||||
alarmDate: new Date(),
|
||||
type: '系统事件',
|
||||
childType: '依据信号设备操作命令设置控制模式',
|
||||
timeSummary: '控制模式摘要',
|
||||
recommendedOperation: '',
|
||||
alarmDetail: `控制模式转换:${this.operate.name}由中控转为站控模式!`
|
||||
};
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
if (this.dialogShow) {
|
||||
this.$store.dispatch('socket/shiftMsgQueue');
|
||||
}
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.alarm.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.alarm.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
isClose() {
|
||||
return this.dialogShow;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
.alarm-type .el-input {
|
||||
width: 220px;
|
||||
}
|
||||
|
||||
.alarm-detail-description {
|
||||
padding-left: 12px;
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
109
src/jmapNew/theme/datie_02/menus/passiveDialog/timeout.vue
Normal file
109
src/jmapNew/theme/datie_02/menus/passiveDialog/timeout.vue
Normal file
@ -0,0 +1,109 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm cmd-notice"
|
||||
title="操作命令提示"
|
||||
:visible.sync="show"
|
||||
width="400px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<span>{{ name }},{{ msg }}!</span>
|
||||
<el-row class="button-group">
|
||||
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit">确认</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
export default {
|
||||
name: 'CmdNotice',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
name: '',
|
||||
msg: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// '$store.state.socket.msgHead': function (elem) {
|
||||
// if (elem && (elem.hasOwnProperty('success') || elem.hasOwnProperty('timeout'))) {
|
||||
// let operate = this.$store.state.training.operate;
|
||||
// let control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
|
||||
// let station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
|
||||
// let newOperate = {
|
||||
// type: operate.type,
|
||||
// name: station.name,
|
||||
// }
|
||||
|
||||
// if (elem.timeout) {
|
||||
// newOperate['msg'] = '请求超时';
|
||||
// this.doShow(newOperate);
|
||||
// } else if (!elem.success) {
|
||||
// newOperate['msg'] = '请求拒绝';
|
||||
// this.doShow(newOperate);
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.name = this.operate.name || '';
|
||||
this.msg = this.operate.msg || '';
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
if (this.dialogShow) {
|
||||
this.$store.dispatch('socket/shiftMsgQueue');
|
||||
}
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.close.notice.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.notice.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
isClose() {
|
||||
return this.dialogShow;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
71
src/jmapNew/theme/datie_02/model.js
Normal file
71
src/jmapNew/theme/datie_02/model.js
Normal file
@ -0,0 +1,71 @@
|
||||
import deviceType from '../../constant/deviceType';
|
||||
|
||||
class Model {
|
||||
constructor() {
|
||||
this.screenLine = 3;
|
||||
// 公共字段部分默认初始值
|
||||
this['public'] = {};
|
||||
this['public'][deviceType.Signal] = {
|
||||
lampPositionType: '02',
|
||||
lampPostType: '02'
|
||||
};
|
||||
|
||||
// 私有字段部分默认初始值
|
||||
this['private'] = {};
|
||||
this['private'][deviceType.StationControl] = {
|
||||
indicatorShow: true // 标识灯名称显示
|
||||
};
|
||||
this['private'][deviceType.Station] = {
|
||||
kmPostShow: true // 公里标显示
|
||||
};
|
||||
this['private'][deviceType.Switch] = {
|
||||
nameShow: true
|
||||
};
|
||||
this['private'][deviceType.Section] = {
|
||||
nameShow: true,
|
||||
borderBorderShow: true, // 区段边界显示
|
||||
destinationNameShow: true, // 目的地码名称显示
|
||||
standTrackNameShow: true, // 站台轨名称显示
|
||||
reentryTrackNameShow: true, // 折返轨名称显示
|
||||
transferTrackNameShow: true // 转换轨名称显示
|
||||
};
|
||||
this['private'][deviceType.Signal] = {
|
||||
nameShow: true, // 信号机名称显示
|
||||
linkageAutoRouteShow: true, // 联锁自动进路表示灯显示
|
||||
atsAutoTriggerShow: true // ATS自动触发表示灯显示
|
||||
};
|
||||
this['private'][deviceType.Train] = {
|
||||
};
|
||||
this['private'][deviceType.TrainWindow] = {
|
||||
trainWindowShow: true
|
||||
};
|
||||
}
|
||||
|
||||
initPublicProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.public[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return model;
|
||||
}
|
||||
|
||||
initPrivateProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.private[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return model;
|
||||
}
|
||||
}
|
||||
|
||||
export default new Model();
|
945
src/jmapNew/theme/datie_02/operationConfig.js
Normal file
945
src/jmapNew/theme/datie_02/operationConfig.js
Normal file
@ -0,0 +1,945 @@
|
||||
// SECTION 区段
|
||||
// SWITCH 道岔
|
||||
// SIGNAL 信号机
|
||||
// START_SIGNAL 进路起始信号机
|
||||
// END_SIGNAL 进路终端信号机
|
||||
|
||||
// STATION 车站
|
||||
// STAND 站台
|
||||
// ROUTE 进路
|
||||
// CYCLE 自动折返
|
||||
|
||||
// {id: "1", trainingType: "ControlConvertMenu", name: "车站名称"}
|
||||
// {id: "2", trainingType: "ControlConvertMenu", name: "车站控制模式编号"}
|
||||
// {id: "3", trainingType: "Signal", name: "进路名称"}
|
||||
// {id: "4", trainingType: "Signal", name: "进路编号"}
|
||||
// {id: "5", trainingType: "Signal", name: "信号机名称"}
|
||||
// {id: "6", trainingType: "Signal", name: "信号机编号"}
|
||||
|
||||
// {id: "7", trainingType: "Switch", name: "道岔名称"}
|
||||
|
||||
// {id: "8", trainingType: "Section", name: "物理区段名称"}
|
||||
// {id: "9", trainingType: "Section", name: "逻辑区段名称"}
|
||||
|
||||
// {id: "10", trainingType: "Stand", name: "车站名称"}
|
||||
// {id: "11", trainingType: "Stand", name: "站台行驶方向编号"}
|
||||
// {id: "12", trainingType: "Stand", name: "站台行驶方向"}
|
||||
// {id: "13", trainingType: "Stand", name: "站台行驶方向编号(反)"}
|
||||
// {id: "14", trainingType: "Stand", name: "站台行驶方向(反)"}
|
||||
// {id: "29", trainingType: "Stand", name: "站台名称"}
|
||||
// {id: "30", trainingType: "Stand", name: "站台编码"}
|
||||
|
||||
// {id: "15", trainingType: "Switch", name: "道岔位置"}
|
||||
// {id: "16", trainingType: "Switch", name: "道岔位置(反)"}
|
||||
// {id: "17", trainingType: "Switch", name: "道岔编码"}
|
||||
|
||||
// {id: "18", trainingType: "Section", name: "逻辑区段编码"}
|
||||
// {id: "19", trainingType: "Section", name: "区段编号"}
|
||||
// {id: "20", trainingType: "Section", name: "车站名称"}
|
||||
|
||||
// {id: "21", trainingType: "Switch", name: "车站名称"}
|
||||
// {id: "22", trainingType: "Section", name: "车站编号"}
|
||||
// {id: "23", trainingType: "Switch", name: "车站编号"}
|
||||
// {id: "24", trainingType: "Switch", name: "道岔计轴区段编号"}
|
||||
// {id: "25", trainingType: "Switch", name: "道岔计轴区段名称"}
|
||||
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
export default {
|
||||
list: [
|
||||
// 控制模式
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL.value,
|
||||
skinCode: '04',
|
||||
trainingName: '请求站控({2})',
|
||||
trainingRemark: '请求站控功能',
|
||||
trainingType: 'ControlConvertMenu',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【站控】', codeType:'STATION', subType:'substation' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL.value,
|
||||
skinCode: '04',
|
||||
trainingName: '请求紧急站控({2})',
|
||||
trainingRemark: '请求紧急站控功能',
|
||||
trainingType: 'ControlConvertMenu',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【紧急站控】', codeType:'STATION', subType:'emergency' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL.value,
|
||||
skinCode: '04',
|
||||
trainingName: '请求中控({2})',
|
||||
trainingRemark: '请求中控功能',
|
||||
trainingType: 'ControlConvertMenu',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【中控】', codeType:'STATION', subType:'center' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.ControlConvertMenu.CMD_CM_INTERLOCK_CONTROL.value,
|
||||
skinCode: '04',
|
||||
trainingName: '请求联锁控({2})',
|
||||
trainingRemark: '请求联锁控功能',
|
||||
trainingType: 'ControlConvertMenu',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【联锁控】', codeType:'STATION', subType:'interconnected' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
// 信号机列表
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_SET_ROUTE.value,
|
||||
skinCode: '04',
|
||||
trainingName: '办理进路({3} 进路)',
|
||||
trainingRemark: '办理进路功能',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '301', tip: '鼠标右键菜单选择【办理进路】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3011', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '3012', tip: '鼠标左键点击【执行】按钮' },
|
||||
{ deviceType: '04', orderNum: 4, operateCode: '301', tip: '输入密码123,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_SET_ROUTE.value,
|
||||
skinCode: '04',
|
||||
trainingName: '办理进路({3} 进路)',
|
||||
trainingRemark: '办理进路功能',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '3010', tip: '鼠标左键点击【排列进路】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3010', tip: '鼠标左键点击【{5}】', codeType:'START_SIGNAL' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '3010', tip: '鼠标左键点击【{5}】', codeType:'END_SIGNAL' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE.value,
|
||||
skinCode: '04',
|
||||
trainingName: '办理引导进路({3})',
|
||||
trainingRemark: '进路办理信号引导',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '308', tip: '鼠标右键菜单选择【办理引导进路】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '308', tip: '输入密码123,点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '3086', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' },
|
||||
{ deviceType: '04', orderNum: 4, operateCode: '3082', tip: '鼠标左键点击【执行】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE.value,
|
||||
skinCode: '04',
|
||||
trainingName: '引导进路({3})[进路已锁闭]',
|
||||
trainingRemark: '进路办理信号引导',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '3080', tip: '鼠标左键点击【引导进路】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3080', tip: '鼠标左键点击【{5}】', codeType:'START_SIGNAL'}, // 进路编号值不正确
|
||||
{ deviceType: 'mbm', orderNum: 3, operateCode: '0011', tip: '输入密码123,点击【确定】按钮', codeType: 'START_SIGNAL' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE.value,
|
||||
skinCode: '04',
|
||||
trainingName: '取消进路({3} 进路)',
|
||||
trainingRemark: '取消进路功能',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '303', tip: '鼠标右键菜单选择【取消进路】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '303', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE.value,
|
||||
skinCode: '04',
|
||||
trainingName: '取消进路({3} 进路)',
|
||||
trainingRemark: '取消进路功能(总取消)',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2994', tip: '鼠标左键点击【总取消】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '2994', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE.value,
|
||||
skinCode: '04',
|
||||
trainingName: '取消引导({3})',
|
||||
trainingRemark: '取消引导进路功能(总取消)',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2994', tip: '鼠标左键点击【总取消】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '2994', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE.value,
|
||||
skinCode: '04',
|
||||
trainingName: '总人解({3})',
|
||||
trainingRemark: '总人解',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '305', tip: '鼠标右键菜单选择【总人解】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3050', tip: '输入密码123,点击【执行】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '305', tip: '鼠标左键点击【确定】按钮' },
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE.value,
|
||||
skinCode: '04',
|
||||
trainingName: '总人解({3})',
|
||||
trainingRemark: '总人解',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '3050', tip: '鼠标左键点击【总人解】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '3050', tip: '鼠标左键点击【{5}】', val: '{6}', codeType:'SIGNAL' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 8,
|
||||
minDuration: 5,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL.value,
|
||||
skinCode: '04',
|
||||
trainingName: '信号重开({5})',
|
||||
trainingRemark: '信号重开功能',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '304', tip: '鼠标右键菜单选择【信号重开】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '304', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 8,
|
||||
minDuration: 5,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL.value,
|
||||
skinCode: '04',
|
||||
trainingName: '信号重开({5})',
|
||||
trainingRemark: '信号重开功能',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '3010', tip: '鼠标左键点击【排列进路】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3010', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_BLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '信号封锁({5})',
|
||||
trainingRemark: '信号封锁',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '306', tip: '鼠标右键菜单选择【信号封锁】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '306', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_BLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '信号封锁({5})',
|
||||
trainingRemark: '信号封锁功能',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2991', tip: '鼠标左键点击【封锁】' },
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2991', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_UNBLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '信号解封({5})',
|
||||
trainingRemark: '信号解封',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '307', tip: '鼠标右键菜单选择【信号解封】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3072', tip: '鼠标左键点击【确认】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '307', tip: '输入密码123,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_UNBLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '信号解封({5})',
|
||||
trainingRemark: '信号解封功能',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2992', tip: '鼠标左键点击【解封】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '2992', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING.value,
|
||||
skinCode: '04',
|
||||
trainingName: '进路收人工控({3})',
|
||||
trainingRemark: '进路收人工控',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '314', tip: '鼠标右键菜单选择【进路收人工控】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3141', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '314', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING.value,
|
||||
skinCode: '04',
|
||||
trainingName: '人工控({5})',
|
||||
trainingRemark: '人工控',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '3140', tip: '鼠标左键点击【人工控】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3140', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
|
||||
],
|
||||
// 成都三号线 特殊配置 类似于哈尔滨线的 atp/联锁进路 配置
|
||||
config:{onlySignalOP:true}
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING.value,
|
||||
skinCode: '04',
|
||||
trainingName: '进路交自动控({3})',
|
||||
trainingRemark: '进路交自动控',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '315', tip: '鼠标右键菜单选择【进路交自动控】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3151', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '315', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING.value,
|
||||
skinCode: '04',
|
||||
trainingName: '自动控({5})',
|
||||
trainingRemark: '自动控',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '3150', tip: '鼠标左键点击【自动控】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3150', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
|
||||
],
|
||||
config:{onlySignalOP:true}
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType:CMD.Signal.CMD_SIGNAL_DETAIL.value,
|
||||
skinCode: '04',
|
||||
trainingName: '查询进路信息({5} 信号机)',
|
||||
trainingRemark: '查询进路信息',
|
||||
trainingType:'Signal',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '316', tip: '鼠标右键菜单选择【进路信息】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '316', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
// 道岔列表
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION.value, // 0312 新增定位字典
|
||||
skinCode: '04',
|
||||
trainingName: '单操到定位({7})',
|
||||
trainingRemark: '单操到定位({15})',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '101', tip: '鼠标右键菜单选择【单操到定位】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '101', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION.value,
|
||||
skinCode: '04',
|
||||
trainingName: '单操到定位({7})',
|
||||
trainingRemark: '单操到定位({7})',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '1010', tip: '鼠标左键点击【道岔定操】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '1010', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION.value, // 0313 新增定位字典
|
||||
skinCode: '04',
|
||||
trainingName: '单操到反位({7})',
|
||||
trainingRemark: '单操到反位({7})',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '102', tip: '鼠标右键菜单选择【单操到反位】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '102', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION.value,
|
||||
skinCode: '04',
|
||||
trainingName: '单操到反位({7})',
|
||||
trainingRemark: '单操到反位({7})',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '1020', tip: '鼠标左键点击【道岔反操】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '1020', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '道岔单锁({7})',
|
||||
trainingRemark: '道岔单锁功能',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '103', tip: '鼠标右键菜单选择【道岔单锁】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '103', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '道岔单锁({7})',
|
||||
trainingRemark: '道岔单锁功能',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['01'], // 现地操作
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '1030', tip: '鼠标左键点击【道岔单锁】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '1030', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '道岔解锁({7})',
|
||||
trainingRemark: '道岔解锁功能',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '104', tip: '鼠标右键菜单选择【道岔解锁】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '104', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '道岔解锁({7})',
|
||||
trainingRemark: '道岔解锁功能',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '1040', tip: '鼠标左键点击【道岔解锁】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' },
|
||||
{ deviceType: '02', orderNum: 3, operateCode: '1040', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_BLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '道岔封锁({7})',
|
||||
trainingRemark: '道岔封锁功能',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '105', tip: '鼠标右键菜单选择【道岔封锁】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '1051', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '02', orderNum: 3, operateCode: '105', tip: '输入密码123,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_BLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '道岔封锁({7})',
|
||||
trainingRemark: '道岔封锁功能',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '2991', tip: '鼠标左键点击【封锁】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '2991', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_UNBLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '道岔解封({7})',
|
||||
trainingRemark: '道岔解封功能',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '106', tip: '鼠标右键菜单选择【道岔解封】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '1062', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '02', orderNum: 3, operateCode: '106', tip: '输入密码123,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Switch.CMD_SWITCH_UNBLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '道岔解封({7})',
|
||||
trainingRemark: '道岔解封功能',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '2992', tip: '鼠标左键点击【解封】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' },
|
||||
{ deviceType: '02', orderNum: 3, operateCode: '2992', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 20,
|
||||
minDuration: 10,
|
||||
operateType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '区故解({7})',
|
||||
trainingRemark: '道岔区段故障解锁功能',
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '109', tip: '鼠标右键菜单选择【区故解】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '1092', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '02', orderNum: 3, operateCode: '109', tip: '输入密码123,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
// 区段列表
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Section.CMD_SECTION_FAULT_UNLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '区故解({8}{9})',
|
||||
trainingRemark: '故障解锁功能',
|
||||
trainingType: 'Section',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '03', orderNum: 1, operateCode: '402', tip: '鼠标右键菜单选择【区故解】' },
|
||||
{ deviceType: '03', orderNum: 2, operateCode: '4023', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '03', orderNum: 3, operateCode: '402', tip: '输入密码123,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Section.CMD_SECTION_FAULT_UNLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '区故解({8}{9})',
|
||||
trainingRemark: '故障解锁功能',
|
||||
trainingType: 'Section',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '03', orderNum: 1, operateCode: '4020', tip: '鼠标左键点击【区故解】'},
|
||||
{ deviceType: '03', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' },
|
||||
{ deviceType: '03', orderNum: 3, operateCode: '4020', tip: '鼠标左键点击【{8}{9}】', codeType:'SECTION' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Section.CMD_SECTION_DETAILS.value,
|
||||
skinCode: '04',
|
||||
trainingName: '属性({8}{9})',
|
||||
trainingRemark: '区段详情({8}{9})',
|
||||
trainingType: 'Section',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '03', orderNum: 1, operateCode: '410', tip: '鼠标右键菜单选择【属性】' },
|
||||
{ deviceType: '03', orderNum: 2, operateCode: '410', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
// 站台列表
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN.value,
|
||||
skinCode: '04',
|
||||
trainingName: '设置扣车({10}-{12}站台)',
|
||||
trainingRemark: '设置扣车功能',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '504', tip: '鼠标右键菜单选择【设置扣车】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '504', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN.value,
|
||||
skinCode: '04',
|
||||
trainingName: '取消扣车({10}-{12}站台)',
|
||||
trainingRemark: '设置取消扣车功能',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '505', tip: '鼠标右键菜单选择【取消扣车】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '505', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN.value,
|
||||
skinCode: '04',
|
||||
trainingName: '全线取消扣车',
|
||||
trainingRemark: '设置取消扣车功能({12}全线)',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '505', tip: '鼠标右键菜单选择【取消扣车】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: 'com01', tip: '鼠标左键点击【{12}全线】按钮', val: 'true' },
|
||||
{ deviceType: '06', orderNum: 3, operateCode: '505', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_SET_JUMP_STOP.value,
|
||||
skinCode: '04',
|
||||
trainingName: '设置跳停({10}-{12}站台)',
|
||||
trainingRemark: '设置跳停功能',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】'},
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【跳停】', codeType:'STAND', subType:'StopJumpLamp' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_SET_JUMP_STOP.value,
|
||||
skinCode: '04',
|
||||
trainingName: '设置跳停({10}-{12}站台)',
|
||||
trainingRemark: '设置跳停功能',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '502', tip: '鼠标右键菜单选择【跳停】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP.value,
|
||||
skinCode: '04',
|
||||
trainingName: '取消跳停({10}-{12}站台)',
|
||||
trainingRemark: '设置取消跳停功能',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】'},
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【取消跳停】', codeType:'STAND', subType:'CancelStopJumpLamp' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP.value,
|
||||
skinCode: '04',
|
||||
trainingName: '取消跳停({10}-{12}站台)',
|
||||
trainingRemark: '设置取消跳停功能',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '503', tip: '鼠标右键菜单选择【取消跳停】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_SET_PARK_TIME.value,
|
||||
skinCode: '04',
|
||||
trainingName: '设置停站时间({10}-{12}站台)',
|
||||
trainingRemark: '设置停站时间(自动, 一直有效)',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【设置停站时间】' },
|
||||
{ deviceType: '06', orderNum: 3, operateCode: '509', tip: '鼠标左键点击【确认】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_SET_PARK_TIME.value,
|
||||
skinCode: '04',
|
||||
trainingName: '设置停站时间({10}-{12}站台)',
|
||||
trainingRemark: '设置停站时间(人工, 20秒, 一直有效)',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【设置停站时间】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【人工】', val: '02' },
|
||||
{ deviceType: '06', orderNum: 3, operateCode: '5094', tip: '输入或鼠标点击,调整为【20】', val: '20' },
|
||||
{ deviceType: '06', orderNum: 4, operateCode: '5093', tip: '标左键点击,选择【一直有效】', val: '02' },
|
||||
{ deviceType: '06', orderNum: 5, operateCode: '509', tip: '鼠标左键点击【确认】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_SET_PARK_TIME.value,
|
||||
skinCode: '04',
|
||||
trainingName: '设置停站时间({10}-{12}站台)',
|
||||
trainingRemark: '设置停站时间(人工, 20秒, 一次有效)',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【设置停站时间】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【人工】', val: '02' },
|
||||
{ deviceType: '06', orderNum: 3, operateCode: '5094', tip: '输入或鼠标点击,调整为【20】', val: '20' },
|
||||
{ deviceType: '06', orderNum: 4, operateCode: '509', tip: '鼠标左键点击【确认】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_SET_RUN_TIME.value,
|
||||
skinCode: '04',
|
||||
trainingName: '设置站间运行等级({10}-{12}站台)',
|
||||
trainingRemark: '设置站间运行等级(自动, 一直有效)',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【设置站间运行等级】' },
|
||||
{ deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_SET_RUN_TIME.value,
|
||||
skinCode: '04',
|
||||
trainingName: '设置站间运行等级({10}-{12}站台)',
|
||||
trainingRemark: '设置站间运行等级(人工, 常速, 一直有效)',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【设置站间运行等级】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '5106', tip: '鼠标左键点击,选择【人工】', val: '02' },
|
||||
{ deviceType: '06', orderNum: 3, operateCode: '5107', tip: '鼠标左键点击,取消选择【一直有效】', val: '02' },
|
||||
{ deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Stand.CMD_STAND_SET_RUN_TIME.value,
|
||||
skinCode: '04',
|
||||
trainingName: '设置站间运行等级({10}-{12}站台)',
|
||||
trainingRemark: '设置站间运行等级(人工, 常速, 一次有效)',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【设置站间运行等级】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '5106', tip: '鼠标左键点击,选择【人工】', val: '02' },
|
||||
{ deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 8, // 自动生成实训失败
|
||||
minDuration: 5,
|
||||
operateType: CMD.Stand.CMD_STAND_VIEW_STATUS.value,
|
||||
skinCode: '04',
|
||||
trainingName: '显示站台信息({10}-{12}站台)',
|
||||
trainingRemark: '查询站台状态功能',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '507', tip: '鼠标右键菜单选择【显示站台信息】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '0012', tip: '鼠标左键点击【退出】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO.value,
|
||||
skinCode: '04',
|
||||
trainingName: '设置自动进路({3})',
|
||||
trainingRemark: '设置自动进路功能',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【{3}】', codeType:'BUTTON' }
|
||||
],
|
||||
// 成都三号线 特殊配置 类似于哈尔滨线的 atp/联锁进路 配置
|
||||
config:{autoRouteBT:true}
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO.value,
|
||||
skinCode: '04',
|
||||
trainingName: '取消自动进路({3})',
|
||||
trainingRemark: '取消自动进路功能',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2994', tip: '鼠标左键点击【总取消】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '2994', tip: '鼠标左键点击【{3}】', codeType:'BUTTON' }
|
||||
],
|
||||
// 成都三号线 特殊配置 类似于哈尔滨线的 atp/联锁进路 配置
|
||||
config:{autoRouteBT:true}
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '设置自动折返({3})',
|
||||
trainingRemark: '设置自动折返功能',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【{3}】', codeType:'BUTTON' }
|
||||
],
|
||||
// 成都三号线 特殊配置 类似于哈尔滨线的 atp/联锁进路 配置
|
||||
config:{autoCycleBT:true}
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '取消自动折返({3})',
|
||||
trainingRemark: '取消自动折返功能',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2994', tip: '鼠标左键点击【总取消】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '2994', tip: '鼠标左键点击【{3}】', codeType:'BUTTON' }
|
||||
],
|
||||
// 成都三号线 特殊配置 类似于哈尔滨线的 atp/联锁进路 配置
|
||||
config:{autoCycleBT:true}
|
||||
},
|
||||
/** 引导总锁 */
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Station.CMD_STATION_SET_MASTER_GUIDE_LOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '引导总锁({26})',
|
||||
trainingRemark: '设置引导总锁',
|
||||
trainingType: 'Station',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '609', tip: '鼠标左键点击【引导总锁】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '609', tip: '鼠标左键点击【{26}】', codeType:'BUTTON' }
|
||||
],
|
||||
config:{guideTotalLockBT:true}
|
||||
},
|
||||
/** 取消引导总锁 */
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: CMD.Station.CMD_STATION_CANCEL_MASTER_GUIDE_LOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '取消引导总锁({26})',
|
||||
trainingRemark: '取消引导总锁',
|
||||
trainingType: 'Station',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '609', tip: '鼠标左键点击【引导总锁】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '609', tip: '鼠标左键点击【{26}】', codeType:'BUTTON' }
|
||||
],
|
||||
config:{guideTotalLockBT:true}
|
||||
}
|
||||
// totalGuideLock
|
||||
//
|
||||
]
|
||||
};
|
74
src/jmapNew/theme/datie_02/planConfig.js
Normal file
74
src/jmapNew/theme/datie_02/planConfig.js
Normal file
@ -0,0 +1,74 @@
|
||||
import { convertSheetToList } from '../parser/util';
|
||||
|
||||
export default {
|
||||
/** 运行图解析方式*/
|
||||
type: 'Ratio',
|
||||
|
||||
/** 边缘高度*/
|
||||
edge: 600,
|
||||
|
||||
/** 间隔高度*/
|
||||
multiple: 1,
|
||||
|
||||
/** 偏移时间*/
|
||||
translation: 60 * 60 * 2,
|
||||
|
||||
/** excel解析配置*/
|
||||
excelConfig: {
|
||||
beginRow: 1,
|
||||
beginCol: 0,
|
||||
fieldNum: 8,
|
||||
sepField: '车次',
|
||||
columns: {
|
||||
'车站名称': { key: 'stationName', formatter: (val) => { return val; } },
|
||||
'到点': { key: 'arriveTime', formatter: (val) => { return val; } },
|
||||
'发点': { key: 'departureTime', formatter: (val) => { return val; } }
|
||||
}
|
||||
},
|
||||
|
||||
/** 解析excel数据转换为Json后台数据*/
|
||||
importData(Sheet, JsonData) {
|
||||
var dataList = convertSheetToList(Sheet, false);
|
||||
var needList = Object.keys(this.excelConfig.columns);
|
||||
if (dataList && dataList.length) {
|
||||
for (var rowIndex = this.excelConfig.beginRow; rowIndex < dataList.length; rowIndex += 1) {
|
||||
for (var colIndex = this.excelConfig.beginCol; colIndex < dataList[this.excelConfig.beginCol].length; colIndex += this.excelConfig.fieldNum + 1) {
|
||||
var tripNew, tripObj;
|
||||
var stationObj = {};
|
||||
|
||||
tripNew = tripObj = { code: '', arrivalList: [] };
|
||||
for (var index = 0; index < this.excelConfig.fieldNum; index += 1) {
|
||||
var title = dataList[0][colIndex + index];
|
||||
var value = dataList[rowIndex][colIndex + index];
|
||||
|
||||
if (title && value) {
|
||||
var titleStr = `${title}`.trim();
|
||||
var valueStr = `${value}`.trim();
|
||||
|
||||
if (titleStr.includes(this.excelConfig.sepField)) {
|
||||
tripObj.code = valueStr;
|
||||
JsonData.forEach(elem => {
|
||||
if (elem.code == valueStr) {
|
||||
tripObj = elem;
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 取需要的字段
|
||||
if (needList.findIndex(elem => { return elem == titleStr; }) >= 0) {
|
||||
stationObj[this.excelConfig.columns[titleStr].key] = this.excelConfig.columns[titleStr].formatter(valueStr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tripObj.arrivalList.push(stationObj);
|
||||
if (tripObj.code && tripObj == tripNew) {
|
||||
JsonData.push(tripObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return JsonData;
|
||||
}
|
||||
};
|
@ -50,7 +50,8 @@ class Theme {
|
||||
'12': 'ningbo_03',
|
||||
'13': 'race_01',
|
||||
'14': 'nanjing_02', // 南京二号线
|
||||
'15': 'datie_01'
|
||||
'15': 'datie_01',
|
||||
'16': 'datie_02'
|
||||
};
|
||||
|
||||
this._runplan = {
|
||||
@ -69,7 +70,8 @@ class Theme {
|
||||
'12': 'ningbo_03',
|
||||
'13': 'race_01',
|
||||
'14': 'nanjing_02', // 南京二号线
|
||||
'15': 'datie_01'
|
||||
'15': 'datie_01',
|
||||
'16': 'datie_02'
|
||||
};
|
||||
|
||||
this._localShowMode = { // 现地显示模式
|
||||
@ -87,7 +89,8 @@ class Theme {
|
||||
'12': 'all',
|
||||
'13':'all',
|
||||
'14':'ecStation',
|
||||
'15':'all'
|
||||
'15':'all',
|
||||
'16':'all'
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1747,7 +1747,21 @@ export const OperationEvent = {
|
||||
operation: '322',
|
||||
domId: '_Tips-Signal-conflictRoute-Menu{TOP}'
|
||||
}
|
||||
}
|
||||
},
|
||||
// 点灯 (大铁)
|
||||
signalLight: {
|
||||
menuButton: {
|
||||
operation: '3231',
|
||||
domId: '_Tips-Signal-signalLight-MenuButton{BOTTOM}'
|
||||
}
|
||||
},
|
||||
// 灭灯 (大铁)
|
||||
signalDestroy: {
|
||||
menuButton: {
|
||||
operation: '3232',
|
||||
domId: '_Tips-Signal-signalDestroy-MenuButton{BOTTOM}'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// 物理区段操作
|
||||
|
@ -90,7 +90,16 @@ export default {
|
||||
'ControlSwitch',
|
||||
'Axle',
|
||||
'SwitchFault',
|
||||
'IndicatorLight'
|
||||
'IndicatorLight',
|
||||
'SectionOccupied',
|
||||
'AssistStatus',
|
||||
'TotalAssist',
|
||||
'DepartAssist',
|
||||
'PickAssist',
|
||||
'Recovery',
|
||||
'Accident',
|
||||
'Occlusion',
|
||||
'PickOrDepartArrow'
|
||||
],
|
||||
noNameTypeList: ['FaultStatusGroup', 'ModeStatusGroup', 'LampFilament', 'ReturnModeGroup', 'ControlSwitch', 'Axle'],
|
||||
typeList: [
|
||||
@ -112,7 +121,16 @@ export default {
|
||||
{ name: 'LCW/ATS控制开关', value: 'ControlSwitch'},
|
||||
{ name: '计轴预复位', value: 'Axle'},
|
||||
{ name: '道岔故障', value: 'SwitchFault'},
|
||||
{ name: '指示灯', value: 'IndicatorLight'}
|
||||
{ name: '指示灯', value: 'IndicatorLight'},
|
||||
{ name: '区间占用', value: 'SectionOccupied' },
|
||||
{ name: '辅助状态', value: 'AssistStatus' },
|
||||
{ name: '总辅助', value: 'TotalAssist' },
|
||||
{ name: '发车辅助', value: 'DepartAssist' },
|
||||
{ name: '接车辅助', value: 'PickAssist' },
|
||||
{ name: '复原', value: 'Recovery' },
|
||||
{ name: '事故', value: 'Accident' },
|
||||
{ name: '闭塞', value: 'Occlusion' },
|
||||
{ name: '接发车箭头', value: 'PickOrDepartArrow' }
|
||||
],
|
||||
editModel:getModel('ControlLamp'),
|
||||
addModel:getModel('ControlLamp'),
|
||||
@ -145,6 +163,7 @@ export default {
|
||||
] },
|
||||
{ prop: 'mfNum', label: '报警指示故障数量:', type: 'number', min: 0, isHidden: this.editModel.type !== 'FaultStatusGroup' },
|
||||
{ prop: 'pfNum', label: '电源故障数量:', type: 'number', min: 0, isHidden: this.editModel.type !== 'FaultStatusGroup'},
|
||||
{ prop: 'right', label: '朝右:', type: 'checkbox', isHidden: this.editModel.type !== 'PickOrDepartArrow' },
|
||||
{ prop: 'switchCode', label: '所属道岔:', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.switchList, isHidden: this.editModel.type !== 'SwitchFault', hover: this.hover, buttonType: 'switchSelectCode', buttonShowType: this.isButtonType },
|
||||
{ prop:'stationCode', label: '所属车站:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList}
|
||||
]
|
||||
@ -258,6 +277,15 @@ export default {
|
||||
this.AxleList = [];
|
||||
this.SwitchFaultList = [];
|
||||
this.IndicatorLightList = [];
|
||||
this.SectionOccupiedList = [];
|
||||
this.AssistStatusList = [];
|
||||
this.TotalAssistList = [];
|
||||
this.DepartAssistList = [];
|
||||
this.PickAssistList = [];
|
||||
this.RecoveryList = [];
|
||||
this.AccidentList = [];
|
||||
this.OcclusionList = [];
|
||||
this.PickOrDepartArrowList = [];
|
||||
indicatorLightList.forEach(item => {
|
||||
switch (item._type) {
|
||||
case 'AtsControl':
|
||||
@ -317,6 +345,33 @@ export default {
|
||||
case 'IndicatorLight':
|
||||
this.IndicatorLightList.push(item);
|
||||
break;
|
||||
case 'SectionOccupied':
|
||||
this.SectionOccupiedList.push(item);
|
||||
break;
|
||||
case 'AssistStatus':
|
||||
this.AssistStatusList.push(item);
|
||||
break;
|
||||
case 'TotalAssist':
|
||||
this.TotalAssistList.push(item);
|
||||
break;
|
||||
case 'DepartAssist':
|
||||
this.DepartAssistList.push(item);
|
||||
break;
|
||||
case 'PickAssist':
|
||||
this.PickAssistList.push(item);
|
||||
break;
|
||||
case 'Recovery':
|
||||
this.RecoveryList.push(item);
|
||||
break;
|
||||
case 'Accident':
|
||||
this.AccidentList.push(item);
|
||||
break;
|
||||
case 'Occlusion':
|
||||
this.OcclusionList.push(item);
|
||||
break;
|
||||
case 'PickOrDepartArrow':
|
||||
this.PickOrDepartArrowList.push(item);
|
||||
break;
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -379,6 +434,33 @@ export default {
|
||||
case 'IndicatorLight':
|
||||
this.selectLists = this.IndicatorLightList;
|
||||
break;
|
||||
case 'SectionOccupied':
|
||||
this.selectLists = this.SectionOccupiedList;
|
||||
break;
|
||||
case 'AssistStatus':
|
||||
this.selectLists = this.AssistStatusList;
|
||||
break;
|
||||
case 'TotalAssist':
|
||||
this.selectLists = this.TotalAssistList;
|
||||
break;
|
||||
case 'DepartAssist':
|
||||
this.selectLists = this.DepartAssistList;
|
||||
break;
|
||||
case 'PickAssist':
|
||||
this.selectLists = this.PickAssistList;
|
||||
break;
|
||||
case 'Recovery':
|
||||
this.selectLists = this.RecoveryList;
|
||||
break;
|
||||
case 'Accident':
|
||||
this.selectLists = this.AccidentList;
|
||||
break;
|
||||
case 'Occlusion':
|
||||
this.selectLists = this.OcclusionList;
|
||||
break;
|
||||
case 'PickOrDepartArrow':
|
||||
this.selectLists = this.PickOrDepartArrowList;
|
||||
break;
|
||||
default :
|
||||
this.selectLists = this.intersiteControlList;
|
||||
break;
|
||||
@ -463,6 +545,33 @@ export default {
|
||||
// case 'SwitchFault':
|
||||
// idPrefix = '';
|
||||
// break;
|
||||
case 'SectionOccupied':
|
||||
idPrefix = 'sectionOcc';
|
||||
break;
|
||||
case 'AssistStatus':
|
||||
idPrefix = 'assistStatus';
|
||||
break;
|
||||
case 'TotalAssist':
|
||||
idPrefix = 'totalAssist';
|
||||
break;
|
||||
case 'DepartAssist':
|
||||
idPrefix = 'departAssist';
|
||||
break;
|
||||
case 'PickAssist':
|
||||
idPrefix = 'pickAssist';
|
||||
break;
|
||||
case 'Recovery':
|
||||
idPrefix = 'recovery';
|
||||
break;
|
||||
case 'Accident':
|
||||
idPrefix = 'accident';
|
||||
break;
|
||||
case 'Occlusion':
|
||||
idPrefix = 'occlusion';
|
||||
break;
|
||||
case 'PickOrDepartArrow':
|
||||
idPrefix = 'podArrow'
|
||||
break;
|
||||
}
|
||||
return idPrefix;
|
||||
},
|
||||
|
@ -201,6 +201,7 @@ class Model {
|
||||
this.mfNum = 0;
|
||||
this.pfNum = 0;
|
||||
this.switchCode = '';
|
||||
this.right = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,12 @@ export default {
|
||||
{ value: 'FLEXIBLE', label: '变通按钮' },
|
||||
{ value: 'RAMP_TERMINAL', label: '坡道终端按钮' },
|
||||
{ value: 'TRAIN_TERMINAL', label: '列车终端按钮'},
|
||||
{ value: 'SHUNT_TERMINAL', label: '调车终端按钮'}
|
||||
{ value: 'SHUNT_TERMINAL', label: '调车终端按钮'},
|
||||
{ value: 'ASSIST', label: '总辅助按钮' },
|
||||
{ value: 'PICK_ASSIST', label: '接辅助按钮' },
|
||||
{ value: 'DEPART_ASSIST', label: '发辅助按钮' },
|
||||
{ value: 'ACCIDENT', label: '事故按钮' },
|
||||
{ value: 'CHANGE_DIRECTION', label: '改方按钮' }
|
||||
],
|
||||
centralizedStationList: [], // 设备集中站列表
|
||||
rules: {
|
||||
|
@ -109,9 +109,6 @@ export default {
|
||||
],
|
||||
modelCode: [
|
||||
{ required: true, message: this.$t('rules.selectTrainType'), trigger: 'change' }
|
||||
],
|
||||
stationCode: [
|
||||
{ required: true, message: '请选择车辆段/停车场', trigger: 'change' }
|
||||
]
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user