功能按钮代码调整

This commit is contained in:
joylink_cuiweidong 2020-03-17 18:59:51 +08:00
parent c01b261638
commit 3beb346ce1
5 changed files with 22 additions and 18 deletions

View File

@ -31,10 +31,8 @@ export default class EMouse extends Group {
if (e.target && e.target._subType == 'Text') { if (e.target && e.target._subType == 'Text') {
this.text.show(); this.text.show();
} else { } else {
// this.device.control.setControlColor(this.device.style.LcControl.mouseOverStyle.arcColor); // this.device.setControlColor(this.device.style.LcControl.mouseOverStyle.arcColor);
this.device.control.setTextColor(this.device.style.LcControl.mouseOverStyle.textColor); // this.device.setTextColor(this.device.style.LcControl.mouseOverStyle.textColor);
this.device.control.setTextBorder(true);
this.device.control.setArcBorder(true);
} }
} }
@ -43,10 +41,8 @@ export default class EMouse extends Group {
if (e.target && e.target._subType == 'Text') { if (e.target && e.target._subType == 'Text') {
this.text.hide(); this.text.hide();
} else { } else {
// this.device.control.setControlColor(this.device.style.LcControl.lamp.controlColor); // this.device.setControlColor(this.device.style.LcControl.lamp.controlColor);
this.device.control.setTextColor('#FFFFFF'); // this.device.setTextColor('#FFFFFF');
this.device.control.setTextBorder(false);
this.device.control.setArcBorder(false);
} }
} }
} }

View File

@ -170,4 +170,15 @@ export default class Automactic extends Group {
this.subtitleText && this.subtitleText.hide(); this.subtitleText && this.subtitleText.hide();
this.arcBorder && this.arcBorder.hide(); this.arcBorder && this.arcBorder.hide();
} }
setControlColor(color) {
if (color) {
this.control.setStyle('fill', color);
}
}
setTextColor(color) {
if (color) {
this.text.setStyle('textFill', color);
}
}
} }

View File

@ -31,10 +31,8 @@ export default class EMouse extends Group {
if (e.target && e.target._subType == 'Text') { if (e.target && e.target._subType == 'Text') {
this.text.show(); this.text.show();
} else { } else {
this.device.control.setControlColor(this.device.style.LcControl.mouseOverStyle.arcColor); // this.device.control.setControlColor(this.device.style.LcControl.mouseOverStyle.arcColor);
this.device.control.setTextColor(this.device.style.LcControl.mouseOverStyle.textColor); // this.device.control.setTextColor(this.device.style.LcControl.mouseOverStyle.textColor);
this.device.control.setTextBorder(true);
this.device.control.setArcBorder(true);
} }
} }
@ -43,10 +41,8 @@ export default class EMouse extends Group {
if (e.target && e.target._subType == 'Text') { if (e.target && e.target._subType == 'Text') {
this.text.hide(); this.text.hide();
} else { } else {
this.device.control.setControlColor(this.device.style.LcControl.lamp.controlColor); // this.device.control.setControlColor(this.device.style.LcControl.lamp.controlColor);
this.device.control.setTextColor('#FFFFFF'); // this.device.control.setTextColor('#FFFFFF');
this.device.control.setTextBorder(false);
this.device.control.setArcBorder(false);
} }
} }
} }

View File

@ -253,9 +253,10 @@ export default {
this.getAutoMaticList(); this.getAutoMaticList();
}, },
deviceSelect(selected) { deviceSelect(selected) {
debugger;
this.$refs.dataform.resetFields(); this.$refs.dataform.resetFields();
this.$refs.make.resetFields(); this.$refs.make.resetFields();
if (selected && selected._type.toUpperCase() == 'AutomaticRoute'.toUpperCase() || selected._type.toUpperCase() == 'MapCycleButtonVO'.toUpperCase() || selected._type.toUpperCase() == 'AxleReset'.toUpperCase() || selected._type.toUpperCase() == 'LimitControl'.toUpperCase()) { if (selected && selected._type.toUpperCase() == 'AutomaticRoute'.toUpperCase() || selected._type.toUpperCase() == 'MapCycleButtonVO'.toUpperCase() || selected._type.toUpperCase() == 'AxleReset'.toUpperCase() || selected._type.toUpperCase() == 'LimitControl'.toUpperCase() || selected._type.toUpperCase() == 'GuideLock'.toUpperCase()) {
this.activeName = 'first'; this.activeName = 'first';
this.editModel = deepAssign(this.editModel, selected); this.editModel = deepAssign(this.editModel, selected);
this.editModel.type = selected._type; this.editModel.type = selected._type;

View File

@ -301,7 +301,7 @@ export default {
this.enabledTab = 'Esp'; this.enabledTab = 'Esp';
} else if (this.feild) { } else if (this.feild) {
this.enabledTab = 'Section'; this.enabledTab = 'Section';
} else if (type == 'AutomaticRoute' || type == 'MapCycleButtonVO' || type == 'AxleReset' || type == 'LimitControl') { } else if (type == 'AutomaticRoute' || type == 'MapCycleButtonVO' || type == 'AxleReset' || type == 'LimitControl' || type == 'GuideLock') {
this.enabledTab = 'ControlDraft'; this.enabledTab = 'ControlDraft';
} else { } else {
this.enabledTab = type; this.enabledTab = type;