diff --git a/src/jmapNew/config/skinCode/bejing_01.js b/src/jmapNew/config/skinCode/bejing_01.js index b11a0d198..4c7cba4c1 100644 --- a/src/jmapNew/config/skinCode/bejing_01.js +++ b/src/jmapNew/config/skinCode/bejing_01.js @@ -257,6 +257,15 @@ class SkinCode extends defaultStyle { mouseOverStyle: { borderLineColor: '#FFFFFF', borderLineDash: [3, 3] + }, + text: { + fontSize: 11, // 字体大小 + fontWeight: 'normal', // 字体粗细 + distance: 5 // 灯跟文字距离 + }, + lamp: { + radiusR: 6, // 控制灯大小 + lampColor: '#5A5D5A' // 功能按钮颜色 } }; diff --git a/src/jmapNew/config/skinCode/chengdu_01.js b/src/jmapNew/config/skinCode/chengdu_01.js index f0c861d39..ec6bd9961 100644 --- a/src/jmapNew/config/skinCode/chengdu_01.js +++ b/src/jmapNew/config/skinCode/chengdu_01.js @@ -258,6 +258,15 @@ class SkinCode extends defaultStyle { position: 1, // 运行等级方向 offset: {x: -8, y: 30}, // 运行等级偏移量 textColor: '#FFF000' // 停站等级字体颜色 + }, + text: { + fontSize: 11, // 字体大小 + fontWeight: 'normal', // 字体粗细 + distance: 5 // 灯跟文字距离 + }, + lamp: { + radiusR: 6, // 控制灯大小 + lampColor: '#5A5D5A' // 功能按钮颜色 } }; diff --git a/src/jmapNew/config/skinCode/chengdu_03.js b/src/jmapNew/config/skinCode/chengdu_03.js index 82e2cccb3..9f2335b4a 100644 --- a/src/jmapNew/config/skinCode/chengdu_03.js +++ b/src/jmapNew/config/skinCode/chengdu_03.js @@ -263,6 +263,15 @@ class SkinCode extends defaultStyle { position: 1, // 运行等级方向 offset: {x: -8, y: 15}, // 运行等级偏移量 textColor: '#FFF000' // 停站等级字体颜色 + }, + text: { + fontSize: 11, // 字体大小 + fontWeight: 'normal', // 字体粗细 + distance: 5 // 灯跟文字距离 + }, + lamp: { + radiusR: 6, // 控制灯大小 + lampColor: '#5A5D5A' // 功能按钮颜色 } }; @@ -295,7 +304,8 @@ class SkinCode extends defaultStyle { }, lamp: { radiusR: 6, // 控制灯大小 - controlColor: '#FFFF00' // 控制灯颜色 + controlColor: '#FFFF00', // 控制灯颜色 + guideColor: '#5A5D5A' // 引导总锁灯颜色 }, turnBack: { // 按图折返 lamp: 1, // 灯数量 @@ -413,7 +423,43 @@ class SkinCode extends defaultStyle { this[deviceType.Line] = { lineColor: '#FFFFFF' // 线条颜色 }; - + this[deviceType.Automactic] = { + // 是否显示 + visible: true, + text: { + fontSize: 11, // 字体大小 + fontWeight: 'normal', // 字体粗细 + distance: 5 // 灯跟文字距离 + }, + subtitleText: { + fontSize: 11, // 字体大小 + fontWeight: 'normal', // 字体粗细 + distance: 17 // 等于副标题距离 + }, + lamp: { + lineDash: null, // 灯的包围框 + stroke: '#FFFFFF', // 框的颜色 + fill: 'rgba(0,0,0,0)', // 填充色 + radiusR: 6, // 控制灯大小 + controlColor: '#b5b3b3' // 控制灯颜色 (灰色) + } + }; + this[deviceType.AutomaticRoute] = { + // 是否显示 + visible: true, + text: { + fontSize: 11, // 字体大小 + fontWeight: 'normal', // 字体粗细 + distance: 5 // 灯跟文字距离 + }, + lamp: { + lineDash: null, // 灯的包围框 + stroke: '#FFFFFF', // 框的颜色 + fill: 'rgba(0,0,0,0)', // 填充色 + radiusR: 6, // 控制灯大小 + controlColor: '#b5b3b3' // 控制灯颜色 (灰色) + } + }; this[deviceType.TrainWindow] = { lineColor: '#4DD43F', // 车次窗颜色 lineDash: null, // 车次窗虚线间隔 diff --git a/src/jmapNew/config/skinCode/fuzhou_01.js b/src/jmapNew/config/skinCode/fuzhou_01.js index 511f84f1a..78b1ad1a1 100644 --- a/src/jmapNew/config/skinCode/fuzhou_01.js +++ b/src/jmapNew/config/skinCode/fuzhou_01.js @@ -241,6 +241,15 @@ class SkinCode extends defaultStyle { position: 1, // 运行等级方向 offset: {x: -8, y: 6}, // 运行等级偏移量 textColor: '#FFFFFF' // 停站等级字体颜色 + }, + text: { + fontSize: 11, // 字体大小 + fontWeight: 'normal', // 字体粗细 + distance: 5 // 灯跟文字距离 + }, + lamp: { + radiusR: 6, // 控制灯大小 + lampColor: '#5A5D5A' // 功能按钮颜色 } }; diff --git a/src/jmapNew/config/skinCode/haerbin_01.js b/src/jmapNew/config/skinCode/haerbin_01.js index fd6f077c6..944e7eb95 100644 --- a/src/jmapNew/config/skinCode/haerbin_01.js +++ b/src/jmapNew/config/skinCode/haerbin_01.js @@ -246,6 +246,15 @@ class SkinCode extends defaultStyle { position: 1, // 运行等级方向 offset: { x: -8, y: 6 }, // 运行等级偏移量 textColor: '#FFFFFF' // 停站等级字体颜色 + }, + text: { + fontSize: 11, // 字体大小 + fontWeight: 'normal', // 字体粗细 + distance: 5 // 灯跟文字距离 + }, + lamp: { + radiusR: 6, // 控制灯大小 + lampColor: '#5A5D5A' // 功能按钮颜色 } }; diff --git a/src/jmapNew/config/skinCode/ningbo_01.js b/src/jmapNew/config/skinCode/ningbo_01.js index 52bab649e..c016c5a4b 100644 --- a/src/jmapNew/config/skinCode/ningbo_01.js +++ b/src/jmapNew/config/skinCode/ningbo_01.js @@ -97,7 +97,7 @@ class SkinCode extends defaultStyle { faultLockColor: 'white', // 区段故障锁定颜色 undefinedColor: '#0071C1', // 区段未定义颜色 protectionLockedColor: '#FFFFFF', // 保护区段锁闭 - blockColor: 'pink', // 区段封锁颜色 + blockColor: '#d659d6', // 区段封锁颜色(淡紫色) atcExcisionColor: '#A0522D', // 区段atc切除颜色 atsExcisionColor: '#A0522D', // 区段ats切除颜色 timeReleaseColor: '#3F3F3F', // 区段延时释放颜色 @@ -134,7 +134,8 @@ class SkinCode extends defaultStyle { color: 'white' // 区段边界符颜色 }, block: { - special: false // 区段特殊显示 + special: false, // 区段特殊显示 + blockGlint: true, // 区段封锁闪烁显示 } }; @@ -202,6 +203,31 @@ class SkinCode extends defaultStyle { } }; + this[deviceType.MapCycleButtonVO] = { + // 是否显示 + visible: true, + text: { + fontSize: 11, // 字体大小 + fontWeight: 'normal', // 字体粗细 + distance: 5 // 灯跟文字距离 + }, + subtitleText: { + fontSize: 11, // 字体大小 + fontWeight: 'normal', // 字体粗细 + distance: 17 // 等于副标题距离 + }, + lamp: { + lineDash: null, // 灯的包围框 + stroke: '#FFFFFF', // 框的颜色 + fill: 'rgba(0,0,0,0)', // 填充色 + radiusR: 6, // 控制灯大小 + controlColor: '#b5b3b3' // 控制灯颜色 (灰色) + }, + OutFrame: { + + } + }; + this[deviceType.StationStand] = { common: { // 通用属性 textFontSize: 10, // 站台默认字体大小 @@ -258,6 +284,15 @@ class SkinCode extends defaultStyle { position: -1, // 运行等级方向 offset: { x: -8, y: 4 }, // 运行等级偏移量 textColor: '#FFF000' // 停站等级字体颜色 + }, + text: { + fontSize: 11, // 字体大小 + fontWeight: 'normal', // 字体粗细 + distance: 5 // 灯跟文字距离 + }, + lamp: { + radiusR: 6, // 控制灯大小 + lampColor: '#5A5D5A' // 功能按钮颜色 } }; @@ -298,7 +333,7 @@ class SkinCode extends defaultStyle { }, StationControl: { text: { - distance: 2, // 灯和文字之间的距离 + distance: 12, // 灯和文字之间的距离 fontSize: 12, // 字体大小 fontFormat: 'consolas', // 字体格式 fontColor: '#ffffff', // 字体颜色 @@ -316,7 +351,7 @@ class SkinCode extends defaultStyle { lamp: { count: 4, // 控制模式的个数 offset: { x: 20, y: 0 }, // 偏移量 - radiusR: 4, // 控制模式灯的半径 + radiusR: 5, // 控制模式灯的半径 distance: 46, // 控制模式之间灯之间的距离 grayColor: '#C0C0C0', // 控制模式灰色 greenColor: 'green', // 控制模式绿色 @@ -326,7 +361,9 @@ class SkinCode extends defaultStyle { centerControlShow: true, // 中控显示 substationControlShow: true, // 站控按钮显示 interconnectedControlShow: false, // 联锁控显示 - centerControlButtonShow: true // 中控显示 + centerControlButtonShow: true, // 中控显示 + stroke: '#FFFFFF', // 框的颜色 + fill: 'rgba(0,0,0,0)', // 填充色 }, arrow: { show: false // 控制模式箭头显隐 @@ -359,7 +396,9 @@ class SkinCode extends defaultStyle { locationColor: '#FF0000', // 道岔单锁'定位'颜色 (红色) inversionColor: '#FF0000', // 道岔单锁'反位'颜色 (红色) rectShow: false, // 道岔单锁 矩形框是否显示 - rectWidth: 18, // 矩形框 宽高 + arcShow: true, // 道岔单锁 圆形显示 + arcBorderColor: 'green', // 圆形单锁框边框颜色 + rectWidth: 22, // 矩形框 宽高 rectBorderColor: '#fff' // 矩形边框颜色 }, block: { // 道岔封锁配置 diff --git a/src/jmapNew/constant/deviceRender.js b/src/jmapNew/constant/deviceRender.js index 90ed42c7b..7e3df19f2 100644 --- a/src/jmapNew/constant/deviceRender.js +++ b/src/jmapNew/constant/deviceRender.js @@ -116,4 +116,22 @@ deviceRender[deviceType.CheckBox] = { zlevel: 1 }; +/** Automactic渲染配置 自动折返*/ +deviceRender[deviceType.MapCycleButtonVO] = { + _type: deviceType.MapCycleButtonVO, + zlevel: 1 +}; + +/** OutFrame渲染配置 自动折返包围矩形*/ +deviceRender[deviceType.OutFrame] = { + _type: deviceType.OutFrame, + zlevel: 1 +}; + +/** AutomacticRoute渲染配置 自动进路*/ +deviceRender[deviceType.AutomaticRoute] = { + _type: deviceType.AutomaticRoute, + zlevel: 1 +}; + export default deviceRender; diff --git a/src/jmapNew/constant/deviceType.js b/src/jmapNew/constant/deviceType.js index ca259fc90..56c4eb15d 100644 --- a/src/jmapNew/constant/deviceType.js +++ b/src/jmapNew/constant/deviceType.js @@ -10,6 +10,8 @@ const deviceType = { StationStand: 'StationStand', Esp: 'Esp', Psd: 'Psd', + MapCycleButtonVO: 'MapCycleButtonVO', + OutFrame: 'OutFrame', StationControl: 'StationControl', StationCounter: 'StationCounter', StationDelayUnlock: 'StationDelayUnlock', @@ -17,7 +19,8 @@ const deviceType = { TrainWindow: 'TrainWindow', Line: 'Line', Text: 'Text', - CheckBox: 'CheckBox' + CheckBox: 'CheckBox', + AutomaticRoute:'AutomaticRoute' }; export default deviceType; diff --git a/src/jmapNew/constant/stateTransition.js b/src/jmapNew/constant/stateTransition.js index 50e2ec9f5..f993764e1 100644 --- a/src/jmapNew/constant/stateTransition.js +++ b/src/jmapNew/constant/stateTransition.js @@ -95,16 +95,25 @@ class Status { }; } handleZcControl(device) { - this.statusObj = { - }; + this.statusObj = { }; + } + handleLcControl(device) { + this.statusObj = { }; } handleTrainWindow(device) { - this.statusObj = { - }; + this.statusObj = { }; } handleLine(device) { - this.statusObj = { - }; + this.statusObj = { }; + } + handleLimitControl(device) { + this.statusObj = { }; + } + handleMapCycleButtonVO(device) { + this.statusObj = { }; + } + handleOutFrame(device) { + this.statusObj = { }; } getStatus() { return this.statusObj; diff --git a/src/jmapNew/shape/Automactic/EMouse.js b/src/jmapNew/shape/Automactic/EMouse.js new file mode 100644 index 000000000..fdb639e95 --- /dev/null +++ b/src/jmapNew/shape/Automactic/EMouse.js @@ -0,0 +1,53 @@ +import Group from 'zrender/src/container/Group'; +import Text from 'zrender/src/graphic/Text'; + +export default class EMouse extends Group { + constructor(device) { + super(); + this.device = device; + this.create(); + } + create() { + this.text = new Text({ + zlevel: this.device.zlevel, + z: this.device.z+1, + position: [0, 0], + style: { + x: this.device.model.position.x, + y: this.device.model.position.y + this.device.style.LcControl.lamp.radiusR + this.device.style.LcControl.text.distance-30, + fontWeight: 'normal', + fontSize: this.device.style.LcControl.mouseOverStyle.fontSize, + fontFamily: this.device.style.LcControl.mouseOverStyle.fontFamily, + text: this.device.model.name, + textFill: this.device.style.LcControl.mouseOverStyle.fontColor, + textAlign: this.device.style.LcControl.mouseOverStyle.textAlign, + textVerticalAlign: this.device.style.LcControl.mouseOverStyle.textVerticalAlign + } + }); + this.add(this.text); + this.text.hide(); + } + mouseover(e) { + if (e.target && e.target._subType == 'Text') { + this.text.show(); + } else { + this.device.control.setControlColor(this.device.style.LcControl.mouseOverStyle.arcColor); + this.device.control.setTextColor(this.device.style.LcControl.mouseOverStyle.textColor); + this.device.control.setTextBorder(true); + this.device.control.setArcBorder(true); + } + } + + mouseout(e) { + if (!this.device.model.down) { + if (e.target && e.target._subType == 'Text') { + this.text.hide(); + } else { + this.device.control.setControlColor(this.device.style.LcControl.lamp.controlColor); + this.device.control.setTextColor('#FFFFFF'); + this.device.control.setTextBorder(false); + this.device.control.setArcBorder(false); + } + } + } +} diff --git a/src/jmapNew/shape/Automactic/index.js b/src/jmapNew/shape/Automactic/index.js new file mode 100644 index 000000000..f1bfbde4e --- /dev/null +++ b/src/jmapNew/shape/Automactic/index.js @@ -0,0 +1,132 @@ +/* +* 自动折返 控制器 +*/ +import Group from 'zrender/src/container/Group'; +import Arc from 'zrender/src/graphic/shape/Arc'; +import Text from 'zrender/src/graphic/Text'; +import Rect from 'zrender/src/graphic/shape/Rect'; +import EMouse from './EMouse'; + +export default class Automactic extends Group { + constructor(model, style) { + super(); + this.z = 20; + this._code = model.code; + this._type = model._type; + this.zlevel = model.zlevel; + this.model = model; + this.style = style; + this.create(); + this.createMouseEvent(); + this.setState(model); + } + + create() { + const model = this.model; + this.control = new Arc({ + _subType: 'Control', + zlevel: this.zlevel, + z: this.z, + shape: { + cx: model.position.x, + cy: model.position.y, + r: this.style.MapCycleButtonVO.lamp.radiusR + }, + style: { + lineWidth: 0, + fill: this.style.MapCycleButtonVO.lamp.controlColor + } + }); + + this.text = new Text({ + _subType: 'Text', + zlevel: this.zlevel, + z: this.z, + position: [0, 0], + style: { + x: model.position.x, + y: model.position.y + this.style.MapCycleButtonVO.lamp.radiusR + this.style.MapCycleButtonVO.text.distance, + fontWeight: this.style.MapCycleButtonVO.text.fontWeight, + fontSize: this.style.MapCycleButtonVO.text.fontSize, + fontFamily: this.style.fontFamily, + text: model.name, + textFill: '#fff', + textAlign: 'middle', + textVerticalAlign: 'top' + } + }); + + if (this.model.subtitleName) { + this.subtitleText = new Text({ + _subType: 'Text', + zlevel: this.zlevel, + z: this.z, + position: [0, 0], + style: { + x: model.position.x, + y: model.position.y + this.style.MapCycleButtonVO.lamp.radiusR + this.style.MapCycleButtonVO.subtitleText.distance, + fontWeight: this.style.MapCycleButtonVO.subtitleText.fontWeight, + fontSize: this.style.MapCycleButtonVO.subtitleText.fontSize, + fontFamily: this.style.fontFamily, + text: model.subtitleName, + textFill: '#fff', + textAlign: 'middle', + textVerticalAlign: 'top' + } + }); + this.add(this.subtitleText); + } + const arcRect = this.getArcBoundingRect(); + this.arcBorder = new Rect({ + zlevel: this.zlevel, + z: this.z, + silent: true, + shape: arcRect, + style: { + lineDash: this.style.MapCycleButtonVO.lamp.lineDash, + stroke: this.style.MapCycleButtonVO.lamp.stroke, + fill: this.style.MapCycleButtonVO.lamp.fill + } + }); + this.add(this.control); + this.add(this.text); + this.add(this.arcBorder); + } + + // 设置状态 + setState(model) { + } + + createMouseEvent() { + if (this.style.LcControl.mouseOverStyle) { + this.mouseEvent = new EMouse(this); + this.add(this.mouseEvent); + this.on('mouseout', (e) => { this.mouseEvent.mouseout(e); }); + this.on('mouseover', (e) => { this.mouseEvent.mouseover(e); }); + } + } + + getArcBoundingRect() { + const rect = this.control.getBoundingRect().clone(); + const scale = this.control.scale[0]; + const offsetX = this.control.position[0]; + const offsetY = this.control.position[1]; + rect.x = rect.x * scale + offsetX - 2; + rect.y = rect.y * scale + offsetY - 2; + rect.width = rect.width * scale + 4; + rect.height = rect.height * scale + 4; + return rect; + } + + getShapeTipPoint() { + if (this.control) { + var distance = 2; + var rect = this.control.getBoundingRect(); + return { + x: rect.x + rect.width / 2, + y: rect.y - distance + }; + } + return null; + } +} diff --git a/src/jmapNew/shape/AutomacticRoute/EMouse.js b/src/jmapNew/shape/AutomacticRoute/EMouse.js new file mode 100644 index 000000000..fdb639e95 --- /dev/null +++ b/src/jmapNew/shape/AutomacticRoute/EMouse.js @@ -0,0 +1,53 @@ +import Group from 'zrender/src/container/Group'; +import Text from 'zrender/src/graphic/Text'; + +export default class EMouse extends Group { + constructor(device) { + super(); + this.device = device; + this.create(); + } + create() { + this.text = new Text({ + zlevel: this.device.zlevel, + z: this.device.z+1, + position: [0, 0], + style: { + x: this.device.model.position.x, + y: this.device.model.position.y + this.device.style.LcControl.lamp.radiusR + this.device.style.LcControl.text.distance-30, + fontWeight: 'normal', + fontSize: this.device.style.LcControl.mouseOverStyle.fontSize, + fontFamily: this.device.style.LcControl.mouseOverStyle.fontFamily, + text: this.device.model.name, + textFill: this.device.style.LcControl.mouseOverStyle.fontColor, + textAlign: this.device.style.LcControl.mouseOverStyle.textAlign, + textVerticalAlign: this.device.style.LcControl.mouseOverStyle.textVerticalAlign + } + }); + this.add(this.text); + this.text.hide(); + } + mouseover(e) { + if (e.target && e.target._subType == 'Text') { + this.text.show(); + } else { + this.device.control.setControlColor(this.device.style.LcControl.mouseOverStyle.arcColor); + this.device.control.setTextColor(this.device.style.LcControl.mouseOverStyle.textColor); + this.device.control.setTextBorder(true); + this.device.control.setArcBorder(true); + } + } + + mouseout(e) { + if (!this.device.model.down) { + if (e.target && e.target._subType == 'Text') { + this.text.hide(); + } else { + this.device.control.setControlColor(this.device.style.LcControl.lamp.controlColor); + this.device.control.setTextColor('#FFFFFF'); + this.device.control.setTextBorder(false); + this.device.control.setArcBorder(false); + } + } + } +} diff --git a/src/jmapNew/shape/AutomacticRoute/index.js b/src/jmapNew/shape/AutomacticRoute/index.js new file mode 100644 index 000000000..2d1dc1426 --- /dev/null +++ b/src/jmapNew/shape/AutomacticRoute/index.js @@ -0,0 +1,105 @@ +/* +* 自动折返 控制器 +*/ +import Group from 'zrender/src/container/Group'; +import Arc from 'zrender/src/graphic/shape/Arc'; +import Text from 'zrender/src/graphic/Text'; +import EMouse from './EMouse'; + +export default class LcControl extends Group { + constructor(model, style) { + super(); + this.z = 20; + this._code = model.code; + this._type = model._type; + this.zlevel = model.zlevel; + this.model = model; + this.style = style; + this.create(); + this.createMouseEvent(); + this.setState(model); + } + + create() { + const model = this.model; + this.control = new Arc({ + _subType: 'Control', + zlevel: this.zlevel, + z: this.z, + shape: { + cx: model.position.x, + cy: model.position.y, + r: this.style.AutomaticRoute.lamp.radiusR + }, + style: { + lineWidth: 0, + fill: this.style.AutomaticRoute.lamp.controlColor + } + }); + + this.text = new Text({ + _subType: 'Text', + zlevel: this.zlevel, + z: this.z, + position: [0, 0], + style: { + x: model.position.x, + y: model.position.y + this.style.AutomaticRoute.lamp.radiusR + this.style.AutomaticRoute.text.distance, + fontWeight: this.style.AutomaticRoute.text.fontWeight, + fontSize: this.style.AutomaticRoute.text.fontSize, + fontFamily: this.style.fontFamily, + text: model.name, + textFill: '#fff', + textAlign: 'middle', + textVerticalAlign: 'top' + } + }); + + if (this.model.subtitleName) { + this.subtitleText = new Text({ + _subType: 'Text', + zlevel: this.zlevel, + z: this.z, + position: [0, 0], + style: { + x: model.position.x, + y: model.position.y + this.style.AutomaticRoute.lamp.radiusR + this.style.AutomaticRoute.subtitleText.distance, + fontWeight: this.style.AutomaticRoute.subtitleText.fontWeight, + fontSize: this.style.AutomaticRoute.subtitleText.fontSize, + fontFamily: this.style.fontFamily, + text: model.subtitleName, + textFill: '#fff', + textAlign: 'middle', + textVerticalAlign: 'top' + } + }); + this.add(this.subtitleText); + } + this.add(this.control); + this.add(this.text); + } + + // 设置状态 + setState(model) { + } + + createMouseEvent() { + if (this.style.LcControl.mouseOverStyle) { + this.mouseEvent = new EMouse(this); + this.add(this.mouseEvent); + this.on('mouseout', (e) => { this.mouseEvent.mouseout(e); }); + this.on('mouseover', (e) => { this.mouseEvent.mouseover(e); }); + } + } + getShapeTipPoint() { + if (this.control) { + var distance = 2; + var rect = this.control.getBoundingRect(); + return { + x: rect.x + rect.width / 2, + y: rect.y - distance + }; + } + return null; + } +} diff --git a/src/jmapNew/shape/OutFrame/index.js b/src/jmapNew/shape/OutFrame/index.js new file mode 100644 index 000000000..af6376aa6 --- /dev/null +++ b/src/jmapNew/shape/OutFrame/index.js @@ -0,0 +1,41 @@ +import Group from 'zrender/src/container/Group'; +import Rect from 'zrender/src/graphic/shape/Rect'; + +export default class OutFrame extends Group { + constructor(model, style) { + super(); + this.model = model; + this._type = model._type; + this._code = model.code; + this.style = style; + this.zlevel = model.zlevel; + this.z = 0; + this.create(); + this.setState(model); + } + + create() { + const model = this.model; + this.box = new Rect({ + zlevel: this.zlevel, + z: this.z, + shape: { + x: model.position.x - model.width / 2, + y: model.position.y - model.height / 2, + width: model.width, + height: model.height + }, + style: { + lineDash: null, + stroke: '#fff', + lineWidth: 1, + fill: 'rgb(135,206,250,0)' + } + }); + this.add(this.box); + } + + // 设置状态 + setState(model) { + } +} diff --git a/src/jmapNew/shape/Section/index.js b/src/jmapNew/shape/Section/index.js index 8c6142f3c..63bf15174 100644 --- a/src/jmapNew/shape/Section/index.js +++ b/src/jmapNew/shape/Section/index.js @@ -654,6 +654,12 @@ export default class Section extends Group { lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth }); } + if (this.style.Section.block.blockGlint) { + this.section && this.section.animateStyle(true, [ + { time: 1000, styles: { stroke: this.style.backgroundColor } }, + { time: 2000, styles: { stroke: this.style.Section.line.blockColor } } + ]); + } } /** 故障锁定状态 05*/ @@ -794,7 +800,6 @@ export default class Section extends Group { /** 空闲锁闭或者叫进路锁闭 */ model.routeLock && this.routeLock(); /** 轨道封锁 */ - // model.blockade = 1; model.blockade && this.block(); /** 非CBTC车占用 */ model.nctOccupied && this.unCommunicationOccupied(); @@ -803,7 +808,6 @@ export default class Section extends Group { /** 区段切除*/ model.cutOff && this.sectionCutOff(); /** 是否限速*/ - // model.speedUpLimit = 1; model.speedUpLimit && this.setSpeedUpperLimit(); /** 道岔区段更新岔心颜色 */ if (model.type === '03' && model.switch) { diff --git a/src/jmapNew/shape/Station/ESingleControl.js b/src/jmapNew/shape/Station/ESingleControl.js index 2f1f8e2c0..1206cb4a3 100644 --- a/src/jmapNew/shape/Station/ESingleControl.js +++ b/src/jmapNew/shape/Station/ESingleControl.js @@ -36,7 +36,7 @@ export default class ESingleControl extends Group { r: model.style.Station.StationControl.lamp.radiusR }, style: { - lineWidth: 0.5, + lineWidth: 0, fill: model.style.Station.StationControl.lamp.grayColor, stroke: model.style.Station.StationControl.lamp.grayColor } @@ -70,4 +70,16 @@ export default class ESingleControl extends Group { this.control.setStyle('fill', color); } } + + getArcBoundingRect() { + const rect = this.control.getBoundingRect().clone(); + const scale = this.control.scale[0]; + const offsetX = this.control.position[0]; + const offsetY = this.control.position[1]; + rect.x = rect.x * scale + offsetX - 2; + rect.y = rect.y * scale + offsetY - 2; + rect.width = rect.width * scale + 4; + rect.height = rect.height * scale + 4; + return rect; + } } diff --git a/src/jmapNew/shape/Station/index.js b/src/jmapNew/shape/Station/index.js index da5e0862f..cec7a6a8e 100644 --- a/src/jmapNew/shape/Station/index.js +++ b/src/jmapNew/shape/Station/index.js @@ -8,6 +8,7 @@ import EMouse from './EMouse'; import ESingleControl from './ESingleControl'; import EArrow from './EArrow'; import { arrow } from '../utils/ShapePoints'; +import Rect from 'zrender/src/graphic/shape/Rect'; import BoundingRect from 'zrender/src/core/BoundingRect'; export default class Station extends Group { @@ -21,6 +22,7 @@ export default class Station extends Group { this.style = style; this.create(); this.createTurnBack(); // 创建按图折返 + this.createGuideTotalLock(); // 创建引导总锁 this.createControlMode(); this.setState(model); this.checkIsDrawMap(); @@ -103,6 +105,39 @@ export default class Station extends Group { } } } + createGuideTotalLock() { // 创建引导总锁 + const model = this.model; + const style = this.style; + if (model.guideTotalLock) { + this.guideLamp = new EControl({ + zlevel: this.zlevel, + z: this.z, + arc: { + shape: { + cx: model.guideTotalLockPoint.x, + cy: model.guideTotalLockPoint.y, + r: style.Station.lamp.radiusR + }, + lineWidth: 0, + fill: style.Station.lamp.guideColor + }, + text: { + position: [0, 0], + x: model.guideTotalLockPoint.x, + y: model.guideTotalLockPoint.y + style.Station.lamp.radiusR + style.Station.StationControl.text.distance, + fontWeight: style.Station.text.fontWeight, + fontSize: style.Station.text.fontSize, + fontFamily: style.fontFamily, + text: '引导总锁', + textFill: '#fff', + textAlign: 'middle', + textVerticalAlign: 'top' + }, + style: this.style + }); + this.add(this.guideLamp); + } + } createTurnBack() { // 创建按图折返 const model = this.model; const style = this.style; @@ -208,7 +243,6 @@ export default class Station extends Group { x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.lamp.offset.x, y: model.controlModePoint.y + this.style.Station.StationControl.lamp.offset.y }, - // context: model.lskContent || '联锁控', context: this.style.Station.StationControl.text.interconnectedControlText || '联锁控', pop: false }); @@ -247,6 +281,19 @@ export default class Station extends Group { pop: false }); this.add(this.centerControlButton); + const arcRect = this.centerControlButton.getArcBoundingRect(); + this.arcBorder = new Rect({ + zlevel: this.zlevel, + z: this.z, + silent: true, + shape: arcRect, + style: { + lineDash: null, + stroke: this.style.Station.StationControl.lamp.stroke, + fill: this.style.Station.StationControl.lamp.fill + } + }); + this.add(this.arcBorder); } } diff --git a/src/jmapNew/shape/StationControl/index.js b/src/jmapNew/shape/StationControl/index.js index b3c32b3fd..087037322 100644 --- a/src/jmapNew/shape/StationControl/index.js +++ b/src/jmapNew/shape/StationControl/index.js @@ -26,75 +26,75 @@ export default class StationControl extends Group { create() { const model = this.model; // 紧急站控 - if (this.style.StationControl.lamp.emergencyControlShow) { + if (this.style.Station.StationControl.lamp.emergencyControlShow) { this.emergencyControl = new ESingleControl({ _subType: 'emergency', style: this.style, zlevel: this.zlevel, z: this.z, point: { - x: model.position.x - this.style.StationControl.lamp.distance * 3 / 2 + this.style.StationControl.lamp.offset.x, - y: model.position.y + this.style.StationControl.lamp.offset.y + x: model.position.x - this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.lamp.offset.x, + y: model.position.y + this.style.Station.StationControl.lamp.offset.y }, - context: this.style.StationControl.text.emergencyControlText, + context: this.style.Station.StationControl.text.emergencyControlText, // model.jjzkContent, pop: false }); this.add(this.emergencyControl); } // 中控按钮 - if (this.style.StationControl.lamp.centerControlShow) { + if (this.style.Station.StationControl.lamp.centerControlShow) { this.centerControl = new ESingleControl({ _subType: 'center', style: this.style, zlevel: this.zlevel, z: this.z, point: { - x: model.position.x - this.style.StationControl.lamp.distance / 2 + this.style.StationControl.lamp.offset.x, - y: model.position.y + this.style.StationControl.lamp.offset.y + x: model.position.x - this.style.Station.StationControl.lamp.distance / 2 + this.style.Station.StationControl.lamp.offset.x, + y: model.position.y + this.style.Station.StationControl.lamp.offset.y }, - context: this.style.StationControl.text.centerControlText, + context: this.style.Station.StationControl.text.centerControlText, // model.zokContent, pop: false }); this.add(this.centerControl); } // 站控按钮 - if (this.style.StationControl.lamp.substationControlShow) { + if (this.style.Station.StationControl.lamp.substationControlShow) { this.substationControl = new ESingleControl({ _subType: 'substation', style: this.style, zlevel: this.zlevel, z: this.z, point: { - x: model.position.x + this.style.StationControl.lamp.distance / 2 + this.style.StationControl.lamp.offset.x, - y: model.position.y + this.style.StationControl.lamp.offset.y + x: model.position.x + this.style.Station.StationControl.lamp.distance / 2 + this.style.Station.StationControl.lamp.offset.x, + y: model.position.y + this.style.Station.StationControl.lamp.offset.y }, - context: this.style.StationControl.text.substationControlText, + context: this.style.Station.StationControl.text.substationControlText, // model.zakContent pop: false }); this.add(this.substationControl); } // 联锁控 - if (this.style.StationControl.lamp.interconnectedControlShow) { + if (this.style.Station.StationControl.lamp.interconnectedControlShow) { this.interconnectedControl = new ESingleControl({ _subType: 'interconnected', style: this.style, zlevel: this.zlevel, z: this.z, point: { - x: model.position.x + this.style.StationControl.lamp.distance * 3 / 2 + this.style.StationControl.lamp.offset.x, - y: model.position.y + this.style.StationControl.lamp.offset.y + x: model.position.x + this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.lamp.offset.x, + y: model.position.y + this.style.Station.StationControl.lamp.offset.y }, - context: this.style.StationControl.text.interconnectedControlText || '联锁控', + context: this.style.Station.StationControl.text.interconnectedControlText || '联锁控', pop: false }); this.add(this.interconnectedControl); } // 箭头 - if (this.style.StationControl.arrow.show) { - const point = arrow(this.model.position.x, this.model.position.y + this.style.StationControl.lamp.radiusR / 2, this.style.StationControl.lamp.distance / 6, this.style.StationControl.lamp.radiusR * 0.8); + if (this.style.Station.StationControl.arrow.show) { + const point = arrow(this.model.position.x, this.model.position.y + this.style.Station.StationControl.lamp.radiusR / 2, this.style.Station.StationControl.lamp.distance / 6, this.style.Station.StationControl.lamp.radiusR * 0.8); this.arrowsControl = new EArrow({ zlevel: this.zlevel, z: this.z, @@ -102,9 +102,9 @@ export default class StationControl extends Group { count: this.count, drict: 1, point: point, - x: model.position.x + this.style.StationControl.lamp.offset.x, - y: model.position.y + this.style.StationControl.lamp.radiusR / 2 + this.style.StationControl.lamp.offset.y, - fill: this.style.StationControl.lamp.grayColor, + x: model.position.x + this.style.Station.StationControl.lamp.offset.x, + y: model.position.y + this.style.Station.StationControl.lamp.radiusR / 2 + this.style.Station.StationControl.lamp.offset.y, + fill: this.style.Station.StationControl.lamp.grayColor, lineWidth: 1, stroke: this.style.sidelineColor }); @@ -116,28 +116,40 @@ export default class StationControl extends Group { setState(model) { // switch (model.status) { // case '00': // 无状态 - // this.emergencyControl && this.emergencyControl.setColor(this.style.StationControl.lamp.grayColor); - // this.substationControl && this.substationControl.setColor(this.style.StationControl.lamp.grayColor); - // this.centerControl && this.centerControl.setColor(this.style.StationControl.lamp.grayColor); + // this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.grayColor); + // this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor); + // this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor); // break; // case '01': // 中控 - // this.emergencyControl && this.emergencyControl.setColor(this.style.StationControl.lamp.grayColor); - // this.substationControl && this.substationControl.setColor(this.style.StationControl.lamp.grayColor); - // this.centerControl && this.centerControl.setColor(this.style.StationControl.lamp.greenColor); + // this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.grayColor); + // this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor); + // this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.greenColor); // break; // case '02': // 站控 - // this.emergencyControl && this.emergencyControl.setColor(this.style.StationControl.lamp.grayColor); - // this.substationControl && this.substationControl.setColor(this.style.StationControl.lamp.yellowColor); - // this.centerControl && this.centerControl.setColor(this.style.StationControl.lamp.grayColor); + // this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.grayColor); + // this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.yellowColor); + // this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor); // break; // case '03': // 紧急站控 - // this.emergencyControl && this.emergencyControl.setColor(this.style.StationControl.lamp.redColor); - // this.substationControl && this.substationControl.setColor(this.style.StationControl.lamp.grayColor); - // this.centerControl && this.centerControl.setColor(this.style.StationControl.lamp.grayColor); + // this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.redColor); + // this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor); + // this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor); // break; // } } + getArcBoundingRect(view) { + const rect = view.getBoundingRect().clone(); + const scale = view.scale[0]; + const offsetX = view.position[0]; + const offsetY = view.position[1]; + rect.x = rect.x * scale + offsetX - 2; + rect.y = rect.y * scale + offsetY - 2; + rect.width = rect.width * scale + 4; + rect.height = rect.height * scale + 4; + return rect; + } + /** 按钮是否按下*/ isPop(e) { for (var i = 0; i < this.childCount(); i++) { diff --git a/src/jmapNew/shape/StationStand/index.js b/src/jmapNew/shape/StationStand/index.js index 66d880da6..e96cba070 100644 --- a/src/jmapNew/shape/StationStand/index.js +++ b/src/jmapNew/shape/StationStand/index.js @@ -11,6 +11,7 @@ import EJump from './EJump'; import EHighlight from '../element/EHighlight'; import ETrainStop from './ETrainStop'; import ETrainDepart from './ETrainDepart'; +import EControl from '../element/EControl'; class StationStand extends Group { constructor(model, style) { @@ -24,6 +25,7 @@ class StationStand extends Group { this.doors = new Group(); this.create(); this.createMouseEvent(); + this.createFunctionButton(); this.setVisible(model.visible); this.setState(model); this.checkIsDrawMap(); @@ -205,7 +207,126 @@ class StationStand extends Group { this.on('mouseover', (e) => { this.mouseEvent.mouseover(e); }); } } - + createFunctionButton() { // + const model = this.model; + const style = this.style; + if (model.stopJumpLamp) { + this.stopJumpLampButton = new EControl({ + zlevel: this.zlevel, + z: this.z, + arc: { + shape: { + cx: model.stopJumpLampPoint.x, + cy: model.stopJumpLampPoint.y, + r: style.Station.lamp.radiusR + }, + lineWidth: 0, + fill: style.StationStand.lamp.lampColor + }, + text: { + position: [0, 0], + x: model.stopJumpLampPoint.x, + y: model.stopJumpLampPoint.y + style.StationStand.lamp.radiusR + style.StationStand.text.distance, + fontWeight: style.StationStand.text.fontWeight, + fontSize: style.StationStand.text.fontSize, + fontFamily: style.fontFamily, + text: '跳停', + textFill: '#fff', + textAlign: 'middle', + textVerticalAlign: 'top' + }, + style: this.style + }); + this.add(this.stopJumpLampButton); + } + if (model.cancelStopJumpLamp) { + this.cancelStopJumpLampButton = new EControl({ + zlevel: this.zlevel, + z: this.z, + arc: { + shape: { + cx: model.cancelStopJumpLampPoint.x, + cy: model.cancelStopJumpLampPoint.y, + r: style.Station.lamp.radiusR + }, + lineWidth: 0, + fill: style.StationStand.lamp.lampColor + }, + text: { + position: [0, 0], + x: model.cancelStopJumpLampPoint.x, + y: model.cancelStopJumpLampPoint.y + style.StationStand.lamp.radiusR + style.StationStand.text.distance, + fontWeight: style.StationStand.text.fontWeight, + fontSize: style.StationStand.text.fontSize, + fontFamily: style.fontFamily, + text: '取消跳停', + textFill: '#fff', + textAlign: 'middle', + textVerticalAlign: 'top' + }, + style: this.style + }); + this.add(this.cancelStopJumpLampButton); + } + if (model.upDetainLamp) { + this.upDetainLampButton = new EControl({ + zlevel: this.zlevel, + z: this.z, + arc: { + shape: { + cx: model.upDetainLampPoint.x, + cy: model.upDetainLampPoint.y, + r: style.Station.lamp.radiusR + }, + lineWidth: 0, + fill: style.StationStand.lamp.lampColor + }, + text: { + position: [0, 0], + x: model.upDetainLampPoint.x, + y: model.upDetainLampPoint.y + style.StationStand.lamp.radiusR + style.StationStand.text.distance, + fontWeight: style.StationStand.text.fontWeight, + fontSize: style.StationStand.text.fontSize, + fontFamily: style.fontFamily, + text: '上行扣车', + textFill: '#fff', + textAlign: 'middle', + textVerticalAlign: 'top' + }, + style: this.style + }); + this.add(this.upDetainLampButton); + } + if (model.downDetainLamp) { + this.downDetainLampButton = new EControl({ + zlevel: this.zlevel, + z: this.z, + arc: { + shape: { + cx: model.downDetainLampPoint.x, + cy: model.downDetainLampPoint.y, + r: style.Station.lamp.radiusR + }, + lineWidth: 0, + fill: style.StationStand.lamp.lampColor + }, + text: { + position: [0, 0], + x: model.downDetainLampPoint.x, + y: model.downDetainLampPoint.y + style.StationStand.lamp.radiusR + style.StationStand.text.distance, + fontWeight: style.StationStand.text.fontWeight, + fontSize: style.StationStand.text.fontSize, + fontFamily: style.fontFamily, + text: '上行扣车', + textFill: '#fff', + textAlign: 'middle', + textVerticalAlign: 'top' + }, + style: this.style + }); + this.add(this.downDetainLampButton); + } + } setVisible(visible) { if (visible) { this.eachChild(elem => { elem.show(); }); diff --git a/src/jmapNew/shape/Switch/ELockArc.js b/src/jmapNew/shape/Switch/ELockArc.js new file mode 100644 index 000000000..d17f1cc97 --- /dev/null +++ b/src/jmapNew/shape/Switch/ELockArc.js @@ -0,0 +1,20 @@ +import Circle from 'zrender/src/graphic/shape/Circle'; + +/** 名称元素*/ +export default function ELockRect(model) { + const TextName = new Circle({ + zlevel: model.zlevel, + z: model.z + 2, + shape: { + cx: model.x, + cy: model.y, + r: 5 + }, + style: { + lineWidth: model.lineWidth, + stroke: model.stroke, + fill: model.fill + } + }); + return TextName; +} diff --git a/src/jmapNew/shape/Switch/ESwName.js b/src/jmapNew/shape/Switch/ESwName.js index b8976a7a3..320d9777a 100644 --- a/src/jmapNew/shape/Switch/ESwName.js +++ b/src/jmapNew/shape/Switch/ESwName.js @@ -24,16 +24,17 @@ class ESwName extends Group { fontSize: style.Switch.text.fontSize, fontFamily: style.fontFamily, text: model.name, - textAlign: model.triangle.drictx === 1 ? 'left' : 'right', + // textAlign: model.triangle.drictx === 1 ? 'left' : 'right', + textAlign: 'center', textVerticalAlign: 'middle', textFill: style.Switch.text.fontColor } }); const rect = this.nameText.getBoundingRect(); - let textWidth = rect.width * 0.8; + let textWidth = rect.width; if (style.Switch.monolock.nameBorderShow) { - textWidth = rect.width * 0.8 + 8; + textWidth = rect.width; } if (model.triangle.drictx !== 1) { rect.x += rect.width; diff --git a/src/jmapNew/shape/Switch/index.js b/src/jmapNew/shape/Switch/index.js index bd2c304f9..bad5eac3b 100644 --- a/src/jmapNew/shape/Switch/index.js +++ b/src/jmapNew/shape/Switch/index.js @@ -9,12 +9,13 @@ import ESwCore from './ESwCore.js'; import ESwLocal from './ESwLocal.js'; import ESwLnversion from './ESwLnversion'; import ELockRect from './ELockRect'; +import ELockArc from './ELockArc'; import EMouse from './EMouse'; import EHighlight from '../element/EHighlight'; import ERhomboid from './ERhomboid'; import ETriangle from './ETriangle'; import store from '@/store'; -import Vue from 'vue'; +// import Vue from 'vue'; export default class Switch extends Group { constructor(model, style) { @@ -200,8 +201,20 @@ export default class Switch extends Group { stroke: this.style.Switch.monolock.rectBorderColor, fill: this.style.transparentColor }); + + this.lockArc = new ELockArc({ // 锁定矩形 + zlevel: this.zlevel, + z: this.z + 6, + x: this.model.intersection.x, + y: this.model.intersection.y, + lineWidth: 1.2, + stroke: this.style.Switch.monolock.arcBorderColor, + fill: this.style.transparentColor + }); + this.add(this.lockArc); this.add(this.lockRect); this.lockRect.hide(); + this.lockArc.hide(); } /** 名称动画*/ @@ -251,6 +264,7 @@ export default class Switch extends Group { /** 恢复状态*/ recover() { this.lockRect.hide(); // 矩形包围框 + this.lockArc.hide(); // 圆形单锁框 this.setSwitchCoreColor(this.style.backgroundColor); this.name.getNameText().stopAnimation(false); this.swCore.stopAnimation(false); @@ -330,6 +344,9 @@ export default class Switch extends Group { if (this.style.Switch.monolock.nameBorderShow) { // 单锁显示名称包围框 this.setHasTextBorder(1); } + if (this.style.Switch.monolock.arcShow) { // 圆形单锁是否显示 + this.lockArc.show(); + } if (this.model.normalPosition) { this.setTextColor(this.style.Switch.monolock.locationColor); // 定位 设置道岔名称颜色 } else if (this.model.reversePosition) { diff --git a/src/jmapNew/shape/factory.js b/src/jmapNew/shape/factory.js index 56a2cc918..94308216d 100644 --- a/src/jmapNew/shape/factory.js +++ b/src/jmapNew/shape/factory.js @@ -15,7 +15,10 @@ import TrainWindow from './TrainWindow/index.js'; import Train from './Train/index.js'; import Line from './Line/index.js'; import Text2 from './Text/index.js'; +import MapCycleButtonVO from './Automactic/index.js'; +import OutFrame from './OutFrame/index.js'; import CheckBox from './checkBox/checkBox.js'; +import AutomaticRoute from './AutomacticRoute/index.js'; /** 图库*/ const mapShape = {}; @@ -35,7 +38,10 @@ mapShape[deviceType.TrainWindow] = TrainWindow; mapShape[deviceType.Train] = Train; mapShape[deviceType.Line] = Line; mapShape[deviceType.Text] = Text2; +mapShape[deviceType.MapCycleButtonVO] = MapCycleButtonVO; +mapShape[deviceType.OutFrame] = OutFrame; mapShape[deviceType.CheckBox] = CheckBox; +mapShape[deviceType.AutomaticRoute] = AutomaticRoute; function shapefactory(device, jmap) { const type = device._type; diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/childDialog/confirmControl.vue b/src/jmapNew/theme/beijing_01/menus/dialog/childDialog/confirmControl.vue index d4d96094f..c88b22dad 100644 --- a/src/jmapNew/theme/beijing_01/menus/dialog/childDialog/confirmControl.vue +++ b/src/jmapNew/theme/beijing_01/menus/dialog/childDialog/confirmControl.vue @@ -183,7 +183,7 @@ export default { }).catch((error) => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, // 信号关灯 @@ -203,7 +203,7 @@ export default { }).catch((error) => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, // 信号重开 @@ -223,7 +223,7 @@ export default { }).catch((error) => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, // 取消进路 @@ -243,7 +243,7 @@ export default { }).catch((error) => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, // 进路交人工控 @@ -263,7 +263,7 @@ export default { }).catch(error => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, // 进路交ATS自动控 @@ -283,7 +283,7 @@ export default { }).catch(error => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, // 设置运行等级 @@ -304,7 +304,7 @@ export default { }).catch((error) => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, // 停站时间 @@ -325,7 +325,7 @@ export default { }).catch((error) => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, // 设置折返策略 @@ -346,7 +346,7 @@ export default { }).catch((error) => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, cancel() { @@ -359,7 +359,7 @@ export default { if (valid) { this.doClose(); } - }).catch(error => { + }).catch(() => { this.doClose(); }); } diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/routeDetail.vue b/src/jmapNew/theme/beijing_01/menus/dialog/routeDetail.vue index afc94e836..849320b3e 100644 --- a/src/jmapNew/theme/beijing_01/menus/dialog/routeDetail.vue +++ b/src/jmapNew/theme/beijing_01/menus/dialog/routeDetail.vue @@ -44,109 +44,109 @@ \ No newline at end of file diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/routeSelection.vue b/src/jmapNew/theme/beijing_01/menus/dialog/routeSelection.vue index bd16c727b..797e1f213 100644 --- a/src/jmapNew/theme/beijing_01/menus/dialog/routeSelection.vue +++ b/src/jmapNew/theme/beijing_01/menus/dialog/routeSelection.vue @@ -218,7 +218,7 @@ export default { val: row.code }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); } diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/standBackStrategy.vue b/src/jmapNew/theme/beijing_01/menus/dialog/standBackStrategy.vue index 21d726024..b9e760881 100644 --- a/src/jmapNew/theme/beijing_01/menus/dialog/standBackStrategy.vue +++ b/src/jmapNew/theme/beijing_01/menus/dialog/standBackStrategy.vue @@ -139,7 +139,6 @@ export default { clickEvent(row, column, event) { const operate = { operation: OperationEvent.StationStand.setBackStrategy.choose.operation, - val: `${row.value}`, }; this.strategy = row.value; this.isConfirm = true; diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/standControl.vue b/src/jmapNew/theme/beijing_01/menus/dialog/standControl.vue index bca51d54e..c2fe566c7 100644 --- a/src/jmapNew/theme/beijing_01/menus/dialog/standControl.vue +++ b/src/jmapNew/theme/beijing_01/menus/dialog/standControl.vue @@ -309,6 +309,7 @@ export default { this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, + // 提前发车 earlyDeparture() { const operate = { diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/standDetail.vue b/src/jmapNew/theme/beijing_01/menus/dialog/standDetail.vue index 488772703..1c2a8046d 100644 --- a/src/jmapNew/theme/beijing_01/menus/dialog/standDetail.vue +++ b/src/jmapNew/theme/beijing_01/menus/dialog/standDetail.vue @@ -195,21 +195,21 @@ export default { // this.tempData.push({ item: '车站扣车', status: opts.holdStatus == '02' || opts.holdStatus == '04' ? '已设置' : '未设置' }); // this.tempData.push({ item: '中心扣车', status: opts.holdStatus == '03' || opts.holdStatus == '04' ? '已设置' : '未设置' }); // 中心扣车 - this.treeData[1].children[0].value = opts.holdStatus == '03' || opts.holdStatus == '04' ? '已设置' : '未设置'; + this.treeData[1].children[0].value = selected.centerHoldTrain ? '已设置' : '未设置'; // 车站扣车 - this.treeData[1].children[1].value = opts.holdStatus == '02' || opts.holdStatus == '04' ? '已设置' : '未设置'; + this.treeData[1].children[1].value = selected.stationHoldTrain ? '已设置' : '未设置'; // this.tempData.push({ item: '停站时间', status: opts.parkingTime != -1 ? opts.parkingTime : '自动' }); // 停站时间 - this.treeData[0].children[2].value = opts.parkingTime != -1 ? opts.parkingTime : '自动'; + this.treeData[0].children[2].value = selected.parkingTime != -1 ? selected.parkingTime : '自动'; // 跳停 - this.treeData[0].children[3].value = opts.jumpStopStatus != '01' ? '已设置' : '未设置'; + this.treeData[0].children[3].value = selected.allSkip || selected.assignSkip ? '已设置' : '未设置'; if (!stationStand || !station) { this.tempData.push({ item: '运行等级', status: `自动` }); } else { - this.tempData.push({ item: '运行等级', status: opts.intervalRunTime > 0 ? `至${station.name}${stationStand.name}:人工` : `至${station.name}${stationStand.name}:自动` }); + this.tempData.push({ item: '运行等级', status: selected.runLevelTime > 0 ? `至${station.name}${stationStand.name}:人工` : `至${station.name}${stationStand.name}:自动` }); } // this.tempData.push({ item: '跳停', status: opts.jumpStopStatus != '01' ? '已设置' : '未设置' }); - this.tempData.push({ item: '下行折返策略', status: this.strategyMap[opts.reentryStrategy] ? this.strategyMap[opts.reentryStrategy] : '默认' }); + this.tempData.push({ item: '下行折返策略', status: this.strategyMap[selected.reentryStrategy] ? this.strategyMap[selected.reentryStrategy] : '默认' }); }, doShow(operate, selected, opts) { this.selected = selected; diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/standJumpStopControl.vue b/src/jmapNew/theme/beijing_01/menus/dialog/standJumpStopControl.vue index 85421ee27..262ffda89 100644 --- a/src/jmapNew/theme/beijing_01/menus/dialog/standJumpStopControl.vue +++ b/src/jmapNew/theme/beijing_01/menus/dialog/standJumpStopControl.vue @@ -270,6 +270,7 @@ export default { this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, + // 取消跳停 cancelJumpStop() { // let val = this.model.val1; @@ -319,7 +320,6 @@ export default { this.model.val2 = val; this.model.val1 = ''; const operate = { - type: MapDeviceType.StationStand.type, operation: operation }; this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { @@ -333,7 +333,6 @@ export default { ? OperationEvent.StationStand.setJumpStop.selfStationStand.operation : OperationEvent.StationStand.cancelJumpStop.selfStationStand.operation; this.model.val1 = val; const operate = { - type: MapDeviceType.StationStand.type, operation: operation }; this.model.val2 = ''; @@ -348,9 +347,7 @@ export default { ? OperationEvent.StationStand.setJumpStop.select.operation : OperationEvent.StationStand.cancelJumpStop.select.operation; this.model.val1 = ''; const operate = { - type: MapDeviceType.StationStand.type, - operation: operation, - val: val + operation: operation }; this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/standRunLevel.vue b/src/jmapNew/theme/beijing_01/menus/dialog/standRunLevel.vue index 5c84f4dc2..f313760e7 100644 --- a/src/jmapNew/theme/beijing_01/menus/dialog/standRunLevel.vue +++ b/src/jmapNew/theme/beijing_01/menus/dialog/standRunLevel.vue @@ -241,10 +241,10 @@ export default { } }, timeSelectChange(time) { - let operate = { + const operate = { operation: OperationEvent.StationStand.setRunLevel.choose.operation, val: time.toString(), - } + }; this.time = time.toString(); this.isSelect = false; @@ -256,7 +256,7 @@ export default { }) }, levelSelectChange(row) { - let operate = { + const operate = { operation: OperationEvent.StationStand.setRunLevel.chooseLevel.operation, val: row.level.toString(), } @@ -268,19 +268,19 @@ export default { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); } - }) + }); }, checkChange(check) { - let operate = { + const operate = { operation: OperationEvent.StationStand.setRunLevel.check.operation, - val: check.toString(), - } + val: check.toString() + }; this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); } - }) + }); }, doClose() { this.loading = false; @@ -318,7 +318,7 @@ export default { } }, cancel() { - let operate = { + const operate = { operation: OperationEvent.Command.cancel.menu.operation, }; diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/standStopTime.vue b/src/jmapNew/theme/beijing_01/menus/dialog/standStopTime.vue index b88a07167..2c8c95504 100644 --- a/src/jmapNew/theme/beijing_01/menus/dialog/standStopTime.vue +++ b/src/jmapNew/theme/beijing_01/menus/dialog/standStopTime.vue @@ -219,7 +219,6 @@ export default { cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME, param: { parkingTime: this.control == '01' ? -1 : 1, - // runLevelTime: this.time, parkingAlwaysValid: this.effective == '1' } // messages: [`停站时间: ${this.stationName} - ${this.standName}, 停站时间为${this.control == '01' ? '自动' : this.time + '秒'}, 有效次数为${this.effective == false ? '一次有效' : '一直有效'}`] diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/switchCmdControl.vue b/src/jmapNew/theme/beijing_01/menus/dialog/switchCmdControl.vue index 1ba0d403e..f5164c4c0 100644 --- a/src/jmapNew/theme/beijing_01/menus/dialog/switchCmdControl.vue +++ b/src/jmapNew/theme/beijing_01/menus/dialog/switchCmdControl.vue @@ -298,7 +298,7 @@ this.setMessage('请点击“确认1”按钮,确认命令!'); this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' }); - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.setButtonEnable({ step: 1 }); @@ -331,7 +331,7 @@ this.setMessage('请点击“确认2”按钮,确认命令!'); this.writeRecord({ order: ++this.order, date: now(), context: '点击确认1', result: '' }); - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.timeCountCommand = -1; @@ -367,7 +367,7 @@ this.setMessage(''); this.writeRecord({ order: ++this.order, date: now(), context: '点击确认2', result: '' }); - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.timeCountCommand = -1; this.timeCountConfirm = -1; this.setButtonEnable({ step: -1 }); @@ -404,7 +404,7 @@ } this.writeRecord({ order: ++this.order, date: now(), context: '点击终止', result: '' }); - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.setButtonEnable({ step: 0 }); @@ -422,7 +422,7 @@ operation: OperationEvent.Command.close.menu.operation, } - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.doClose(); } diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/switchControl.vue b/src/jmapNew/theme/beijing_01/menus/dialog/switchControl.vue index 64abdf8e0..8304e61b0 100644 --- a/src/jmapNew/theme/beijing_01/menus/dialog/switchControl.vue +++ b/src/jmapNew/theme/beijing_01/menus/dialog/switchControl.vue @@ -66,12 +66,8 @@ export default { return this.dialogShow ? getDomIdByOperation(this.operation) : ''; }, title() { - if (this.operation == OperationEvent.Switch.lock.menu.operation) { - return '道岔单锁'; - } else if (this.operation == OperationEvent.Switch.block.menu.operation) { + if (this.operation == OperationEvent.Switch.block.menu.operation) { return '道岔封锁'; - } else if (this.operation == OperationEvent.Switch.turnout.menu.operation) { - return '道岔转动'; } else if (this.operation == OperationEvent.Switch.turnoutForce.menu.operation) { return '道岔强扳'; } else if (this.operation == OperationEvent.Switch.split.menu.operation) { @@ -115,15 +111,9 @@ export default { mouseCancelState(this.selected); }, commit() { - if (this.operation == OperationEvent.Switch.lock.menu.operation) { - /** 道岔单锁*/ - this.lock(); - } else if (this.operation == OperationEvent.Switch.block.menu.operation) { + if (this.operation == OperationEvent.Switch.block.menu.operation) { /** 道岔封锁*/ this.block(); - } else if (this.operation == OperationEvent.Switch.turnout.menu.operation) { - /** 道岔转动*/ - this.turnout(this.operation); } else if (this.operation == OperationEvent.Switch.turnoutForce.menu.operation) { /** 道岔强扳*/ this.turnoutForce(); @@ -135,16 +125,6 @@ export default { this.active(); } }, - // 道岔单锁 - lock() { - const operate = { - over: true, - operation: OperationEvent.Switch.lock.menu.operation, - cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK - }; - - this.sendCommand(operate); - }, // 道岔封锁 block() { const operate = { @@ -155,16 +135,6 @@ export default { this.sendCommand(operate); }, - // 道岔转动 - turnout(operation) { - const operate = { - over: true, - operation: OperationEvent.Switch.turnout.menu.operation, - cmdType: CMD.Switch.CMD_SWITCH_TURN - }; - - this.sendCommand(operate); - }, // 道岔强扮 turnoutForce() { const operate = { diff --git a/src/jmapNew/theme/beijing_01/menus/menuSignal.vue b/src/jmapNew/theme/beijing_01/menus/menuSignal.vue index 2228e91ca..e585b0181 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuSignal.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuSignal.vue @@ -153,11 +153,17 @@ export default { }, watch: { '$store.state.menuOperation.menuCount': function (val) { + debugger; if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && !this.buttonOperation) { this.doShow(this.$store.state.menuOperation.menuPosition); } else { this.doClose(); } + }, + '$store.state.menuOperation.selectedCount': function(val) { + if (this.buttonOperation) { + this.operationHandler(this.buttonOperation, this.$store.state.menuOperation.selected._type); + } } }, computed: { @@ -204,10 +210,51 @@ export default { this.$refs.popMenu.close(); } }, + operationHandler(buttonOperation, selectType) { + switch (buttonOperation) { + case OperationEvent.Signal.arrangementRoute.button.operation: { + // 进路建立 + break; + } + case OperationEvent.Signal.cancelTrainRoute.button.operation: { + // 总取消 + break; + } + case OperationEvent.Signal.humanTrainRoute.button.operation: { + // 总人解 + break; + } + case OperationEvent.Signal.reopenSignal.button.operation: { + // 信号重开 + break; + } + case OperationEvent.Signal.guide.button.operation: { + // 引导按钮 + break; + } + case 'mbm_06': { + // 引导总锁 + break; + } + case OperationEvent.Signal.guide.button.operation: { + // 自动进路 + break; + } + case OperationEvent.Signal.guide.button.operation: { + // 区故解 + break; + } + case OperationEvent.Signal.guide.button.operation: { + // 计轴复位 + break; + } + } + }, // 设置故障 setStoppage() { const operate = { start: true, + over: true, code: `${this.selected.code}`, operation: OperationEvent.Signal.stoppage.menu.operation, cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT, @@ -232,6 +279,7 @@ export default { cancelStoppage() { const operate = { start: true, + over: true, code: this.selected.code, cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT, operation: OperationEvent.Signal.cancelStoppage.menu.operation, @@ -255,10 +303,7 @@ export default { arrangementRoute() { const operate = { start: true, - // send: true, code: this.selected.code, - // type: MapDeviceType.Signal.type, - // label: MapDeviceType.Signal.label, operation: OperationEvent.Signal.arrangementRoute.menu.operation // param: { // signalCode: `${this.selected.code}` @@ -325,7 +370,7 @@ export default { // label: MapDeviceType.Signal.label, // operation: OperationEvent.Signal.unlock.menu.operation // }; - // this.$store.dispatch('training/next', operate).then(({ valid }) => { + // this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { // if (valid) { // this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); // this.$refs.routeCmdControl.doShow(operate, this.selected); @@ -370,10 +415,7 @@ export default { humanControl() { const operate = { start: true, - // send: true, code: this.selected.code, - // type: MapDeviceType.Signal.type, - // label: MapDeviceType.Signal.label, operation: OperationEvent.Signal.humanControl.menu.operation, param: { signalCode: `${this.selected.code}` @@ -396,16 +438,13 @@ export default { atsAutoControl() { const operate = { start: true, - // send: true, code: this.selected.code, - // type: MapDeviceType.Signal.type, - // label: MapDeviceType.Signal.label, operation: OperationEvent.Signal.atsAutoControl.menu.operation, param: { signalCode: `${this.selected.code}` } }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); const routes = []; diff --git a/src/jmapNew/theme/beijing_01/menus/menuStationStand.vue b/src/jmapNew/theme/beijing_01/menus/menuStationStand.vue index 907d53642..09340016e 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuStationStand.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuStationStand.vue @@ -55,72 +55,72 @@ export default { menu: [], menuNormal: { Local: [ - { - label: '设置扣车', - handler: this.setDetainTrain, - cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN, - auth: { station: true, center: false } - }, - { - label: '取消扣车', - handler: this.cancelDetainTrain, - cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN, - auth: { station: true, center: true } - }, - { - label: '设置跳停', - handler: this.setJumpStop, - cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP, - auth: { station: true, center: false } - }, - { - label: '取消跳停', - handler: this.cancelJumpStop, - cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP, - auth: { station: true, center: true } - }, - { - type: 'separator' - }, - { - label: '提前发车', - handler: this.earlyDeparture, - cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART, - auth: { station: true, center: true } - }, - { - label: '设置停站时间', - handler: this.setStopTime, - cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME, - auth: { station: true, center: true } - }, - { - type: 'separator' - }, - { - label: '站台详细信息', - handler: this.detail, - cmdType: CMD.Stand.CMD_STAND_VIEW_STATUS, - auth: { station: true, center: true } - }, - { - label: '运行时间控制', - handler: this.setRunLevel, - cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME, - auth: { station: false, center: false } - }, - { - label: '设置提前发车', - handler: this.earlyDeparture, - cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART, - auth: { station: false, center: false } - }, - { - label: '人工折返策略设置', - handler: this.setBackStrategy, - cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY, - auth: { station: false, center: false } - } + // { + // label: '设置扣车', + // handler: this.setDetainTrain, + // cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN, + // auth: { station: true, center: false } + // }, + // { + // label: '取消扣车', + // handler: this.cancelDetainTrain, + // cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN, + // auth: { station: true, center: true } + // }, + // { + // label: '设置跳停', + // handler: this.setJumpStop, + // cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP, + // auth: { station: true, center: false } + // }, + // { + // label: '取消跳停', + // handler: this.cancelJumpStop, + // cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP, + // auth: { station: true, center: true } + // }, + // { + // type: 'separator' + // }, + // { + // label: '提前发车', + // handler: this.earlyDeparture, + // cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART, + // auth: { station: true, center: true } + // }, + // { + // label: '设置停站时间', + // handler: this.setStopTime, + // cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME, + // auth: { station: true, center: true } + // }, + // { + // type: 'separator' + // }, + // { + // label: '站台详细信息', + // handler: this.detail, + // cmdType: CMD.Stand.CMD_STAND_VIEW_STATUS, + // auth: { station: true, center: true } + // }, + // { + // label: '运行时间控制', + // handler: this.setRunLevel, + // cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME, + // auth: { station: false, center: false } + // }, + // { + // label: '设置提前发车', + // handler: this.earlyDeparture, + // cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART, + // auth: { station: false, center: false } + // }, + // { + // label: '人工折返策略设置', + // handler: this.setBackStrategy, + // cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY, + // auth: { station: false, center: false } + // } // { // label: '查询站台状态', // handler: this.detail, @@ -462,7 +462,6 @@ export default { setBackStrategy() { const operate = { start: true, - // send: true, code: this.selected.code, operation: OperationEvent.StationStand.setBackStrategy.menu.operation, param:{ diff --git a/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue b/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue index 6b0383282..bce77aaa9 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue @@ -55,15 +55,17 @@ export default { { label: '轨道切除', handler: this.split, - cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF, - auth: { station: true, center: true } + cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF }, { label: '轨道激活', handler: this.active, - cmdType: CMD.Switch.CMD_SWITCH_ACTIVE, - auth: { station: true, center: true } + cmdType: CMD.Switch.CMD_SWITCH_ACTIVE } + // { + // label: '查看站场设备状态', + // handler: this.undeveloped + // } ], Center: [ { @@ -125,6 +127,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); + } } }, computed: { @@ -167,6 +174,39 @@ export default { this.$refs.popMenu.close(); } }, + 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: { + debugger; + // 道岔单锁 + if (!selectType.singleLock) { + this.lock(selectType); + } + break; + } + case OperationEvent.Switch.unlock.button.operation: { + // 道岔解锁 + if (selectType.singleLock) { + this.unlock(selectType); + } + break; + } + } + }, // 设置故障 setStoppage() { const operate = { @@ -214,109 +254,126 @@ export default { }); }, // 道岔单锁 - lock() { + lock(selectType) { const operate = { start: true, - code: this.selected.code, + over: true, operation: OperationEvent.Switch.lock.menu.operation, param: { - switchCode: `${this.selected.code}` - } + switchCode: selectType.code + }, + cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK }; this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.switchControl.doShow(operate, this.selected); } }); }, // 道岔解封 - unlock() { + unlock(selectType) { const operate = { start: true, + over: true, code: this.selected.code, operation: OperationEvent.Switch.unlock.menu.operation, param: { - switchCode: `${this.selected.code}` - } + switchCode: selectType.code + }, + cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK }; this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.switchCmdControl.doShow(operate, this.selected); + // this.$refs.switchCmdControl.doShow(operate, this.selected); } }); }, // 道岔封锁 - 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() { + // 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); + // } + // }); + // }, // 道岔解封 - 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.switchCmdControl.doShow(operate, this.selected); - } - }); - }, + // 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.switchCmdControl.doShow(operate, this.selected); + // } + // }); + // }, // 道岔强扳 - switchTurnoutForce() { + // switchTurnoutForce() { + // const operate = { + // start: true, + // code: this.selected.code, + // operation: OperationEvent.Switch.turnoutForce.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) { const operate = { start: true, - code: this.selected.code, - operation: OperationEvent.Switch.turnoutForce.menu.operation, + over: true, + operation: OperationEvent.Switch.locate.menu.operation, param: { - switchCode: `${this.selected.code}` - } + switchCode: selectType.code + }, + cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION }; this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.switchControl.doShow(operate, this.selected); } }); }, - // 道岔转动 - switchTurnout() { + + // 单操到反位 + reverse(selectType) { const operate = { start: true, - code: this.selected.code, - operation: OperationEvent.Switch.turnout.menu.operation, + over: true, + operation: OperationEvent.Switch.reverse.menu.operation, param: { - switchCode: `${this.selected.code}` - } + switchCode: selectType.code + }, + cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION }; - - if (operate.operation) { - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.switchControl.doShow(operate, this.selected); - } - }); - } + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + } + }); }, // 道岔故障解锁 fault() { @@ -390,22 +447,22 @@ export default { }); }, // 道岔计轴预复位 - axlePreReset() { - const operate = { - start: true, - code: this.selected.code, - operation: OperationEvent.Switch.axlePreReset.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.switchCmdControl.doShow(operate, this.selected); - } - }); - }, + // axlePreReset() { + // const operate = { + // start: true, + // code: this.selected.code, + // operation: OperationEvent.Switch.axlePreReset.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.switchCmdControl.doShow(operate, this.selected); + // } + // }); + // }, // 设置临时限速 setSpeed() { const operate = { diff --git a/src/jmapNew/theme/chengdu_01/menus/index.vue b/src/jmapNew/theme/chengdu_01/menus/index.vue index 7d01c6adf..117cb64f3 100644 --- a/src/jmapNew/theme/chengdu_01/menus/index.vue +++ b/src/jmapNew/theme/chengdu_01/menus/index.vue @@ -5,7 +5,7 @@ - + @@ -22,7 +22,7 @@ - \ No newline at end of file diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/routeCmdControl.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/routeCmdControl.vue deleted file mode 100644 index 29bf071e8..000000000 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/routeCmdControl.vue +++ /dev/null @@ -1,438 +0,0 @@ - - diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/routeDetail.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/routeDetail.vue index 8d608e1d7..fa74d117a 100644 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/routeDetail.vue +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/routeDetail.vue @@ -135,7 +135,6 @@ export default { const operate = { over: true, operation: OperationEvent.Signal.detail.menu.operation, - cmdType: CMD.Signal.CMD_SIGNAL_DETAIL }; this.loading = true; diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/routeHandControl.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/routeHandControl.vue index 0718bbeb1..aae0336b8 100644 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/routeHandControl.vue +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/routeHandControl.vue @@ -230,6 +230,8 @@ export default { if (!item.disabled) { this.changeList.push(false); this.selection.splice(this.selection.indexOf(item.code), 1); + } else { + this.changeList = []; } }); this.allSelect = false; @@ -287,7 +289,10 @@ export default { const operate = { over: true, operation: OperationEvent.Signal.humanControl.menu.operation, - cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING + cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING, + param:{ + routeCodeList: this.selection + } }; this.sendCommand(operate); @@ -297,7 +302,10 @@ export default { const operate = { over: true, operation: OperationEvent.Signal.atsAutoControl.menu.operation, - cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING + cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING, + param:{ + routeCodeList: this.selection + } }; this.sendCommand(operate); diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/routeLock.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/routeLock.vue index 333638b92..3521fb45a 100644 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/routeLock.vue +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/routeLock.vue @@ -155,11 +155,10 @@ export default { }, cancel() { const operate = { - type: MapDeviceType.Signal.type, operation: OperationEvent.Command.cancel.menu.operation }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.doClose(); } diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/sectionCmdControl.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/sectionCmdControl.vue deleted file mode 100644 index 3ddac40c9..000000000 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/sectionCmdControl.vue +++ /dev/null @@ -1,337 +0,0 @@ - - - - diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/sectionControl.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/sectionControl.vue index 2e1f9aab1..ff22f21c4 100644 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/sectionControl.vue +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/sectionControl.vue @@ -22,7 +22,7 @@ - + 激活 @@ -61,6 +61,7 @@ export default { loading: false, selected: null, operation: '', + isShow: false, stationName: '', sectionName: '', radio: '' @@ -113,11 +114,13 @@ export default { } } this.operation = operate.operation || ''; - + this.isShow = false; if (this.operation == OperationEvent.Section.split.menu.operation) { this.radio = '2'; + this.isShow = true; } else if (this.operation == OperationEvent.Section.active.menu.operation) { this.radio = '1'; + this.isShow = true; } } this.dialogShow = true; @@ -147,10 +150,33 @@ export default { lock() { const operate = { over: true, - operation: OperationEvent.Section.lock.menu.operation, + operation: this.operation, cmdType: CMD.Section.CMD_SECTION_BLOCK }; + this.sendCommand(operate); + }, + // 轨道区段切除 + split() { + const operate = { + over: true, + operation: this.operation, + cmdType: CMD.Section.CMD_SECTION_CUT_OFF + }; + + this.sendCommand(operate); + }, + // 轨道区段激活 + active() { + const operate = { + over: true, + operation: this.operation, + cmdType: CMD.Section.CMD_SECTION_ACTIVE + }; + + this.sendCommand(operate); + }, + sendCommand(operate) { this.loading = true; this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.loading = false; @@ -163,46 +189,6 @@ export default { this.$refs.noticeInfo.doShow(operate, error.message); }); }, - // 轨道区段切除 - split() { - const operate = { - over: true, - operation: OperationEvent.Section.split.menu.operation, - cmdType: CMD.Section.CMD_SECTION_CUT_OFF - }; - - this.loading = true; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - this.loading = false; - if (valid) { - this.doClose(); - } - }).catch(() => { - this.loading = false; - this.doClose(); - this.$refs.noticeInfo.doShow(operate); - }); - }, - // 轨道区段激活 - active() { - const operate = { - over: true, - operation: OperationEvent.Section.active.menu.operation, - cmdType: CMD.Section.CMD_SECTION_ACTIVE - }; - - this.loading = true; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - this.loading = false; - if (valid) { - this.doClose(); - } - }).catch(() => { - this.loading = false; - this.doClose(); - this.$refs.noticeInfo.doShow(operate); - }); - }, cancel() { const operate = { operation: OperationEvent.Command.cancel.menu.operation diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/sectionUnLock.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/sectionUnLock.vue new file mode 100644 index 000000000..dbf186aae --- /dev/null +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/sectionUnLock.vue @@ -0,0 +1,318 @@ + + + + diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/speedCmdControl.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/speedCmdControl.vue deleted file mode 100644 index 0f6ff2147..000000000 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/speedCmdControl.vue +++ /dev/null @@ -1,897 +0,0 @@ - - diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/standBulkBuckleTrain.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/standBulkBuckleTrain.vue index 9742f5d04..48be045ef 100644 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/standBulkBuckleTrain.vue +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/standBulkBuckleTrain.vue @@ -160,7 +160,7 @@ export default { operate.operation = OperationEvent.StationStand.earlyDeparture.downSelect.operation; } - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); } diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/standDetail.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/standDetail.vue index ef43665f2..b1d6c726b 100644 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/standDetail.vue +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/standDetail.vue @@ -193,21 +193,25 @@ export default { // this.tempData.push({ item: '车站扣车', status: opts.holdStatus == '02' || opts.holdStatus == '04' ? '已设置' : '未设置' }); // this.tempData.push({ item: '中心扣车', status: opts.holdStatus == '03' || opts.holdStatus == '04' ? '已设置' : '未设置' }); // 中心扣车 - this.treeData[1].children[0].value = opts.holdStatus == '03' || opts.holdStatus == '04' ? '已设置' : '未设置'; + this.treeData[1].children[0].value = selected.centerHoldTrain ? '已设置' : '未设置'; // 车站扣车 - this.treeData[1].children[1].value = opts.holdStatus == '02' || opts.holdStatus == '04' ? '已设置' : '未设置'; + this.treeData[1].children[1].value = selected.stationHoldTrain ? '已设置' : '未设置'; // this.tempData.push({ item: '停站时间', status: opts.parkingTime != -1 ? opts.parkingTime : '自动' }); // 停站时间 - this.treeData[0].children[2].value = opts.parkingTime != -1 ? opts.parkingTime : '自动'; + this.treeData[0].children[2].value = selected.parkingTime != -1 ? selected.parkingTime : '自动'; // 跳停 - this.treeData[0].children[3].value = opts.jumpStopStatus != '01' ? '已设置' : '未设置'; - if (!stationStand || !station) { - this.tempData.push({ item: '运行等级', status: `自动` }); - } else { - this.tempData.push({ item: '运行等级', status: opts.intervalRunTime > 0 ? `至${station.name}${stationStand.name}:人工` : `至${station.name}${stationStand.name}:自动` }); - } + this.treeData[0].children[3].value = selected.allSkip || selected.assignSkip ? '已设置' : '未设置'; + // if (selected.direction == '01') { + // 待添加 + // } + // if (!stationStand || !station) { + // this.tempData.push({ item: '运行等级', status: `自动` }); + // } else { + // this.tempData.push({ item: '运行等级', status: selected.runLevelTime > 0 ? `至${station.name}${stationStand.name}:人工` : `至${station.name}${stationStand.name}:自动` }); + // } // this.tempData.push({ item: '跳停', status: opts.jumpStopStatus != '01' ? '已设置' : '未设置' }); - this.tempData.push({ item: '下行折返策略', status: this.strategyMap[opts.reentryStrategy] ? this.strategyMap[opts.reentryStrategy] : '默认' }); + // 待添加 + // this.tempData.push({ item: '下行折返策略', status: this.strategyMap[selected.reentryStrategy] ? this.strategyMap[selected.reentryStrategy] : '默认' }); }, doShow(operate, selected, opts) { this.selected = selected; diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/stationControl.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/stationControl.vue index 3b466a561..b4ce94a54 100644 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/stationControl.vue +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/stationControl.vue @@ -221,7 +221,6 @@ export default { operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL; operate.operation = OperationEvent.StationControl.requestStationControl.menu.operation; } - console.log(operate); this.loading = true; this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { @@ -229,10 +228,10 @@ export default { if (valid) { this.doClose(); } - }).catch(() => { + }).catch((error) => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, error.message); }); } }, diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/switchCmdControl.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/switchCmdControl.vue deleted file mode 100644 index e9339584b..000000000 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/switchCmdControl.vue +++ /dev/null @@ -1,322 +0,0 @@ - - - - diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/switchUnLock.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/switchUnLock.vue new file mode 100644 index 000000000..6c7378eb1 --- /dev/null +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/switchUnLock.vue @@ -0,0 +1,317 @@ + + + + diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/trainCreate.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/trainCreate.vue deleted file mode 100644 index b5ca7b901..000000000 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/trainCreate.vue +++ /dev/null @@ -1,154 +0,0 @@ - - - diff --git a/src/jmapNew/theme/ningbo_01/menus/menuSection.vue b/src/jmapNew/theme/ningbo_01/menus/menuSection.vue index e22454204..8a2e150b6 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuSection.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuSection.vue @@ -2,10 +2,8 @@
- + - -
@@ -14,10 +12,8 @@ + diff --git a/src/views/newMap/newMapdraft/mapoperate/automaticRoute.vue b/src/views/newMap/newMapdraft/mapoperate/automaticRoute.vue new file mode 100644 index 000000000..b06e218f9 --- /dev/null +++ b/src/views/newMap/newMapdraft/mapoperate/automaticRoute.vue @@ -0,0 +1,274 @@ + + + + diff --git a/src/views/newMap/newMapdraft/mapoperate/index.vue b/src/views/newMap/newMapdraft/mapoperate/index.vue index 46f811c85..dfea9a449 100644 --- a/src/views/newMap/newMapdraft/mapoperate/index.vue +++ b/src/views/newMap/newMapdraft/mapoperate/index.vue @@ -92,6 +92,22 @@ @setCenter="setCenter" /> + + + + + + + + + + + +
+ + + +
+ + {{ $t('map.updateObj') }} + {{ $t('map.deleteObj') }} + +
+ +
+ + + + +
+ + {{ $t('map.create') }} + +
+
+ + + + diff --git a/src/views/newMap/newMapdraft/mapoperate/section/index.vue b/src/views/newMap/newMapdraft/mapoperate/section/index.vue index f0737894e..29275260c 100644 --- a/src/views/newMap/newMapdraft/mapoperate/section/index.vue +++ b/src/views/newMap/newMapdraft/mapoperate/section/index.vue @@ -397,7 +397,6 @@ export default { this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code)); }, deviceSelect(selected) { - console.log(selected, '==========='); // 判断是否激活选择站台 if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) { if (this.field === 'leftSection') { diff --git a/src/views/newMap/newMapdraft/mapoperate/station.vue b/src/views/newMap/newMapdraft/mapoperate/station.vue index 516de4b6b..323065578 100644 --- a/src/views/newMap/newMapdraft/mapoperate/station.vue +++ b/src/views/newMap/newMapdraft/mapoperate/station.vue @@ -125,6 +125,8 @@ export default { // controlled:false, createControlMode:false, createTurnBack:false, + guideTotalLock: false, + guideTotalLockPoint: {x: 0, y: 0}, turnBackPoint: {x: 0, y: 0}, // 按图折返坐标 controlModePoint: { x: 0, y: 0 } // 控制模式坐标 }, @@ -198,6 +200,11 @@ export default { { prop: 'turnBackPoint', label: '按图折返坐标:', type: 'coordinate', width: '120px', isHidden: !this.isPointsShow, children: [ { prop: 'turnBackPoint.x', firstLevel: 'turnBackPoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' }, { prop: 'turnBackPoint.y', firstLevel: 'turnBackPoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' } + ] }, + { prop: 'guideTotalLock', label: '引导总锁:', type: 'checkbox'}, + { prop: 'guideTotalLockPoint', label: '引导总锁坐标:', type: 'coordinate', width: '120px', isHidden: !this.isGuidePointsShow, children: [ + { prop: 'guideTotalLockPoint.x', firstLevel: 'guideTotalLockPoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' }, + { prop: 'guideTotalLockPoint.y', firstLevel: 'guideTotalLockPoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' } ] } ] }, @@ -247,6 +254,9 @@ export default { isPointsShow() { return this.editModel.createTurnBack; }, + isGuidePointsShow() { + return this.editModel.guideTotalLock; + }, isZcCode() { return this.editModel.centralized; } @@ -394,6 +404,8 @@ export default { // controlled: false, chargeStationCodeList:[], createControlMode: item.control, + guideTotalLock: false, + guideTotalLockPoint: {x: 0, y: 0}, createTurnBack: false, turnBackPoint: {x: 0, y: 0} // 按图折返坐标 }; diff --git a/src/views/newMap/newMapdraft/mapoperate/stationstand.vue b/src/views/newMap/newMapdraft/mapoperate/stationstand.vue index 6c83299c0..c775d589a 100644 --- a/src/views/newMap/newMapdraft/mapoperate/stationstand.vue +++ b/src/views/newMap/newMapdraft/mapoperate/stationstand.vue @@ -74,7 +74,15 @@ export default { inside: false, // 内外站台显示 right: true, standTrackCode: '', - small: false + small: false, + stopJumpLamp: false, // 跳停功能按钮 + stopJumpLampPoint: {x: 0, y: 0}, // 跳停功能按钮坐标 + cancelStopJumpLamp: false, // 取消跳停功能按钮 + cancelStopJumpLampPoint: {x: 0, y: 0}, // 取消跳停功能按钮坐标 + upDetainLamp: false, // 上行扣车功能按钮 + upDetainLampPoint: {x: 0, y: 0}, // 上行扣车功能按钮坐标 + downDetainLamp: false, // 下行扣车功能按钮 + downDetainLampPoint: {x: 0, y: 0} // 下行扣车功能按钮坐标 // direction: '' // 上下行方向 }, field: '', @@ -90,7 +98,15 @@ export default { stationstandDirection: '02', // 屏蔽门方向 right: true, inside: false, // 内外站台 - small: false + small: false, + stopJumpLamp: false, // 跳停功能按钮 + stopJumpLampPoint: {x: 0, y: 0}, // 跳停功能按钮坐标 + cancelStopJumpLamp: false, // 取消跳停功能按钮 + cancelStopJumpLampPoint: {x: 0, y: 0}, // 取消跳停功能按钮坐标 + upDetainLamp: false, // 上行扣车功能按钮 + upDetainLampPoint: {x: 0, y: 0}, // 上行扣车功能按钮坐标 + downDetainLamp: false, // 下行扣车功能按钮 + downDetainLampPoint: {x: 0, y: 0} // 下行扣车功能按钮坐标 } }; }, @@ -125,7 +141,27 @@ export default { { prop: 'standTrackCode', label: '站台轨:', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.PhysicalSectionList, hover: this.hover, buttonType: 'editSectionSelectCode', buttonShowType: this.isButtonTypeES }, { prop: 'right', label: '行驶方向:', type: 'radio', optionLabel: 'name', optionValue: 'code', border: true, radioList: this.isRightList }, { prop: 'small', label: '是否小型站台:', type: 'checkbox', disabled: true }, - { prop: 'inside', label: '是否内站台:', type: 'checkbox' } + { prop: 'inside', label: '是否内站台:', type: 'checkbox' }, + { prop: 'stopJumpLamp', label: '跳停按钮:', type: 'checkbox'}, + { prop: 'stopJumpLampPoint', label: '跳停按钮坐标:', type: 'coordinate', width: '120px', isHidden: !this.isStopJumpPointsShow, children: [ + { prop: 'stopJumpLampPoint.x', firstLevel: 'stopJumpLampPoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' }, + { prop: 'stopJumpLampPoint.y', firstLevel: 'stopJumpLampPoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' } + ] }, + { prop: 'cancelStopJumpLamp', label: '取消跳停按钮:', type: 'checkbox'}, + { prop: 'cancelStopJumpLampPoint', label: '取消跳停按钮坐标:', type: 'coordinate', width: '120px', isHidden: !this.isCancelStopJumpPointsShow, children: [ + { prop: 'cancelStopJumpLampPoint.x', firstLevel: 'cancelStopJumpLampPoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' }, + { prop: 'cancelStopJumpLampPoint.y', firstLevel: 'cancelStopJumpLampPoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' } + ] }, + { prop: 'upDetainLamp', label: '上行扣车按钮:', type: 'checkbox'}, + { prop: 'upDetainLampPoint', label: '上行扣车按钮坐标:', type: 'coordinate', width: '120px', isHidden: !this.isUpDetainPointsShow, children: [ + { prop: 'upDetainLampPoint.x', firstLevel: 'upDetainLampPoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' }, + { prop: 'upDetainLampPoint.y', firstLevel: 'upDetainLampPoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' } + ] }, + { prop: 'downDetainLamp', label: '下行扣车按钮:', type: 'checkbox'}, + { prop: 'downDetainLampPoint', label: '下行扣车坐标:', type: 'coordinate', width: '120px', isHidden: !this.isDownDetainPointsShow, children: [ + { prop: 'downDetainLampPoint.x', firstLevel: 'downDetainLampPoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' }, + { prop: 'downDetainLampPoint.y', firstLevel: 'downDetainLampPoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' } + ] } ] }, map: { @@ -188,7 +224,27 @@ export default { { prop: 'standTrackCode', label: '站台轨:', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.PhysicalSectionList, hover: this.hover, buttonType: 'sectionSelectCode', buttonShowType: this.isButtonTypeS }, { prop: 'right', label: '行驶方向:', type: 'radio', optionLabel: 'name', optionValue: 'code', border: true, radioList: this.isRightList }, { prop: 'small', label: '是否小型站台:', type: 'checkbox' }, - { prop: 'inside', label: '是否内站台:', type: 'checkbox' } + { prop: 'inside', label: '是否内站台:', type: 'checkbox' }, + { prop: 'stopJumpLamp', label: '跳停按钮:', type: 'checkbox'}, + { prop: 'stopJumpLampPoint', label: '跳停按钮坐标:', type: 'coordinate', width: '120px', isHidden: !this.isStopJumpPointsShow, children: [ + { prop: 'stopJumpLampPoint.x', firstLevel: 'stopJumpLampPoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' }, + { prop: 'stopJumpLampPoint.y', firstLevel: 'stopJumpLampPoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' } + ] }, + { prop: 'cancelStopJumpLamp', label: '取消跳停按钮:', type: 'checkbox'}, + { prop: 'cancelStopJumpLampPoint', label: '取消跳停按钮坐标:', type: 'coordinate', width: '120px', isHidden: !this.isCancelStopJumpPointsShow, children: [ + { prop: 'cancelStopJumpLampPoint.x', firstLevel: 'cancelStopJumpLampPoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' }, + { prop: 'cancelStopJumpLampPoint.y', firstLevel: 'cancelStopJumpLampPoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' } + ] }, + { prop: 'upDetainLamp', label: '上行扣车按钮:', type: 'checkbox'}, + { prop: 'upDetainLampPoint', label: '上行扣车按钮坐标:', type: 'coordinate', width: '120px', isHidden: !this.isUpDetainPointsShow, children: [ + { prop: 'upDetainLampPoint.x', firstLevel: 'upDetainLampPoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' }, + { prop: 'upDetainLampPoint.y', firstLevel: 'upDetainLampPoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' } + ] }, + { prop: 'downDetainLamp', label: '下行扣车按钮:', type: 'checkbox'}, + { prop: 'downDetainLampPoint', label: '下行扣车坐标:', type: 'coordinate', width: '120px', isHidden: !this.isDownDetainPointsShow, children: [ + { prop: 'downDetainLampPoint.x', firstLevel: 'downDetainLampPoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' }, + { prop: 'downDetainLampPoint.y', firstLevel: 'downDetainLampPoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' } + ] } ] }, door: { @@ -228,6 +284,18 @@ export default { isButtonTypeES() { return this.field === 'editSectionSelectCode'; }, + isStopJumpPointsShow() { + return this.activeName === 'first' ? this.editModel.stopJumpLamp : this.addModel.stopJumpLamp; + }, + isCancelStopJumpPointsShow() { + return this.activeName === 'first' ? this.editModel.cancelStopJumpLamp : this.addModel.cancelStopJumpLamp; + }, + isUpDetainPointsShow() { + return this.activeName === 'first' ? this.editModel.upDetainLamp : this.addModel.upDetainLamp; + }, + isDownDetainPointsShow() { + return this.activeName === 'first' ? this.editModel.downDetainLamp : this.addModel.downDetainLamp; + }, PhysicalSectionList() { let list = []; if (this.sectionList && this.sectionList.length) { @@ -309,7 +377,15 @@ export default { standTrackCode: this.addModel.standTrackCode, right: this.addModel.right, small: this.addModel.small, - inside: this.addModel.inside + inside: this.addModel.inside, + stopJumpLamp: this.addModel.stopJumpLamp, // 跳停功能按钮 + stopJumpLampPoint: this.addModel.stopJumpLampPoint, // 跳停功能按钮坐标 + cancelStopJumpLamp: this.addModel.cancelStopJumpLamp, // 取消跳停功能按钮 + cancelStopJumpLampPoint: this.addModel.cancelStopJumpLampPoint, // 取消跳停功能按钮坐标 + upDetainLamp: this.addModel.upDetainLamp, // 上行扣车功能按钮 + upDetainLampPoint: this.addModel.upDetainLampPoint, // 上行扣车功能按钮坐标 + downDetainLamp: this.addModel.downDetainLamp, // 下行扣车功能按钮 + downDetainLampPoint: this.addModel.downDetainLampPoint // 下行扣车功能按钮坐标 }; this.stationList.forEach(elem => { if (elem.code == this.addModel.stationCode) { diff --git a/src/views/newMap/newMapdraft/mapoperate/zcControl.vue b/src/views/newMap/newMapdraft/mapoperate/zcControl.vue index 449c37cb7..55e05f6bd 100644 --- a/src/views/newMap/newMapdraft/mapoperate/zcControl.vue +++ b/src/views/newMap/newMapdraft/mapoperate/zcControl.vue @@ -163,6 +163,9 @@ export default { watch: { selected(val, oldVal) { this.deviceSelect(val); + }, + stationList() { + this.getConcertrateStation(); } }, mounted() { @@ -195,17 +198,19 @@ export default { }); }); this.concertrateStation = this.stationList.filter(station=>{ - if (this.activeName == 'first') { - return station.centralized && !( beConcentrateStation[station.code] && (beConcentrateStation[station.code] != this.editModel.code)); - } else { - return station.centralized && !( beConcentrateStation[station.code]); - } + // if (this.activeName == 'first') { + // return station.centralized && !( beConcentrateStation[station.code] && (beConcentrateStation[station.code] != this.editModel.code)); + return station.centralized; + // } else { + // return station.centralized && !( beConcentrateStation[station.code]); + // } }); }, create() { this.$refs.make.validate((valid) => { if (valid) { const uid = getUID('ZcControl', this.zcList); + let models = []; const model = { _type: 'ZcControl', code: uid, @@ -216,10 +221,12 @@ export default { }, concentrateStationList:this.addModel.concentrateStationList }; + models.push(model); model.concentrateStationList.forEach(stationCode=>{ - this.setStationStand(stationCode, model.code); + const arr = this.setStationStand(stationCode, model.code); + models = [...models, ...arr]; }); - this.$emit('updateMapModel', model); + this.$emit('updateMapModel', models); this.getConcertrateStation(); this.$refs.make.resetForm(); } @@ -230,20 +237,12 @@ export default { this.$refs['dataform'].validate((valid) => { if (valid) { const data = Object.assign({_type: 'ZcControl'}, this.editModel); - this.$emit('updateMapModel', data); - - this.concertrateStation.forEach(station=>{ - this.setStationStand(station.code, ''); - data.concentrateStationList.forEach(stationCode=>{ - switch (stationCode) { - case station.code: { - this.setStationStand(stationCode, this.editModel.code); - break; - } - } - }); + let models = [data]; + data.concentrateStationList.forEach(stationCode=>{ + const arr = this.setStationStand(stationCode, data.code); + models = [...models, ...arr]; }); - + this.$emit('updateMapModel', models); } }); }, @@ -274,14 +273,19 @@ export default { }); } }, + // 设置车站所属ZC区域 setStationStand(stationCode, code) { + const arr = []; this.stationList.forEach(elem=>{ if (elem.code == stationCode) { - const station = Object.assign({}, elem); + const station = deepAssign({}, elem); + // const station = Object.assign({}, elem); station.zcCode = code; - this.$emit('updateMapModel', station); + arr.push(station); + // this.$emit('updateMapModel', station); } }); + return arr; // 返回设置的车站list } // changeConcertrateStation(data) { // if (data.length > 0) {