This commit is contained in:
joylink_cuiweidong 2020-05-25 15:43:58 +08:00
commit 40d7d960cf
28 changed files with 242 additions and 214 deletions

BIN
src/assets/SAFS.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

@ -315,12 +315,12 @@ export default {
centralized: '是否集中站:', centralized: '是否集中站:',
stationRunPlanName: '真实名称:', stationRunPlanName: '真实名称:',
stationVisible: '是否显示:', stationVisible: '是否显示:',
stationNameFont: '车站字体:', stationNameFont: '车站字体大小:',
stationNameFontColor: '车站字体颜色:', stationNameFontColor: '车站字体颜色:',
stationKmPostShow: '是否显示公里标名称:', stationKmPostShow: '是否显示公里标名称:',
stationKmRange: '公里标距离:', stationKmRange: '公里标距离:',
stationKmPost: '公里标名称:', stationKmPost: '公里标名称:',
stationKmPostFont: '公里标字体:', stationKmPostFont: '公里标字体大小:',
stationKmPostFontColor: '公里标字体颜色:', stationKmPostFontColor: '公里标字体颜色:',
stationPositionX: 'x坐标:', stationPositionX: 'x坐标:',
stationPositionY: 'y坐标:', stationPositionY: 'y坐标:',
@ -350,7 +350,7 @@ export default {
stationstandPosition: '车站坐标:', stationstandPosition: '车站坐标:',
subhead:'副标题:', subhead:'副标题:',
subheadDisplay:'是否显示副标题:', subheadDisplay:'是否显示副标题:',
subheadFont:'副标题字体:', subheadFont:'副标题字体大小:',
subheadFontColor:'副标题字体颜色:', subheadFontColor:'副标题字体颜色:',
subheadPosition:'副标题坐标:', subheadPosition:'副标题坐标:',
@ -377,7 +377,7 @@ export default {
textCode: '文字编码:', textCode: '文字编码:',
textContent: '文本内容:', textContent: '文本内容:',
textFont: '字体格式:', textFont: '字体大小:',
textFontColor: '字体颜色:', textFontColor: '字体颜色:',
trainCode: '列车编号:', trainCode: '列车编号:',

View File

@ -4,6 +4,7 @@ import deviceType from '../../constant/deviceType';
class SkinCode extends defaultStyle { class SkinCode extends defaultStyle {
constructor() { constructor() {
super(); super();
this.fontFamily = '宋体';
this[deviceType.Section] = { this[deviceType.Section] = {
active: { active: {
routeColor: false // 进路触发颜色 routeColor: false // 进路触发颜色

View File

@ -4,6 +4,7 @@ import deviceType from '../../constant/deviceType';
class SkinCode extends defaultStyle { class SkinCode extends defaultStyle {
constructor() { constructor() {
super(); super();
this.fontFamily = '宋体';
this[deviceType.Section] = { this[deviceType.Section] = {
active: { active: {
routeColor: false // 进路触发颜色 routeColor: false // 进路触发颜色

View File

@ -4,6 +4,7 @@ import deviceType from '../../constant/deviceType';
class SkinCode extends defaultStyle { class SkinCode extends defaultStyle {
constructor() { constructor() {
super(); super();
this.fontFamily = '宋体';
this[deviceType.Section] = { this[deviceType.Section] = {
active: { active: {
routeColor: true // 进路触发颜色 routeColor: true // 进路触发颜色

View File

@ -4,6 +4,7 @@ import deviceType from '../../constant/deviceType';
class SkinCode extends defaultStyle { class SkinCode extends defaultStyle {
constructor() { constructor() {
super(); super();
this.fontFamily = '宋体';
this[deviceType.Section] = { this[deviceType.Section] = {
active: { active: {
routeColor: false // 进路触发颜色 routeColor: false // 进路触发颜色

View File

@ -4,6 +4,7 @@ import deviceType from '../../constant/deviceType';
class SkinCode extends defaultStyle { class SkinCode extends defaultStyle {
constructor() { constructor() {
super(); super();
this.fontFamily = '宋体';
this[deviceType.Section] = { this[deviceType.Section] = {
active: { active: {
routeColor: false // 进路触发颜色 routeColor: false // 进路触发颜色

View File

@ -4,6 +4,7 @@ import deviceType from '../../constant/deviceType';
class SkinCode extends defaultStyle { class SkinCode extends defaultStyle {
constructor() { constructor() {
super(); super();
this.fontFamily = '宋体';
this[deviceType.Section] = { this[deviceType.Section] = {
active: { active: {
routeColor: false // 进路触发颜色 routeColor: false // 进路触发颜色

View File

@ -4,6 +4,7 @@ import deviceType from '../../constant/deviceType';
class SkinCode extends defaultStyle { class SkinCode extends defaultStyle {
constructor() { constructor() {
super(); super();
this.fontFamily = '宋体';
this[deviceType.Section] = { this[deviceType.Section] = {
active: { active: {
routeColor: false // 进路触发颜色 routeColor: false // 进路触发颜色

View File

@ -4,6 +4,7 @@ import deviceType from '../../constant/deviceType';
class SkinCode extends defaultStyle { class SkinCode extends defaultStyle {
constructor() { constructor() {
super(); super();
this.fontFamily = '宋体';
this[deviceType.Section] = { this[deviceType.Section] = {
active: { active: {
routeColor: false // 进路触发颜色 routeColor: false // 进路触发颜色

View File

@ -4,6 +4,7 @@ import deviceType from '../../constant/deviceType';
class SkinCode extends defaultStyle { class SkinCode extends defaultStyle {
constructor() { constructor() {
super(); super();
this.fontFamily = '宋体';
this[deviceType.Section] = { this[deviceType.Section] = {
active: { active: {
routeColor: false // 进路触发颜色 routeColor: false // 进路触发颜色

View File

@ -17,7 +17,7 @@ export default class EMouse extends Group {
y: this.device.model.position.y + this.device.style.LcControl.lamp.radiusR + this.device.style.LcControl.text.distance - 30, y: this.device.model.position.y + this.device.style.LcControl.lamp.radiusR + this.device.style.LcControl.text.distance - 30,
fontWeight: 'normal', fontWeight: 'normal',
fontSize: this.device.style.LcControl.mouseOverStyle.fontSize, fontSize: this.device.style.LcControl.mouseOverStyle.fontSize,
fontFamily: this.device.style.LcControl.mouseOverStyle.fontFamily, fontFamily: this.device.style.fontFamily,
text: this.device.model.name, text: this.device.model.name,
textFill: this.device.style.LcControl.mouseOverStyle.fontColor, textFill: this.device.style.LcControl.mouseOverStyle.fontColor,
textAlign: this.device.style.LcControl.mouseOverStyle.textAlign, textAlign: this.device.style.LcControl.mouseOverStyle.textAlign,

View File

@ -17,7 +17,7 @@ export default class EMouse extends Group {
y: this.device.model.position.y + this.device.style.LcControl.lamp.radiusR + this.device.style.LcControl.text.distance - 30, y: this.device.model.position.y + this.device.style.LcControl.lamp.radiusR + this.device.style.LcControl.text.distance - 30,
fontWeight: 'normal', fontWeight: 'normal',
fontSize: this.device.style.LcControl.mouseOverStyle.fontSize, fontSize: this.device.style.LcControl.mouseOverStyle.fontSize,
fontFamily: this.device.style.LcControl.mouseOverStyle.fontFamily, fontFamily: this.device.style.fontFamily,
text: this.device.model.name, text: this.device.model.name,
textFill: this.device.style.LcControl.mouseOverStyle.fontColor, textFill: this.device.style.LcControl.mouseOverStyle.fontColor,
textAlign: this.device.style.LcControl.mouseOverStyle.textAlign, textAlign: this.device.style.LcControl.mouseOverStyle.textAlign,

View File

@ -17,7 +17,7 @@ export default class EMouse extends Group {
y: this.device.model.position.y + this.device.style.LcControl.lamp.radiusR + this.device.style.LcControl.text.distance - 30, y: this.device.model.position.y + this.device.style.LcControl.lamp.radiusR + this.device.style.LcControl.text.distance - 30,
fontWeight: 'normal', fontWeight: 'normal',
fontSize: this.device.style.LcControl.mouseOverStyle.fontSize, fontSize: this.device.style.LcControl.mouseOverStyle.fontSize,
fontFamily: this.device.style.LcControl.mouseOverStyle.fontFamily, fontFamily: this.device.style.fontFamily,
text: this.device.model.name, text: this.device.model.name,
textFill: this.device.style.LcControl.mouseOverStyle.fontColor, textFill: this.device.style.LcControl.mouseOverStyle.fontColor,
textAlign: this.device.style.LcControl.mouseOverStyle.textAlign, textAlign: this.device.style.LcControl.mouseOverStyle.textAlign,

View File

@ -17,7 +17,7 @@ export default class EMouse extends Group {
y: this.device.model.position.y + this.device.style.LcControl.lamp.radiusR + this.device.style.LcControl.text.distance - 30, y: this.device.model.position.y + this.device.style.LcControl.lamp.radiusR + this.device.style.LcControl.text.distance - 30,
fontWeight: 'normal', fontWeight: 'normal',
fontSize: this.device.style.LcControl.mouseOverStyle.fontSize, fontSize: this.device.style.LcControl.mouseOverStyle.fontSize,
fontFamily: this.device.style.LcControl.mouseOverStyle.fontFamily, fontFamily: this.device.style.fontFamily,
text: this.device.model.name, text: this.device.model.name,
textFill: this.device.style.LcControl.mouseOverStyle.fontColor, textFill: this.device.style.LcControl.mouseOverStyle.fontColor,
textAlign: this.device.style.LcControl.mouseOverStyle.textAlign, textAlign: this.device.style.LcControl.mouseOverStyle.textAlign,

View File

@ -2,52 +2,52 @@ import Group from 'zrender/src/container/Group';
import Text from 'zrender/src/graphic/Text'; import Text from 'zrender/src/graphic/Text';
export default class EMouse extends Group { export default class EMouse extends Group {
constructor(device) { constructor(device) {
super(); super();
this.device = device; this.device = device;
this.create(); this.create();
} }
create() { create() {
this.text = new Text({ this.text = new Text({
zlevel: this.device.zlevel, zlevel: this.device.zlevel,
z: this.device.z+1, z: this.device.z + 1,
position: [0, 0], position: [0, 0],
style: { style: {
x: this.device.model.position.x, x: this.device.model.position.x,
y: this.device.model.position.y + this.device.style.LcControl.lamp.radiusR + this.device.style.LcControl.text.distance-30, y: this.device.model.position.y + this.device.style.LcControl.lamp.radiusR + this.device.style.LcControl.text.distance - 30,
fontWeight: 'normal', fontWeight: 'normal',
fontSize: this.device.style.LcControl.mouseOverStyle.fontSize, fontSize: this.device.style.LcControl.mouseOverStyle.fontSize,
fontFamily: this.device.style.LcControl.mouseOverStyle.fontFamily, fontFamily: this.device.style.fontFamily,
text: this.device.model.name, text: this.device.model.name,
textFill: this.device.style.LcControl.mouseOverStyle.fontColor, textFill: this.device.style.LcControl.mouseOverStyle.fontColor,
textAlign: this.device.style.LcControl.mouseOverStyle.textAlign, textAlign: this.device.style.LcControl.mouseOverStyle.textAlign,
textVerticalAlign: this.device.style.LcControl.mouseOverStyle.textVerticalAlign textVerticalAlign: this.device.style.LcControl.mouseOverStyle.textVerticalAlign
} }
}); });
this.add(this.text); this.add(this.text);
this.text.hide(); this.text.hide();
} }
mouseover(e) { mouseover(e) {
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.setTextBorder(true);
this.device.control.setArcBorder(true); this.device.control.setArcBorder(true);
} }
} }
mouseout(e) { mouseout(e) {
if (!this.device.model.down) { if (!this.device.model.down) {
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.setTextBorder(false);
this.device.control.setArcBorder(false); this.device.control.setArcBorder(false);
} }
} }
} }
} }

View File

@ -2,53 +2,53 @@ import Group from 'zrender/src/container/Group';
import Text from 'zrender/src/graphic/Text'; import Text from 'zrender/src/graphic/Text';
export default class EMouse extends Group { export default class EMouse extends Group {
constructor(device) { constructor(device) {
super(); super();
this.device = device; this.device = device;
this.create(); this.create();
} }
create() { create() {
this.text = new Text({ this.text = new Text({
_subType: 'Text', _subType: 'Text',
zlevel: this.device.zlevel, zlevel: this.device.zlevel,
z: this.device.z+1, z: this.device.z + 1,
position: [0, 0], position: [0, 0],
style: { style: {
x: this.device.model.position.x, x: this.device.model.position.x,
y: this.device.model.position.y + this.device.style.LimitControl.lamp.radiusR + this.device.style.LimitControl.text.distance-30, y: this.device.model.position.y + this.device.style.LimitControl.lamp.radiusR + this.device.style.LimitControl.text.distance - 30,
fontWeight: this.device.style.LimitControl.mouseOverStyle.fontWeight, fontWeight: this.device.style.LimitControl.mouseOverStyle.fontWeight,
fontSize: this.device.style.LimitControl.mouseOverStyle.fontSize, fontSize: this.device.style.LimitControl.mouseOverStyle.fontSize,
fontFamily: this.device.style.LimitControl.mouseOverStyle.fontFormat, fontFamily: this.device.style.fontFormat,
text: this.device.model.name, text: this.device.model.name,
textFill: this.device.style.LimitControl.mouseOverStyle.fontColor, textFill: this.device.style.LimitControl.mouseOverStyle.fontColor,
textAlign: this.device.style.LimitControl.mouseOverStyle.textAlign, textAlign: this.device.style.LimitControl.mouseOverStyle.textAlign,
textVerticalAlign: this.device.style.LimitControl.mouseOverStyle.textVerticalAlign textVerticalAlign: this.device.style.LimitControl.mouseOverStyle.textVerticalAlign
} }
}); });
this.add(this.text); this.add(this.text);
this.text.hide(); this.text.hide();
} }
mouseover(e) { mouseover(e) {
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.LimitControl.mouseOverStyle.arcColor); this.device.control.setControlColor(this.device.style.LimitControl.mouseOverStyle.arcColor);
this.device.control.setTextColor(this.device.style.LimitControl.mouseOverStyle.textColor); this.device.control.setTextColor(this.device.style.LimitControl.mouseOverStyle.textColor);
this.device.control.setTextBorder(true); this.device.control.setTextBorder(true);
this.device.control.setArcBorder(true); this.device.control.setArcBorder(true);
} }
} }
mouseout(e) { mouseout(e) {
if (!this.device.model.down) { if (!this.device.model.down) {
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.LimitControl.lamp.controlColor); this.device.control.setControlColor(this.device.style.LimitControl.lamp.controlColor);
this.device.control.setTextColor('#FFFFFF'); this.device.control.setTextColor('#FFFFFF');
this.device.control.setTextBorder(false); this.device.control.setTextBorder(false);
this.device.control.setArcBorder(false); this.device.control.setArcBorder(false);
} }
} }
} }
} }

View File

@ -17,7 +17,7 @@ export default class EMouse extends Group {
y: this.device.model.position.y + this.device.deviceStyle.lamp.radiusR + this.device.deviceStyle.text.distance - 30, y: this.device.model.position.y + this.device.deviceStyle.lamp.radiusR + this.device.deviceStyle.text.distance - 30,
fontWeight: 'normal', fontWeight: 'normal',
fontSize: this.device.deviceStyle.mouseOverStyle.fontSize, fontSize: this.device.deviceStyle.mouseOverStyle.fontSize,
fontFamily: this.device.deviceStyle.mouseOverStyle.fontFamily, fontFamily: this.device.style.fontFamily,
text: this.device.model.name, text: this.device.model.name,
textFill: this.device.deviceStyle.mouseOverStyle.fontColor, textFill: this.device.deviceStyle.mouseOverStyle.fontColor,
textAlign: this.device.deviceStyle.mouseOverStyle.textAlign, textAlign: this.device.deviceStyle.mouseOverStyle.textAlign,

View File

@ -59,6 +59,7 @@ class EMouse extends Group {
x: rect.x + (rect.width / 2), x: rect.x + (rect.width / 2),
y: rect.y + (rect.height / 2), y: rect.y + (rect.height / 2),
text: this.device.model.name, text: this.device.model.name,
fontFamily: this.device.style.fontFamily,
textFill: this.device.style.Section.mouseOverStyle.textShadowColor, // 黄色 textFill: this.device.style.Section.mouseOverStyle.textShadowColor, // 黄色
textAlign: 'middle', textAlign: 'middle',
textVerticalAlign: 'top', textVerticalAlign: 'top',

View File

@ -53,7 +53,7 @@ export default class ESingleControl extends Group {
y: model.point.y + model.style.Station.StationControl.lamp.radiusR + model.style.Station.StationControl.text.distance, y: model.point.y + model.style.Station.StationControl.lamp.radiusR + model.style.Station.StationControl.text.distance,
fontWeight: model.style.Station.StationControl.text.fontWeight, fontWeight: model.style.Station.StationControl.text.fontWeight,
fontSize: model.style.Station.StationControl.text.fontSize, fontSize: model.style.Station.StationControl.text.fontSize,
fontFamily: model.style.Station.StationControl.text.fontFormat, fontFamily: model.style.fontFamily,
text: model.context, text: model.context,
textFill: model.style.Station.StationControl.text.fontColor, textFill: model.style.Station.StationControl.text.fontColor,
textAlign: model.style.Station.StationControl.text.textAlign, textAlign: model.style.Station.StationControl.text.textAlign,

View File

@ -36,6 +36,7 @@ export default class Station extends Group {
if (model.visible) { if (model.visible) {
// 公里标名称是否显示 // 公里标名称是否显示
console.log(model.nameFont);
this.stationText = new ETextName({ this.stationText = new ETextName({
zlevel: this.zlevel, zlevel: this.zlevel,
z: this.z, z: this.z,

View File

@ -23,7 +23,8 @@ class EDetain extends Group {
x: model.x, x: model.x,
y: model.y, y: model.y,
text: style.StationStand.detainCar.text, text: style.StationStand.detainCar.text,
fontSize: `${style.StationStand.detainCar.fontSize} px ${style.fontFamily}`, fontSize: `${style.StationStand.detainCar.fontSize}px`,
fontFamily: style.fontFamily,
textFill: style.StationStand.detainCar.centerTrainColor, textFill: style.StationStand.detainCar.centerTrainColor,
textStroke: style.backgroundColor, textStroke: style.backgroundColor,
textAlign: style.textStyle.textAlign, textAlign: style.textStyle.textAlign,

View File

@ -59,7 +59,7 @@ export default class TrainBody extends Group {
text: style.Train.hsda.textHContent, text: style.Train.hsda.textHContent,
textFill: style.trainYellowColor, textFill: style.trainYellowColor,
fontSize: style.Train.hsda.trainHSDATextFontSize, fontSize: style.Train.hsda.trainHSDATextFontSize,
fontFamily: style.Train.common.fontFamily, fontFamily: style.fontFamily,
textAlign: 'middle', textAlign: 'middle',
textVerticalAlign: 'top' textVerticalAlign: 'top'
}) : ''; }) : '';
@ -71,7 +71,7 @@ export default class TrainBody extends Group {
text: style.Train.hsda.textSContent, text: style.Train.hsda.textSContent,
textFill: style.trainBlueColor, textFill: style.trainBlueColor,
fontSize: style.Train.hsda.trainHSDATextFontSize, fontSize: style.Train.hsda.trainHSDATextFontSize,
fontFamily: style.Train.common.fontFamily, fontFamily: style.fontFamily,
textAlign: 'middle', textAlign: 'middle',
textVerticalAlign: 'top' textVerticalAlign: 'top'
}) : ''; }) : '';
@ -83,7 +83,7 @@ export default class TrainBody extends Group {
text: style.Train.hsda.textDContent, text: style.Train.hsda.textDContent,
textFill: style.trainGreenColor, textFill: style.trainGreenColor,
fontSize: style.Train.hsda.trainHSDATextFontSize, fontSize: style.Train.hsda.trainHSDATextFontSize,
fontFamily: style.Train.common.fontFamily, fontFamily: style.fontFamily,
textAlign: 'middle', textAlign: 'middle',
textVerticalAlign: 'top' textVerticalAlign: 'top'
}) : ''; }) : '';
@ -95,7 +95,7 @@ export default class TrainBody extends Group {
text: style.Train.hsda.textAContent, text: style.Train.hsda.textAContent,
textFill: style.trainRedColor, textFill: style.trainRedColor,
fontSize: style.Train.hsda.trainHSDATextFontSize, fontSize: style.Train.hsda.trainHSDATextFontSize,
fontFamily: style.Train.common.fontFamily, fontFamily: style.fontFamily,
textAlign: 'middle', textAlign: 'middle',
textVerticalAlign: 'top' textVerticalAlign: 'top'
}) : ''; }) : '';
@ -113,7 +113,7 @@ export default class TrainBody extends Group {
text: serviceNumber.substring(serviceNumber.length - style.Train.trainServer.serviceNumberPrefix.length), text: serviceNumber.substring(serviceNumber.length - style.Train.trainServer.serviceNumberPrefix.length),
textFill: model.style.Train.trainServer.fontColor || style.trainTextColor, textFill: model.style.Train.trainServer.fontColor || style.trainTextColor,
fontSize: model.fontSize, fontSize: model.fontSize,
fontFamily: style.Train.common.fontFamily, fontFamily: style.fontFamily,
textAlign: 'left', textAlign: 'left',
textVerticalAlign: 'top' textVerticalAlign: 'top'
}); });
@ -125,7 +125,7 @@ export default class TrainBody extends Group {
text: tripNumber.substring(tripNumber.length - style.Train.trainTarget.tripNumberPrefix.length), text: tripNumber.substring(tripNumber.length - style.Train.trainTarget.tripNumberPrefix.length),
textFill: model.style.Train.trainTarget.fontColor || style.trainTextColor, textFill: model.style.Train.trainTarget.fontColor || style.trainTextColor,
fontSize: model.fontSize, fontSize: model.fontSize,
fontFamily: style.Train.common.fontFamily, fontFamily: style.fontFamily,
textAlign: 'left', textAlign: 'left',
textVerticalAlign: 'top' textVerticalAlign: 'top'
}); });
@ -139,7 +139,7 @@ export default class TrainBody extends Group {
textStroke: style.trainTextColor, textStroke: style.trainTextColor,
textStrokeWidth: 0, textStrokeWidth: 0,
fontSize: model.fontSize, fontSize: model.fontSize,
fontFamily: style.Train.common.fontFamily, fontFamily: style.fontFamily,
textAlign: 'left', textAlign: 'left',
textVerticalAlign: 'top' textVerticalAlign: 'top'
}); });
@ -153,7 +153,7 @@ export default class TrainBody extends Group {
textStroke: style.trainTextColor, textStroke: style.trainTextColor,
textStrokeWidth: 0, textStrokeWidth: 0,
fontSize: model.fontSize, fontSize: model.fontSize,
fontFamily: style.Train.common.fontFamily, fontFamily: style.fontFamily,
textAlign: 'left', textAlign: 'left',
textVerticalAlign: 'top' textVerticalAlign: 'top'
}); });
@ -193,7 +193,7 @@ export default class TrainBody extends Group {
textStroke: style.trainTextColor, textStroke: style.trainTextColor,
textStrokeWidth: 0, textStrokeWidth: 0,
fontSize: model.fontSize, fontSize: model.fontSize,
fontFamily: style.Train.common.fontFamily, fontFamily: style.fontFamily,
textAlign: 'left', textAlign: 'left',
textVerticalAlign: 'top' textVerticalAlign: 'top'
}); });
@ -210,7 +210,7 @@ export default class TrainBody extends Group {
textStroke: style.trainTextColor, textStroke: style.trainTextColor,
textStrokeWidth: 0, textStrokeWidth: 0,
fontSize: model.fontSize, fontSize: model.fontSize,
fontFamily: style.Train.common.fontFamily, fontFamily: style.fontFamily,
textAlign: 'left', textAlign: 'left',
textVerticalAlign: 'top' textVerticalAlign: 'top'
}); });
@ -227,7 +227,7 @@ export default class TrainBody extends Group {
textStroke: style.trainTextColor, textStroke: style.trainTextColor,
textStrokeWidth: 0, textStrokeWidth: 0,
fontSize: model.fontSize, fontSize: model.fontSize,
fontFamily: style.Train.common.fontFamily, fontFamily: style.fontFamily,
textAlign: 'left', textAlign: 'left',
textVerticalAlign: 'top' textVerticalAlign: 'top'
}); });
@ -244,7 +244,7 @@ export default class TrainBody extends Group {
textStroke: style.trainTextColor, textStroke: style.trainTextColor,
textStrokeWidth: 0, textStrokeWidth: 0,
fontSize: model.fontSize, fontSize: model.fontSize,
fontFamily: style.Train.common.fontFamily, fontFamily: style.fontFamily,
textAlign: 'left', textAlign: 'left',
textVerticalAlign: 'top' textVerticalAlign: 'top'
}); });

View File

@ -2,53 +2,53 @@ import Group from 'zrender/src/container/Group';
import Text from 'zrender/src/graphic/Text'; import Text from 'zrender/src/graphic/Text';
export default class EMouse extends Group { export default class EMouse extends Group {
constructor(device) { constructor(device) {
super(); super();
this.device = device; this.device = device;
this.create(); this.create();
} }
create() { create() {
this.text = new Text({ this.text = new Text({
_subType: 'Text', _subType: 'Text',
zlevel: this.device.zlevel, zlevel: this.device.zlevel,
z: this.device.z+1, z: this.device.z + 1,
position: [0, 0], position: [0, 0],
style: { style: {
x: this.device.model.position.x, x: this.device.model.position.x,
y: this.device.model.position.y + this.device.style.ZcControl.lamp.radiusR + this.device.style.ZcControl.text.distance-30, y: this.device.model.position.y + this.device.style.ZcControl.lamp.radiusR + this.device.style.ZcControl.text.distance - 30,
fontWeight: this.device.style.ZcControl.mouseOverStyle.fontWeight, fontWeight: this.device.style.ZcControl.mouseOverStyle.fontWeight,
fontSize: this.device.style.ZcControl.mouseOverStyle.fontSize, fontSize: this.device.style.ZcControl.mouseOverStyle.fontSize,
fontFamily: this.device.style.ZcControl.mouseOverStyle.fontFormat, fontFamily: this.device.style.fontFamily,
text: this.device.model.name, text: this.device.model.name,
textFill: this.device.style.ZcControl.mouseOverStyle.fontColor, textFill: this.device.style.ZcControl.mouseOverStyle.fontColor,
textAlign: this.device.style.ZcControl.mouseOverStyle.textAlign, textAlign: this.device.style.ZcControl.mouseOverStyle.textAlign,
textVerticalAlign: this.device.style.ZcControl.mouseOverStyle.textVerticalAlign textVerticalAlign: this.device.style.ZcControl.mouseOverStyle.textVerticalAlign
} }
}); });
this.add(this.text); this.add(this.text);
this.text.hide(); this.text.hide();
} }
mouseover(e) { mouseover(e) {
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.ZcControl.mouseOverStyle.arcColor); this.device.control.setControlColor(this.device.style.ZcControl.mouseOverStyle.arcColor);
this.device.control.setTextColor(this.device.style.ZcControl.mouseOverStyle.textColor); this.device.control.setTextColor(this.device.style.ZcControl.mouseOverStyle.textColor);
this.device.control.setTextBorder(true); this.device.control.setTextBorder(true);
this.device.control.setArcBorder(true); this.device.control.setArcBorder(true);
} }
} }
mouseout(e) { mouseout(e) {
if (!this.device.model.down) { if (!this.device.model.down) {
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.ZcControl.lamp.controlColor); this.device.control.setControlColor(this.device.style.ZcControl.lamp.controlColor);
this.device.control.setTextColor('#FFFFFF'); this.device.control.setTextColor('#FFFFFF');
this.device.control.setTextBorder(false); this.device.control.setTextBorder(false);
this.device.control.setArcBorder(false); this.device.control.setArcBorder(false);
} }
} }
} }
} }

View File

@ -1,71 +1,70 @@
<template> <template>
<div class="font_box"> <div class="font_box">
<el-select v-model="font" :placeholder="$t('global.font')" @input="$emit('input', inputValue)"> <!-- <el-select v-model="font" :placeholder="$t('global.font')" @input="$emit('input', inputValue)">
<el-option v-for="option in fontList" :key="option.code" :label="option.name" :value="option.code" /> <el-option v-for="option in fontList" :key="option.code" :label="option.name" :value="option.code" />
</el-select> </el-select> -->
<el-select v-model="size" :placeholder="$t('global.size')" @input="$emit('input', inputValue)"> <el-select v-model="size" :placeholder="$t('global.size')" @input="$emit('input', inputValue)">
<el-option v-for="option in sizeList" :key="option.code" :label="option.name" :value="option.code" /> <el-option v-for="option in sizeList" :key="option.code" :label="option.name" :value="option.code" />
</el-select><br> </el-select><br>
<div class="format"> <!-- <div class="format">
<span :style="{'font-family': font, 'font-size': size}">{{ text }}</span> <span :style="{'font-family': font, 'font-size': size}">{{ text }}</span>
</div> </div> -->
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: 'ElFont', name: 'ElFont',
props: [ props: ['value'],
'value'
],
data() { data() {
return { return {
fontList: [ // fontList: [
{ code: 'consolas', name: 'consolas' }, // { code: 'consolas', name: 'consolas' },
{ code: 'sans-serif', name: 'sans-serif' }, // { code: 'sans-serif', name: 'sans-serif' },
{ code: 'STHeiti', name: '华文黑体' }, // { code: 'STHeiti', name: '' },
{ code: 'FangSong', name: '仿宋' } // { code: 'FangSong', name: '仿' }
], // ],
sizeList: [ sizeList: [
{ code: '0px', name: '0px' }, { code: '0', name: '0px' },
{ code: '4px', name: '4px' }, { code: '4', name: '4px' },
{ code: '6px', name: '6px' }, { code: '6', name: '6px' },
{ code: '8px', name: '8px' }, { code: '8', name: '8px' },
{ code: '10px', name: '10px' }, { code: '10', name: '10px' },
{ code: '12px', name: '12px' }, { code: '12', name: '12px' },
{ code: '14px', name: '14px' }, { code: '14', name: '14px' },
{ code: '16px', name: '16px' }, { code: '16', name: '16px' },
{ code: '18px', name: '18px' }, { code: '18', name: '18px' },
{ code: '20px', name: '20px' }, { code: '20', name: '20px' },
{ code: '22px', name: '22px' }, { code: '22', name: '22px' },
{ code: '24px', name: '24px' }, { code: '24', name: '24px' },
{ code: '26px', name: '26px' }, { code: '26', name: '26px' },
{ code: '28px', name: '28px' }, { code: '28', name: '28px' },
{ code: '30px', name: '30px' }, { code: '30', name: '30px' },
{ code: '32px', name: '32px' }, { code: '32', name: '32px' },
{ code: '34px', name: '34px' }, { code: '34', name: '34px' },
{ code: '36px', name: '36px' }, { code: '36', name: '36px' },
{ code: '38px', name: '38px' }, { code: '38', name: '38px' },
{ code: '40px', name: '40px' } { code: '40', name: '40px' }
], ],
size: '10px', size: '10px',
font: 'consolas', // font: 'consolas',
text: 'hello world' text: 'hello world'
}; };
}, },
computed: { computed: {
inputValue: function () { inputValue: function () {
return this.size + ' ' + this.font; return this.size;
} }
}, },
watch: { watch: {
value(val) { value(val) {
if (val !== this.inputValue && val) { if (val !== this.inputValue && val) {
const arr = val.split(' '); this.size = val;
if (arr && arr.length >= 2) { // const arr = val.split(' ');
this.size = arr[0]; // if (arr && arr.length >= 2) {
this.font = arr[1]; // this.size = arr[0];
} // this.font = arr[1];
// }
} }
} }
}, },
@ -79,7 +78,7 @@ export default {
background-color: #C0C4CC; background-color: #C0C4CC;
width: 100%; width: 100%;
display: flex; display: flex;
padding-left: 15px; padding-left: 15px;
} }
.font_box{ .font_box{
/deep/ { /deep/ {

View File

@ -55,10 +55,12 @@
</template> </template>
<template v-else> <template v-else>
<div v-if="flag" class="apply_box"> <div v-if="flag" class="apply_box">
<div class="img_box"><img :src="SAFS" alt=""></div>
<i class="el-icon-success" style="color: green; font-size: 40px;" /> <i class="el-icon-success" style="color: green; font-size: 40px;" />
<span class="title">报名成功!</span> <span class="title">报名成功!</span>
</div> </div>
<div v-if="!flag" class="applyAready_box"> <div v-if="!flag" class="applyAready_box">
<div class="img_box"><img :src="SAFS" alt=""></div>
<div><img :src="applyAlready" class="applyAlready"></div> <div><img :src="applyAlready" class="applyAlready"></div>
<div><span style="margin-left:10px;">请按时参加竞赛</span></div> <div><span style="margin-left:10px;">请按时参加竞赛</span></div>
</div> </div>
@ -77,6 +79,7 @@ import { getUserinfoMobileCode } from '@/api/management/user';
import { postSignUp } from '@/api/competition'; import { postSignUp } from '@/api/competition';
import { getIsSignUp } from '@/api/competition'; import { getIsSignUp } from '@/api/competition';
import applyAlready from '@/assets/applyAlready.png'; import applyAlready from '@/assets/applyAlready.png';
import SAFS from '@/assets/SAFS.png';
export default { export default {
name: '', name: '',
@ -97,6 +100,7 @@ export default {
} }
}; };
return { return {
SAFS: SAFS,
dialogVisible: false, dialogVisible: false,
applyAlready:applyAlready, applyAlready:applyAlready,
applyFlag: true, applyFlag: true,
@ -384,10 +388,12 @@ export default {
.applyAlready{ .applyAlready{
width:150px; width:150px;
} }
.applyAready_box{
padding-top: 95px;
}
.applyAready_box div{ .applyAready_box div{
width:100%; width:100%;
text-align:center; text-align:center;
margin-top: 150px;
font-size: 25px; font-size: 25px;
} }
.dictionary_box{ .dictionary_box{
@ -403,11 +409,22 @@ export default {
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
} }
} }
.img_box{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 80px;
img{
width: 100%;
height: 100%;
}
}
.apply_box{ .apply_box{
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
margin-top: 50px; margin-top: 95px;
font-size: 25px; font-size: 25px;
.title{ .title{
margin-left: 7px; margin-left: 7px;

View File

@ -70,10 +70,10 @@
<div style="height: 100%;"> <div style="height: 100%;">
<el-scrollbar wrap-class="scrollbar-wrapper"> <el-scrollbar wrap-class="scrollbar-wrapper">
<el-form ref="oprt" :model="allModel" label-width="130px" size="mini"> <el-form ref="oprt" :model="allModel" label-width="130px" size="mini">
<el-form-item label="车站字体:" prop="nameFont"> <el-form-item label="车站字体大小:" prop="nameFont">
<el-font v-model="allModel.nameFont" :placeholder="this.$t('tip.stationFont')" /> <el-font v-model="allModel.nameFont" :placeholder="this.$t('tip.stationFont')" />
</el-form-item> </el-form-item>
<el-form-item label="公里标字体:" prop="kmPostFont"> <el-form-item label="公里标字体大小:" prop="kmPostFont">
<el-font v-model="allModel.kmPostFont" :placeholder="this.$t('tip.stationFont')" /> <el-font v-model="allModel.kmPostFont" :placeholder="this.$t('tip.stationFont')" />
</el-form-item> </el-form-item>
<el-form-item label="车站Y坐标:" prop="positionY"> <el-form-item label="车站Y坐标:" prop="positionY">
@ -421,11 +421,11 @@ export default {
zcCode: '', zcCode: '',
runPlanName: '', runPlanName: '',
visible: true, visible: true,
nameFont: '22px consolas', nameFont: '22',
nameFontColor: '#FFFFFF', nameFontColor: '#FFFFFF',
kmPost: '1000km~2000km', kmPost: '1000km~2000km',
kmPostShow: true, kmPostShow: true,
kmPostFont: '8px consolas', kmPostFont: '8',
kmPostFontColor: '#FFFFFF', kmPostFontColor: '#FFFFFF',
kilometerPosition: { x: 0, y: 0 }, kilometerPosition: { x: 0, y: 0 },
centralized: false, centralized: false,

View File

@ -206,7 +206,7 @@ export default {
const model = { const model = {
_type: 'Text', _type: 'Text',
code: getUID('Text', this.textList), code: getUID('Text', this.textList),
font: '14px consolas', font: '14',
fontColor: '#FFFFFF', fontColor: '#FFFFFF',
content: `${this.addModel.prepend}::${this.addModel.content}`, content: `${this.addModel.prepend}::${this.addModel.content}`,
position: { position: {