From e947e50a0d055594b580b6af951945b9e3aa6f86 Mon Sep 17 00:00:00 2001 From: Yuan Date: Fri, 15 Jul 2022 18:08:39 +0800 Subject: [PATCH 01/96] =?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/96] =?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 2c770a5bcce8fb164db129252bcf6337b986598c Mon Sep 17 00:00:00 2001 From: fan Date: Thu, 21 Jul 2022 18:12:28 +0800 Subject: [PATCH 03/96] =?UTF-8?q?=E6=9A=82=E6=8F=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/map.js | 13 ++++++++++--- src/jmapNew/theme/beijing_01/model.js | 18 ++++++++++++++---- src/jmapNew/theme/chengdu_01/model.js | 18 ++++++++++++++---- src/jmapNew/theme/chengdu_03/model.js | 18 ++++++++++++++---- src/jmapNew/theme/datie_01/model.js | 20 +++++++++++++++----- src/jmapNew/theme/datie_02/model.js | 19 +++++++++++++++---- src/jmapNew/theme/datie_jd1a/model.js | 19 +++++++++++++++---- src/jmapNew/theme/datie_tky/model.js | 19 +++++++++++++++---- src/jmapNew/theme/foshan_01/model.js | 19 +++++++++++++++---- src/jmapNew/theme/fuzhou_01/model.js | 19 +++++++++++++++---- src/jmapNew/theme/haerbin_01/model.js | 19 +++++++++++++++---- src/jmapNew/theme/nanjing_02/model.js | 19 +++++++++++++++---- src/jmapNew/theme/ningbo_01/model.js | 19 +++++++++++++++---- src/jmapNew/theme/ningbo_03/model.js | 19 +++++++++++++++---- src/jmapNew/theme/race_01/model.js | 18 ++++++++++++++---- src/jmapNew/theme/xian_01/model.js | 18 ++++++++++++++---- src/jmapNew/theme/xian_02/model.js | 21 +++++++++++++++------ 17 files changed, 245 insertions(+), 70 deletions(-) diff --git a/src/jmapNew/map.js b/src/jmapNew/map.js index 1391c9e8d..732319c8f 100644 --- a/src/jmapNew/map.js +++ b/src/jmapNew/map.js @@ -85,15 +85,22 @@ class Jlmap { } reloadStyle(lineCode) { if (this.lineCode !== lineCode) { - this.handleModelData(this.lineCode, lineCode); + this.reloadModelData(this.lineCode, lineCode); } this.lineCode = lineCode; this.style = selectLineCode(lineCode); this.$zr.dom.style.backgroundColor = this.style.backgroundColor || '#000'; + console.log(this.mapDevice, 'mapDevice'); } // 处理私有属性 - handleModelData(oldLineCode, lineCode) { - + reloadModelData(oldLineCode, lineCode) { + // console.log(oldLineCode, lineCode, '-------------12'); + const propConvert = lineCode ? Vue.prototype.$theme.loadPropConvert(lineCode) : null; + const oldPropConvert = oldLineCode ? Vue.prototype.$theme.loadPropConvert(oldLineCode) : null; + for (const device in this.mapDevice) { + oldPropConvert.deletePrivateProps(device); + propConvert.initPrivateProps(device); + } } loadDefaultState() { // 加载默认状态 const defaultStateDict = {}; diff --git a/src/jmapNew/theme/beijing_01/model.js b/src/jmapNew/theme/beijing_01/model.js index c7d80a99e..2560bd938 100644 --- a/src/jmapNew/theme/beijing_01/model.js +++ b/src/jmapNew/theme/beijing_01/model.js @@ -43,9 +43,9 @@ class Model { initPublicProps(model) { if (model) { - var modelInitial = this.public[model._type]; + const modelInitial = this.public[model._type]; if (modelInitial) { - for (var prop in modelInitial) { + for (const prop in modelInitial) { model[prop] = modelInitial[prop]; } } @@ -56,9 +56,9 @@ class Model { initPrivateProps(model) { if (model) { - var modelInitial = this.private[model._type]; + const modelInitial = this.private[model._type]; if (modelInitial) { - for (var prop in modelInitial) { + for (const prop in modelInitial) { model[prop] = modelInitial[prop]; } } @@ -66,6 +66,16 @@ class Model { return model; } + deletePrivateProps(model) { + if (model) { + const modelInitial = this.private[model._type]; + if (modelInitial) { + for (const prop in modelInitial) { + delete model[prop]; + } + } + } + } } export default new Model(); diff --git a/src/jmapNew/theme/chengdu_01/model.js b/src/jmapNew/theme/chengdu_01/model.js index b7c5f905f..25920db5e 100644 --- a/src/jmapNew/theme/chengdu_01/model.js +++ b/src/jmapNew/theme/chengdu_01/model.js @@ -46,9 +46,9 @@ class Model { initPublicProps(model) { if (model) { - var modelInitial = this.public[model._type]; + const modelInitial = this.public[model._type]; if (modelInitial) { - for (var prop in modelInitial) { + for (const prop in modelInitial) { model[prop] = modelInitial[prop]; } } @@ -59,9 +59,9 @@ class Model { initPrivateProps(model) { if (model) { - var modelInitial = this.private[model._type]; + const modelInitial = this.private[model._type]; if (modelInitial) { - for (var prop in modelInitial) { + for (const prop in modelInitial) { model[prop] = modelInitial[prop]; } } @@ -69,6 +69,16 @@ class Model { return model; } + deletePrivateProps(model) { + if (model) { + const modelInitial = this.private[model._type]; + if (modelInitial) { + for (const prop in modelInitial) { + delete model[prop]; + } + } + } + } } export default new Model(); diff --git a/src/jmapNew/theme/chengdu_03/model.js b/src/jmapNew/theme/chengdu_03/model.js index c7d80a99e..2560bd938 100644 --- a/src/jmapNew/theme/chengdu_03/model.js +++ b/src/jmapNew/theme/chengdu_03/model.js @@ -43,9 +43,9 @@ class Model { initPublicProps(model) { if (model) { - var modelInitial = this.public[model._type]; + const modelInitial = this.public[model._type]; if (modelInitial) { - for (var prop in modelInitial) { + for (const prop in modelInitial) { model[prop] = modelInitial[prop]; } } @@ -56,9 +56,9 @@ class Model { initPrivateProps(model) { if (model) { - var modelInitial = this.private[model._type]; + const modelInitial = this.private[model._type]; if (modelInitial) { - for (var prop in modelInitial) { + for (const prop in modelInitial) { model[prop] = modelInitial[prop]; } } @@ -66,6 +66,16 @@ class Model { return model; } + deletePrivateProps(model) { + if (model) { + const modelInitial = this.private[model._type]; + if (modelInitial) { + for (const prop in modelInitial) { + delete model[prop]; + } + } + } + } } export default new Model(); diff --git a/src/jmapNew/theme/datie_01/model.js b/src/jmapNew/theme/datie_01/model.js index c7d80a99e..52be6ae09 100644 --- a/src/jmapNew/theme/datie_01/model.js +++ b/src/jmapNew/theme/datie_01/model.js @@ -43,22 +43,21 @@ class Model { initPublicProps(model) { if (model) { - var modelInitial = this.public[model._type]; + const modelInitial = this.public[model._type]; if (modelInitial) { - for (var prop in modelInitial) { + for (const prop in modelInitial) { model[prop] = modelInitial[prop]; } } } - return model; } initPrivateProps(model) { if (model) { - var modelInitial = this.private[model._type]; + const modelInitial = this.private[model._type]; if (modelInitial) { - for (var prop in modelInitial) { + for (const prop in modelInitial) { model[prop] = modelInitial[prop]; } } @@ -66,6 +65,17 @@ class Model { return model; } + + deletePrivateProps(model) { + if (model) { + const modelInitial = this.private[model._type]; + if (modelInitial) { + for (const prop in modelInitial) { + delete model[prop]; + } + } + } + } } export default new Model(); diff --git a/src/jmapNew/theme/datie_02/model.js b/src/jmapNew/theme/datie_02/model.js index c7d80a99e..9c09fd633 100644 --- a/src/jmapNew/theme/datie_02/model.js +++ b/src/jmapNew/theme/datie_02/model.js @@ -43,9 +43,9 @@ class Model { initPublicProps(model) { if (model) { - var modelInitial = this.public[model._type]; + const modelInitial = this.public[model._type]; if (modelInitial) { - for (var prop in modelInitial) { + for (const prop in modelInitial) { model[prop] = modelInitial[prop]; } } @@ -56,9 +56,9 @@ class Model { initPrivateProps(model) { if (model) { - var modelInitial = this.private[model._type]; + const modelInitial = this.private[model._type]; if (modelInitial) { - for (var prop in modelInitial) { + for (const prop in modelInitial) { model[prop] = modelInitial[prop]; } } @@ -66,6 +66,17 @@ class Model { return model; } + + deletePrivateProps(model) { + if (model) { + const modelInitial = this.private[model._type]; + if (modelInitial) { + for (const prop in modelInitial) { + delete model[prop]; + } + } + } + } } export default new Model(); diff --git a/src/jmapNew/theme/datie_jd1a/model.js b/src/jmapNew/theme/datie_jd1a/model.js index c7d80a99e..9c09fd633 100644 --- a/src/jmapNew/theme/datie_jd1a/model.js +++ b/src/jmapNew/theme/datie_jd1a/model.js @@ -43,9 +43,9 @@ class Model { initPublicProps(model) { if (model) { - var modelInitial = this.public[model._type]; + const modelInitial = this.public[model._type]; if (modelInitial) { - for (var prop in modelInitial) { + for (const prop in modelInitial) { model[prop] = modelInitial[prop]; } } @@ -56,9 +56,9 @@ class Model { initPrivateProps(model) { if (model) { - var modelInitial = this.private[model._type]; + const modelInitial = this.private[model._type]; if (modelInitial) { - for (var prop in modelInitial) { + for (const prop in modelInitial) { model[prop] = modelInitial[prop]; } } @@ -66,6 +66,17 @@ class Model { return model; } + + deletePrivateProps(model) { + if (model) { + const modelInitial = this.private[model._type]; + if (modelInitial) { + for (const prop in modelInitial) { + delete model[prop]; + } + } + } + } } export default new Model(); diff --git a/src/jmapNew/theme/datie_tky/model.js b/src/jmapNew/theme/datie_tky/model.js index c7d80a99e..9c09fd633 100644 --- a/src/jmapNew/theme/datie_tky/model.js +++ b/src/jmapNew/theme/datie_tky/model.js @@ -43,9 +43,9 @@ class Model { initPublicProps(model) { if (model) { - var modelInitial = this.public[model._type]; + const modelInitial = this.public[model._type]; if (modelInitial) { - for (var prop in modelInitial) { + for (const prop in modelInitial) { model[prop] = modelInitial[prop]; } } @@ -56,9 +56,9 @@ class Model { initPrivateProps(model) { if (model) { - var modelInitial = this.private[model._type]; + const modelInitial = this.private[model._type]; if (modelInitial) { - for (var prop in modelInitial) { + for (const prop in modelInitial) { model[prop] = modelInitial[prop]; } } @@ -66,6 +66,17 @@ class Model { return model; } + + deletePrivateProps(model) { + if (model) { + const modelInitial = this.private[model._type]; + if (modelInitial) { + for (const prop in modelInitial) { + delete model[prop]; + } + } + } + } } export default new Model(); diff --git a/src/jmapNew/theme/foshan_01/model.js b/src/jmapNew/theme/foshan_01/model.js index bd6829d9f..ecca1edf7 100644 --- a/src/jmapNew/theme/foshan_01/model.js +++ b/src/jmapNew/theme/foshan_01/model.js @@ -45,9 +45,9 @@ class Model { initPublicProps(model) { if (model) { - var modelInitial = this.public[model._type]; + const modelInitial = this.public[model._type]; if (modelInitial) { - for (var prop in modelInitial) { + for (const prop in modelInitial) { model[prop] = modelInitial[prop]; } } @@ -58,9 +58,9 @@ class Model { initPrivateProps(model) { if (model) { - var modelInitial = this.private[model._type]; + const modelInitial = this.private[model._type]; if (modelInitial) { - for (var prop in modelInitial) { + for (const prop in modelInitial) { model[prop] = modelInitial[prop]; } } @@ -68,6 +68,17 @@ class Model { return model; } + + deletePrivateProps(model) { + if (model) { + const modelInitial = this.private[model._type]; + if (modelInitial) { + for (const prop in modelInitial) { + delete model[prop]; + } + } + } + } } export default new Model(); diff --git a/src/jmapNew/theme/fuzhou_01/model.js b/src/jmapNew/theme/fuzhou_01/model.js index 218474f7c..f9dff7a35 100644 --- a/src/jmapNew/theme/fuzhou_01/model.js +++ b/src/jmapNew/theme/fuzhou_01/model.js @@ -45,9 +45,9 @@ class Model { initPublicProps(model) { if (model) { - var modelInitial = this.public[model._type]; + const modelInitial = this.public[model._type]; if (modelInitial) { - for (var prop in modelInitial) { + for (const prop in modelInitial) { model[prop] = modelInitial[prop]; } } @@ -58,9 +58,9 @@ class Model { initPrivateProps(model) { if (model) { - var modelInitial = this.private[model._type]; + const modelInitial = this.private[model._type]; if (modelInitial) { - for (var prop in modelInitial) { + for (const prop in modelInitial) { model[prop] = modelInitial[prop]; } } @@ -68,6 +68,17 @@ class Model { return model; } + + deletePrivateProps(model) { + if (model) { + const modelInitial = this.private[model._type]; + if (modelInitial) { + for (const prop in modelInitial) { + delete model[prop]; + } + } + } + } } export default new Model(); diff --git a/src/jmapNew/theme/haerbin_01/model.js b/src/jmapNew/theme/haerbin_01/model.js index 53a250e7f..e256d37de 100644 --- a/src/jmapNew/theme/haerbin_01/model.js +++ b/src/jmapNew/theme/haerbin_01/model.js @@ -44,9 +44,9 @@ class Model { initPublicProps(model) { if (model) { - var modelInitial = this.public[model._type]; + const modelInitial = this.public[model._type]; if (modelInitial) { - for (var prop in modelInitial) { + for (const prop in modelInitial) { model[prop] = modelInitial[prop]; } } @@ -57,9 +57,9 @@ class Model { initPrivateProps(model) { if (model) { - var modelInitial = this.private[model._type]; + const modelInitial = this.private[model._type]; if (modelInitial) { - for (var prop in modelInitial) { + for (const prop in modelInitial) { model[prop] = modelInitial[prop]; } } @@ -67,6 +67,17 @@ class Model { return model; } + + deletePrivateProps(model) { + if (model) { + const modelInitial = this.private[model._type]; + if (modelInitial) { + for (const prop in modelInitial) { + delete model[prop]; + } + } + } + } } export default new Model(); diff --git a/src/jmapNew/theme/nanjing_02/model.js b/src/jmapNew/theme/nanjing_02/model.js index 53a250e7f..e256d37de 100644 --- a/src/jmapNew/theme/nanjing_02/model.js +++ b/src/jmapNew/theme/nanjing_02/model.js @@ -44,9 +44,9 @@ class Model { initPublicProps(model) { if (model) { - var modelInitial = this.public[model._type]; + const modelInitial = this.public[model._type]; if (modelInitial) { - for (var prop in modelInitial) { + for (const prop in modelInitial) { model[prop] = modelInitial[prop]; } } @@ -57,9 +57,9 @@ class Model { initPrivateProps(model) { if (model) { - var modelInitial = this.private[model._type]; + const modelInitial = this.private[model._type]; if (modelInitial) { - for (var prop in modelInitial) { + for (const prop in modelInitial) { model[prop] = modelInitial[prop]; } } @@ -67,6 +67,17 @@ class Model { return model; } + + deletePrivateProps(model) { + if (model) { + const modelInitial = this.private[model._type]; + if (modelInitial) { + for (const prop in modelInitial) { + delete model[prop]; + } + } + } + } } export default new Model(); diff --git a/src/jmapNew/theme/ningbo_01/model.js b/src/jmapNew/theme/ningbo_01/model.js index c00fd4260..6a478f5d4 100644 --- a/src/jmapNew/theme/ningbo_01/model.js +++ b/src/jmapNew/theme/ningbo_01/model.js @@ -54,9 +54,9 @@ class Model { initPublicProps(model) { if (model) { - var modelInitial = this.public[model._type]; + const modelInitial = this.public[model._type]; if (modelInitial) { - for (var prop in modelInitial) { + for (const prop in modelInitial) { model[prop] = modelInitial[prop]; } } @@ -67,9 +67,9 @@ class Model { initPrivateProps(model) { if (model) { - var modelInitial = this.private[model._type]; + const modelInitial = this.private[model._type]; if (modelInitial) { - for (var prop in modelInitial) { + for (const prop in modelInitial) { model[prop] = modelInitial[prop]; } } @@ -77,6 +77,17 @@ class Model { return model; } + + deletePrivateProps(model) { + if (model) { + const modelInitial = this.private[model._type]; + if (modelInitial) { + for (const prop in modelInitial) { + delete model[prop]; + } + } + } + } } export default new Model(); diff --git a/src/jmapNew/theme/ningbo_03/model.js b/src/jmapNew/theme/ningbo_03/model.js index c00fd4260..6a478f5d4 100644 --- a/src/jmapNew/theme/ningbo_03/model.js +++ b/src/jmapNew/theme/ningbo_03/model.js @@ -54,9 +54,9 @@ class Model { initPublicProps(model) { if (model) { - var modelInitial = this.public[model._type]; + const modelInitial = this.public[model._type]; if (modelInitial) { - for (var prop in modelInitial) { + for (const prop in modelInitial) { model[prop] = modelInitial[prop]; } } @@ -67,9 +67,9 @@ class Model { initPrivateProps(model) { if (model) { - var modelInitial = this.private[model._type]; + const modelInitial = this.private[model._type]; if (modelInitial) { - for (var prop in modelInitial) { + for (const prop in modelInitial) { model[prop] = modelInitial[prop]; } } @@ -77,6 +77,17 @@ class Model { return model; } + + deletePrivateProps(model) { + if (model) { + const modelInitial = this.private[model._type]; + if (modelInitial) { + for (const prop in modelInitial) { + delete model[prop]; + } + } + } + } } export default new Model(); diff --git a/src/jmapNew/theme/race_01/model.js b/src/jmapNew/theme/race_01/model.js index c00fd4260..311a4d893 100644 --- a/src/jmapNew/theme/race_01/model.js +++ b/src/jmapNew/theme/race_01/model.js @@ -54,9 +54,9 @@ class Model { initPublicProps(model) { if (model) { - var modelInitial = this.public[model._type]; + const modelInitial = this.public[model._type]; if (modelInitial) { - for (var prop in modelInitial) { + for (const prop in modelInitial) { model[prop] = modelInitial[prop]; } } @@ -67,9 +67,9 @@ class Model { initPrivateProps(model) { if (model) { - var modelInitial = this.private[model._type]; + const modelInitial = this.private[model._type]; if (modelInitial) { - for (var prop in modelInitial) { + for (const prop in modelInitial) { model[prop] = modelInitial[prop]; } } @@ -77,6 +77,16 @@ class Model { return model; } + deletePrivateProps(model) { + if (model) { + const modelInitial = this.private[model._type]; + if (modelInitial) { + for (const prop in modelInitial) { + delete model[prop]; + } + } + } + } } export default new Model(); diff --git a/src/jmapNew/theme/xian_01/model.js b/src/jmapNew/theme/xian_01/model.js index bf09f1e11..ee8f58301 100644 --- a/src/jmapNew/theme/xian_01/model.js +++ b/src/jmapNew/theme/xian_01/model.js @@ -45,9 +45,9 @@ class Model { initPublicProps(model) { if (model) { - var modelInitial = this.public[model._type]; + const modelInitial = this.public[model._type]; if (modelInitial) { - for (var prop in modelInitial) { + for (const prop in modelInitial) { model[prop] = modelInitial[prop]; } } @@ -58,9 +58,9 @@ class Model { initPrivateProps(model) { if (model) { - var modelInitial = this.private[model._type]; + const modelInitial = this.private[model._type]; if (modelInitial) { - for (var prop in modelInitial) { + for (const prop in modelInitial) { model[prop] = modelInitial[prop]; } } @@ -68,6 +68,16 @@ class Model { return model; } + deletePrivateProps(model) { + if (model) { + const modelInitial = this.private[model._type]; + if (modelInitial) { + for (const prop in modelInitial) { + delete model[prop]; + } + } + } + } } export default new Model(); diff --git a/src/jmapNew/theme/xian_02/model.js b/src/jmapNew/theme/xian_02/model.js index 849144e90..9d51fe665 100644 --- a/src/jmapNew/theme/xian_02/model.js +++ b/src/jmapNew/theme/xian_02/model.js @@ -48,29 +48,38 @@ class Model { initPublicProps(model) { if (model) { - var modelInitial = this.public[model._type]; + const modelInitial = this.public[model._type]; if (modelInitial) { - for (var prop in modelInitial) { + for (const prop in modelInitial) { model[prop] = modelInitial[prop]; } } } - return model; } initPrivateProps(model) { if (model) { - var modelInitial = this.private[model._type]; + const modelInitial = this.private[model._type]; if (modelInitial) { - for (var prop in modelInitial) { + for (const prop in modelInitial) { model[prop] = modelInitial[prop]; } } } - return model; } + + deletePrivateProps(model) { + if (model) { + const modelInitial = this.private[model._type]; + if (modelInitial) { + for (const prop in modelInitial) { + delete model[prop]; + } + } + } + } } export default new Model(); From a2ccd822088d913c05ff6f26594a32206654fcce Mon Sep 17 00:00:00 2001 From: fan Date: Fri, 22 Jul 2022 10:16:30 +0800 Subject: [PATCH 04/96] =?UTF-8?q?=E7=94=BB=E9=9D=A2=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E5=A4=84=E7=90=86=E4=B8=8D=E5=90=8C=E7=BA=BF=E8=B7=AF=E7=A7=81?= =?UTF-8?q?=E6=9C=89=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/map.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/jmapNew/map.js b/src/jmapNew/map.js index 732319c8f..654ac2284 100644 --- a/src/jmapNew/map.js +++ b/src/jmapNew/map.js @@ -90,16 +90,14 @@ class Jlmap { this.lineCode = lineCode; this.style = selectLineCode(lineCode); this.$zr.dom.style.backgroundColor = this.style.backgroundColor || '#000'; - console.log(this.mapDevice, 'mapDevice'); } // 处理私有属性 reloadModelData(oldLineCode, lineCode) { - // console.log(oldLineCode, lineCode, '-------------12'); const propConvert = lineCode ? Vue.prototype.$theme.loadPropConvert(lineCode) : null; const oldPropConvert = oldLineCode ? Vue.prototype.$theme.loadPropConvert(oldLineCode) : null; - for (const device in this.mapDevice) { - oldPropConvert.deletePrivateProps(device); - propConvert.initPrivateProps(device); + for (const deviceCode in this.mapDevice) { + oldPropConvert.deletePrivateProps(this.mapDevice[deviceCode]); + propConvert.initPrivateProps(this.mapDevice[deviceCode]); } } loadDefaultState() { // 加载默认状态 From 3f7696e157681225ff8d06351be6498449ab6825 Mon Sep 17 00:00:00 2001 From: fan Date: Fri, 22 Jul 2022 11:20:24 +0800 Subject: [PATCH 05/96] =?UTF-8?q?=E5=A4=A7=E9=93=81=E4=BA=8C=E5=8F=B7?= =?UTF-8?q?=E7=BA=BF=E7=82=B9=E7=81=AF=E7=81=AD=E7=81=AF=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/shape/graph/Signal/index.js | 2 +- src/jmapNew/theme/datie_02/menus/index.vue | 2 +- .../theme/datie_02/menus/menuButton.vue | 57 ++++++++++++++----- src/scripts/cmdPlugin/CommandEnum.js | 6 +- src/scripts/cmdPlugin/OperationHandler.js | 8 +-- 5 files changed, 54 insertions(+), 21 deletions(-) diff --git a/src/jmapNew/shape/graph/Signal/index.js b/src/jmapNew/shape/graph/Signal/index.js index 4f72e5530..e57f088fa 100644 --- a/src/jmapNew/shape/graph/Signal/index.js +++ b/src/jmapNew/shape/graph/Signal/index.js @@ -1163,7 +1163,7 @@ class Signal extends Group { // 灯颜色状态显示 exec(SignalAspectMap[model.signalAspect], this.lamps, this.style); // 灯是否点灯显示 - this.lamps.forEach(lamp => { lamp.setStop(model.signalLight); }); + // this.lamps.forEach(lamp => { lamp.setStop(model.signalLight); }); } if (model.hasSelected) { this.sigName && this.sigName.setAnimationStart(this.style.Signal.text.defaultColor); diff --git a/src/jmapNew/theme/datie_02/menus/index.vue b/src/jmapNew/theme/datie_02/menus/index.vue index c07abe8ef..ba90cf9f0 100644 --- a/src/jmapNew/theme/datie_02/menus/index.vue +++ b/src/jmapNew/theme/datie_02/menus/index.vue @@ -33,7 +33,7 @@
与中心通信正常
-
+
提示信息窗
{{ '操控A:主机' + ' ' + dateString + ' ' + time }}
diff --git a/src/jmapNew/theme/datie_02/menus/menuButton.vue b/src/jmapNew/theme/datie_02/menus/menuButton.vue index 7e52408dc..a75e36178 100644 --- a/src/jmapNew/theme/datie_02/menus/menuButton.vue +++ b/src/jmapNew/theme/datie_02/menus/menuButton.vue @@ -71,16 +71,16 @@
道岔解封
- - - - - - - - - - + + -
- - diff --git a/src/views/newMap/newMapdraft/dataRelation/bigroutingoperate/index.vue b/src/views/newMap/newMapdraft/dataRelation/bigroutingoperate/index.vue index 69158bb6d..a90bca099 100644 --- a/src/views/newMap/newMapdraft/dataRelation/bigroutingoperate/index.vue +++ b/src/views/newMap/newMapdraft/dataRelation/bigroutingoperate/index.vue @@ -7,7 +7,7 @@ :route-data="routeData" @setCenter="setCenter" /> - + From 75025ed307fe861b926eb0113a5aae5a5d55d582 Mon Sep 17 00:00:00 2001 From: Yuan Date: Wed, 3 Aug 2022 10:00:49 +0800 Subject: [PATCH 84/96] bugfix --- src/jmapNew/theme/datie_jd1a/menus/menuButton.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jmapNew/theme/datie_jd1a/menus/menuButton.vue b/src/jmapNew/theme/datie_jd1a/menus/menuButton.vue index c21b7f3fb..49d286571 100644 --- a/src/jmapNew/theme/datie_jd1a/menus/menuButton.vue +++ b/src/jmapNew/theme/datie_jd1a/menus/menuButton.vue @@ -535,7 +535,7 @@ export default { }, buttonDown(operation, commandTypeList, color) { this.clearOperate() - this.pressedSignalButton.instance.pressDown(true, color) + this.pressedSignalButton && this.pressedSignalButton.instance.pressDown(true, color) if (operation != this.Command.cancel.clearMbm.operation) { const operate = { operation: operation, From 6360e26c8983c3913e68372c533693e15e97acbc Mon Sep 17 00:00:00 2001 From: fan Date: Wed, 3 Aug 2022 10:04:31 +0800 Subject: [PATCH 85/96] =?UTF-8?q?=E7=B0=BF=E5=86=8C=E8=BD=A6=E7=AB=99?= =?UTF-8?q?=E4=BC=A0=E9=80=92=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/newMap/registerBook/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/newMap/registerBook/index.vue b/src/views/newMap/registerBook/index.vue index b5cb5e891..2134c4857 100644 --- a/src/views/newMap/registerBook/index.vue +++ b/src/views/newMap/registerBook/index.vue @@ -124,7 +124,7 @@ export default { this.queryData(); }, queryData() { - const params = { stationCode: this.$store.state.map.showCentralizedStationCode}; + const params = { stationCode: this.$store.state.training.roleDeviceCode}; commitOperate(menuOperate.Rail.railQueryRegister, params, 3).then(({valid, operate, response})=>{ this.tableData = response.data ? response.data.lines : []; this.dataIndex = null; @@ -133,7 +133,7 @@ export default { }); }, saveData(data) { - const params = { stationCode: this.$store.state.map.showCentralizedStationCode, line: data }; + const params = { stationCode: this.$store.state.training.roleDeviceCode, line: data }; commitOperate(menuOperate.Rail.railFillInRegister, params, 3).then(({valid, operate})=>{ this.queryData(); }).catch(()=>{ From f1dc88be3365c3eaabf67ef29e4adb4758414639 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Wed, 3 Aug 2022 11:00:31 +0800 Subject: [PATCH 86/96] =?UTF-8?q?=E5=9C=BA=E6=99=AF=E7=BC=96=E8=BE=91?= =?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/drts/scene/modify.vue | 66 ++++++----- .../component/covertOperation.js | 103 +++++++++++++++++- 2 files changed, 138 insertions(+), 31 deletions(-) diff --git a/src/views/drts/scene/modify.vue b/src/views/drts/scene/modify.vue index cfbffe846..2b97732a7 100644 --- a/src/views/drts/scene/modify.vue +++ b/src/views/drts/scene/modify.vue @@ -16,7 +16,9 @@ {{ '' }} -
{{ covert(scope.row) }}
+
{{ scope.row.remarkName }}
+ + @@ -265,6 +267,37 @@ export default { watch: { '$store.state.map.mapDataLoadedCount': function (val) { this.parseMember(); + getCompetitionPracticalSceneById(this.formModel.id).then(response=>{ + const commandEvaluationRuleVOs = {}; + if (response.data.commandEvaluationRuleVOs) { + response.data.commandEvaluationRuleVOs.forEach(data=>{ + commandEvaluationRuleVOs[data.actionId] = data; + // commandEvaluationRuleVOs[data.actionId].inputVisible = false; + }); + } + const stepVOs = {}; + if (response.data.stepVOs) { + response.data.stepVOs.forEach(data=>{ + stepVOs[data.startActionId] = data; + const dataIndex = this.tempActionList.findIndex((value, index, arr)=>{ return value.id == data.startActionId; }); + const dataIndex1 = this.tempActionList.findIndex((value, index, arr)=>{ return value.id == data.endActionId; }); + this.startArray.push(dataIndex); + this.endArray.push(dataIndex1); + }); + } + // action.remarkName = this.covert(action); + this.tempActionList.forEach(action=>{ + action.remarkName = this.covert(action); + }); + this.actionList = [...this.tempActionList]; + this.commandEvaluationRuleVOs = commandEvaluationRuleVOs; + if (response.data.operationStatisticVO) { + this.formModel.operationStatisticVO = response.data.operationStatisticVO; + } else { + this.formModel.operationStatisticVO = {score:0, itemVOS:[]}; + } + this.stepVOs = stepVOs; + }); } }, methods:{ @@ -279,37 +312,13 @@ export default { this.formModel.disposalProcesses = row.disposalProcesses; this.formModel.operationScore = row.operationScore; this.formModel.scriptId = row.scriptId; + this.actionList = []; + this.tempActionList = []; getScriptByIdNew(row.scriptId).then(res=>{ - this.actionList = res.data.actionList.filter(action=>{ + this.tempActionList = res.data.actionList.filter(action=>{ return action.type != 'Exit_Conversation' && action.type != 'Accept_Conversation_Invitation'; }); this.jsonData = res; - getCompetitionPracticalSceneById(row.id).then(response=>{ - const commandEvaluationRuleVOs = {}; - if (response.data.commandEvaluationRuleVOs) { - response.data.commandEvaluationRuleVOs.forEach(data=>{ - commandEvaluationRuleVOs[data.actionId] = data; - // commandEvaluationRuleVOs[data.actionId].inputVisible = false; - }); - } - const stepVOs = {}; - if (response.data.stepVOs) { - response.data.stepVOs.forEach(data=>{ - stepVOs[data.startActionId] = data; - const dataIndex = this.actionList.findIndex((value, index, arr)=>{ return value.id == data.startActionId; }); - const dataIndex1 = this.actionList.findIndex((value, index, arr)=>{ return value.id == data.endActionId; }); - this.startArray.push(dataIndex); - this.endArray.push(dataIndex1); - }); - } - this.commandEvaluationRuleVOs = commandEvaluationRuleVOs; - if (response.data.operationStatisticVO) { - this.formModel.operationStatisticVO = response.data.operationStatisticVO; - } else { - this.formModel.operationStatisticVO = {score:0, itemVOS:[]}; - } - this.stepVOs = stepVOs; - }); // 加载地图数据 loadMapDataById(res.data.mapId, 'parse'); }); @@ -360,6 +369,7 @@ export default { this.$store.dispatch('map/mapClear'); }, covert(element) { + console.log(JSON.stringify(element), '8888888---666666'); const member = this.memberList[element.memberId]; let resultData = ''; if (element.type == 'Accept_Conversation_Invitation') { diff --git a/src/views/newMap/displayNew/scriptDisplay/component/covertOperation.js b/src/views/newMap/displayNew/scriptDisplay/component/covertOperation.js index d96f8f80d..40b61dcb3 100644 --- a/src/views/newMap/displayNew/scriptDisplay/component/covertOperation.js +++ b/src/views/newMap/displayNew/scriptDisplay/component/covertOperation.js @@ -282,7 +282,7 @@ export const operateEnum = { params:[ { code:'stationCode', - name:'车站', + name:'车站为', function:getStationNameById }, { @@ -326,7 +326,7 @@ export const operateEnum = { params:[ { code:'stationCode', - name:'车站', + name:'车站为', function:getStationNameById }, { @@ -354,7 +354,7 @@ export const operateEnum = { params:[ { code:'stationCode', - name:'车站', + name:'车站为', function:getStationNameById }, { @@ -480,8 +480,81 @@ export const operateEnum = { function: getStationNamList } ] + }, + CTC_SEND_NOTICE:{ + isList:true, + name:'发送发车预告', + params:[ + { + code:'stationCode', + name:'车站为', + function:getStationNameById + }, + { + code:'runPlanCode', + name:'车次号', + function:getTripNumberByCode + } + ] + }, + CTC_AGREE_NOTICE:{ + isList:true, + name:'同意发车预告', + params:[ + { + code:'stationCode', + name:'车站为', + function:getStationNameById + }, + { + code:'runPlanCode', + name:'车次号', + function:getTripNumberByCode + // 运行计划编码 + } + ] } + }, + RAIL:{ + function: getRAILDevicename, + RAIL_QUERY_REGISTER:{ + name:'查询行车簿册', + isList:true, + params:[ + { + code:'stationCode', + name:'车站为', + function:getStationNameById + } + ] + }, + RAIL_FILL_IN_REGISTER:{ + name:'填写行车簿册' + }, + RAIL_FILL_IN_TICKET:{ + name:'填写票据' + }, + RAIL_QUERY_TICKET:{ + name:'查询票据', + isList:true, + params:[ + { + code:'stationCode', + name:'车站为', + function:getStationNameById + } + ] + }, + RAIL_GIVE_TICKET_TO:{ + name:'给出票据' + } + // CMD_RAIL_FILL_IN_TICKET: {value: 'RAIL_FILL_IN_TICKET', label: '填写票据'}, + // CMD_RAIL_QUERY_TICKET: {value: 'RAIL_QUERY_TICKET', label: '查询票据'}, + // CMD_RAIL_FILL_IN_REGISTER: {value: 'RAIL_FILL_IN_REGISTER', label: '填写行车簿册'}, + // CMD_RAIL_QUERY_REGISTER: {value: 'RAIL_QUERY_REGISTER', label: '查询行车簿册'}, + // CMD_RAIL_GIVE_TICKET_TO: {value: 'RAIL_GIVE_TICKET_TO', label: '给出票据'} } + // }; // // 调度台操作 @@ -738,8 +811,14 @@ function covertDeviceName(deviceInfo, deviceType) { function getCTCDevicename(operationType) { let deviceName = ''; + const stationRPLogList = ['CTC_SEND_NOTICE', 'CTC_MODIFY_SECTION', + 'CTC_STATION_SEND_OUT_RUN_PLAN', 'CTC_CANCEL_TWINKLE', + 'CTC_MODIFY_TRIP_NUMBER', 'CTC_AGREE_NOTICE', + 'CTC_MODIFY_ADJACENT_STATION']; if (operationType.includes('CTC_ZONE')) { deviceName = '请点击运行图'; + } else if (stationRPLogList.includes(operationType)) { + deviceName = '车务终端 --> 行车日志'; } else if (operationType == 'CTC_QUERY_DISPATCH_COMMAND') { const roles = store.state.training.roles; if (roles == 'DISPATCHER') { @@ -757,6 +836,18 @@ function getCTCDevicename(operationType) { return deviceName; } +function getRAILDevicename(operationType) { + let deviceName = ''; + const ticketList = ['RAIL_FILL_IN_TICKET', 'RAIL_QUERY_TICKET', 'RAIL_GIVE_TICKET_TO']; + const registerList = ['RAIL_FILL_IN_REGISTER', 'RAIL_QUERY_REGISTER']; + if (ticketList.includes(operationType)) { + deviceName = '车务终端 --> 票据'; + } else if (registerList.includes(operationType)) { + deviceName = '车务终端 --> 簿册'; + } + return deviceName; +} + function covertOperation(deviceType, operationParamMap, operationType) { let deviceName = '【'; let paramName = ''; @@ -804,6 +895,7 @@ function covertOperation(deviceType, operationParamMap, operationType) { } } else { if (paramInfo.isList) { + // debugger; const params = paramInfo.params; if (params && params.length > 0) { paramName += '【'; @@ -890,6 +982,11 @@ function getDeviceNameById(deviceCode) { const device = store.getters['map/getDeviceByCode'](deviceCode) || {}; return device.name; } + +function getTripNumberByCode(code) { + return code.slice(3, code.length || 0); +} + function getStationNamList(list) { const nameList = []; list.sort().forEach(stationId => { From 01b44ccccf247e5a36d2bb70f19ceb4a26835258 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Wed, 3 Aug 2022 11:02:35 +0800 Subject: [PATCH 87/96] =?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/drts/scene/modify.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/drts/scene/modify.vue b/src/views/drts/scene/modify.vue index 2b97732a7..63fc1418a 100644 --- a/src/views/drts/scene/modify.vue +++ b/src/views/drts/scene/modify.vue @@ -369,7 +369,7 @@ export default { this.$store.dispatch('map/mapClear'); }, covert(element) { - console.log(JSON.stringify(element), '8888888---666666'); + // console.log(JSON.stringify(element), '8888888---666666'); const member = this.memberList[element.memberId]; let resultData = ''; if (element.type == 'Accept_Conversation_Invitation') { From 024f1c8963b1285a08e93e79d853da04dbf500e5 Mon Sep 17 00:00:00 2001 From: fan Date: Wed, 3 Aug 2022 11:21:52 +0800 Subject: [PATCH 88/96] =?UTF-8?q?=E6=8E=A5=E5=8F=97=E4=BC=9A=E8=AF=9D?= =?UTF-8?q?=E5=90=8E=E5=90=8C=E8=B4=A6=E6=88=B7=E6=B8=85=E9=99=A4=E5=93=8D?= =?UTF-8?q?=E9=93=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/newMap/chatView/chatBox.vue | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/views/newMap/chatView/chatBox.vue b/src/views/newMap/chatView/chatBox.vue index 9b7d0bf2a..2a4756ab5 100644 --- a/src/views/newMap/chatView/chatBox.vue +++ b/src/views/newMap/chatView/chatBox.vue @@ -313,7 +313,6 @@ export default { data.disabled = true; }); if (item.children[val.creatorId]) { - console.log(item.children[val.creatorId], item.children, '---------------'); item.children[val.creatorId].isInviting = true; const offsetTop = document.getElementById('proper_content_box' + val.creatorId).parentNode.offsetTop; document.querySelector('.chat-box-content').scrollTop = (offsetTop - 40) > 0 ? (offsetTop - 80) : 0; @@ -628,6 +627,21 @@ export default { } }); } + if (this.myMemberId == val.memberId) { + this.connectSuccess = true; + document.querySelector('#teleName').classList.remove('flash'); + document.querySelector('#teleRing').pause(); + this.treeData.forEach(data => { + if (data.children) { + const member = data.children[val.creatorId]; + if (member) { + member.active = true; + member.isConnect = true; + member.isInviting = false; + } + } + }); + } }, '$store.state.scriptRecord.audioPlay':function(val) { this.audioPlay = val; From 71480564f7c4301361b0f323c7dbe4ef7631d4a8 Mon Sep 17 00:00:00 2001 From: dong <58670809@qq.com> Date: Wed, 3 Aug 2022 13:31:07 +0800 Subject: [PATCH 89/96] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=9B=E8=B7=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dataRelation/bigroutingoperate/route.vue | 40 ++++++++++++++++--- src/views/newMap/newMapdraft/index.vue | 1 + 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/src/views/newMap/newMapdraft/dataRelation/bigroutingoperate/route.vue b/src/views/newMap/newMapdraft/dataRelation/bigroutingoperate/route.vue index 54a0c7c78..39d8d1590 100644 --- a/src/views/newMap/newMapdraft/dataRelation/bigroutingoperate/route.vue +++ b/src/views/newMap/newMapdraft/dataRelation/bigroutingoperate/route.vue @@ -7,6 +7,16 @@ + + + + + {{ $t('display.schema.previewRunDiagram') }} @@ -166,6 +166,10 @@ export default { { value: 4, label: '4倍速' }, { value: 5, label: '5倍速' } ]; + }, + showRegisterBookBtn() { + const roleList = ['STATION_SUPERVISOR', 'STATION_ASSISTANT', 'STATION_SIGNALER', 'STATION_SWITCH_MAN', 'STATION_MASTER', 'STATION_WORKER', 'DEVICE_MANAGER']; + return this.$route.query.lineCode === '16' && roleList.includes(this.$store.state.training.userRole); } }, watch:{ diff --git a/src/views/newMap/displayNew/selectStation.vue b/src/views/newMap/displayNew/selectStation.vue index 317a2968f..051072f03 100644 --- a/src/views/newMap/displayNew/selectStation.vue +++ b/src/views/newMap/displayNew/selectStation.vue @@ -173,6 +173,7 @@ export default { list.push(mapDevice[key]); } this.$store.dispatch('training/setRoleDeviceCode', item.deviceCode); + this.$store.dispatch('training/setUserRole', item.type); this.$jlmap.updateShowStation(list, showStationCode || item.deviceCode); this.setCenter(showStationCode); } diff --git a/src/views/newMap/jointTrainingNew/index.vue b/src/views/newMap/jointTrainingNew/index.vue index 6eb2a050a..38c2811ca 100644 --- a/src/views/newMap/jointTrainingNew/index.vue +++ b/src/views/newMap/jointTrainingNew/index.vue @@ -300,6 +300,7 @@ export default { await this.$store.dispatch('training/reset'); await this.$store.dispatch('map/mapClear'); await this.$store.dispatch('menuOperation/resetRequestList'); + this.$store.dispatch('training/setUserRole', ''); Message.closeAll(); }, methods: { @@ -782,6 +783,7 @@ export default { } else if (item.messageType === 'PLAY_CHANGE' && item.userId == this.userId) { this.userRole = item.type || 'AUDIENCE'; this.$store.dispatch('training/setRoleDeviceCode', item.deviceCode); + this.$store.dispatch('training/setUserRole', this.userRole); this.deviceCode = item.deviceCode; this.setSimulationPrdType(this.centralizedStationMap[item.deviceCode]); this.$nextTick(() => { diff --git a/src/views/newMap/jointTrainingNew/menuSchema.vue b/src/views/newMap/jointTrainingNew/menuSchema.vue index f29728324..a8e99ea2a 100644 --- a/src/views/newMap/jointTrainingNew/menuSchema.vue +++ b/src/views/newMap/jointTrainingNew/menuSchema.vue @@ -15,7 +15,7 @@ 车务终端 路票 - 簿册 + 簿册 调度台 IBP盘 大屏 @@ -169,6 +169,10 @@ export default { ibpShow() { const lineCodeList = ['08', '16']; return this.userRole === 'STATION_SUPERVISOR' && !this.$route.query.projectDevice && !lineCodeList.includes(this.$route.query.lineCode); + }, + showRegisterBookBtn() { + const roleList = ['STATION_SUPERVISOR', 'STATION_ASSISTANT', 'STATION_SIGNALER', 'STATION_SWITCH_MAN', 'STATION_MASTER', 'STATION_WORKER', 'DEVICE_MANAGER']; + return this.$route.query.lineCode === '16' && roleList.includes(this.$store.state.training.userRole); } }, watch: { From ae5d53e9e0c8a902ce14a80c46f8b4b9b2301274 Mon Sep 17 00:00:00 2001 From: dong <58670809@qq.com> Date: Wed, 3 Aug 2022 15:33:03 +0800 Subject: [PATCH 92/96] =?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 --- .../newMapdraft/dataRelation/bigroutingoperate/route.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/newMap/newMapdraft/dataRelation/bigroutingoperate/route.vue b/src/views/newMap/newMapdraft/dataRelation/bigroutingoperate/route.vue index 16a257d8f..b366b2839 100644 --- a/src/views/newMap/newMapdraft/dataRelation/bigroutingoperate/route.vue +++ b/src/views/newMap/newMapdraft/dataRelation/bigroutingoperate/route.vue @@ -98,7 +98,7 @@ >{{ $t('map.activate') }} - + Date: Wed, 3 Aug 2022 15:40:33 +0800 Subject: [PATCH 93/96] =?UTF-8?q?=E9=BB=84=E7=BB=BF=E7=81=AF=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/shape/graph/Signal/index.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/jmapNew/shape/graph/Signal/index.js b/src/jmapNew/shape/graph/Signal/index.js index 1f7c4853a..e1f642769 100644 --- a/src/jmapNew/shape/graph/Signal/index.js +++ b/src/jmapNew/shape/graph/Signal/index.js @@ -722,6 +722,10 @@ class Signal extends Group { this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.whiteColor); this.lamps[1] && this.lamps[1].setColor(this.style.Signal.lamp.redColor); } + greenYellow() { + this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.yellowColor); + this.lamps[1] && this.lamps[1].setColor(this.style.Signal.lamp.greenColor); + } lampWhite() { if (this.lamps.length === 1) { this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.whiteColor); @@ -1078,6 +1082,10 @@ class Signal extends Group { this.redWhite(); break; } + case 'GY': { + this.greenYellow(); + break; + } default: { this.close(model.logicLight); // 信号关闭 break; From 6cb94046c8149818ba7dd348059a5dc897ea217f Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Wed, 3 Aug 2022 15:40:51 +0800 Subject: [PATCH 94/96] =?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 --- .../component/covertOperation.js | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/views/newMap/displayNew/scriptDisplay/component/covertOperation.js b/src/views/newMap/displayNew/scriptDisplay/component/covertOperation.js index 40b61dcb3..aa121e4fd 100644 --- a/src/views/newMap/displayNew/scriptDisplay/component/covertOperation.js +++ b/src/views/newMap/displayNew/scriptDisplay/component/covertOperation.js @@ -529,7 +529,20 @@ export const operateEnum = { ] }, RAIL_FILL_IN_REGISTER:{ - name:'填写行车簿册' + name:'填写行车簿册', + isList:true, + params:[ + { + code:'stationCode', + name:'车站为', + function:getStationNameById + }, + { + code:'line', + name:'单条记录', + function:getRecordByLine + } + ] }, RAIL_FILL_IN_TICKET:{ name:'填写票据' @@ -633,6 +646,7 @@ export const operateEnum = { // 转换函数 export function covertOperate(operationType, operationParamMap) { + debugger; if (operationType == 'Set_Fault' || operationType == 'Cancel_Fault') { let deviceName = ''; const device = store.getters['map/getDeviceByCode'](operationParamMap.code) || {}; @@ -983,6 +997,12 @@ function getDeviceNameById(deviceCode) { return device.name; } +function getRecordByLine(line) { + // '{"stationCode":"Station58852","line":{"moonDay":"","hourMinute":"","result":"","noticeTime":{"moonDay":"","hourMinute":"","info":""},"arriveTime":{"moonDay":"","hourMinute":"","info":""},"endTime":{"moonDay":"","hourMinute":"","info":""}}}' + return ',结果为' + line.result; + // JSON.stringify(line); +} + function getTripNumberByCode(code) { return code.slice(3, code.length || 0); } From 8262b24698439038984206d6affa5ab7696dc561 Mon Sep 17 00:00:00 2001 From: fan Date: Thu, 4 Aug 2022 10:29:56 +0800 Subject: [PATCH 95/96] =?UTF-8?q?=E8=BD=A6=E6=AC=A1=E7=AA=97=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E7=94=9F=E6=88=90=E6=97=B6=E5=8F=AF=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E8=B7=9D=E7=A6=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../newMapdraft/mapoperate/trainwindow.vue | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/views/newMap/newMapdraft/mapoperate/trainwindow.vue b/src/views/newMap/newMapdraft/mapoperate/trainwindow.vue index 38bdef408..1dff77bc5 100644 --- a/src/views/newMap/newMapdraft/mapoperate/trainwindow.vue +++ b/src/views/newMap/newMapdraft/mapoperate/trainwindow.vue @@ -24,6 +24,10 @@
创建 +
+ 离区段距离: + +
{{ $t('map.createTrainWindow') }}
@@ -95,6 +99,7 @@ export default { lazy: true, mapData: null, addList: [], + distance: 0, editModel: { code: '', point: { @@ -192,6 +197,9 @@ export default { return this.$jlmap.style; } }, + mounted() { + this.distance = this.style.trainDistance; + }, methods: { filterSections(query, item) { return item.pinyin.indexOf(query) > -1; @@ -250,20 +258,20 @@ export default { }; } - const distance = (this.style.trainDistance + this.style.trainConflictR * 2 + height); + const distanceActive = (this.distance + this.style.trainConflictR * 2 + height); let offsetx = 0; let offsety = 0; if (opts.triangle) { if (opts.triangle.getCosRate() == 1 || opts.triangle.getCosRate() == 0) { - offsetx = distance * opts.triangle.getSinRate(); - offsety = distance * opts.triangle.getCosRate(); + offsetx = distanceActive * opts.triangle.getSinRate(); + offsety = distanceActive * opts.triangle.getCosRate(); } else { - offsetx = distance; - offsety = distance; + offsetx = distanceActive; + offsety = distanceActive; } } else { offsetx = 0; - offsety = distance; + offsety = distanceActive; } if (section.trainPosType == '01') { model.point.y = model.point.y - height - offsety; From 8c7cd5d4959f09247a493eca49688bb51dde1864 Mon Sep 17 00:00:00 2001 From: fan Date: Thu, 4 Aug 2022 11:04:47 +0800 Subject: [PATCH 96/96] =?UTF-8?q?=E7=B0=BF=E5=86=8C=E6=9A=82=E6=8F=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/newMap/registerBook/index.vue | 273 ++++++++++++++++-------- 1 file changed, 182 insertions(+), 91 deletions(-) diff --git a/src/views/newMap/registerBook/index.vue b/src/views/newMap/registerBook/index.vue index 2134c4857..f98473b11 100644 --- a/src/views/newMap/registerBook/index.vue +++ b/src/views/newMap/registerBook/index.vue @@ -9,97 +9,188 @@ :close-on-click-modal="false" center > -
- 新增 -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +
+ 新增 +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ 新增 +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ 新增 +
+ +
+