删除日志,信号机调整

This commit is contained in:
fan 2020-05-14 17:24:35 +08:00
parent 5ef9b0aaaf
commit 027fe43467
3 changed files with 21 additions and 3 deletions

View File

@ -321,6 +321,12 @@ class Signal extends Group {
this.lamps[0].setColor(this.style.Signal.lamp.grayColor); this.lamps[0].setColor(this.style.Signal.lamp.grayColor);
this.insideTriangle.show(); this.insideTriangle.show();
this.insideTriangle.setStyle({fill: this.style.Signal.lamp.redColor}); 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 { } else {
if (this.count == 2) { // 双灯 if (this.count == 2) { // 双灯
@ -345,6 +351,12 @@ class Signal extends Group {
this.lamps[0].setColor(this.style.Signal.lamp.grayColor); this.lamps[0].setColor(this.style.Signal.lamp.grayColor);
this.insideTriangle.show(); this.insideTriangle.show();
this.insideTriangle.setStyle({fill: this.style.Signal.lamp.greenColor}); 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 { } else {
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.greenColor); 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.lamps[0].setColor(this.style.Signal.lamp.grayColor);
this.insideTriangle.show(); this.insideTriangle.show();
this.insideTriangle.setStyle({fill: this.style.Signal.lamp.yellowColor}); 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 { } else {
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.yellowColor); this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.yellowColor);

View File

@ -22,7 +22,7 @@ export function creatSubscribe(topic, header) {
function callback(Response) { function callback(Response) {
if (store) { if (store) {
var data = JSON.parse(Response.body); var data = JSON.parse(Response.body);
console.log(Response.body); // console.log(Response.body);
store.dispatch('socket/setStomp', data); store.dispatch('socket/setStomp', data);
} else { } else {
callback(Response); callback(Response);

View File

@ -139,9 +139,9 @@ export default {
this.$message.success(this.$t('publish.deleteSuccess')); this.$message.success(this.$t('publish.deleteSuccess'));
this.reloadTable(); this.reloadTable();
localStore.remove('mapId'); localStore.remove('mapId');
}).catch(() => { }).catch((error) => {
this.reloadTable(); this.reloadTable();
this.$messageBox(this.$t('error.deleteFailed')); this.$messageBox(this.$t('error.deleteFailed') + ':' + error.message);
}); });
}).catch(() => { }); }).catch(() => { });
}, },