Merge branch 'dev' of https://git.code.tencent.com/lian-cbtc/jl-client into dev
This commit is contained in:
commit
f96c8a11ef
@ -610,5 +610,20 @@ export default {
|
||||
routePhysicalSectionData: 'Route physical section data',
|
||||
routeSideDefenseSwitch: 'Route side defense switch',
|
||||
switchID: 'Switch ID',
|
||||
lineColor: 'Line Color'
|
||||
lineColor: 'Line Color',
|
||||
psd: 'Psd',
|
||||
platformEmergencyStop: 'Platform emergency stop',
|
||||
functionButton: 'Function button',
|
||||
saidLamp: 'Said lamp',
|
||||
rectangularBox: 'Rectangular box',
|
||||
boundingBox: 'Bounding box',
|
||||
ownedCiStation: 'Owned CI station:',
|
||||
saidLampType: 'Said lamp type:',
|
||||
saidLampName: 'Said lamp name:',
|
||||
functionButtonType: 'Function type:',
|
||||
buttonMainName: 'Button main name:',
|
||||
buttonViceName: 'Button vice name:',
|
||||
automaticRouteCode: 'Automatic route code:',
|
||||
cycleCode: 'Automatic reentry code:'
|
||||
|
||||
};
|
||||
|
@ -321,5 +321,8 @@ export default {
|
||||
selectConcentrateStation:'Please select Concentrate Station',
|
||||
enterDeviceCode: 'Please enter device code',
|
||||
selectDeviceType: 'Please select device type',
|
||||
selectBelongProject: 'Please select belongs to project'
|
||||
selectBelongProject: 'Please select belongs to project',
|
||||
selectSaidLampType: 'Please select type of said lamp',
|
||||
enterSaidLampName: 'Please enter said lamp name',
|
||||
selectFunctionType: 'Please select type of function'
|
||||
};
|
||||
|
@ -605,5 +605,20 @@ export default {
|
||||
switchID: '道岔ID',
|
||||
normalPosition: '定位',
|
||||
reversePosition: '反位',
|
||||
lineColor: '线条颜色'
|
||||
lineColor: '线条颜色',
|
||||
psd: '屏蔽门',
|
||||
platformEmergencyStop: '站台紧急停车',
|
||||
functionButton: '功能按钮',
|
||||
saidLamp: '表示灯',
|
||||
rectangularBox: '矩形框',
|
||||
boundingBox: '包围框',
|
||||
ownedCiStation: '所属集中站:',
|
||||
saidLampType: '表示灯类型:',
|
||||
saidLampName: '表示灯名称:',
|
||||
functionButtonType: '功能类型:',
|
||||
buttonMainName: '按钮主名称:',
|
||||
buttonViceName: '按钮副名称:',
|
||||
automaticRouteCode: '自动进路code:',
|
||||
cycleCode: '自动折返code'
|
||||
|
||||
};
|
||||
|
@ -323,5 +323,8 @@ export default {
|
||||
selectConcentrateStation:'请选择设备集中站',
|
||||
enterDeviceCode: '请输入设备编码',
|
||||
selectDeviceType: '请选择设备类型',
|
||||
selectBelongProject: '请选择所属项目'
|
||||
selectBelongProject: '请选择所属项目',
|
||||
selectSaidLampType: '请选择表示灯类型',
|
||||
enterSaidLampName: '请输入表示灯名称',
|
||||
selectFunctionType: '请选择功能类型'
|
||||
};
|
||||
|
@ -530,7 +530,7 @@ class SkinCode extends defaultStyle {
|
||||
hsda: {
|
||||
lrPaddingHSDA: 3, // HSDA两边间隔
|
||||
upPaddingHSDA: 4, // HSDA上边距离
|
||||
trainHSDATextFontSize: 8, // 列车HDSA字号
|
||||
trainHSDATextFontSize: 12, // 列车HDSA字号
|
||||
textHContent: 'H', // textH文本
|
||||
textSContent: 'S', // textS文本
|
||||
textDContent: 'D', // textD文本
|
||||
|
@ -2,127 +2,127 @@ import Group from 'zrender/src/container/Group';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
import store from '@/store';
|
||||
class EMouse extends Group {
|
||||
constructor(device) {
|
||||
super();
|
||||
this.device = device;
|
||||
this.create();
|
||||
this.craeteSwitchBorder();
|
||||
}
|
||||
create() {
|
||||
if (this.device.name) {
|
||||
// 创建锁闭框
|
||||
const rect = this.device.name.getNameText().getBoundingRect();
|
||||
let textWidth = rect.width * 0.8;
|
||||
if (this.device.triangle.drictx !== 1) {
|
||||
// rect.x += rect.width;
|
||||
textWidth = -textWidth;
|
||||
}
|
||||
constructor(device) {
|
||||
super();
|
||||
this.device = device;
|
||||
this.create();
|
||||
this.craeteSwitchBorder();
|
||||
}
|
||||
create() {
|
||||
if (this.device.name) {
|
||||
// 创建锁闭框
|
||||
const rect = this.device.name.getNameText().getBoundingRect();
|
||||
let textWidth = rect.width * 0.8;
|
||||
if (this.device.triangle.drictx !== 1) {
|
||||
// rect.x += rect.width;
|
||||
textWidth = -textWidth;
|
||||
}
|
||||
|
||||
this.textRect = new Rect({
|
||||
zlevel: this.device.zlevel,
|
||||
z: this.device.z,
|
||||
silent: true,
|
||||
shape: {
|
||||
x: rect.x,
|
||||
y: rect.y,
|
||||
width: textWidth,
|
||||
height: rect.height
|
||||
},
|
||||
style: {
|
||||
lineWidth: 1,
|
||||
lineDash: [3, 3],
|
||||
stroke: this.device.style.Switch.mouseOverStyle.borderColor,
|
||||
fill: this.device.style.Switch.mouseOverStyle.borderBackgroundColor
|
||||
}
|
||||
});
|
||||
this.add(this.textRect);
|
||||
this.textRect.hide();
|
||||
}
|
||||
}
|
||||
this.textRect = new Rect({
|
||||
zlevel: this.device.zlevel,
|
||||
z: this.device.z,
|
||||
silent: true,
|
||||
shape: {
|
||||
x: rect.x,
|
||||
y: rect.y,
|
||||
width: textWidth,
|
||||
height: rect.height
|
||||
},
|
||||
style: {
|
||||
lineWidth: 1,
|
||||
lineDash: [3, 3],
|
||||
stroke: this.device.style.Switch.mouseOverStyle.borderColor,
|
||||
fill: this.device.style.Switch.mouseOverStyle.borderBackgroundColor
|
||||
}
|
||||
});
|
||||
this.add(this.textRect);
|
||||
this.textRect.hide();
|
||||
}
|
||||
}
|
||||
|
||||
// 创建道岔边框
|
||||
craeteSwitchBorder() {
|
||||
const sectionA = this.getInstanceByCode(this.device.model.sectionACode);
|
||||
const sectionB = this.getInstanceByCode(this.device.model.sectionBCode);
|
||||
const sectionC = this.getInstanceByCode(this.device.model.sectionCCode);
|
||||
const rect = this.device.getBoundingRect();
|
||||
// 创建道岔边框
|
||||
craeteSwitchBorder() {
|
||||
const sectionA = this.getInstanceByCode(this.device.model.sectionACode);
|
||||
const sectionB = this.getInstanceByCode(this.device.model.sectionBCode);
|
||||
const sectionC = this.getInstanceByCode(this.device.model.sectionCCode);
|
||||
const rect = this.device.getBoundingRect();
|
||||
|
||||
sectionA && rect.union(sectionA.getBoundingRect());
|
||||
sectionB && rect.union(sectionB.getBoundingRect());
|
||||
sectionC && rect.union(sectionC.getBoundingRect());
|
||||
sectionA && rect.union(sectionA.getBoundingRect());
|
||||
sectionB && rect.union(sectionB.getBoundingRect());
|
||||
sectionC && rect.union(sectionC.getBoundingRect());
|
||||
|
||||
this.switchBorder = new Rect({
|
||||
zlevel: this.device.model.zlevel,
|
||||
z: this.device.z,
|
||||
silent: true,
|
||||
shape: Object.assign({ r: 4 }, rect),
|
||||
style: {
|
||||
lineDash: [3, 3],
|
||||
stroke: this.device.style.Switch.mouseOverStyle.borderColor,
|
||||
fill: this.device.style.transparentColor
|
||||
}
|
||||
});
|
||||
this.switchBorder = new Rect({
|
||||
zlevel: this.device.model.zlevel,
|
||||
z: this.device.z,
|
||||
silent: true,
|
||||
shape: Object.assign({ r: 4 }, rect),
|
||||
style: {
|
||||
lineDash: [3, 3],
|
||||
stroke: this.device.style.Switch.mouseOverStyle.borderColor,
|
||||
fill: this.device.style.transparentColor
|
||||
}
|
||||
});
|
||||
|
||||
this.add(this.switchBorder);
|
||||
this.switchBorder.hide();
|
||||
}
|
||||
this.add(this.switchBorder);
|
||||
this.switchBorder.hide();
|
||||
}
|
||||
|
||||
getInstanceByCode(code) {
|
||||
return (store.getters['map/getDeviceByCode'](code) || {}).instance;
|
||||
}
|
||||
getInstanceByCode(code) {
|
||||
return (store.getters['map/getDeviceByCode'](code) || {}).instance;
|
||||
}
|
||||
|
||||
mouseout(e) {
|
||||
if (!this.device.model.down) {
|
||||
this.switchBorder && this.switchBorder.hide();
|
||||
this.device.setTextStyle({
|
||||
textFill: this.device.style.backgroundColor
|
||||
});
|
||||
this.textRect && this.textRect.hide();
|
||||
this.device.setState(this.device.model);
|
||||
mouseout(e) {
|
||||
if (!this.device.model.down) {
|
||||
this.switchBorder && this.switchBorder.hide();
|
||||
this.device.setTextStyle({
|
||||
textFill: this.device.style.backgroundColor
|
||||
});
|
||||
this.textRect && this.textRect.hide();
|
||||
this.device.setState(this.device.model);
|
||||
|
||||
const section = store.getters['map/getDeviceByCode'](this.device.model.sectionACode) || {};
|
||||
const parentSection = store.getters['map/getDeviceByCode'](section.parentCode) || {};
|
||||
const instance = this.getInstanceByCode(parentSection.trainWindowCode);
|
||||
if (instance && instance.mouseEvent && instance.mouseEvent.mouseLeave) {
|
||||
instance.mouseEvent.mouseLeave(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
const section = store.getters['map/getDeviceByCode'](this.device.model.sectionACode) || {};
|
||||
const parentSection = store.getters['map/getDeviceByCode'](section.parentCode) || {};
|
||||
const instance = this.getInstanceByCode(parentSection.trainWindowCode);
|
||||
if (instance && instance.mouseEvent && instance.mouseEvent.mouseLeave) {
|
||||
instance.mouseEvent.mouseLeave(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mouseover(e) {
|
||||
this.switchBorder && this.switchBorder.show();
|
||||
this.device.setLossAction(false);
|
||||
this.device.setSwitchCoreColor(this.device.style.Switch.mouseOverStyle.borderBackgroundColor);
|
||||
this.device.setTextStyle({
|
||||
textFill: '#000'
|
||||
});
|
||||
this.textRect && this.textRect.show();
|
||||
mouseover(e) {
|
||||
this.switchBorder && this.switchBorder.show();
|
||||
// this.device.setLossAction(false);
|
||||
// this.device.setSwitchCoreColor(this.device.style.Switch.mouseOverStyle.borderBackgroundColor);
|
||||
this.device.setTextStyle({
|
||||
textFill: '#000'
|
||||
});
|
||||
this.textRect && this.textRect.show();
|
||||
|
||||
const section = store.getters['map/getDeviceByCode'](this.device.model.sectionACode) || {};
|
||||
const parentSection = store.getters['map/getDeviceByCode'](section.parentCode) || {};
|
||||
const instance = this.getInstanceByCode(parentSection.trainWindowCode);
|
||||
if (instance && instance.mouseEvent && instance.mouseEvent.mouseEnter) {
|
||||
instance.mouseEvent.mouseEnter(e);
|
||||
}
|
||||
}
|
||||
const section = store.getters['map/getDeviceByCode'](this.device.model.sectionACode) || {};
|
||||
const parentSection = store.getters['map/getDeviceByCode'](section.parentCode) || {};
|
||||
const instance = this.getInstanceByCode(parentSection.trainWindowCode);
|
||||
if (instance && instance.mouseEvent && instance.mouseEvent.mouseEnter) {
|
||||
instance.mouseEvent.mouseEnter(e);
|
||||
}
|
||||
}
|
||||
|
||||
mouseEnter(e) {
|
||||
this.switchBorder && this.switchBorder.show();
|
||||
this.device.setLossAction(false);
|
||||
this.device.setSwitchCoreColor(this.device.style.Switch.mouseOverStyle.borderBackgroundColor);
|
||||
this.device.setTextStyle({
|
||||
textFill: '#000'
|
||||
});
|
||||
this.textRect && this.textRect.show();
|
||||
}
|
||||
mouseEnter(e) {
|
||||
this.switchBorder && this.switchBorder.show();
|
||||
// this.device.setLossAction(false);
|
||||
// this.device.setSwitchCoreColor(this.device.style.Switch.mouseOverStyle.borderBackgroundColor);
|
||||
this.device.setTextStyle({
|
||||
textFill: '#000'
|
||||
});
|
||||
this.textRect && this.textRect.show();
|
||||
}
|
||||
|
||||
mouseLeave(e) {
|
||||
this.switchBorder && this.switchBorder.hide();
|
||||
this.device.setTextStyle({
|
||||
textFill: this.device.style.backgroundColor
|
||||
});
|
||||
this.textRect && this.textRect.hide();
|
||||
this.device.setState(this.device.model);
|
||||
}
|
||||
mouseLeave(e) {
|
||||
this.switchBorder && this.switchBorder.hide();
|
||||
this.device.setTextStyle({
|
||||
textFill: this.device.style.backgroundColor
|
||||
});
|
||||
this.textRect && this.textRect.hide();
|
||||
this.device.setState(this.device.model);
|
||||
}
|
||||
}
|
||||
export default EMouse;
|
||||
|
@ -3,7 +3,7 @@
|
||||
<menu-cancel ref="menuCancel" />
|
||||
<template v-show="isShowAll">
|
||||
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
||||
<!-- <menu-button ref="menuButton" /> -->
|
||||
<menu-button ref="menuButton" />
|
||||
<menu-axle-reset ref="menuAxleReset" :selected="selected" />
|
||||
<menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||
@ -25,7 +25,7 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import MenuCancel from './menuCancel';
|
||||
import MenuSignal from './menuSignal';
|
||||
// import MenuButton from './menuButton';
|
||||
import MenuButton from './menuButton';
|
||||
import MenuAxleReset from './menuAxleReset';
|
||||
import MenuAutoTrunRoute from './menuAutoTrunRoute';
|
||||
import MenuStationStand from './menuStationStand';
|
||||
@ -44,7 +44,7 @@ export default {
|
||||
name: 'Menus',
|
||||
components: {
|
||||
MenuBar,
|
||||
// MenuButton,
|
||||
MenuButton,
|
||||
MenuAxleReset,
|
||||
MenuAutoTrunRoute,
|
||||
MenuCancel,
|
||||
|
@ -1,21 +1,5 @@
|
||||
<template>
|
||||
<div v-if="isShowBtn" class="menu" style="height: 45px;" :style="{left: point.x+'px', top: point.y+'px' }">
|
||||
<button
|
||||
:id="Signal.arrangementRoute.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(Signal.arrangementRoute.button.operation)"
|
||||
>
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>进</b>
|
||||
<b>路</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>建</b>
|
||||
<b>立</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
:id="Signal.cancelTrainRoute.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@ -46,54 +30,6 @@
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
:id="Signal.reopenSignal.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(Signal.reopenSignal.button.operation)"
|
||||
>
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>信</b>
|
||||
<b>号</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>重</b>
|
||||
<b>开</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
:id="Signal.guide.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(Signal.guide.button.operation)"
|
||||
>
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>引</b>
|
||||
<b>导</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>按</b>
|
||||
<b>钮</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
id="mbm_06"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown('mbm_06')"
|
||||
>
|
||||
<span style="color: red">
|
||||
<center>
|
||||
<b>引</b>
|
||||
<b>导</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>总</b>
|
||||
<b>锁</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
:id="Switch.locate.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px',backgroundColor:buttonUpColor}"
|
||||
@ -153,24 +89,39 @@
|
||||
<b>岔</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>单</b>
|
||||
<b>解</b>
|
||||
<b>锁</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
:id="Signal.setAutoInterlock.button.domId"
|
||||
:id="Switch.turnoutForce.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(Signal.setAutoInterlock.button.operation)"
|
||||
@click="buttonDown(Switch.turnoutForce.button.operation)"
|
||||
>
|
||||
<span style="color: red">
|
||||
<center>
|
||||
<b>道</b>
|
||||
<b>岔</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>强</b>
|
||||
<b>扳</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
id="mbm_13"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown('mbm_13')"
|
||||
>
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>自</b>
|
||||
<b>动</b>
|
||||
<b>全</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>进</b>
|
||||
<b>路</b>
|
||||
<b>触</b>
|
||||
<b>发</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
@ -179,61 +130,110 @@
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(Section.fault.button.operation)"
|
||||
>
|
||||
<span style="color: black">
|
||||
<span style="color: red">
|
||||
<center>
|
||||
<b>区</b>
|
||||
<b>事</b>
|
||||
<b>故</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>故</b>
|
||||
<b>解</b>
|
||||
<b>锁</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
:id="Section.axlePreReset.button.domId"
|
||||
id="mbm_14"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(Section.axlePreReset.button.operation)"
|
||||
@click="buttonDown('mbm_14')"
|
||||
>
|
||||
<span style="color: black">
|
||||
<span style="color: red">
|
||||
<center>
|
||||
<b>计</b>
|
||||
<b>轴</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>复</b>
|
||||
<b>位</b>
|
||||
<b>零</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
id="mbm_11"
|
||||
id="mbm_15"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown('mbm_11')"
|
||||
@click="buttonDown('mbm_15')"
|
||||
>
|
||||
<span style="color: black">
|
||||
<span style="color: red">
|
||||
<center>
|
||||
<b style="color:deepskyblue">功</b>
|
||||
<b style="color:burlywood">能</b>
|
||||
<b>上</b>
|
||||
<b>电</b>
|
||||
</center>
|
||||
<center>
|
||||
<b style="color: red">按</b>
|
||||
<b style="color:forestgreen">钮</b>
|
||||
<b>解</b>
|
||||
<b>锁</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
id="mbm_12"
|
||||
:id="Signal.lock.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown('mbm_12')"
|
||||
@click="buttonDown(Signal.lock.button.operation)"
|
||||
>
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>强</b>
|
||||
<b>扳</b>
|
||||
<b>按</b>
|
||||
<b>钮</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>授</b>
|
||||
<b>权</b>
|
||||
<b>封</b>
|
||||
<b>闭</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
:id="Signal.unlock.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(Signal.unlock.button.operation)"
|
||||
>
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>按</b>
|
||||
<b>钮</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>解</b>
|
||||
<b>封</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
:id="Switch.block.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(Switch.block.button.operation)"
|
||||
>
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>道</b>
|
||||
<b>岔</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>封</b>
|
||||
<b>闭</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
:id="Switch.unblock.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(Switch.unblock.button.operation)"
|
||||
>
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>道</b>
|
||||
<b>岔</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>解</b>
|
||||
<b>封</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
@ -241,8 +241,13 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
import OperateHandler from '@/scripts/plugin/OperateHandler';
|
||||
// import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
// import OperateHandler from '@/scripts/plugin/OperateHandler';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import Handler from '@/scripts/cmdPlugin/Handler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
// import { deepAssign } from '@/utils/index';
|
||||
|
||||
export default {
|
||||
name: 'MapButtonMenu',
|
||||
@ -254,8 +259,8 @@ export default {
|
||||
},
|
||||
operation: '0',
|
||||
buttonName: '',
|
||||
buttonDownColor: '#A8A8A8',
|
||||
buttonUpColor: '#DCDCDC',
|
||||
buttonDownColor: '#00c8c8',
|
||||
buttonUpColor: '#ece9d8',
|
||||
width: 58,
|
||||
tempData: null,
|
||||
offset: {}
|
||||
@ -303,7 +308,7 @@ export default {
|
||||
updateButtonShow(val, old) {
|
||||
if (old) {
|
||||
// 恢复旧按钮显示
|
||||
const domId = getDomIdByOperation(old);
|
||||
const domId = OperationHandler.getDomIdByOperation(old);
|
||||
const dom = document.getElementById(domId);
|
||||
if (dom) {
|
||||
dom.disabled = false;
|
||||
@ -312,7 +317,7 @@ export default {
|
||||
}
|
||||
if (val) {
|
||||
// 新按钮按下效果
|
||||
const domId = getDomIdByOperation(val);
|
||||
const domId = OperationHandler.getDomIdByOperation(val);
|
||||
const dom = document.getElementById(domId);
|
||||
if (dom) {
|
||||
dom.disabled = true;
|
||||
@ -334,32 +339,38 @@ export default {
|
||||
});
|
||||
},
|
||||
selectedChange() {
|
||||
// 按钮按下时
|
||||
if (this.$store.state.menuOperation.buttonOperation) {
|
||||
const model = this.$store.state.menuOperation.selected;
|
||||
if (model) {
|
||||
const deviceType = MapDeviceType[model._type];
|
||||
const operate = {
|
||||
send: true,
|
||||
model: model,
|
||||
code: model.code,
|
||||
type: deviceType.type,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
tempData: this.tempData
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
if (response) {
|
||||
this.tempData = response.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
OperateHandler.cleanOperates();
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
}
|
||||
const model = this.$store.state.menuOperation.selected;
|
||||
if (model && model._type) {
|
||||
} else {
|
||||
Handler.clear();
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
}
|
||||
// 按钮按下时
|
||||
// if (this.$store.state.menuOperation.buttonOperation) {
|
||||
// const model = this.$store.state.menuOperation.selected;
|
||||
// if (model) {
|
||||
// const deviceType = MapDeviceType[model._type];
|
||||
// const operate = {
|
||||
// send: true,
|
||||
// model: model,
|
||||
// code: model.code,
|
||||
// type: deviceType.type,
|
||||
// operation: this.$store.state.menuOperation.buttonOperation,
|
||||
// tempData: this.tempData
|
||||
// };
|
||||
|
||||
// this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||
// if (valid) {
|
||||
// if (response) {
|
||||
// this.tempData = response.data;
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// } else {
|
||||
// OperateHandler.cleanOperates();
|
||||
// this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -51,12 +51,12 @@ export default {
|
||||
label: '区段切除',
|
||||
handler: this.split,
|
||||
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
||||
},
|
||||
{
|
||||
label: '区段故障解锁',
|
||||
handler: this.fault,
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||
}
|
||||
// {
|
||||
// label: '区段故障解锁',
|
||||
// handler: this.fault,
|
||||
// cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||
// }
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
|
@ -61,11 +61,11 @@ export default {
|
||||
handler: this.arrangementRoute,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||
},
|
||||
{
|
||||
label: '进路取消',
|
||||
handler: this.cancelTrainRoute,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||
},
|
||||
// {
|
||||
// label: '进路取消',
|
||||
// handler: this.cancelTrainRoute,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||
// },
|
||||
{
|
||||
label: '信号重开',
|
||||
handler: this.reopenSignal,
|
||||
@ -81,26 +81,26 @@ export default {
|
||||
handler: this.humanTrainRoute,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
|
||||
},
|
||||
{
|
||||
label: '信号封锁',
|
||||
handler: this.lock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
|
||||
},
|
||||
{
|
||||
label: '信号解封',
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
|
||||
},
|
||||
{
|
||||
label: '设置自动进路',
|
||||
handler: this.singalPassModel,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
||||
},
|
||||
{
|
||||
label: '取消自动进路',
|
||||
handler: this.singalCancelPassModel,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
||||
},
|
||||
// {
|
||||
// label: '信号封锁',
|
||||
// handler: this.lock,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
|
||||
// },
|
||||
// {
|
||||
// label: '信号解封',
|
||||
// handler: this.unlock,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
|
||||
// },
|
||||
// {
|
||||
// label: '设置自动进路',
|
||||
// handler: this.singalPassModel,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
||||
// },
|
||||
// {
|
||||
// label: '取消自动进路',
|
||||
// handler: this.singalCancelPassModel,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
||||
// },
|
||||
{
|
||||
label: '进路交人工控',
|
||||
handler: this.humanControl,
|
||||
|
@ -15,7 +15,7 @@ import SwitchUnLock from './dialog/switchUnLock';
|
||||
import SpeedLimitControl from './dialog/speedLimitControl';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
@ -43,37 +43,6 @@ export default {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: '道岔总定',
|
||||
handler: this.locate,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_TURN_NP_CHAIN
|
||||
},
|
||||
{
|
||||
label: '道岔总反',
|
||||
handler: this.reverse,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_TURN_RP_CHAIN
|
||||
},
|
||||
{
|
||||
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
|
||||
}
|
||||
// 道岔强板
|
||||
],
|
||||
Center: [
|
||||
// {
|
||||
@ -113,6 +82,11 @@ export default {
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
},
|
||||
'$store.state.menuOperation.selectedCount': function(val) {
|
||||
if (this.buttonOperation && this.$store.state.menuOperation.selected._type == 'Switch') {
|
||||
this.operationHandler(this.buttonOperation, this.$store.state.menuOperation.selected);
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -186,106 +160,110 @@ export default {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
operationHandler(buttonOperation, selectType) {
|
||||
switch (buttonOperation) {
|
||||
case OperationEvent.Switch.locate.button.operation: {
|
||||
// 道岔总定
|
||||
if (!selectType.normalPosition && selectType.reversePosition) {
|
||||
this.locate(selectType);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OperationEvent.Switch.reverse.button.operation: {
|
||||
// 道岔总反
|
||||
if (selectType.normalPosition && !selectType.reversePosition) {
|
||||
this.reverse(selectType);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OperationEvent.Switch.lock.button.operation: {
|
||||
// 道岔单锁
|
||||
if (!selectType.singleLock) {
|
||||
this.lock(selectType);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OperationEvent.Switch.unlock.button.operation: {
|
||||
// 道岔解锁
|
||||
if (selectType.singleLock) {
|
||||
this.unlock(selectType);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OperationEvent.Switch.block.button.operation: {
|
||||
// 道岔封锁
|
||||
if (!selectType.blockade) {
|
||||
this.block(selectType);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OperationEvent.Switch.unblock.button.operation: {
|
||||
// 道岔解封
|
||||
if (selectType.blockade) {
|
||||
this.unblock(selectType);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OperationEvent.Switch.turnoutForce.button.operation: {
|
||||
// 道岔强扳
|
||||
this.switchTurnoutForce(selectType);
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
// 单操到定位
|
||||
locate() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Switch.locate.menu.operation,
|
||||
param: {
|
||||
switchCode: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
locate(selectType) {
|
||||
commitOperate(menuOperate.Switch.locate, {switchCode:selectType.code}, 3).then((data)=>{
|
||||
// this.$refs.switchControl.doShow(data.operate, this.selected);
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 单操到反位
|
||||
reverse() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Switch.reverse.menu.operation,
|
||||
param: {
|
||||
switchCode: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
reverse(selectType) {
|
||||
commitOperate(menuOperate.Switch.reverse, {switchCode:selectType.code}, 3).then((data)=>{
|
||||
// this.$refs.switchControl.doShow(data.operate, this.selected);
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 道岔单锁
|
||||
lock() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Switch.lock.menu.operation,
|
||||
param: {
|
||||
switchCode: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
lock(selectType) {
|
||||
commitOperate(menuOperate.Switch.lock, {switchCode:selectType.code}, 3).then((data)=>{
|
||||
// this.$refs.switchControl.doShow(data.operate, this.selected);
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 道岔解锁
|
||||
unlock() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Switch.unlock.menu.operation,
|
||||
param: {
|
||||
switchCode: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.switchUnLock.doShow(operate, this.selected);
|
||||
}
|
||||
unlock(selectType) {
|
||||
commitOperate(menuOperate.Switch.unlock, {switchCode:selectType.code}, 3).then((data)=>{
|
||||
// this.$refs.switchUnLock.doShow(data.operate, this.selected);
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 道岔封锁
|
||||
block() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Switch.block.menu.operation,
|
||||
param: {
|
||||
switchCode: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
block(selectType) {
|
||||
commitOperate(menuOperate.Switch.block, {switchCode:selectType.code}, 3).then((data)=>{
|
||||
// this.$refs.switchControl.doShow(data.operate, this.selected);
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 道岔解封
|
||||
unblock() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Switch.unblock.menu.operation,
|
||||
param: {
|
||||
switchCode: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.switchUnLock.doShow(operate, this.selected);
|
||||
}
|
||||
unblock(selectType) {
|
||||
commitOperate(menuOperate.Switch.unblock, {switchCode:selectType.code}, 3).then((data)=>{
|
||||
// this.$refs.switchUnLock.doShow(data.operate, this.selected);
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 道岔强扳
|
||||
switchTurnoutForce(selectType) {
|
||||
commitOperate(menuOperate.Switch.turnoutForce, {switchCode:selectType.code}, 3).then((data)=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 设置临时限速
|
||||
|
278
src/jmapNew/theme/foshan_01/menus/utils/menuOperate.js
Normal file
278
src/jmapNew/theme/foshan_01/menus/utils/menuOperate.js
Normal file
@ -0,0 +1,278 @@
|
||||
import store from '@/store';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
// 操作
|
||||
export const menuOperate = {
|
||||
Section:{
|
||||
// alxeFailure:{
|
||||
// // 设置计轴失效
|
||||
// operation: OperationEvent.Section.alxeFailure.menu.operation,
|
||||
// // cmdType 值有问题
|
||||
// cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
|
||||
// },
|
||||
// active:{
|
||||
// // 区段激活
|
||||
// operation: OperationEvent.Section.active.menu.operation,
|
||||
// cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
||||
// },
|
||||
// alxeEffective:{
|
||||
// // 确认计轴有效
|
||||
// operation: OperationEvent.Section.alxeEffective.menu.operation,
|
||||
// cmdType: CMD.Section.CMD_SECTION_COMFIRMATION_AXLE
|
||||
// },
|
||||
// split:{
|
||||
// // 区段切除
|
||||
// operation: OperationEvent.Section.split.menu.operation,
|
||||
// cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
||||
// },
|
||||
// lock:{
|
||||
// // 区段封锁
|
||||
// operation: OperationEvent.Section.lock.menu.operation,
|
||||
// cmdType: CMD.Section.CMD_SECTION_BLOCK
|
||||
// },
|
||||
// unlock:{
|
||||
// // 区段解锁
|
||||
// operation: OperationEvent.Section.unlock.menu.operation,
|
||||
// cmdType: CMD.Section.CMD_SECTION_UNBLOCK
|
||||
// },
|
||||
// setSpeed:{
|
||||
// // 设置速度
|
||||
// operation: OperationEvent.Section.setSpeed.menu.operation,
|
||||
// cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
// },
|
||||
// fault:{
|
||||
// // 区段故障解锁
|
||||
// operation: OperationEvent.Section.fault.menu.operation,
|
||||
// cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||
// }
|
||||
},
|
||||
Signal:{
|
||||
// arrangementRoute:{
|
||||
// // 排列进路
|
||||
// operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||
// },
|
||||
// cancelTrainRoute:{
|
||||
// // 取消进路
|
||||
// operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||
// },
|
||||
// lock:{
|
||||
// // 信号封锁
|
||||
// operation:OperationEvent.Signal.lock.menu.operation,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
|
||||
// },
|
||||
// unlock:{
|
||||
// // 信号解封
|
||||
// operation: OperationEvent.Signal.unlock.menu.operation,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
|
||||
// },
|
||||
// guide:{
|
||||
// // 进路引导
|
||||
// operation: OperationEvent.Signal.guide.menu.operation,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
||||
// },
|
||||
// reopenSignal:{
|
||||
// // 信号重开
|
||||
// operation: OperationEvent.Signal.reopenSignal.menu.operation,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||
// },
|
||||
// signalClose:{
|
||||
// // 信号关灯
|
||||
// operation: OperationEvent.Signal.signalClose.menu.operation,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||
// },
|
||||
// humanControl:{
|
||||
// // 进路交人工控
|
||||
// operation: OperationEvent.Signal.humanControl.menu.operation,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
|
||||
// },
|
||||
// atsAutoControl:{
|
||||
// // 进路交自动控
|
||||
// operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
||||
// },
|
||||
// setAutoInterlock:{
|
||||
// // 设置通过模式
|
||||
// operation: OperationEvent.Signal.setAutoInterlock.menu.operation,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
||||
// },
|
||||
// cancelAutoInterlock:{
|
||||
// // 取消通过模式
|
||||
// operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
||||
// },
|
||||
// detail:{
|
||||
// // 查询进路状态
|
||||
// operation: OperationEvent.Signal.detail.menu.operation
|
||||
// },
|
||||
// cancelGuide:{
|
||||
// // 人工解锁进路(信号机取消引导)
|
||||
// operation: OperationEvent.Signal.cancelGuide.menu.operation,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
|
||||
// },
|
||||
// setAutoTurnBack:{
|
||||
// // 设置自动折返
|
||||
// operation: OperationEvent.AutoTurnBack.SetAutoTurnBackButton.menu.operation,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK
|
||||
// },
|
||||
// cancelAutoTurnBack:{
|
||||
// // 取消自动折返
|
||||
// operation: OperationEvent.AutoTurnBack.CancelAutoTurnBackButton.menu.operation,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK
|
||||
// }
|
||||
},
|
||||
Switch:{
|
||||
lock:{
|
||||
// 道岔单锁
|
||||
operation: OperationEvent.Switch.lock.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||
},
|
||||
unlock:{
|
||||
// 道岔解锁
|
||||
operation: OperationEvent.Switch.unlock.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||
},
|
||||
block:{
|
||||
// 道岔封锁
|
||||
operation: OperationEvent.Switch.block.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_BLOCK
|
||||
},
|
||||
unblock:{
|
||||
// 道岔解封
|
||||
operation: OperationEvent.Switch.unblock.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
|
||||
},
|
||||
locate:{
|
||||
// 单操到定位
|
||||
operation: OperationEvent.Switch.locate.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
|
||||
},
|
||||
reverse:{
|
||||
// 单操到反位
|
||||
operation: OperationEvent.Switch.reverse.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
|
||||
},
|
||||
setSpeed:{
|
||||
// 设置临时限速
|
||||
operation: OperationEvent.Switch.setSpeed.menu.operation,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
|
||||
},
|
||||
turnoutForce: {
|
||||
// 道岔强制扳动
|
||||
operation: OperationEvent.Switch.turnoutForce.menu.operation,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_FORCE_TURN
|
||||
}
|
||||
},
|
||||
StationStand:{
|
||||
// setDetainTrain:{
|
||||
// // 设置扣车
|
||||
// operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
|
||||
// cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
|
||||
// },
|
||||
// cancelDetainTrain:{
|
||||
// // 取消扣车
|
||||
// operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
|
||||
// cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
||||
// },
|
||||
// setDetainTrainAuto:{
|
||||
// // 区间列车数量限制
|
||||
// operation: OperationEvent.StationStand.setDetainTrainAuto.menu.operation,
|
||||
// cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_AUTO
|
||||
// },
|
||||
// cancelDetainTrainAuto:{
|
||||
// // 取消区间列车数量限制
|
||||
// operation: OperationEvent.StationStand.cancelDetainTrainAuto.menu.operation,
|
||||
// cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_AUTO
|
||||
// },
|
||||
// setBulkBuckleTrain:{
|
||||
// // 批量扣车
|
||||
// operation: OperationEvent.StationStand.setBulkBuckleTrain.menu.operation,
|
||||
// cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_ALL
|
||||
// },
|
||||
// cancelBulkBuckleTrain:{
|
||||
// // 批量取消扣车
|
||||
// operation: OperationEvent.StationStand.cancelBulkBuckleTrain.menu.operation,
|
||||
// cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_ALL
|
||||
// },
|
||||
// setJumpStop:{
|
||||
// // 设置跳停
|
||||
// operation: OperationEvent.StationStand.setJumpStop.menu.operation,
|
||||
// cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP
|
||||
// },
|
||||
// cancelJumpStop:{
|
||||
// // 取消跳停
|
||||
// operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
|
||||
// cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
|
||||
// },
|
||||
// setStopTime:{
|
||||
// // 停站时间控制
|
||||
// operation: OperationEvent.StationStand.setStopTime.menu.operation,
|
||||
// cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME
|
||||
// },
|
||||
// setRunLevel:{
|
||||
// // 运行时间控制
|
||||
// operation: OperationEvent.StationStand.setRunLevel.menu.operation,
|
||||
// cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME
|
||||
// },
|
||||
// earlyDeparture:{
|
||||
// // 设置提前发车
|
||||
// operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
|
||||
// cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART
|
||||
// },
|
||||
// setBackStrategy:{
|
||||
// // 设置折返策略
|
||||
// operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
|
||||
// cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY
|
||||
// },
|
||||
// detail:{
|
||||
// // 查询站台状态
|
||||
// operation: OperationEvent.StationStand.detail.menu.operation
|
||||
// }
|
||||
},
|
||||
StationControl:{
|
||||
// requestCentralControl:{
|
||||
// // 请求中控(遥控)
|
||||
// operation: OperationEvent.StationControl.requestCentralControl.menu.operation,
|
||||
// cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL
|
||||
// },
|
||||
// requestStationControl:{
|
||||
// // 请求站控
|
||||
// operation: OperationEvent.StationControl.requestStationControl.menu.operation,
|
||||
// cmdType:CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL
|
||||
// },
|
||||
// emergencyStationControl:{
|
||||
// // 紧急站控
|
||||
// operation: OperationEvent.StationControl.emergencyStationControl.menu.operation,
|
||||
// cmdType:CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL
|
||||
// }
|
||||
}
|
||||
};
|
||||
|
||||
export function commitOperate(operate, paramList, over) {
|
||||
const step = {
|
||||
start: true,
|
||||
operation: operate.operation,
|
||||
param:{}
|
||||
};
|
||||
step.param = paramList;
|
||||
// over 0为首次操作,1为中间操作,2为最后操作,3为直接一次性操作
|
||||
if (over != 0 && over != 3) {
|
||||
delete step.start;
|
||||
}
|
||||
if (over == 2 || over == 3) {
|
||||
step.over = true;
|
||||
step.cmdType = operate.cmdType;
|
||||
}
|
||||
return new Promise(function(resolve, reject) {
|
||||
store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
resolve({operate:step});
|
||||
}
|
||||
}).catch(error=>{
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
}
|
@ -54,10 +54,6 @@ export default {
|
||||
title() {
|
||||
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||
return '信号关灯';
|
||||
} else if (this.operation === OperationEvent.StationStand.setRunLevel.menu.operation) {
|
||||
return '设置运行等级';
|
||||
} else if (this.operation === OperationEvent.StationStand.setStopTime.menu.operation) {
|
||||
return '停站时间';
|
||||
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
|
||||
return '设置折返策略';
|
||||
}
|
||||
@ -70,12 +66,6 @@ export default {
|
||||
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||
/** 信号关灯*/
|
||||
return OperationEvent.Signal.signalClose.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.StationStand.setRunLevel.menu.operation) {
|
||||
/** 设置运行等级*/
|
||||
return OperationEvent.StationStand.setRunLevel.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.StationStand.setStopTime.menu.operation) {
|
||||
/** 设置停战时间*/
|
||||
return OperationEvent.StationStand.setStopTime.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
|
||||
/** 设置折返策略*/
|
||||
return OperationEvent.StationStand.setBackStrategy.confirm.domId;
|
||||
@ -111,12 +101,6 @@ export default {
|
||||
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||
/** 信号关灯*/
|
||||
this.signalClose();
|
||||
} else if (this.operation === OperationEvent.StationStand.setRunLevel.menu.operation) {
|
||||
/** 设置运行等级*/
|
||||
this.setRunLevel();
|
||||
} else if (this.operation === OperationEvent.StationStand.setStopTime.menu.operation) {
|
||||
/** 停站时间*/
|
||||
this.setStopTime();
|
||||
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
|
||||
/** 设置折返策略*/
|
||||
this.setBackStrategy();
|
||||
@ -126,14 +110,6 @@ export default {
|
||||
signalClose() {
|
||||
this.sendCommand(menuOperate.Signal.signalClose);
|
||||
},
|
||||
// 设置运行等级
|
||||
setRunLevel() {
|
||||
this.sendCommand(menuOperate.StationStand.setRunLevel);
|
||||
},
|
||||
// 停站时间
|
||||
setStopTime() {
|
||||
this.sendCommand(menuOperate.StationStand.setStopTime);
|
||||
},
|
||||
// 设置折返策略
|
||||
setBackStrategy() {
|
||||
this.sendCommand(menuOperate.StationStand.setBackStrategy);
|
||||
|
@ -294,6 +294,10 @@ export const OperationEvent = {
|
||||
},
|
||||
// 道岔封闭
|
||||
block: {
|
||||
button: {
|
||||
operation: '1050',
|
||||
domId: '_Tips-Switch-Block-Mbm{TOP}'
|
||||
},
|
||||
menu: {
|
||||
operation: '105',
|
||||
domId: '_Tips-Switch-Block-Menu'
|
||||
@ -305,6 +309,10 @@ export const OperationEvent = {
|
||||
},
|
||||
// 道岔解封
|
||||
unblock: {
|
||||
button: {
|
||||
operation: '1060',
|
||||
domId: '_Tips-Switch-Unblock-Mbm{TOP}'
|
||||
},
|
||||
menu: {
|
||||
operation: '106',
|
||||
domId: '_Tips-Switch-Unblock-menu'
|
||||
@ -343,6 +351,10 @@ export const OperationEvent = {
|
||||
},
|
||||
// 强制扳动
|
||||
turnoutForce: {
|
||||
button: {
|
||||
operation: '1080',
|
||||
domId: '_Tips-Switch-TurnoutForce-Mbm{TOP}'
|
||||
},
|
||||
menu: {
|
||||
operation: '108',
|
||||
domId: '_Tips-Switch-TurnoutForce-Menu'
|
||||
@ -723,6 +735,10 @@ export const OperationEvent = {
|
||||
},
|
||||
// 封锁
|
||||
lock: {
|
||||
button: {
|
||||
operation: '3060',
|
||||
domId: '_Tips-Signal-Lock-Menu-Mbm{TOP}'
|
||||
},
|
||||
menu: {
|
||||
operation: '306',
|
||||
domId: '_Tips-Signal-Lock-Menu'
|
||||
@ -734,6 +750,10 @@ export const OperationEvent = {
|
||||
},
|
||||
// 解锁
|
||||
unlock: {
|
||||
button: {
|
||||
operation: '3070',
|
||||
domId: '_Tips-Signal-Unlock-Mbm{TOP}'
|
||||
},
|
||||
menu: {
|
||||
operation: '307',
|
||||
domId: '_Tips-Signal-Unlock-Menu'
|
||||
|
@ -123,17 +123,17 @@ export default {
|
||||
draw: {
|
||||
name: this.$t('map.drawData'),
|
||||
item: [
|
||||
{ prop:'type', label: '功能类型:', type: 'select', optionLabel: 'name', optionValue: 'value', options: this.typeList, disabled: true },
|
||||
{ prop:'type', label: this.$t('map.functionButtonType'), type: 'select', optionLabel: 'name', optionValue: 'value', options: this.typeList, disabled: true },
|
||||
{ prop: 'code', label: `${this.$t('map.code')}`, type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.selectLists, change: true, deviceChange: this.deviceChange },
|
||||
{ prop: 'name', label: '按钮主名称:', type: 'input' },
|
||||
{ prop: 'subtitleName', label: '按钮副名称:', type: 'input' },
|
||||
{ prop: 'position', label: '坐标:', type: 'coordinate', width: '140px', children: [
|
||||
{ prop: 'name', label: this.$t('map.buttonMainName'), type: 'input' },
|
||||
{ prop: 'subtitleName', label: this.$t('map.buttonViceName'), type: 'input' },
|
||||
{ prop: 'position', label: this.$t('map.textPoints'), type: 'coordinate', width: '140px', children: [
|
||||
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
|
||||
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
|
||||
] },
|
||||
{ prop:'automaticRouteCode', label: '自动进路code:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.autoList, isHidden: !this.isHiddenAutomaticRoute, change: true, deviceChange: this.changeEditStation },
|
||||
{ prop:'cycleCode', label: '自动折返进路code:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.autoList, isHidden: !this.isHiddenMapCycleButtonVO, change: true, deviceChange: this.changeEditStation },
|
||||
{ prop:'stationCode', label: '所属集中站:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList, disabled: this.isDisabledStation, isHidden: !this.isHiddenStation }
|
||||
{ prop:'automaticRouteCode', label: this.$t('map.automaticRouteCode'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.autoList, isHidden: !this.isHiddenAutomaticRoute, change: true, deviceChange: this.changeEditStation },
|
||||
{ prop:'cycleCode', label: this.$t('map.cycleCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.autoList, isHidden: !this.isHiddenMapCycleButtonVO, change: true, deviceChange: this.changeEditStation },
|
||||
{ prop:'stationCode', label: this.$t('map.ownedCiStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList, disabled: this.isDisabledStation, isHidden: !this.isHiddenStation }
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -144,15 +144,15 @@ export default {
|
||||
const form = {
|
||||
labelWidth: '150px',
|
||||
items: [
|
||||
{ prop:'type', label: '功能类型:', type: 'select', optionLabel: 'name', optionValue: 'value', options: this.typeList, change: true, deviceChange: this.typeChange },
|
||||
{ prop: 'name', label: '按钮主名称:', type: 'input' },
|
||||
{ prop: 'position', label: '坐标:', type: 'coordinate', width: '140px', children: [
|
||||
{ prop:'type', label: this.$t('map.functionButtonType'), type: 'select', optionLabel: 'name', optionValue: 'value', options: this.typeList, change: true, deviceChange: this.typeChange },
|
||||
{ prop: 'name', label: this.$t('map.buttonMainName'), type: 'input' },
|
||||
{ prop: 'position', label: this.$t('map.textPoints'), type: 'coordinate', width: '140px', children: [
|
||||
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
|
||||
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
|
||||
] },
|
||||
{ prop:'automaticRouteCode', label: '自动进路code:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.autoList, isHidden: !this.isHiddenCreateAutomaticRoute, change: true, deviceChange: this.changeStation },
|
||||
{ prop:'cycleCode', label: '自动折返进路code:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.autoList, isHidden: !this.isHiddenCreateMapCycleButtonVO, change: true, deviceChange: this.changeStation },
|
||||
{ prop:'stationCode', label: '所属集中站:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList, disabled: this.isDisabledCreateStation, isHidden: !this.isHiddenCreateStation }
|
||||
{ prop:'automaticRouteCode', label: this.$t('map.automaticRouteCode'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.autoList, isHidden: !this.isHiddenCreateAutomaticRoute, change: true, deviceChange: this.changeStation },
|
||||
{ prop:'cycleCode', label: this.$t('map.cycleCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.autoList, isHidden: !this.isHiddenCreateMapCycleButtonVO, change: true, deviceChange: this.changeStation },
|
||||
{ prop:'stationCode', label: this.$t('map.ownedCiStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList, disabled: this.isDisabledCreateStation, isHidden: !this.isHiddenCreateStation }
|
||||
]
|
||||
};
|
||||
return form;
|
||||
@ -160,10 +160,10 @@ export default {
|
||||
createRules: function () {
|
||||
return {
|
||||
type: [
|
||||
{ required: true, message: '请选择功能类型', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.selectFunctionType'), trigger: 'change' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: '请输入名称', trigger: 'blur' }
|
||||
{ required: true, message: this.$t('rules.pleaseInputName'), trigger: 'blur' }
|
||||
],
|
||||
'position.x': [
|
||||
{ required: true, message: this.$t('rules.trainPositionX'), trigger: 'blur' }
|
||||
|
@ -64,6 +64,7 @@ export default {
|
||||
noOneReturnList: [],
|
||||
maintenanceLampList: [],
|
||||
zcCommunicationList: [],
|
||||
controlLampTypeList: ['LeuControl', 'IntersiteControl', 'CenterCommunication', 'AtsControl', 'LocalControl', 'ChainControl', 'Maintain', 'PowerSupply', 'NoOneReturn', 'MaintenanceLamps', 'ZcCommunication'],
|
||||
typeList: [
|
||||
{ name: 'LEU通信', value: 'LeuControl' },
|
||||
{ name: '站间通信', value: 'IntersiteControl' },
|
||||
@ -99,10 +100,10 @@ export default {
|
||||
},
|
||||
rules: {
|
||||
code: [
|
||||
{ required: true, message: this.$t('rules.pleaseSelectEncoding'), trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.selectSaidLampType'), trigger: 'change' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: this.$t('rules.pleaseEnterStatusSignal'), trigger: 'blur' }
|
||||
{ required: true, message: this.$t('rules.enterSaidLampName'), trigger: 'blur' }
|
||||
],
|
||||
'position.x': [
|
||||
{ required: true, message: this.$t('rules.trainPositionX'), trigger: 'blur' }
|
||||
@ -111,7 +112,7 @@ export default {
|
||||
{ required: true, message: this.$t('rules.trainPositionY'), trigger: 'blur' }
|
||||
],
|
||||
stationCode: [
|
||||
{ required: true, message: '请选择设备集中站', trigger: 'change'}
|
||||
{ required: true, message: this.$t('rules.pleaseSelectStationCode'), trigger: 'change'}
|
||||
]
|
||||
}
|
||||
};
|
||||
@ -132,14 +133,14 @@ export default {
|
||||
draw: {
|
||||
name: this.$t('map.drawData'),
|
||||
item: [
|
||||
{ prop:'type', label: '表示灯类型:', type: 'select', optionLabel: 'name', optionValue: 'value', options: this.typeList, change: true, deviceChange: this.typeChange },
|
||||
{ prop:'type', label: this.$t('map.saidLampType'), type: 'select', optionLabel: 'name', optionValue: 'value', options: this.typeList, change: true, deviceChange: this.typeChange },
|
||||
{ prop: 'code', label: `${this.$t('map.code')}`, type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.selectLists, change: true, deviceChange: this.deviceChange },
|
||||
{ prop: 'name', label: '表示灯名称:', type: 'input' },
|
||||
{ prop: 'position', label: '坐标:', type: 'coordinate', width: '140px', children: [
|
||||
{ prop: 'name', label: this.$t('map.saidLampName'), type: 'input' },
|
||||
{ prop: 'position', label: this.$t('map.textPoints'), type: 'coordinate', width: '140px', children: [
|
||||
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
|
||||
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
|
||||
] },
|
||||
{ prop:'stationCode', label: '所属集中站:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList}
|
||||
{ prop:'stationCode', label: `${this.$t('map.ownedCiStation')}:`, type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList}
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -150,13 +151,13 @@ export default {
|
||||
const form = {
|
||||
labelWidth: '150px',
|
||||
items: [
|
||||
{ prop:'type', label: '表示灯类型:', type: 'select', optionLabel: 'name', optionValue: 'value', options: this.typeList, change: true, deviceChange: this.typeChange },
|
||||
{ prop: 'name', label: '表示灯名称:', type: 'input' },
|
||||
{ prop: 'position', label: '坐标:', type: 'coordinate', width: '140px', children: [
|
||||
{ prop:'type', label: this.$t('map.saidLampType'), type: 'select', optionLabel: 'name', optionValue: 'value', options: this.typeList, change: true, deviceChange: this.typeChange },
|
||||
{ prop: 'name', label: this.$t('map.saidLampName'), type: 'input' },
|
||||
{ prop: 'position', label: this.$t('map.textPoints'), type: 'coordinate', width: '140px', children: [
|
||||
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
|
||||
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
|
||||
] },
|
||||
{ prop:'stationCode', label: '所属集中站:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList}
|
||||
{ prop:'stationCode', label: `${this.$t('map.ownedCiStation')}`, type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList}
|
||||
]
|
||||
};
|
||||
return form;
|
||||
@ -164,10 +165,10 @@ export default {
|
||||
createRules: function () {
|
||||
return {
|
||||
type: [
|
||||
{ required: true, message: '请选择表示灯类型', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.selectSaidLampType'), trigger: 'change' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: '请输入名称', trigger: 'blur' }
|
||||
{ required: true, message: this.$t('rules.enterSaidLampName'), trigger: 'blur' }
|
||||
],
|
||||
'position.x': [
|
||||
{ required: true, message: this.$t('rules.trainPositionX'), trigger: 'blur' }
|
||||
@ -176,7 +177,7 @@ export default {
|
||||
{ required: true, message: this.$t('rules.trainPositionY'), trigger: 'blur' }
|
||||
],
|
||||
stationCode: [
|
||||
{ required: true, message: '请选择设备集中站', trigger: 'change'}
|
||||
{ required: true, message: this.$t('rules.pleaseSelectStationCode'), trigger: 'change'}
|
||||
]
|
||||
};
|
||||
}
|
||||
@ -306,12 +307,7 @@ export default {
|
||||
deviceSelect(selected) {
|
||||
this.$refs.dataform.resetFields();
|
||||
this.$refs.make.resetFields();
|
||||
if (selected && selected._type.toUpperCase() === 'LeuControl'.toUpperCase() || selected._type.toUpperCase() === 'IntersiteControl'.toUpperCase() ||
|
||||
selected._type.toUpperCase() === 'CenterCommunication'.toUpperCase() || selected._type.toUpperCase() === 'AtsControl'.toUpperCase() ||
|
||||
selected._type.toUpperCase() === 'LocalControl'.toUpperCase() || selected._type.toUpperCase() === 'ChainControl'.toUpperCase() ||
|
||||
selected._type.toUpperCase() === 'Maintain'.toUpperCase() || selected._type.toUpperCase() === 'PowerSupply'.toUpperCase() ||
|
||||
selected._type.toUpperCase() === 'NoOneReturn'.toUpperCase() || selected._type.toUpperCase() === 'MaintenanceLamps'.toUpperCase() ||
|
||||
selected._type.toUpperCase() === 'ZcCommunication'.toUpperCase()) {
|
||||
if (selected && this.controlLampTypeList.includes(selected._type)) {
|
||||
this.activeName = 'first';
|
||||
this.editModel = deepAssign(this.editModel, selected);
|
||||
this.editModel.type = selected._type;
|
||||
@ -352,12 +348,7 @@ export default {
|
||||
// 删除对象
|
||||
deleteObj() {
|
||||
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
||||
if (selected && selected._type.toUpperCase() === 'LeuControl'.toUpperCase() || selected._type.toUpperCase() === 'IntersiteControl'.toUpperCase() ||
|
||||
selected._type.toUpperCase() === 'CenterCommunication'.toUpperCase() || selected._type.toUpperCase() === 'AtsControl'.toUpperCase() ||
|
||||
selected._type.toUpperCase() === 'LocalControl'.toUpperCase() || selected._type.toUpperCase() === 'ChainControl'.toUpperCase() ||
|
||||
selected._type.toUpperCase() === 'Maintain'.toUpperCase() || selected._type.toUpperCase() === 'PowerSupply'.toUpperCase() ||
|
||||
selected._type.toUpperCase() === 'NoOneReturn'.toUpperCase() || selected._type.toUpperCase() === 'MaintenanceLamps'.toUpperCase() ||
|
||||
selected._type.toUpperCase() === 'ZcCommunication'.toUpperCase()) {
|
||||
if (selected && this.controlLampTypeList.includes(selected._type)) {
|
||||
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
|
@ -58,7 +58,7 @@
|
||||
@standStationCode="standStationTab"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="屏蔽门" class="tab_pane_box" name="Psd">
|
||||
<el-tab-pane :label="$t('map.psd')" class="tab_pane_box" name="Psd">
|
||||
<psd-draft
|
||||
ref="PsdDraft"
|
||||
:selected="selected"
|
||||
@ -67,7 +67,7 @@
|
||||
@standStationCode="psdTab"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="站台紧急停车" class="tab_pane_box" name="Esp">
|
||||
<el-tab-pane :label="$t('map.platformEmergencyStop')" class="tab_pane_box" name="Esp">
|
||||
<esp-draft
|
||||
ref="EspDraft"
|
||||
:selected="selected"
|
||||
@ -92,7 +92,7 @@
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="功能按钮" class="tab_pane_box" name="ControlDraft">
|
||||
<el-tab-pane :label="$t('map.functionButton')" class="tab_pane_box" name="ControlDraft">
|
||||
<control-draft
|
||||
ref="ControlDraft"
|
||||
:selected="selected"
|
||||
@ -100,7 +100,7 @@
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="表示灯" class="tab_pane_box" name="ControlLamp">
|
||||
<el-tab-pane :label="$t('map.saidLamp')" class="tab_pane_box" name="ControlLamp">
|
||||
<control-lamp
|
||||
ref="ControlLamp"
|
||||
:selected="selected"
|
||||
@ -140,7 +140,7 @@
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="矩形框" class="tab_pane_box" name="OutFrame">
|
||||
<el-tab-pane :label="$t('map.rectangularBox')" class="tab_pane_box" name="OutFrame">
|
||||
<out-frame-draft
|
||||
ref="OutFrame"
|
||||
:selected="selected"
|
||||
@ -156,7 +156,7 @@
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="包围框" class="tab_pane_box" name="CheckBox">
|
||||
<el-tab-pane :label="$t('map.boundingBox')" class="tab_pane_box" name="CheckBox">
|
||||
<checkbox-draft
|
||||
ref="CheckBox"
|
||||
:selected="selected"
|
||||
@ -296,6 +296,8 @@ export default {
|
||||
});
|
||||
},
|
||||
handleSelectControlPage(device) {
|
||||
const controlLampTypeList = ['AtsControl', 'CenterCommunication', 'ChainControl', 'IntersiteControl', 'LeuControl', 'LocalControl', 'Maintain',
|
||||
'PowerSupply', 'NoOneReturn', 'MaintenanceLamps', 'ZcCommunication'];
|
||||
const type = device._type;
|
||||
if (this.stationType) {
|
||||
this.enabledTab = 'Station';
|
||||
@ -313,8 +315,7 @@ export default {
|
||||
this.enabledTab = 'Section';
|
||||
} else if (type == 'AutomaticRoute' || type == 'AutoTurnBack' || type == 'AxleReset' || type == 'LimitControl' || type == 'GuideLock') {
|
||||
this.enabledTab = 'ControlDraft';
|
||||
} else if (type == 'AtsControl' || type == 'CenterCommunication' || type == 'ChainControl' || type == 'IntersiteControl' || type == 'LeuControl' ||
|
||||
type == 'LocalControl' || type == 'Maintain' || type == 'PowerSupply' || type == 'NoOneReturn' || type == 'MaintenanceLamps' || type == 'ZcCommunication') {
|
||||
} else if (controlLampTypeList.includes(type)) {
|
||||
this.enabledTab = 'ControlLamp';
|
||||
} else {
|
||||
this.enabledTab = type;
|
||||
|
Loading…
Reference in New Issue
Block a user