diff --git a/src/jmapNew/config/skinCode/bejing_01.js b/src/jmapNew/config/skinCode/bejing_01.js index ef8770859..0cee4be8e 100644 --- a/src/jmapNew/config/skinCode/bejing_01.js +++ b/src/jmapNew/config/skinCode/bejing_01.js @@ -494,7 +494,8 @@ class SkinCode extends defaultStyle { }, lamp: { radiusR: 6, // 灯大小 - controlColor: '#00FF00' // 灯颜色 + controlColor: '#00FF00', // 灯颜色 + activeColor:'#ff0000' // 控制灯激活颜色 }, mouseOverStyle: { fontSize: 10, diff --git a/src/jmapNew/config/skinCode/chengdu_01.js b/src/jmapNew/config/skinCode/chengdu_01.js index aa9e114b0..725492b1e 100644 --- a/src/jmapNew/config/skinCode/chengdu_01.js +++ b/src/jmapNew/config/skinCode/chengdu_01.js @@ -449,7 +449,8 @@ class SkinCode extends defaultStyle { }, lamp: { radiusR: 6, // 控制灯大小 - controlColor: '#00FF00' // 控制灯颜色 + controlColor: '#00FF00', // 控制灯颜色 + activeColor:'#ff0000' // 控制灯激活颜色 } }; diff --git a/src/jmapNew/config/skinCode/ningbo_01.js b/src/jmapNew/config/skinCode/ningbo_01.js index 3e2aeab49..5a66a2e8a 100644 --- a/src/jmapNew/config/skinCode/ningbo_01.js +++ b/src/jmapNew/config/skinCode/ningbo_01.js @@ -487,7 +487,8 @@ class SkinCode extends defaultStyle { }, lamp: { radiusR: 6, // 控制灯大小 - controlColor: '#00FF00' // 控制灯颜色 + controlColor: '#00FF00', // 控制灯颜色 + activeColor:'#ff0000' // 控制灯激活颜色 } }; diff --git a/src/jmapNew/shape/ZcControl/index.js b/src/jmapNew/shape/ZcControl/index.js index a5bf38970..6be973b52 100644 --- a/src/jmapNew/shape/ZcControl/index.js +++ b/src/jmapNew/shape/ZcControl/index.js @@ -61,8 +61,23 @@ export default class ZcControl extends Group { // 设置状态 setState(model) { + this.recover(); + model.fault == 'FAULT' && this.fault(); if (!this.isShowShape) return; } + + recover() { + if (this.style.ZcControl.visible) { + this.control.setControlColor(this.style.ZcControl.lamp.controlColor); + } + } + + fault() { + if (this.style.ZcControl.visible) { + this.control.setControlColor(this.style.ZcControl.lamp.activeColor); + } + } + createMouseEvent() { if (this.style.ZcControl.mouseOverStyle) { this.mouseEvent = new EMouse(this);