From 027fe4346785ac4230ce5a41f26fd54b0e02de39 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Thu, 14 May 2020 17:24:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A5=E5=BF=97=EF=BC=8C?= =?UTF-8?q?=E4=BF=A1=E5=8F=B7=E6=9C=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/Signal/index.js | 18 ++++++++++++++++++ src/utils/stomp.js | 2 +- src/views/publish/publishLesson/index.vue | 4 ++-- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/jmapNew/shape/Signal/index.js b/src/jmapNew/shape/Signal/index.js index 7d5ff5f46..6e9fc6fb6 100644 --- a/src/jmapNew/shape/Signal/index.js +++ b/src/jmapNew/shape/Signal/index.js @@ -321,6 +321,12 @@ class Signal extends Group { this.lamps[0].setColor(this.style.Signal.lamp.grayColor); this.insideTriangle.show(); this.insideTriangle.setStyle({fill: this.style.Signal.lamp.redColor}); + setTimeout(()=> { + this.insideTriangle.setStyle({fill: '#000'}); + }, 500); + setTimeout(()=> { + this.insideTriangle.setStyle({fill: this.style.Signal.lamp.redColor}); + }, 1000); } } else { if (this.count == 2) { // 双灯 @@ -345,6 +351,12 @@ class Signal extends Group { this.lamps[0].setColor(this.style.Signal.lamp.grayColor); this.insideTriangle.show(); this.insideTriangle.setStyle({fill: this.style.Signal.lamp.greenColor}); + setTimeout(()=> { + this.insideTriangle.setStyle({fill: '#000'}); + }, 500); + setTimeout(()=> { + this.insideTriangle.setStyle({fill: this.style.Signal.lamp.greenColor}); + }, 1000); } } else { this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.greenColor); @@ -366,6 +378,12 @@ class Signal extends Group { this.lamps[0].setColor(this.style.Signal.lamp.grayColor); this.insideTriangle.show(); this.insideTriangle.setStyle({fill: this.style.Signal.lamp.yellowColor}); + setTimeout(()=> { + this.insideTriangle.setStyle({fill: '#000'}); + }, 1000); + setTimeout(()=> { + this.insideTriangle.setStyle({fill: this.style.Signal.lamp.yellowColor}); + }, 2000); } } else { this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.yellowColor); diff --git a/src/utils/stomp.js b/src/utils/stomp.js index b6a9b8fd9..2febbf668 100644 --- a/src/utils/stomp.js +++ b/src/utils/stomp.js @@ -22,7 +22,7 @@ export function creatSubscribe(topic, header) { function callback(Response) { if (store) { var data = JSON.parse(Response.body); - console.log(Response.body); + // console.log(Response.body); store.dispatch('socket/setStomp', data); } else { callback(Response); diff --git a/src/views/publish/publishLesson/index.vue b/src/views/publish/publishLesson/index.vue index 2fe2f9b43..c64889c4e 100644 --- a/src/views/publish/publishLesson/index.vue +++ b/src/views/publish/publishLesson/index.vue @@ -139,9 +139,9 @@ export default { this.$message.success(this.$t('publish.deleteSuccess')); this.reloadTable(); localStore.remove('mapId'); - }).catch(() => { + }).catch((error) => { this.reloadTable(); - this.$messageBox(this.$t('error.deleteFailed')); + this.$messageBox(this.$t('error.deleteFailed') + ':' + error.message); }); }).catch(() => { }); },