From 89700f2245a0ccc33845cfb59dfece98158c561f Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Thu, 21 Jan 2021 10:05:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=A1=E6=96=AF=E6=9F=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/Section/index.js | 4 ++-- src/jmapNew/shape/Switch/ESwLnversion.js | 9 ++++----- src/jmapNew/shape/Switch/ESwLocal.js | 9 ++++----- src/jmapNew/shape/Switch/ETriangle.js | 9 ++++----- src/jmapNew/shape/Switch/index.js | 17 ++++++++++++++--- .../theme/nanjing_02/menus/menuButton.vue | 2 +- src/jmapNew/theme/ningbo_01/operationConfig.js | 8 ++++---- 7 files changed, 33 insertions(+), 25 deletions(-) diff --git a/src/jmapNew/shape/Section/index.js b/src/jmapNew/shape/Section/index.js index b834a7b97..fc30a3994 100644 --- a/src/jmapNew/shape/Section/index.js +++ b/src/jmapNew/shape/Section/index.js @@ -184,7 +184,7 @@ export default class Section extends Group { { time: 500, styles: { stroke: this.style.backgroundColor } }, { time: 1000, styles: { stroke: this.style.Section.line.blockColor } } ]); - } else { + } else if (this.model.type !== '03') { this.line && this.line.setStyle({ stroke: this.style.Section.line.blockColor, lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth @@ -193,7 +193,7 @@ export default class Section extends Group { if (this.style.Section.cross && this.model.type == '05') { this.line.setCrossBlock(); } - if (this.style.Section.block && this.style.Section.block.blockGlint && this.line) { + if (this.style.Section.block && this.style.Section.block.blockGlint && this.line && this.model.type !== '03') { this.line.animateStyle(true, [ { time: 1000, styles: { stroke: this.style.backgroundColor } }, { time: 2000, styles: { stroke: this.style.Section.line.blockColor } } diff --git a/src/jmapNew/shape/Switch/ESwLnversion.js b/src/jmapNew/shape/Switch/ESwLnversion.js index 9edd29646..1aaa77895 100644 --- a/src/jmapNew/shape/Switch/ESwLnversion.js +++ b/src/jmapNew/shape/Switch/ESwLnversion.js @@ -59,11 +59,10 @@ class ESwLnversion extends Group { return this.relocShelter; } - animateStyle(color1, color2) { - this.relocShelter.animateStyle(true) - .when(0, {stroke: color1}) - .when(500, {stroke: color2}) - .when(1000, {stroke: color1}).start(); + animateStyle(cb) { + this.eachChild((child) => { + cb(child); + }); } } diff --git a/src/jmapNew/shape/Switch/ESwLocal.js b/src/jmapNew/shape/Switch/ESwLocal.js index f43f45601..d7e47b717 100644 --- a/src/jmapNew/shape/Switch/ESwLocal.js +++ b/src/jmapNew/shape/Switch/ESwLocal.js @@ -56,11 +56,10 @@ class ESwLocal extends Group { this.locShelter.setStyle(data); } - animateStyle(color1, color2) { - this.locShelter.animateStyle(true) - .when(0, {stroke: color1}) - .when(500, {stroke: color2}) - .when(1000, {stroke: color1}).start(); + animateStyle(cb) { + this.eachChild((child) => { + cb(child); + }); } getLocal() { return this.locShelter; diff --git a/src/jmapNew/shape/Switch/ETriangle.js b/src/jmapNew/shape/Switch/ETriangle.js index 35cf12c1b..1c40478ea 100644 --- a/src/jmapNew/shape/Switch/ETriangle.js +++ b/src/jmapNew/shape/Switch/ETriangle.js @@ -65,11 +65,10 @@ class ETriangle extends Group { }); } - animateStyle(color1, color2) { - this.section.animateStyle(true) - .when(0, {stroke: color1}) - .when(500, {stroke: color2}) - .when(1000, {stroke: color1}).start(); + animateStyle(cb) { + this.eachChild((child) => { + cb(child); + }); } } diff --git a/src/jmapNew/shape/Switch/index.js b/src/jmapNew/shape/Switch/index.js index 9a321a007..3a7788976 100644 --- a/src/jmapNew/shape/Switch/index.js +++ b/src/jmapNew/shape/Switch/index.js @@ -335,9 +335,21 @@ export default class Switch extends Group { bColor = '#FF0'; } // 南京二号线道岔短闪两部分相位不同 - this.shapeModelA && this.shapeModelA.animateStyle(aColor, this.style.backgroundColor); + this.shapeModelA && this.shapeModelA.animateStyle(item => { + item.animateStyle(true) + .when(0, { stroke: this.style.backgroundColor }) + .when(1000, { stroke: aColor }) + .when(2000, { stroke: this.style.backgroundColor }) + .start(); + }); setTimeout(() => { - this.shapeModelB && this.shapeModelB.animateStyle(bColor, this.style.backgroundColor); + this.shapeModelB && this.shapeModelB.animateStyle(item => { + item.animateStyle(true) + .when(0, { stroke: this.style.backgroundColor }) + .when(1000, { stroke: bColor }) + .when(2000, { stroke: this.style.backgroundColor }) + .start(); + }); }, 100); if (split) { this.shapeModelA.hide(); @@ -351,7 +363,6 @@ export default class Switch extends Group { this.shapeModelB.show(); this.shapeModelC.show(); this.shapeModelC.setColor(this.style.backgroundColor); - this.shapeModelB.animateStyle(); this.style.Switch.shapeFlash && this.shapeFlashing(split); this.setTextColor(this.style.Switch.text.lossColor); this.style.Switch.text.faultFlashing && this.nameTextAnimation(); diff --git a/src/jmapNew/theme/nanjing_02/menus/menuButton.vue b/src/jmapNew/theme/nanjing_02/menus/menuButton.vue index 8351d66a1..4264ba198 100644 --- a/src/jmapNew/theme/nanjing_02/menus/menuButton.vue +++ b/src/jmapNew/theme/nanjing_02/menus/menuButton.vue @@ -346,7 +346,7 @@ export default { this.pushTempData([]); // 清空执行栏 this.selectedObj = this.selected; this.rightClickDialogVisible = false; - if (this.selectedObj._type && (val._event == MouseEvent.Left || (val._event == MouseEvent.Right || this.$store.state.training.prdType === '01'))) { + if (this.selectedObj._type && (val._event == MouseEvent.Left || (val._event == MouseEvent.Right && this.$store.state.training.prdType === '01'))) { const type = this.State2SimulationMap[this.$store.state.training.prdType]; this.modeMatch = this.stationContorl.controlMode == type; // 道岔区段 道岔计轴区段 都是道岔操作 diff --git a/src/jmapNew/theme/ningbo_01/operationConfig.js b/src/jmapNew/theme/ningbo_01/operationConfig.js index e306228e0..f9f9fba3e 100644 --- a/src/jmapNew/theme/ningbo_01/operationConfig.js +++ b/src/jmapNew/theme/ningbo_01/operationConfig.js @@ -863,8 +863,8 @@ export default { trainingType: 'Station', productTypes: ['01'], stepVOList: [ - { deviceType: '05', orderNum: 1, operateCode: '602', tip: '鼠标右键菜单选择【全站取消联锁自动触发】'}, - { deviceType: '05', orderNum: 2, operateCode: '602', tip: '鼠标左键点击【确定】' } + { deviceType: '05', orderNum: 1, operateCode: '602', tip: '鼠标右键菜单选择【全站取消联锁自动触发】'} + // { deviceType: '05', orderNum: 2, operateCode: '602', tip: '鼠标左键点击【确定】' } ] }, { @@ -877,8 +877,8 @@ export default { trainingType: 'Station', productTypes: ['01'], stepVOList: [ - { deviceType: '05', orderNum: 1, operateCode: '601', tip: '鼠标右键菜单选择【全站设置联锁自动触发】'}, - { deviceType: '05', orderNum: 2, operateCode: '601', tip: '鼠标左键点击【确定】' } + { deviceType: '05', orderNum: 1, operateCode: '601', tip: '鼠标右键菜单选择【全站设置联锁自动触发】'} + // { deviceType: '05', orderNum: 2, operateCode: '601', tip: '鼠标左键点击【确定】' } ] } ]