大铁线路调整23
This commit is contained in:
parent
e65abe322a
commit
1c04fd0bd6
@ -947,7 +947,7 @@ class SkinCode extends defaultStyle {
|
||||
fontFamily:'宋体'
|
||||
}
|
||||
};
|
||||
this[deviceType.PickOrDepartArrow] = {
|
||||
this[deviceType.DepartArrow] = {
|
||||
triangleLength: 15,
|
||||
lineWidth: 8,
|
||||
length: 35,
|
||||
@ -955,7 +955,18 @@ class SkinCode extends defaultStyle {
|
||||
fill: '#000',
|
||||
stroke: '#fff',
|
||||
fontSize: 11,
|
||||
defaultText: '接发车',
|
||||
defaultText: '发车',
|
||||
defaultColor: '#ccc'
|
||||
};
|
||||
this[deviceType.PickArrow] = {
|
||||
triangleLength: 15,
|
||||
lineWidth: 8,
|
||||
length: 35,
|
||||
distance: 15,
|
||||
fill: '#000',
|
||||
stroke: '#fff',
|
||||
fontSize: 11,
|
||||
defaultText: '接车',
|
||||
defaultColor: '#ccc'
|
||||
};
|
||||
this[deviceType.Occlusion] = {
|
||||
|
@ -285,9 +285,14 @@ deviceRender[deviceType.IndicatorLight] = {
|
||||
_type: deviceType.IndicatorLight,
|
||||
zlevel: 1
|
||||
};
|
||||
/** 接发车指示灯 */
|
||||
deviceRender[deviceType.PickOrDepartArrow] = {
|
||||
_type: deviceType.PickOrDepartArrow,
|
||||
/** 接车指示灯 */
|
||||
deviceRender[deviceType.PickArrow] = {
|
||||
_type: deviceType.PickArrow,
|
||||
zlevel: 1
|
||||
};
|
||||
/** 发车指示灯 */
|
||||
deviceRender[deviceType.DepartArrow] = {
|
||||
_type: deviceType.DepartArrow,
|
||||
zlevel: 1
|
||||
};
|
||||
/** 区间占用 区间监控 */
|
||||
|
@ -51,7 +51,8 @@ const deviceType = {
|
||||
DirectionRod: 'DirectionRod',
|
||||
Responder: 'Responder',
|
||||
SignalButton: 'SignalButton',
|
||||
PickOrDepartArrow: 'PickOrDepartArrow',
|
||||
PickArrow: 'PickArrow',
|
||||
DepartArrow: 'DepartArrow',
|
||||
Occlusion: 'Occlusion',
|
||||
Accident: 'Accident',
|
||||
Recovery: 'Recovery',
|
||||
|
@ -350,7 +350,8 @@ 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.PickArrow: updateForList(model, state, 'indicatorLightList');break;
|
||||
case deviceType.DepartArrow: 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;
|
||||
|
@ -16,22 +16,22 @@ export default class EPickOrDepartArrow extends Group {
|
||||
this.arrow = new Polygon({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
origin: [model.x + style.PickOrDepartArrow.length / 2, model.y],
|
||||
origin: [model.x + style[this._subType].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]
|
||||
[model.x + style[this._subType].triangleLength, model.y - style[this._subType].triangleLength / 2],
|
||||
[model.x + style[this._subType].triangleLength, model.y - style[this._subType].lineWidth / 2],
|
||||
[model.x + style[this._subType].length, model.y - style[this._subType].lineWidth / 2],
|
||||
[model.x + style[this._subType].length, model.y + style[this._subType].lineWidth / 2],
|
||||
[model.x + style[this._subType].triangleLength, model.y + style[this._subType].lineWidth / 2],
|
||||
[model.x + style[this._subType].triangleLength, model.y + style[this._subType].triangleLength / 2]
|
||||
]
|
||||
},
|
||||
style: {
|
||||
fill: style.PickOrDepartArrow.fill,
|
||||
stroke: style.PickOrDepartArrow.stroke,
|
||||
fill: style[this._subType].fill,
|
||||
stroke: style[this._subType].stroke,
|
||||
lineWidth: 1
|
||||
}
|
||||
});
|
||||
@ -39,13 +39,13 @@ export default class EPickOrDepartArrow extends Group {
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: {
|
||||
x: model.x + style.PickOrDepartArrow.length / 2,
|
||||
y: model.y + style.PickOrDepartArrow.distance,
|
||||
x: model.x + style[this._subType].length / 2,
|
||||
y: model.y + style[this._subType].distance,
|
||||
fontWeight: style.textStyle.fontWeight,
|
||||
fontSize: style.PickOrDepartArrow.fontSize,
|
||||
fontSize: style[this._subType].fontSize,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.text,
|
||||
textFill: style.PickOrDepartArrow.defaultColor,
|
||||
textFill: style[this._subType].defaultColor,
|
||||
textAlign: style.textStyle.textAlign,
|
||||
textVerticalAlign: style.textStyle.textVerticalAlign
|
||||
}
|
||||
@ -58,9 +58,9 @@ export default class EPickOrDepartArrow extends Group {
|
||||
if (color) {
|
||||
const style = this.model.style;
|
||||
this.arrow.animateStyle(true)
|
||||
.when(0, { fill: style.PickOrDepartArrow.fill })
|
||||
.when(0, { fill: style[this._subType].fill })
|
||||
.when(1000, { stroke: color })
|
||||
.when(2000, { fill: style.PickOrDepartArrow.fill })
|
||||
.when(2000, { fill: style[this._subType].fill })
|
||||
.start();
|
||||
}
|
||||
}
|
||||
@ -68,7 +68,7 @@ export default class EPickOrDepartArrow extends Group {
|
||||
recover() {
|
||||
const style = this.model.style;
|
||||
this.arrow.stopAnimation(false);
|
||||
this.arrow.setStyle('fill', style.PickOrDepartArrow.fill);
|
||||
this.arrow.setStyle('fill', style[this._subType].fill);
|
||||
}
|
||||
|
||||
setControlColor(color) {
|
||||
|
@ -179,7 +179,7 @@ export default class SaidLamp extends Group {
|
||||
_subType: 'IndicatorLight'
|
||||
});
|
||||
this.add(this.control);
|
||||
} else if (this._type === 'PickOrDepartArrow') {
|
||||
} else if (this._type === 'PickArrow'|| this._type === 'DepartArrow') {
|
||||
this.control = new EPickOrDepartArrow({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
@ -188,7 +188,7 @@ export default class SaidLamp extends Group {
|
||||
text: model.name,
|
||||
right: model.right,
|
||||
style: this.style,
|
||||
_subType: 'PickOrDepartArrow'
|
||||
_subType: this._type
|
||||
});
|
||||
this.add(this.control);
|
||||
}
|
||||
@ -201,7 +201,7 @@ export default class SaidLamp extends Group {
|
||||
this.control && this.control.hide();
|
||||
} else {
|
||||
// 区段占用,辅助状态,接发车箭头
|
||||
const datieType = [deviceType.SectionOccupied, deviceType.AssistStatus, deviceType.PickOrDepartArrow];
|
||||
const datieType = [deviceType.SectionOccupied, deviceType.AssistStatus, deviceType.PickArrow ,deviceType.DepartArrow];
|
||||
if (model._type === deviceType.PowerSupply && model.name.includes('2')) {
|
||||
this.control && this.control.setControlColor(this.deviceStyle.lamp.offColor);
|
||||
this.control && this.control.setControlStroke(this.deviceStyle.lamp.strokeColor, 1);
|
||||
@ -213,7 +213,7 @@ export default class SaidLamp extends Group {
|
||||
this.control && this.control.setControlFlashing('#FFFFFF');
|
||||
} else {
|
||||
let defalutColor;
|
||||
if (model._type == deviceType.PickOrDepartArrow) {
|
||||
if (model._type == deviceType.PickArrow || model._type == deviceType.DepartArrow) {
|
||||
defalutColor = this.deviceStyle.fill;
|
||||
} else {
|
||||
defalutColor = this.deviceStyle.lamp.controlColor;
|
||||
|
@ -71,6 +71,70 @@ export default class SignalButton extends Group {
|
||||
});
|
||||
this.add(this.rightLine);
|
||||
this.rightLine.hide();
|
||||
this.leftBoard = new Line({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
shape: {
|
||||
x1: model.position.x - 1,
|
||||
y1: model.position.y - 1,
|
||||
x2: model.position.x - 1,
|
||||
y2: model.position.y + 16
|
||||
},
|
||||
style: {
|
||||
lineWidth: 2,
|
||||
stroke: '#FFFFFF'
|
||||
}
|
||||
});
|
||||
this.add(this.leftBoard);
|
||||
this.leftBoard.hide();
|
||||
this.topBoard = new Line({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
shape: {
|
||||
x1: model.position.x - 1,
|
||||
y1: model.position.y - 1,
|
||||
x2: model.position.x + 16,
|
||||
y2: model.position.y - 1
|
||||
},
|
||||
style: {
|
||||
lineWidth: 2,
|
||||
stroke: '#FFFFFF'
|
||||
}
|
||||
});
|
||||
this.add(this.topBoard);
|
||||
this.topBoard.hide();
|
||||
this.rightBoard = new Line({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
shape: {
|
||||
x1: model.position.x + 16,
|
||||
y1: model.position.y - 1,
|
||||
x2: model.position.x + 16,
|
||||
y2: model.position.y + 16
|
||||
},
|
||||
style: {
|
||||
lineWidth: 2,
|
||||
stroke: '#A0A0A0'
|
||||
}
|
||||
});
|
||||
this.add(this.rightBoard);
|
||||
this.rightBoard.hide();
|
||||
this.bottomBoard = new Line({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
shape: {
|
||||
x1: model.position.x - 1,
|
||||
y1: model.position.y + 16,
|
||||
x2: model.position.x + 16,
|
||||
y2: model.position.y + 16,
|
||||
},
|
||||
style: {
|
||||
lineWidth: 2,
|
||||
stroke: '#A0A0A0'
|
||||
}
|
||||
});
|
||||
this.add(this.bottomBoard);
|
||||
this.bottomBoard.hide();
|
||||
const hasTextList = ['PASS', 'ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'ACCIDENT', 'CHANGE_DIRECTION'];
|
||||
if (hasTextList.includes(model.type)) {
|
||||
this.buttonText = new Text({
|
||||
@ -132,7 +196,7 @@ export default class SignalButton extends Group {
|
||||
color = '#008000';
|
||||
}
|
||||
return color;
|
||||
}// 12
|
||||
}//
|
||||
recover() {
|
||||
this.stopAnimation();
|
||||
this.rectButton && this.rectButton.setStyle({ fill:this.getTypeColor() });
|
||||
@ -140,6 +204,9 @@ export default class SignalButton extends Group {
|
||||
this.leftLine && this.leftLine.hide();
|
||||
this.rectButton && this.rectButton.show();
|
||||
this.buttonText && this.buttonText.show();
|
||||
// this.leftBoard && this.leftBoard.show();
|
||||
// this.rightBoard && this.rightBoard.show();
|
||||
// this.top
|
||||
}
|
||||
blockShow() {
|
||||
this.rightLine && this.rightLine.show();
|
||||
|
@ -77,7 +77,8 @@ mapShape[deviceType.ReturnModeGroup] = SaidLamp;
|
||||
mapShape[deviceType.Axle] = SaidLamp;
|
||||
mapShape[deviceType.SwitchFault] = SaidLamp;
|
||||
mapShape[deviceType.IndicatorLight] = SaidLamp;
|
||||
mapShape[deviceType.PickOrDepartArrow] = SaidLamp;
|
||||
mapShape[deviceType.PickArrow] = SaidLamp;
|
||||
mapShape[deviceType.DepartArrow] = SaidLamp;
|
||||
mapShape[deviceType.Occlusion] = SaidLamp;
|
||||
mapShape[deviceType.Accident] = SaidLamp;
|
||||
mapShape[deviceType.Recovery] = SaidLamp;
|
||||
|
@ -431,7 +431,6 @@ export default {
|
||||
}
|
||||
this.deviceTimeNode = this.$store.state.socket.simulationTimeSync;
|
||||
const signal = this.$store.getters['map/getDeviceByCode'](deviceList[0].signalCode || deviceList[0].code);// deviceList[0] 为 SignalButton || Signal
|
||||
console.log(deviceList, signal, '***************');
|
||||
if (deviceList.length === 1 && !signal.routeLock) { // 排列进路 处理始端信号机状态
|
||||
operate.code = deviceList[0].code;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
|
708
src/jmapNew/theme/datie_02/menus/menuButtonCtc.vue
Normal file
708
src/jmapNew/theme/datie_02/menus/menuButtonCtc.vue
Normal file
@ -0,0 +1,708 @@
|
||||
<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="Signal.arrangementRoute.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.arrangementRoute.button.operation, ['Signal'])">
|
||||
<span style="color: black">
|
||||
<center><b>进</b><b>路</b></center>
|
||||
<center><b>建</b><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>
|
||||
<center><b>取</b><b>消</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Signal.reopenSignal.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.reopenSignal.button.operation, ['Signal'])">
|
||||
<span style="color: black;">
|
||||
<center><b>信</b><b>号</b></center>
|
||||
<center><b>重</b><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>引</b><b>导</b></center>
|
||||
<center><b>总</b><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>
|
||||
<center><b>人</b><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><b>岔</b></center>
|
||||
<center><b>总</b><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><b>岔</b></center>
|
||||
<center><b>总</b><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><b>岔</b></center>
|
||||
<center><b>单</b><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><b>岔</b></center>
|
||||
<center><b>解</b><b>锁</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="MixinCommand.block.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(MixinCommand.lock.button.operation, ['Switch', 'Signal'])">
|
||||
<span style="color: black">
|
||||
<center><b>封</b><b>锁</b></center>
|
||||
<center><b>按</b><b>钮</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="MixinCommand.functionButton.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(MixinCommand.functionButton.button.operation, ['StationStand', 'Station'])">
|
||||
<span style="color: black;">
|
||||
<center><b>功</b><b>能</b></center>
|
||||
<center><b>按</b><b>钮</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown()">
|
||||
<span style="color: black;">
|
||||
<center><b>坡</b><b>道</b></center>
|
||||
<center><b>解</b><b>锁</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :disabled="true" :id="" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown()">
|
||||
<span style="color: black;">
|
||||
<center><b>分</b><b>路</b></center>
|
||||
<center><b>不</b><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><b>令</b></center>
|
||||
<center><b>清</b><b>除</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown()">
|
||||
<span style="color: black;">
|
||||
<center><b>命</b><b>令</b></center>
|
||||
<center><b>下</b><b>达</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="" class="button_box" :style="{width: width+'px', backgroundColor: buttonUpColor}" @click="buttonDown()">
|
||||
<span style="color: black;">
|
||||
<center><b>状</b><b>态</b></center>
|
||||
<center><b>选</b><b>择</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="" class="button_box" :style="{width: width+'px', backgroundColor: buttonUpColor}" @click="buttonDown()">
|
||||
<span style="color: black;">
|
||||
<center><b>模</b><b>式</b></center>
|
||||
<center><b>转</b><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 CenterConfig from '../../../../views/newMap/newMapdraft/mapoperate/displayConfig/centerConfig';
|
||||
// import { OperateMode } from '@/scripts/ConstDic';564
|
||||
|
||||
export default {
|
||||
name: 'MapButtonMenu',
|
||||
components: {
|
||||
CenterConfig,
|
||||
PasswordBox,
|
||||
NoticeInfo
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
point: {
|
||||
x: 0,
|
||||
y: 0
|
||||
},
|
||||
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;
|
||||
},
|
||||
CTCCommand() {
|
||||
return OperationEvent.CTCCommand;
|
||||
},
|
||||
MixinCommand() {
|
||||
return OperationEvent.MixinCommand;
|
||||
},
|
||||
Command() {
|
||||
return OperationEvent.Command;
|
||||
},
|
||||
isShowBtn() {
|
||||
return this.$store.state.training.prdType == '01' || this.$store.state.training.prdType == '10';
|
||||
},
|
||||
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
|
||||
console.log(deviceList, 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 = {signalCode: 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 = {routeCode: 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: {
|
||||
signalCode: 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: {signalCode: 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 = {signalCode: model.signalCode};
|
||||
this.sendCommand(operate);
|
||||
} else if (model._type === 'Signal' && model.type === 'SHUNTING' && signal.routeLock) {
|
||||
operate.param = {signalCode: model.code};
|
||||
this.sendCommand(operate);
|
||||
}
|
||||
},
|
||||
handelSwitchOperate(model) {
|
||||
const operate = {
|
||||
over: true,
|
||||
code: model.code,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
cmdType: this.cmdType,
|
||||
param: { switchCode: 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 = {signalCode: model.code};
|
||||
} else if (buttonOperation === this.Signal.unlock.button.operation) {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_UNBLOCK;
|
||||
operate.param = {signalCode: 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 = {signalCode: model.signalCode};
|
||||
} else if (buttonOperation === this.Signal.unlock.button.operation) {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_UNBLOCK;
|
||||
operate.param = {signalCode: 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: {signalCode: 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: {sectionCode: model.code}
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
}
|
||||
},
|
||||
// CHANGE_DIRECTION
|
||||
selectedChange() {
|
||||
// 按钮按下时
|
||||
const model = this.selected; // 选择设备
|
||||
if ((this.$store.state.training.prdType != '01' && this.$store.state.training.prdType != '10') || 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' && model.type === 'CHANGE_DIRECTION') {
|
||||
// 改方操作
|
||||
this.changeDirection(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);
|
||||
},
|
||||
changeDirection(model) {
|
||||
const operate = {
|
||||
over: true,
|
||||
code: model.code,
|
||||
operation: this.CTCCommand.assistPressDownTurnDirection.menu.operation,
|
||||
cmdType: CMD.CTC.CTC_ASSIST_PRESS_DOWN_TURN_DIRECTION,
|
||||
param: {
|
||||
labelEnum:model.labelEnum,
|
||||
stationCode:model.stationCode
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
// this.clearOperate();
|
||||
}).catch((error) => {
|
||||
// this.clearOperate();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</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>
|
@ -90,7 +90,7 @@ class Theme {
|
||||
'13':'all',
|
||||
'14':'ecStation',
|
||||
'15':'all',
|
||||
'16':'all'
|
||||
'16':'ecStation'
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -317,7 +317,7 @@
|
||||
if (flag){
|
||||
return '#29CA42';
|
||||
} else {
|
||||
return trigger ? '#FFBF2F' : '#CCCCCC'
|
||||
return trigger ? '#FFBF2F' : '#CCCCCC';
|
||||
}
|
||||
},
|
||||
doShowRecDep(row, type) {
|
||||
@ -327,7 +327,6 @@
|
||||
this.$refs.routeSelection.doShow(row, type, this.selectCode);
|
||||
},
|
||||
popMenuShow(item,type, e){
|
||||
console.log(e,item, '====');
|
||||
if (type === 'rec') {
|
||||
this.menu[0].disabled = item.receivingRouteAutoTrigger;
|
||||
this.menu[1].disabled = !item.receivingRouteAutoTrigger;
|
||||
|
@ -312,6 +312,7 @@ export default {
|
||||
const lineCode = this.$store.state.map.map.skinVO.code;
|
||||
if (Vue.prototype.$theme) {
|
||||
this.localStationShow = Vue.prototype.$theme._localShowMode[lineCode] === 'ecStation';
|
||||
console.log(this.localStationShow, '============');
|
||||
}
|
||||
this.$store.dispatch('map/setTrainWindowShow', this.previewOrMapDraw);
|
||||
},
|
||||
@ -498,7 +499,7 @@ export default {
|
||||
for (const key in mapDevice) {
|
||||
list.push(mapDevice[key]);
|
||||
}
|
||||
|
||||
console.log(list, stationCode, '=============');
|
||||
this.$jlmap.updateShowStation(list, stationCode);
|
||||
!setCenter && stationCode && this.setCenter(stationCode);
|
||||
},
|
||||
|
@ -185,7 +185,7 @@
|
||||
setSelected(selected) {
|
||||
if (selected) {
|
||||
const deviceTypeList = ['SectionOccupied'.toUpperCase(), 'AssistStatus'.toUpperCase(), 'TotalAssist'.toUpperCase(), 'DepartAssist'.toUpperCase(),
|
||||
'PickAssist'.toUpperCase(), 'PickOrDepartArrow'.toUpperCase(),
|
||||
'PickAssist'.toUpperCase(), 'DepartArrow'.toUpperCase(),'PickArrow'.toUpperCase(),
|
||||
'SignalButton'.toUpperCase()];
|
||||
if (deviceTypeList.includes(selected._type.toUpperCase()) && this.field.toUpperCase() === 'code'.toUpperCase()) {
|
||||
this.addModel.code = selected.code;
|
||||
|
@ -57,7 +57,7 @@
|
||||
@mouseenter="mouseenter(nor)"
|
||||
@mouseleave="mouseleave(nor)"
|
||||
>
|
||||
<div class="name">{{ nor.name }}</div>
|
||||
<div class="name">{{ nor.name || nor.code }}</div>
|
||||
<div class="close" @click="delList(nor, item.list)"><i class="el-icon-close" /></div>
|
||||
</div>
|
||||
</div>
|
||||
@ -119,6 +119,11 @@ export default {
|
||||
type: 'Signal',
|
||||
name: '信号机列表',
|
||||
list: []
|
||||
},
|
||||
{
|
||||
type: 'SignalButton',
|
||||
name: '信号按钮列表',
|
||||
list: []
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -156,6 +161,8 @@ export default {
|
||||
this.modelList[1].list.push(item);
|
||||
} else if (item._type == 'Signal') {
|
||||
this.modelList[2].list.push(item);
|
||||
} else if (item._type == 'SignalButton') {
|
||||
this.modelList[3].list.push(item);
|
||||
}
|
||||
if (item.stationCode == this.seclectDeviceList[0].stationCode) {
|
||||
count++;
|
||||
@ -317,6 +324,11 @@ export default {
|
||||
type: 'Signal',
|
||||
name: '信号机列表',
|
||||
list: []
|
||||
},
|
||||
{
|
||||
type: 'SignalButton',
|
||||
name: '信号按钮列表',
|
||||
list: []
|
||||
}
|
||||
];
|
||||
},
|
||||
|
@ -99,7 +99,8 @@ export default {
|
||||
'Recovery',
|
||||
'Accident',
|
||||
'Occlusion',
|
||||
'PickOrDepartArrow'
|
||||
'PickArrow',
|
||||
'DepartArrow'
|
||||
],
|
||||
noNameTypeList: ['FaultStatusGroup', 'ModeStatusGroup', 'LampFilament', 'ReturnModeGroup', 'ControlSwitch', 'Axle'],
|
||||
typeList: [
|
||||
@ -130,9 +131,10 @@ export default {
|
||||
{ name: '复原', value: 'Recovery' },
|
||||
{ name: '事故', value: 'Accident' },
|
||||
{ name: '闭塞', value: 'Occlusion' },
|
||||
{ name: '接发车箭头', value: 'PickOrDepartArrow' }
|
||||
{ name: '接车箭头', value: 'PickArrow' },
|
||||
{ name: '发车箭头', value: 'DepartArrow' }
|
||||
],
|
||||
hasDirectionList: ['SectionOccupied', 'AssistStatus', 'TotalAssist', 'DepartAssist', 'PickAssist', 'Recovery', 'Accident', 'Occlusion', 'PickOrDepartArrow'],
|
||||
hasDirectionList: ['SectionOccupied', 'AssistStatus', 'TotalAssist', 'DepartAssist', 'PickAssist', 'Recovery', 'Accident', 'Occlusion', 'PickArrow', 'DepartArrow'],
|
||||
directionList: [{label: 'X',value: 'X'},{label: 'XF',value: 'XF'},{label: 'XD',value: 'XD'}, {label:'S',value:'S'},{label:'SF',value:'SF'},{label:'SD',value: 'SD'}],
|
||||
editModel:getModel('ControlLamp'),
|
||||
addModel:getModel('ControlLamp'),
|
||||
@ -165,7 +167,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: 'right', label: '朝右:', type: 'checkbox', isHidden: this.editModel.type !== 'DepartArrow' && this.editModel.type !== 'PickArrow' },
|
||||
{ prop: 'labelEnum', label: '方向:', type: 'select', optionLabel: 'label', optionValue: 'value', options: this.directionList, isHidden: !this.hasDirectionList.includes(this.editModel.type) },
|
||||
{ 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}
|
||||
@ -292,7 +294,8 @@ export default {
|
||||
this.RecoveryList = [];
|
||||
this.AccidentList = [];
|
||||
this.OcclusionList = [];
|
||||
this.PickOrDepartArrowList = [];
|
||||
this.DepartArrowList = [];
|
||||
this.PickArrowList = [];
|
||||
indicatorLightList.forEach(item => {
|
||||
switch (item._type) {
|
||||
case 'AtsControl':
|
||||
@ -376,8 +379,11 @@ export default {
|
||||
case 'Occlusion':
|
||||
this.OcclusionList.push(item);
|
||||
break;
|
||||
case 'PickOrDepartArrow':
|
||||
this.PickOrDepartArrowList.push(item);
|
||||
case 'PickArrow':
|
||||
this.PickArrowList.push(item);
|
||||
break;
|
||||
case 'DepartArrow':
|
||||
this.DepartArrowList.push(item);
|
||||
break;
|
||||
}
|
||||
});
|
||||
@ -465,8 +471,11 @@ export default {
|
||||
case 'Occlusion':
|
||||
this.selectLists = this.OcclusionList;
|
||||
break;
|
||||
case 'PickOrDepartArrow':
|
||||
this.selectLists = this.PickOrDepartArrowList;
|
||||
case 'PickArrow':
|
||||
this.selectLists = this.PickArrowList;
|
||||
break;
|
||||
case 'DepartArrow':
|
||||
this.selectLists = this.DepartArrowList;
|
||||
break;
|
||||
default :
|
||||
this.selectLists = this.intersiteControlList;
|
||||
@ -577,8 +586,11 @@ export default {
|
||||
case 'Occlusion':
|
||||
idPrefix = 'occlusion';
|
||||
break;
|
||||
case 'PickOrDepartArrow':
|
||||
idPrefix = 'podArrow'
|
||||
case 'PickArrow':
|
||||
idPrefix = 'pickArrow';
|
||||
break;
|
||||
case 'DepartArrow':
|
||||
idPrefix = 'departArrow';
|
||||
break;
|
||||
}
|
||||
return idPrefix;
|
||||
|
@ -211,7 +211,7 @@ export default {
|
||||
const controlLampTypeList = ['AtsControl', 'CenterCommunication', 'ChainControl', 'IntersiteControl', 'LeuControl', 'LocalControl', 'Maintain',
|
||||
'SwitchFault', 'PowerSupply', 'NoOneReturn', 'MaintenanceLamps', 'ZcCommunication', 'FaultStatusGroup', 'ModeStatusGroup', 'LampFilament',
|
||||
'ReturnModeGroup', 'ControlSwitch', 'Axle', 'IndicatorLight', 'SectionOccupied', 'AssistStatus', 'TotalAssist', 'DepartAssist', 'PickAssist',
|
||||
'Recovery', 'Accident', 'Occlusion', 'PickOrDepartArrow'];
|
||||
'Recovery', 'Accident', 'Occlusion', 'PickArrow' ,'DepartArrow'];
|
||||
const type = device._type;
|
||||
if (this.selectDevice) {
|
||||
this.enabledTab = this.selectDevice;
|
||||
|
Loading…
Reference in New Issue
Block a user