From e947e50a0d055594b580b6af951945b9e3aa6f86 Mon Sep 17 00:00:00 2001 From: Yuan Date: Fri, 15 Jul 2022 18:08:39 +0800 Subject: [PATCH 01/28] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=87=A0=E4=B8=AA?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../newMap/newMapdraft/mapoperate/signalButton.vue | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/views/newMap/newMapdraft/mapoperate/signalButton.vue b/src/views/newMap/newMapdraft/mapoperate/signalButton.vue index 862e4e4e8..babbe9482 100644 --- a/src/views/newMap/newMapdraft/mapoperate/signalButton.vue +++ b/src/views/newMap/newMapdraft/mapoperate/signalButton.vue @@ -87,7 +87,18 @@ export default { { value: 'ACCIDENT', label: '事故按钮' }, { value: 'CHANGE_DIRECTION', label: '改方按钮' }, { value: 'RECOVERY', label: '复原按钮' }, - { value: 'OCCLUSION', label: '闭塞按钮' } + { value: 'OCCLUSION', label: '闭塞按钮' }, + { value: 'LOCATE', label: '总定位按钮' }, + { value: 'REVERSE', label: '总反位按钮' }, + { value: 'HUMAN_RELEASE_ROUTE', label: '总人解按钮' }, + { value: 'CANCEL', label: '总取消按钮' }, + { value: 'GUIDELOCK', label: '引导总锁按钮' }, + { value: 'SECTION_FAULT_UNLOCK', label: '区故解按钮' }, + { value: 'MONOLOCK', label: '单锁按钮' }, + { value: 'UNLOCK', label: '' }, + { value: 'GUIDELOCK', label: '引导总锁按钮' }, + { value: 'GUIDELOCK', label: '引导总锁按钮' }, + ], centralizedStationList: [], // 设备集中站列表 directionList: [ From c4fc19c88e48c5b19a9b1cea8a321841cec26c4a Mon Sep 17 00:00:00 2001 From: Yuan Date: Wed, 20 Jul 2022 15:35:55 +0800 Subject: [PATCH 02/28] =?UTF-8?q?JD1A-=E4=BF=A1=E5=8F=B7=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E5=92=8C=E8=A1=A8=E7=A4=BA=E7=8A=B6=E6=80=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/datie_jd1a.js | 21 +- src/jmapNew/config/skinCode/xian_01.js | 1 + src/jmapNew/shape/graph/SaidLamp/index.js | 3 +- src/jmapNew/shape/graph/SignalButton/index.js | 654 +++++++++--------- src/jmapNew/shape/graph/element/EControl.js | 45 +- .../newMapdraft/mapoperate/signalButton.vue | 6 +- 6 files changed, 389 insertions(+), 341 deletions(-) diff --git a/src/jmapNew/config/skinCode/datie_jd1a.js b/src/jmapNew/config/skinCode/datie_jd1a.js index 9e65e8f30..c6b473208 100644 --- a/src/jmapNew/config/skinCode/datie_jd1a.js +++ b/src/jmapNew/config/skinCode/datie_jd1a.js @@ -256,9 +256,28 @@ class SkinCode extends defaultStyle { }; this[deviceType.SignalButton] = { - shape: 'roundWithDock' + shape: 'roundWithDock', + fillColor: '#808080', + showName: true } + this[deviceType.SwitchFault] = { + displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) + text: { + fontSize: 14, // 字体大小 + fontWeight: 'normal', // 字体粗细 + distance: -50 // 灯跟文字距离 + }, + lamp: { + square: true, // 方形 + radiusR: 20, // 控制灯大小 + controlColor: '#00d900', // 控制灯颜色 + offColor: '#ff0000', + lineWidth: 2, + strokeColor: '#FFFFFF' // 控制灯描边样式 + } + }; + // 供电线路 this[deviceType.Power] = { noElectricStrokeColor:'#808080', // 无电颜色 diff --git a/src/jmapNew/config/skinCode/xian_01.js b/src/jmapNew/config/skinCode/xian_01.js index bad6a642d..37655a0ca 100644 --- a/src/jmapNew/config/skinCode/xian_01.js +++ b/src/jmapNew/config/skinCode/xian_01.js @@ -541,6 +541,7 @@ class SkinCode extends defaultStyle { distance: 5 // 灯跟文字距离 }, lamp: { + square: false, // 方形 radiusR: 6, // 控制灯大小 controlColor: '#000000', // 控制灯颜色 offColor: '#ff0000', diff --git a/src/jmapNew/shape/graph/SaidLamp/index.js b/src/jmapNew/shape/graph/SaidLamp/index.js index 512632050..a67d30ec9 100644 --- a/src/jmapNew/shape/graph/SaidLamp/index.js +++ b/src/jmapNew/shape/graph/SaidLamp/index.js @@ -45,12 +45,13 @@ export default class SaidLamp extends Group { this.control = new EControl({ zlevel: this.zlevel, z: this.z, - arc: { + control: { shape: { cx: this.computedPosition.x, cy: this.computedPosition.y, r: this.deviceStyle.lamp.radiusR }, + isSquare: this.deviceStyle.lamp.square, subType: 'Control', lineWidth: this.deviceStyle.lamp.lineWidth || 0, fill: this.deviceStyle.lamp.controlColor, diff --git a/src/jmapNew/shape/graph/SignalButton/index.js b/src/jmapNew/shape/graph/SignalButton/index.js index b6d5053cd..19a2fb816 100644 --- a/src/jmapNew/shape/graph/SignalButton/index.js +++ b/src/jmapNew/shape/graph/SignalButton/index.js @@ -1,331 +1,341 @@ -import Group from 'zrender/src/container/Group'; -import Rect from 'zrender/src/graphic/shape/Rect'; -import Line from 'zrender/src/graphic/shape/Line'; -import Text from 'zrender/src/graphic/Text'; -import Arc from 'zrender/src/graphic/shape/Arc'; -import Circle from 'zrender/src/graphic/shape/Circle'; -import store from '@/store/index'; +import Group from 'zrender/src/container/Group' +import Rect from 'zrender/src/graphic/shape/Rect' +import Line from 'zrender/src/graphic/shape/Line' +import Text from 'zrender/src/graphic/Text' +import Arc from 'zrender/src/graphic/shape/Arc' +import Circle from 'zrender/src/graphic/shape/Circle' +import store from '@/store/index' +const typeList = [ + 'PICK_ASSIST', + 'DEPART_ASSIST', + 'ASSIST', + 'GUIDELOCK', + 'SECTION_FAULT_UNLOCK', + 'LOCATE', + 'REVERSE', + 'CANCEL', + 'HUMAN_RELEASE_ROUTE', + 'MONOLOCK', + 'UNLOCK', + 'BLOCK', + 'UNBLOCK', + 'CHANGE_DIRECTION' +] export default class SignalButton extends Group { - constructor(model, {style}) { - super(); - this._code = model.code; - this._type = model._type; - this.zlevel = model.zlevel; - const pictureDevice = store.getters['map/getPictureDeviceByCode'](model.code); - if (pictureDevice) { - this.computedPosition = pictureDevice.position; - } else { - this.computedPosition = model.position; - } - this.z = 0; - this.model = model; - this.style = style; - // Line - this.create(); - this.setState(model); + constructor(model, { style }) { + super() + this._code = model.code + this._type = model._type + this.zlevel = model.zlevel + const pictureDevice = store.getters['map/getPictureDeviceByCode'](model.code) + if (pictureDevice) { + this.computedPosition = pictureDevice.position + } else { + this.computedPosition = model.position } + this.z = 0 + this.model = model + this.style = style + // Line + this.create() + this.setState(model) + } - create() { - const model = this.model; - const computedPosition = this.computedPosition; - const fillColor = this.getTypeColor(); - const queryList = window.location.search.substring(1).split('&'); - const queryCtc = queryList.find(item => { - return item.includes('ctc'); - }); - const ctcArcList = ['OCCLUSION', 'RECOVERY', 'CHANGE_DIRECTION', 'ACCIDENT', 'DEPART_ASSIST', 'PICK_ASSIST', 'ASSIST']; - const typeList = [] - if (queryCtc && ctcArcList.includes(model.type)){ - this.arcShape = new Arc({ - zlevel: this.zlevel, - z: this.z, - shape: { - cx: computedPosition.x + 7, - cy: computedPosition.y + 7, - r: 7 - }, - style: { - stroke: '#69666E', - lineWidth: 1, - fill: fillColor - } - }); - this.add(this.arcShape); - } else if (this.style.SignalButton - && this.style.SignalButton.shape === 'roundWithDock' - && typeList.includes(model.type)) { - const circle1 = new Circle({ - zlevel: this.zlevel, - z: this.z + 2, - shape: { - cx: computedPosition.x + 7, - cy: computedPosition.y + 7, - r: 7 - }, - style: { - stroke: '#69666E', - lineWidth: 1, - fill: fillColor - } - }) - const circle2 = new Circle({ - zlevel: this.zlevel, - z: this.z + 1, - shape: { - cx: computedPosition.x + 7, - cy: computedPosition.y + 9, - r: 8 - }, - style: { - fill: '#000' - } - }) - const circle3 = new Circle({ - zlevel: this.zlevel, - z: this.z, - shape: { - cx: computedPosition.x + 7, - cy: computedPosition.y + 9, - r: 9 - }, - style: { - fill: '#eee' - } - }) - this.arcShape = circle1 - this.add(circle1).add(circle2).add(circle3) + create() { + const model = this.model + const computedPosition = this.computedPosition + const fillColor = this.getTypeColor() + const queryList = window.location.search.substring(1).split('&') + const queryCtc = queryList.find(item => { + return item.includes('ctc') + }) + const ctcArcList = ['OCCLUSION', 'RECOVERY', 'CHANGE_DIRECTION', 'ACCIDENT', 'DEPART_ASSIST', 'PICK_ASSIST', 'ASSIST'] + + // if (model.code === 'BTN31730') debugger + if (queryCtc && ctcArcList.includes(model.type)) { + this.arcShape = new Arc({ + zlevel: this.zlevel, + z: this.z, + shape: { + cx: computedPosition.x + 7, + cy: computedPosition.y + 7, + r: 7 + }, + style: { + stroke: '#69666E', + lineWidth: 1, + fill: fillColor + } + }) + this.add(this.arcShape) + } else if (this.style.SignalButton && this.style.SignalButton.shape === 'roundWithDock' && typeList.includes(model.type)) { + const circle1 = new Circle({ + zlevel: this.zlevel, + z: this.z + 2, + shape: { + cx: computedPosition.x + 7, + cy: computedPosition.y + 7, + r: 7 + }, + style: { + stroke: '#69666E', + lineWidth: 1, + fill: fillColor + } + }) + const circle2 = new Circle({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + cx: computedPosition.x + 7, + cy: computedPosition.y + 9, + r: 8 + }, + style: { + fill: '#000' + } + }) + const circle3 = new Circle({ + zlevel: this.zlevel, + z: this.z, + shape: { + cx: computedPosition.x + 7, + cy: computedPosition.y + 9, + r: 9 + }, + style: { + fill: '#eee' + } + }) + this.arcShape = circle1 + this.arcShapeDock1 = circle2 + this.arcShapeDock2 = circle3 + this.add(circle1) + .add(circle2) + .add(circle3) + } else { + this.rectButton = new Rect({ + zlevel: this.zlevel, + z: this.z, + shape: { + x: computedPosition.x, + y: computedPosition.y, + width: 14, + height: 14 + }, + style: { + lineDash: null, + stroke: '#69666E', + lineWidth: 1, + fill: fillColor + } + }) + this.add(this.rectButton) + } + this.leftLine = new Line({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + x1: computedPosition.x + 1, + y1: computedPosition.y + 1, + x2: computedPosition.x + 13, + y2: computedPosition.y + 13 + }, + style: { + lineWidth: 2, + stroke: '#ff0000' + } + }) + this.add(this.leftLine) + this.leftLine.hide() + this.rightLine = new Line({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + x1: computedPosition.x + 13, + y1: computedPosition.y + 1, + x2: computedPosition.x + 1, + y2: computedPosition.y + 13 + }, + style: { + lineWidth: 2, + stroke: '#ff0000' + } + }) + this.add(this.rightLine) + this.rightLine.hide() + this.leftBoard = new Line({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + x1: computedPosition.x - 1, + y1: computedPosition.y - 1, + x2: computedPosition.x - 1, + y2: computedPosition.y + 15 + }, + style: { + lineWidth: 2, + stroke: '#FFFFFF' + } + }) + this.add(this.leftBoard) + this.leftBoard.hide() + this.topBoard = new Line({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + x1: computedPosition.x - 1, + y1: computedPosition.y - 1, + x2: computedPosition.x + 15, + y2: computedPosition.y - 1 + }, + style: { + lineWidth: 2, + stroke: '#FFFFFF' + } + }) + this.add(this.topBoard) + this.topBoard.hide() + this.rightBoard = new Line({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + x1: computedPosition.x + 15, + y1: computedPosition.y - 1, + x2: computedPosition.x + 15, + y2: computedPosition.y + 15 + }, + style: { + lineWidth: 2, + stroke: '#A0A0A0' + } + }) + this.add(this.rightBoard) + this.rightBoard.hide() + this.bottomBoard = new Line({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + x1: computedPosition.x - 1, + y1: computedPosition.y + 15, + x2: computedPosition.x + 15, + y2: computedPosition.y + 15 + }, + style: { + lineWidth: 2, + stroke: '#A0A0A0' + } + }) + this.add(this.bottomBoard) + this.bottomBoard.hide() + const hasTextList = ['PASS', 'ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'ACCIDENT', 'CHANGE_DIRECTION', 'RECOVERY', 'OCCLUSION'] + if (hasTextList.includes(model.type) || (this.style.SignalButton && this.style.SignalButton.showName)) { + this.buttonText = new Text({ + zlevel: this.zlevel, + z: this.z, + style: { + x: computedPosition.x + model.nameOffset.x, + y: computedPosition.y + model.nameOffset.y, + fontWeight: '400', + fontSize: 10, + fontFamily: '', + text: model.name, + textFill: '#C0C0C0', + textAlign: 'middle', + textVerticalAlign: 'top' + } + }) + this.add(this.buttonText) + } + } + startAnimate() { + this.rectButton && + this.rectButton + .animateStyle(true) + .when(0, { fill: '#000' }) + .when(1000, { fill: this.getTypeColor() }) + .when(2000, { fill: '#000' }) + .start() + } + stopAnimation() { + this.rectButton && this.rectButton.stopAnimation(true) + // this.arcFlash && this.arcFlash.stopAnimation(false); + } + getTypeColor() { + if (this.style.SignalButton && this.style.SignalButton.fillColor && typeList.includes(this.model.type)) { + return this.style.SignalButton.fillColor + } + let color = '' + const list = ['ASSIST', 'ACCIDENT', 'PICK_ASSIST', 'DEPART_ASSIST', 'CHANGE_DIRECTION', 'RECOVERY', 'OCCLUSION'] + if (this.model.type === 'FLEXIBLE' || this.model.type === 'SHUNT_TERMINAL') { + color = '#808080' + } else if (this.model.type === 'GUIDE') { + color = '#5050E1' + } else if (list.includes(this.model.type)) { + color = '#ccc' + } else { + color = '#008000' + } + return color + } // + recover() { + this.stopAnimation() + this.rectButton && this.rectButton.setStyle({ fill: this.getTypeColor() }) + this.arcShape && this.arcShape.setStyle({ fill: this.getTypeColor() }) + this.rightLine && this.rightLine.hide() + this.leftLine && this.leftLine.hide() + this.rectButton && this.rectButton.show() + this.arcShape && this.arcShape.show() + this.arcShapeDock1 && this.arcShapeDock1.show() + this.arcShapeDock2 && this.arcShapeDock2.show() + this.buttonText && this.buttonText.show() + this.leftBoard && this.leftBoard.hide() + this.rightBoard && this.rightBoard.hide() + this.topBoard && this.topBoard.hide() + this.bottomBoard && this.bottomBoard.hide() + } + blockShow() { + this.rightLine && this.rightLine.show() + this.leftLine && this.leftLine.show() + } + setState(model) { + this.recover() + // { value: 'ASSIST', label: '总辅助按钮' }, + // { value: 'PICK_ASSIST', label: '接辅助按钮' }, + // { value: 'DEPART_ASSIST', label: '发辅助按钮' }, + const list = ['ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'CHANGE_DIRECTION', 'ACCIDENT', 'RECOVERY', 'OCCLUSION'] + if (list.includes(model.type)) { + if (this.rectButton) { + if (model.pressDown) { + this.rectButton.setStyle({ fill: '#FFFF00' }) + // this.arcFlash.show(); + // const style = this.style; + // this.arcFlash.animateStyle(true) + // .when(0, { fill: style.backgroundColor }) + // .when(500, { fill: '#FFFF00' }) + // .when(1000, { fill: style.backgroundColor }) + // .start(); } else { - this.rectButton = new Rect({ - zlevel: this.zlevel, - z: this.z, - shape: { - x: model.position.x, - y: model.position.y, - width: 14, - height: 14 - }, - style: { - lineDash: null, - stroke: '#69666E', - lineWidth:1, - fill: fillColor - } - }); - this.add(this.rectButton); - } - this.leftLine = new Line({ - zlevel: this.zlevel, - z: this.z + 1, - shape: { - x1: computedPosition.x + 1, - y1: computedPosition.y + 1, - x2: computedPosition.x + 13, - y2: computedPosition.y + 13 - }, - style: { - lineWidth: 2, - stroke: '#ff0000' - } - }); - this.add(this.leftLine); - this.leftLine.hide(); - this.rightLine = new Line({ - zlevel: this.zlevel, - z: this.z + 1, - shape: { - x1: computedPosition.x + 13, - y1: computedPosition.y + 1, - x2: computedPosition.x + 1, - y2: computedPosition.y + 13 - }, - style: { - lineWidth: 2, - stroke: '#ff0000' - } - }); - this.add(this.rightLine); - this.rightLine.hide(); - this.leftBoard = new Line({ - zlevel: this.zlevel, - z: this.z + 1, - shape: { - x1: computedPosition.x - 1, - y1: computedPosition.y - 1, - x2: computedPosition.x - 1, - y2: computedPosition.y + 15 - }, - style: { - lineWidth: 2, - stroke: '#FFFFFF' - } - }); - this.add(this.leftBoard); - this.leftBoard.hide(); - this.topBoard = new Line({ - zlevel: this.zlevel, - z: this.z + 1, - shape: { - x1: computedPosition.x - 1, - y1: computedPosition.y - 1, - x2: computedPosition.x + 15, - y2: computedPosition.y - 1 - }, - style: { - lineWidth: 2, - stroke: '#FFFFFF' - } - }); - this.add(this.topBoard); - this.topBoard.hide(); - this.rightBoard = new Line({ - zlevel: this.zlevel, - z: this.z + 1, - shape: { - x1: computedPosition.x + 15, - y1: computedPosition.y - 1, - x2: computedPosition.x + 15, - y2: computedPosition.y + 15 - }, - style: { - lineWidth: 2, - stroke: '#A0A0A0' - } - }); - this.add(this.rightBoard); - this.rightBoard.hide(); - this.bottomBoard = new Line({ - zlevel: this.zlevel, - z: this.z + 1, - shape: { - x1: computedPosition.x - 1, - y1: computedPosition.y + 15, - x2: computedPosition.x + 15, - y2: computedPosition.y + 15 - }, - style: { - lineWidth: 2, - stroke: '#A0A0A0' - } - }); - this.add(this.bottomBoard); - this.bottomBoard.hide(); - const hasTextList = ['PASS', 'ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'ACCIDENT', 'CHANGE_DIRECTION', 'RECOVERY', 'OCCLUSION']; - if (hasTextList.includes(model.type)) { - this.buttonText = new Text({ - zlevel: this.zlevel, - z: this.z, - style: { - x: computedPosition.x + model.nameOffset.x, - y: computedPosition.y + model.nameOffset.y, - fontWeight: '400', - fontSize: 10, - fontFamily: '', - text: model.name, - textFill: '#C0C0C0', - textAlign: 'middle', - textVerticalAlign: 'top' - } - }); - this.add(this.buttonText); + this.rectButton.setStyle({ fill: this.getTypeColor() }) + // this.arcFlash.stopAnimation(false); + // this.arcFlash.hide(); } - // if (model.type === 'CHANGE_DIRECTION') { - // this.arcFlash = new Arc({ - // _subType: 'change_direction_flash', - // zlevel: this.zlevel, - // z: this.z, - // shape: { - // cx: model.position.x + 18 + 7, - // cy: model.position.y + 7, - // r: 6 - // }, - // style: { - // lineWidth: 0, - // fill: '#ffff00' - // } - // }); - // this.add(this.arcFlash); - // } + } } - startAnimate() { - this.rectButton && this.rectButton.animateStyle(true) - .when(0, { fill: '#000' }) - .when(1000, { fill: this.getTypeColor() }) - .when(2000, { fill: '#000' }) - .start(); - } - stopAnimation() { - this.rectButton && this.rectButton.stopAnimation(true); - // this.arcFlash && this.arcFlash.stopAnimation(false); - } - getTypeColor() { - let color = ''; - const list = ['ASSIST', 'ACCIDENT', 'PICK_ASSIST', 'DEPART_ASSIST', 'CHANGE_DIRECTION', 'RECOVERY', 'OCCLUSION']; - if (this.model.type === 'FLEXIBLE' || this.model.type === 'SHUNT_TERMINAL') { - color = '#808080'; - } else if (this.model.type === 'GUIDE') { - color = '#5050E1'; - } else if (list.includes(this.model.type)) { - color = '#ccc'; - } else { - color = '#008000'; - } - return color; - }// - recover() { - this.stopAnimation(); - this.rectButton && this.rectButton.setStyle({ fill:this.getTypeColor() }); - this.arcShape && this.arcShape.setStyle({ fill:this.getTypeColor() }); - this.rightLine && this.rightLine.hide(); - this.leftLine && this.leftLine.hide(); - this.rectButton && this.rectButton.show(); - this.arcShape && this.arcShape.show(); - this.buttonText && this.buttonText.show(); - this.leftBoard && this.leftBoard.hide(); - this.rightBoard && this.rightBoard.hide(); - this.topBoard && this.topBoard.hide(); - this.bottomBoard && this.bottomBoard.hide(); - } - blockShow() { - this.rightLine && this.rightLine.show(); - this.leftLine && this.leftLine.show(); - } - setState(model) { - this.recover(); - // { value: 'ASSIST', label: '总辅助按钮' }, - // { value: 'PICK_ASSIST', label: '接辅助按钮' }, - // { value: 'DEPART_ASSIST', label: '发辅助按钮' }, - const list = ['ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'CHANGE_DIRECTION', 'ACCIDENT', 'RECOVERY', 'OCCLUSION']; - if (list.includes(model.type)) { - if (this.rectButton) { - if (model.pressDown) { - this.rectButton.setStyle({ fill:'#FFFF00' }); - // this.arcFlash.show(); - // const style = this.style; - // this.arcFlash.animateStyle(true) - // .when(0, { fill: style.backgroundColor }) - // .when(500, { fill: '#FFFF00' }) - // .when(1000, { fill: style.backgroundColor }) - // .start(); - } else { - this.rectButton.setStyle({ fill:this.getTypeColor() }); - // this.arcFlash.stopAnimation(false); - // this.arcFlash.hide(); - } - } - } - if (!store.getters['map/checkDeviceShow'](this._code)) { - this.buttonText && this.buttonText.hide(); - this.rectButton && this.rectButton.hide(); - this.leftLine && this.leftLine.hide(); - this.rightLine && this.rightLine.hide(); - this.arcShape && this.arcShape.hide(); - } else { - if (model.hasSelected) { - this.startAnimate(); - } - } - } - getAnchorPoint() { + if (!store.getters['map/checkDeviceShow'](this._code)) { + this.buttonText && this.buttonText.hide() + this.rectButton && this.rectButton.hide() + this.leftLine && this.leftLine.hide() + this.rightLine && this.rightLine.hide() + this.arcShape && this.arcShape.hide() + this.arcShapeDock1 && this.arcShapeDock1.hide() + this.arcShapeDock2 && this.arcShapeDock2.hide() + } else { + if (model.hasSelected) { + this.startAnimate() + } } + } + getAnchorPoint() {} } diff --git a/src/jmapNew/shape/graph/element/EControl.js b/src/jmapNew/shape/graph/element/EControl.js index 1b01a84d7..c9cb12aa4 100644 --- a/src/jmapNew/shape/graph/element/EControl.js +++ b/src/jmapNew/shape/graph/element/EControl.js @@ -13,23 +13,40 @@ export default class EControl extends Group { this.z = model.z; this.style = model.style; this.textStyle = model.text; - this.arcStyle = model.arc; + this.controlStyle = model.control; this.create(); } create() { - this.control = new Arc({ - _subType: this.arcStyle.subType, + this.control = this.controlStyle.isSquare ? new Rect({ + _subType: this.controlStyle.subType, zlevel: this.zlevel, z: this.z, - shape: this.arcStyle.shape, - style: { - lineWidth: this.arcStyle.lineWidth, - fill: this.arcStyle.fill, - stroke: this.arcStyle.stroke + shape: { + width: this.controlStyle.shape.r, + height: this.controlStyle.shape.r, + x: this.controlStyle.shape.cx - this.controlStyle.shape.r / 2, + y: this.controlStyle.shape.cy - this.controlStyle.shape.r / 2, }, - onmouseover: this.arcStyle.mouseover, - onmouseout: this.arcStyle.mouseout + style: { + lineWidth: this.controlStyle.lineWidth, + fill: this.controlStyle.fill, + stroke: this.controlStyle.stroke + }, + onmouseover: this.controlStyle.mouseover, + onmouseout: this.controlStyle.mouseout + }) : new Arc({ + _subType: this.controlStyle.subType, + zlevel: this.zlevel, + z: this.z, + shape: this.controlStyle.shape, + style: { + lineWidth: this.controlStyle.lineWidth, + fill: this.controlStyle.fill, + stroke: this.controlStyle.stroke + }, + onmouseover: this.controlStyle.mouseover, + onmouseout: this.controlStyle.mouseout }); this.text = new Text({ _subType: 'Text', @@ -63,7 +80,7 @@ export default class EControl extends Group { height: arcRect.height + 4 }, style: { - lineDash: this.arcStyle.lineDash || this.style.arcBorderStyle.lineDash, + lineDash: this.controlStyle.lineDash || this.style.arcBorderStyle.lineDash, stroke: this.style.arcBorderStyle.stroke, fill: this.style.arcBorderStyle.fill } @@ -106,15 +123,15 @@ export default class EControl extends Group { setControlFlashing(color) { if (color) { this.control.animateStyle(true) - .when(0, { fill: this.arcStyle.fill }) + .when(0, { fill: this.controlStyle.fill }) .when(1000, { stroke: color }) - .when(2000, { fill: this.arcStyle.fill }) + .when(2000, { fill: this.controlStyle.fill }) .start(); } } recover() { this.control.stopAnimation(false); - this.control.setStyle('fill', this.arcStyle.fill); + this.control.setStyle('fill', this.controlStyle.fill); } setControlStroke(color, lineWidth) { this.control.setStyle('lineWidth', lineWidth); diff --git a/src/views/newMap/newMapdraft/mapoperate/signalButton.vue b/src/views/newMap/newMapdraft/mapoperate/signalButton.vue index babbe9482..f91118247 100644 --- a/src/views/newMap/newMapdraft/mapoperate/signalButton.vue +++ b/src/views/newMap/newMapdraft/mapoperate/signalButton.vue @@ -95,9 +95,9 @@ export default { { value: 'GUIDELOCK', label: '引导总锁按钮' }, { value: 'SECTION_FAULT_UNLOCK', label: '区故解按钮' }, { value: 'MONOLOCK', label: '单锁按钮' }, - { value: 'UNLOCK', label: '' }, - { value: 'GUIDELOCK', label: '引导总锁按钮' }, - { value: 'GUIDELOCK', label: '引导总锁按钮' }, + { value: 'UNLOCK', label: '单解按钮' }, + { value: 'BLOCK', label: '单封按钮' }, + { value: 'UNBLOCK', label: '解封按钮' }, ], centralizedStationList: [], // 设备集中站列表 From f8b83fc4e6462ad1eb2397c5119413ed6158068e Mon Sep 17 00:00:00 2001 From: dong <58670809@qq.com> Date: Tue, 26 Jul 2022 18:10:14 +0800 Subject: [PATCH 03/28] =?UTF-8?q?=E5=89=A7=E6=9C=AC=E8=A1=8C=E8=B0=83?= =?UTF-8?q?=E5=91=BD=E4=BB=A4=E6=8C=87=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/covertOperation.js | 72 ++++++++++++++++++- .../scriptDisplay/scriptPreview/index.vue | 59 ++++++++++++++- .../scriptPreview/scriptButtonGroup.vue | 50 ++++++++++++- 3 files changed, 177 insertions(+), 4 deletions(-) diff --git a/src/views/newMap/displayNew/scriptDisplay/component/covertOperation.js b/src/views/newMap/displayNew/scriptDisplay/component/covertOperation.js index f8fbe8e02..fd80f187c 100644 --- a/src/views/newMap/displayNew/scriptDisplay/component/covertOperation.js +++ b/src/views/newMap/displayNew/scriptDisplay/component/covertOperation.js @@ -275,7 +275,47 @@ export const operateEnum = { }; export const ctcOperateEnum = { - + CTC_READ_DISPATCH_COMMAND: { + isList:true, + name:'读取调度命令', + params:[ + { + code:'commandId', + name:'命令号' + } + ] + }, + CTC_SIGN_DISPATCH_COMMAND: { + code:'signInfo', + name:'签收调度命令', + isList:true, + params:[ + { + code:'commandId', + name:'命令号' + }, + { + code:'signedStatus', + name:'签收状态', + result:[ + {data:'SIGNED', name:'签收', judge:'='}, + {data:'REFUSE', name:'拒签', judge:'='} + ] + } + ] + }, + CTC_SEND_DISPATCH_COMMAND: { + code:'signInfo', + name:'发送调度命令', + isList:true, + params:[ + { + code:'receiverIds', + name:'受令单位', + function: getStationNamList + } + ] + } }; // 转换函数 @@ -308,7 +348,25 @@ export function covertOperate(operationType, operationParamMap) { return tip; } else if (operationType.includes('CTC')) { - const tip = '请打开'; + let tip = '请打开'; + console.log(operationType, operationParamMap, store.state.training.roles, '---operationType---operationParamMap-'); + if (operationType == 'CTC_QUERY_DISPATCH_COMMAND') { + const roles = store.state.training.roles; + if (roles == 'DISPATCHER') { + tip = '请打开调度命令'; + } else { + tip = '请打开车务终端'; + } + } + if (operationType == 'CTC_READ_DISPATCH_COMMAND') { + tip = '请查看详细的调度命令'; + } + if (operationType == 'CTC_SIGN_DISPATCH_COMMAND') { + tip = '请签收调度命令'; + } + if (operationType == 'CTC_SEND_DISPATCH_COMMAND') { + tip = '请打开并下达调度命令'; + } // ctcOperateEnum // 车务终端,找到 return tip; @@ -514,6 +572,16 @@ function getStationNameById(stationId) { const station = store.getters['map/getDeviceByCode'](stationId) || {}; return station.name; } +function getStationNamList(list) { + const nameList = []; + list.sort().forEach(stationId => { + const station = store.getters['map/getDeviceByCode'](stationId) || {}; + if (station.name) { + nameList.push(station.name); + } + }); + return nameList.join(','); +} function getStationResultById(stationResult) { const station = store.getters['map/getDeviceByCode'](stationResult.stationCode) || {}; let param = '不同意'; diff --git a/src/views/newMap/displayNew/scriptDisplay/scriptPreview/index.vue b/src/views/newMap/displayNew/scriptDisplay/scriptPreview/index.vue index c3a3dc0b4..dd0809f5e 100644 --- a/src/views/newMap/displayNew/scriptDisplay/scriptPreview/index.vue +++ b/src/views/newMap/displayNew/scriptDisplay/scriptPreview/index.vue @@ -2,13 +2,14 @@
- + +
+ +
@@ -49,6 +55,7 @@ import { loadDraftScriptNew } from '@/api/designPlatform'; import Vue from 'vue'; import { ScriptMode } from '@/scripts/ConstDic'; import ConstConfig from '@/scripts/ConstConfig'; +import DispatcherStation from '@/views/newMap/jointTrainingNew/dispatcherStation.vue'; export default { name: 'DisplayDraft', @@ -60,6 +67,7 @@ export default { FaultChoose, MenuSystemTime, SelectRole, + DispatcherStation, ScriptButtonGroup }, data() { @@ -73,6 +81,7 @@ export default { mapLocation:{}, showStation: '', group: '', + lineCode: '', prdTypeMap: { '01': '01', // 现地 => 现地 '02': '02', // 行调 => 行调 @@ -80,9 +89,12 @@ export default { '05': '' // 派班 => null }, userRole:'', + showMap: false, isDrive: this.prdType == '04', treeData:[], memberList:[], + centralizedstationList: [], + centralizedStationMap: {}, scriptMode: ScriptMode.TEACH }; }, @@ -117,6 +129,11 @@ export default { this.showStation = code; } }, + '$store.state.map.map': function (map) { + if (map) { + this.setCentralizedstationList(map); // 获取集中站列表 + } + }, '$store.state.training.prdType':function(val) { this.setPosition(); // this.setMode(); @@ -129,8 +146,12 @@ export default { }, created() { this.group = this.$route.query.group || ''; + this.lineCode = this.$route.query.lineCode; }, methods: { + changeShowMap(flag) { + this.showMap = flag; + }, back() { this.$refs.scriptButtonGroup.back(); }, @@ -190,6 +211,9 @@ export default { prdType = ''; } this.switchMode(prdType); + if (role.type == '行值') { + this.setShowStation(role.deviceCode); + } this.memberData.map(member=>{ if (member.id == role.id) { member.userId = this.$store.state.user.id; @@ -274,6 +298,38 @@ export default { } this.$store.dispatch('map/setShowCentralizedStationCode', this.showStation); this.$store.dispatch('map/setShowCentralizedStationNum'); + }, + quitQuest() { + this.userRole = ''; + this.setShowStation(''); + }, + setShowStation(stationCode) { + const showStation = this.centralizedStationMap[stationCode]; + const list = []; + const mapDevice = this.$store.state.map.mapDevice; + for (const key in mapDevice) { + list.push(mapDevice[key]); + } + this.$jlmap.updateShowStation(list, showStation); + this.$nextTick(()=>{ + this.$jlmap.setCenter(showStation); + }); + }, + setCentralizedstationList(map) { + this.centralizedstationList = []; + (map.stationList || []).forEach(item => { + if (item.centralized) { + this.centralizedstationList.push({value: item.code, name: item.name}); + this.centralizedStationMap[item.code] = item.code; + item.chargeStationCodeList && item.chargeStationCodeList.length && item.chargeStationCodeList.forEach(ele => { + this.centralizedStationMap[ele] = item.code; + }); + } + }); + console.log(this.centralizedStationMap, '----this.centralizedStationMap--'); + // if (this.centralizedstationList.length && !this.showStation) { + // this.showStation = this.centralizedstationList[0].value; + // } } } }; @@ -285,6 +341,7 @@ export default { width: 100%; height: 100%; overflow: hidden; + background: #000000; -moz-user-select: none; -o-user-select: none; diff --git a/src/views/newMap/displayNew/scriptDisplay/scriptPreview/scriptButtonGroup.vue b/src/views/newMap/displayNew/scriptDisplay/scriptPreview/scriptButtonGroup.vue index fe8e8717b..e8329c751 100644 --- a/src/views/newMap/displayNew/scriptDisplay/scriptPreview/scriptButtonGroup.vue +++ b/src/views/newMap/displayNew/scriptDisplay/scriptPreview/scriptButtonGroup.vue @@ -20,6 +20,10 @@ diff --git a/src/views/newMap/displayNew/menuDemon.vue b/src/views/newMap/displayNew/menuDemon.vue index 056c23cb9..5c2f14d82 100644 --- a/src/views/newMap/displayNew/menuDemon.vue +++ b/src/views/newMap/displayNew/menuDemon.vue @@ -29,6 +29,9 @@ + @@ -58,6 +62,7 @@ + diff --git a/src/jmapNew/theme/datie_tky/menus/dialog/trainCreateNumber.vue b/src/jmapNew/theme/datie_tky/menus/dialog/trainCreateNumber.vue new file mode 100644 index 000000000..e56f2f80d --- /dev/null +++ b/src/jmapNew/theme/datie_tky/menus/dialog/trainCreateNumber.vue @@ -0,0 +1,181 @@ + + + + diff --git a/src/jmapNew/theme/datie_tky/menus/dialog/trainDeleteNumber.vue b/src/jmapNew/theme/datie_tky/menus/dialog/trainDeleteNumber.vue new file mode 100644 index 000000000..210e2dc87 --- /dev/null +++ b/src/jmapNew/theme/datie_tky/menus/dialog/trainDeleteNumber.vue @@ -0,0 +1,176 @@ + + + + diff --git a/src/jmapNew/theme/datie_tky/menus/dialog/trainDetailInfo copy.vue b/src/jmapNew/theme/datie_tky/menus/dialog/trainDetailInfo copy.vue new file mode 100644 index 000000000..907727139 --- /dev/null +++ b/src/jmapNew/theme/datie_tky/menus/dialog/trainDetailInfo copy.vue @@ -0,0 +1,378 @@ + + + + diff --git a/src/jmapNew/theme/datie_tky/menus/dialog/trainDetailInfo.vue b/src/jmapNew/theme/datie_tky/menus/dialog/trainDetailInfo.vue new file mode 100644 index 000000000..907727139 --- /dev/null +++ b/src/jmapNew/theme/datie_tky/menus/dialog/trainDetailInfo.vue @@ -0,0 +1,378 @@ + + + + diff --git a/src/jmapNew/theme/datie_tky/menus/dialog/trainEditNumber.vue b/src/jmapNew/theme/datie_tky/menus/dialog/trainEditNumber.vue new file mode 100644 index 000000000..570e22144 --- /dev/null +++ b/src/jmapNew/theme/datie_tky/menus/dialog/trainEditNumber.vue @@ -0,0 +1,174 @@ + + + + diff --git a/src/jmapNew/theme/datie_tky/menus/dialog/trainMoveNumber.vue b/src/jmapNew/theme/datie_tky/menus/dialog/trainMoveNumber.vue new file mode 100644 index 000000000..7e7635d23 --- /dev/null +++ b/src/jmapNew/theme/datie_tky/menus/dialog/trainMoveNumber.vue @@ -0,0 +1,193 @@ + + + + diff --git a/src/jmapNew/theme/datie_tky/menus/dialog/updateTrip.vue b/src/jmapNew/theme/datie_tky/menus/dialog/updateTrip.vue new file mode 100644 index 000000000..49a60e088 --- /dev/null +++ b/src/jmapNew/theme/datie_tky/menus/dialog/updateTrip.vue @@ -0,0 +1,155 @@ + + + diff --git a/src/jmapNew/theme/datie_tky/menus/menuTrain.vue b/src/jmapNew/theme/datie_tky/menus/menuTrain.vue new file mode 100644 index 000000000..e3da86fa1 --- /dev/null +++ b/src/jmapNew/theme/datie_tky/menus/menuTrain.vue @@ -0,0 +1,622 @@ + + + From 129b1be71335f24937cee89a43ac72dd770bf3c9 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Thu, 28 Jul 2022 13:37:00 +0800 Subject: [PATCH 15/28] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/scriptManage/allScriptRole.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/scriptManage/allScriptRole.vue b/src/views/scriptManage/allScriptRole.vue index 0b678f8ff..4f57cda34 100644 --- a/src/views/scriptManage/allScriptRole.vue +++ b/src/views/scriptManage/allScriptRole.vue @@ -97,6 +97,7 @@ export default { switchMode(member) { this.loading = true; changeScriptRole(this.group, member.id).then(res=>{ + if (member.type == '行值') { this.$store.dispatch('training/setPrdType', '01'); } this.$emit('changeMode', member); }).catch(()=>{ this.loading = false; From 7c7099120c96e2f8ff9d936b11c06a1ca5f01ead Mon Sep 17 00:00:00 2001 From: dong <58670809@qq.com> Date: Fri, 29 Jul 2022 10:16:46 +0800 Subject: [PATCH 16/28] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/scripts/cmdPlugin/CommandEnum.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/cmdPlugin/CommandEnum.js b/src/scripts/cmdPlugin/CommandEnum.js index 601fb8d72..703f71bc9 100644 --- a/src/scripts/cmdPlugin/CommandEnum.js +++ b/src/scripts/cmdPlugin/CommandEnum.js @@ -448,7 +448,7 @@ export default { CTC_ZONE_RELEASE_STATION_RUN_PLAN:{value:'CTC_ZONE_RELEASE_STATION_RUN_PLAN', label: '调度台发布车站行车计划'}, CTC_QUERY_DISPATCH_COMMAND:{value:'CTC_QUERY_DISPATCH_COMMAND', label: '调度台命令查询'}, - CTC_SEND_DISPATCH_COMMAND:{value:'CTC_SEND_DISPATCH_COMMAND', label: '调度台命令发送'}, + CTC_SEND_DISPATCH_COMMAND:{value:'CTC_SEND_DISPATCH_COMMAND', label: '调度台命令下达'}, CTC_SIGN_DISPATCH_COMMAND:{value:'CTC_SIGN_DISPATCH_COMMAND', label: '调度台命令签收'}, CTC_READ_DISPATCH_COMMAND:{value:'CTC_READ_DISPATCH_COMMAND', label: '调度台命令已读'} From 70ec386b9de5291db226f1568beedc2dd833eb70 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Fri, 29 Jul 2022 11:00:28 +0800 Subject: [PATCH 17/28] =?UTF-8?q?=E5=A4=A7=E9=93=81=E7=BA=BF=E8=B7=AF=20?= =?UTF-8?q?=E5=89=A7=E6=9C=AC=E7=BC=96=E5=88=B6=20=E8=BD=A6=E7=AB=99?= =?UTF-8?q?=E6=89=B3=E9=81=93=E5=91=98=20=20=E6=B7=BB=E5=8A=A0=20=E9=81=93?= =?UTF-8?q?=E5=B2=94=E9=92=A9=E9=94=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../theme/datie_02/menus/menuSwitch.vue | 2 +- .../theme/datie_jd1a/menus/menuSwitch.vue | 140 +++++++++--------- .../theme/datie_tky/menus/menuSwitch.vue | 25 ++-- 3 files changed, 83 insertions(+), 84 deletions(-) diff --git a/src/jmapNew/theme/datie_02/menus/menuSwitch.vue b/src/jmapNew/theme/datie_02/menus/menuSwitch.vue index d7a35a11f..3637112e7 100644 --- a/src/jmapNew/theme/datie_02/menus/menuSwitch.vue +++ b/src/jmapNew/theme/datie_02/menus/menuSwitch.vue @@ -205,7 +205,7 @@ export default { } else { this.menu.forEach(item => { item.disabled = false; }); } // 故障模式菜单列表 if (this.operatemode === OperateMode.FAULT) { - if (!this.$store.state.scriptRecord.bgSet) { + if (!this.$store.state.scriptRecord.bgSet || this.$store.state.scriptRecord.userRole == 'STATION_SWITCH_MAN') { const menuHook = [{ label: '道岔钩锁', handler: this.hookLock diff --git a/src/jmapNew/theme/datie_jd1a/menus/menuSwitch.vue b/src/jmapNew/theme/datie_jd1a/menus/menuSwitch.vue index 013b098bb..68bcfaafa 100644 --- a/src/jmapNew/theme/datie_jd1a/menus/menuSwitch.vue +++ b/src/jmapNew/theme/datie_jd1a/menus/menuSwitch.vue @@ -7,7 +7,7 @@ - +
@@ -36,7 +36,7 @@ export default { SetFault, SwitchHookLock, DrawSelect, - RouteCancel + RouteCancel }, mixins: [ CancelMouseState @@ -54,72 +54,72 @@ export default { menu: [], menuNormal: { Local: [ - { - label: '定操', - handler: this.locate, - cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION - }, - { - label: '反操', - handler: this.reverse, - cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION - }, - { - label: '单锁', - handler: this.lock, - cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK - }, - { - label: '单解', - handler: this.unlock, - cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK - }, - { - label: '封锁', - handle: this.block, + { + label: '定操', + handler: this.locate, + cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION + }, + { + label: '反操', + handler: this.reverse, + cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION + }, + { + label: '单锁', + handler: this.lock, + cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK + }, + { + label: '单解', + handler: this.unlock, + cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK + }, + { + label: '封锁', + handle: this.block, cmdType: CMD.Switch.CMD_SWITCH_BLOCK }, - { - label: '解封', - handle: this.unblock, + { + label: '解封', + handle: this.unblock, cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK - }, - { - label: '区故解', - handle: '' - }, - { - label: '岔前 分路不良', - handle: '' - }, - { - label: '定位 分路不良', - handle: '' - }, - { - label: '反位 分路不良', - handle: '' - }, - { - label: '接触网定位无电', - handle: '' - }, - { - label: '接触网反位无电', - handle: '' - }, - { - label: '添加调机号', - handle: '' - }, - { - label: '删除调机号', - handle: '' - }, - { - label: '修改调机号', - handle: '' - } + }, + { + label: '区故解', + handle: '' + }, + { + label: '岔前 分路不良', + handle: '' + }, + { + label: '定位 分路不良', + handle: '' + }, + { + label: '反位 分路不良', + handle: '' + }, + { + label: '接触网定位无电', + handle: '' + }, + { + label: '接触网反位无电', + handle: '' + }, + { + label: '添加调机号', + handle: '' + }, + { + label: '删除调机号', + handle: '' + }, + { + label: '修改调机号', + handle: '' + } ], Center: [ // { @@ -193,7 +193,7 @@ export default { }, watch: { '$store.state.menuOperation.menuCount': function (val) { - if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && (!this.buttonOperation || this.$route.query.ctc)) { + if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && (!this.buttonOperation || this.$route.query.ctc)) { this.doShow(this.$store.state.menuOperation.menuPosition); } else { this.doClose(); @@ -207,7 +207,7 @@ export default { this.menu = this.menuNormal.Local; // 故障模式菜单列表 if (this.operatemode === OperateMode.FAULT) { - if (!this.$store.state.scriptRecord.bgSet) { + if (!this.$store.state.scriptRecord.bgSet || this.$store.state.scriptRecord.userRole == 'STATION_SWITCH_MAN') { const menuHook = [{ label: '道岔钩锁', handler: this.hookLock @@ -270,7 +270,7 @@ export default { }, // 道岔封锁 block() { - debugger + debugger; commitOperate(menuOperate.Switch.block, { switchCode: this.selected.code}, 0).then(({valid, operate}) => { if (valid) { this.$refs.switchControl.doShow(operate, this.selected); @@ -306,7 +306,7 @@ export default { commitOperate(menuOperate.Switch.locate, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{ if (valid) { // this.$refs.switchControl.doShow(operate, this.selected); - this.$refs.routeCancel.doShow(operate, this.selected); + this.$refs.routeCancel.doShow(operate, this.selected); } }); }, @@ -315,7 +315,7 @@ export default { commitOperate(menuOperate.Switch.reverse, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{ if (valid) { // this.$refs.switchControl.doShow(operate, this.selected); - this.$refs.routeCancel.doShow(operate, this.selected); + this.$refs.routeCancel.doShow(operate, this.selected); } }); }, diff --git a/src/jmapNew/theme/datie_tky/menus/menuSwitch.vue b/src/jmapNew/theme/datie_tky/menus/menuSwitch.vue index 4e7760193..42c5a2f2d 100644 --- a/src/jmapNew/theme/datie_tky/menus/menuSwitch.vue +++ b/src/jmapNew/theme/datie_tky/menus/menuSwitch.vue @@ -7,8 +7,7 @@