修改皮肤配置
This commit is contained in:
parent
d4b995675d
commit
7573e30a31
@ -16,7 +16,7 @@ export default class defaultStyle {
|
||||
this.textFontSize = 10;
|
||||
|
||||
/** 默认字体 族类*/
|
||||
this.textFontFormat = 'consolas';
|
||||
this.fontFamily = 'consolas';
|
||||
|
||||
/** 默认字体颜色*/
|
||||
this.textFontColor = '#C0C0C0';
|
||||
|
@ -329,6 +329,7 @@ class SkinStyle extends defaultStyle {
|
||||
this[deviceType.LcControl] = {
|
||||
text: {
|
||||
fontSize: 10, // 灯字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
@ -350,6 +351,7 @@ class SkinStyle extends defaultStyle {
|
||||
this[deviceType.ZcControl] = {
|
||||
text: {
|
||||
fontSize: 10, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
@ -371,6 +373,7 @@ class SkinStyle extends defaultStyle {
|
||||
this[deviceType.LimitControl] = {
|
||||
text: {
|
||||
fontSize: 10, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
@ -463,7 +466,7 @@ class SkinStyle extends defaultStyle {
|
||||
trainHeadDistance: 4, // 列车和车头之间的间距
|
||||
trainWidth: 40, // 列车长度
|
||||
trainTextFontSize: 12, // 列车字号
|
||||
textFontFormat: 'consolas', // 默认字体 族类
|
||||
fontFamily: 'consolas', // 默认字体 族类
|
||||
haveTextHSDA: true, // 是否需创建textHSDA对象
|
||||
haveArrowText: true, // 是否需创建arrowText对象
|
||||
haveTrainBorder: false// 是否需创建trainBorder对象
|
||||
|
@ -321,6 +321,7 @@ class SkinStyle extends defaultStyle {
|
||||
this[deviceType.LcControl] = {
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
@ -332,6 +333,7 @@ class SkinStyle extends defaultStyle {
|
||||
this[deviceType.ZcControl] = {
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
@ -343,6 +345,7 @@ class SkinStyle extends defaultStyle {
|
||||
this[deviceType.LimitControl] = {
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
@ -430,7 +433,7 @@ class SkinStyle extends defaultStyle {
|
||||
trainHeadDistance: 4, // 列车和车头之间的间距
|
||||
trainWidth: 48, // 列车长度
|
||||
trainTextFontSize: 12, // 列车字号
|
||||
textFontFormat: 'consolas', // 默认字体 族类
|
||||
fontFamily: 'consolas', // 默认字体 族类
|
||||
haveTextHSDA: true, // 是否需创建textHSDA对象
|
||||
haveArrowText: true, // 是否需创建arrowText对象
|
||||
haveTrainBorder: false // 是否需创建trainBorder对象
|
||||
|
@ -379,7 +379,7 @@ class SkinStyle extends defaultStyle {
|
||||
trainHeadDistance: 2, // 列车和车头之间的间距
|
||||
trainWidth: 76, // 列车长度
|
||||
trainTextFontSize: 15, // 列车字号
|
||||
textFontFormat: '宋体', // 默认字体 族类
|
||||
fontFamily: '宋体', // 默认字体 族类
|
||||
nameFontSize: 10, // 字体大小
|
||||
haveTextHSDA: false, // 是否需创建textHSDA对象
|
||||
haveArrowText: true, // 是否需创建arrowText对象
|
||||
|
@ -19,7 +19,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,
|
||||
fontWeight: 'normal',
|
||||
fontSize: this.device.style.LcControl.mouseOverStyle.fontSize,
|
||||
fontFamily: this.device.style.LcControl.mouseOverStyle.textFontFormat,
|
||||
fontFamily: this.device.style.LcControl.mouseOverStyle.fontFamily,
|
||||
text: this.device.model.name,
|
||||
textFill: this.device.style.LcControl.mouseOverStyle.fontColor,
|
||||
textAlign: this.device.style.LcControl.mouseOverStyle.textAlign,
|
||||
|
@ -38,9 +38,9 @@ export default class LcControl extends Group {
|
||||
position: [0, 0],
|
||||
x: model.position.x,
|
||||
y: model.position.y + this.style.LcControl.lamp.radiusR + this.style.LcControl.text.distance,
|
||||
fontWeight: 'normal',
|
||||
fontWeight: this.style.LcControl.text.fontWeight,
|
||||
fontSize: this.style.LcControl.text.fontSize,
|
||||
fontFamily: this.style.textFontFormat,
|
||||
fontFamily: this.style.fontFamily,
|
||||
text: model.name,
|
||||
textFill: '#fff',
|
||||
textAlign: 'middle',
|
||||
|
@ -38,9 +38,9 @@ export default class LimitControl extends Group {
|
||||
position: [0, 0],
|
||||
x: model.position.x,
|
||||
y: model.position.y + this.style.LimitControl.lamp.radiusR + this.style.LimitControl.text.distance,
|
||||
fontWeight: 'normal',
|
||||
fontWeight: this.style.LimitControl.text.fontWeight,
|
||||
fontSize: this.style.LimitControl.text.fontSize,
|
||||
fontFamily: this.style.textFontFormat,
|
||||
fontFamily: this.style.fontFamily,
|
||||
text: model.name,
|
||||
textFill: '#fff',
|
||||
textAlign: 'middle',
|
||||
|
@ -59,7 +59,7 @@ class EMouse extends Group {
|
||||
textFill: this.device.style.Section.mouseOverStyle.textShadowColor, // 黄色
|
||||
textAlign: 'middle',
|
||||
textVerticalAlign: 'top',
|
||||
textFont: 'bold ' + (fontSize + 1) + 'px ' + this.device.style.textFontFormat
|
||||
textFont: 'bold ' + (fontSize + 1) + 'px ' + this.device.style.fontFamily
|
||||
}
|
||||
});
|
||||
this.add(this.sectionTextShadow);
|
||||
|
@ -245,7 +245,7 @@ export default class Section extends Group {
|
||||
y: tempy + model.namePosition.y,
|
||||
fontWeight: style.Section.logicText.fontWeight,
|
||||
fontSize: style.Section.logicText.fontSize,
|
||||
fontFamily: style.textFontFormat,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.name,
|
||||
textFill: style.Section.logicText.fontColor,
|
||||
textAlign: style.Section.logicText.textAlign,
|
||||
@ -265,7 +265,7 @@ export default class Section extends Group {
|
||||
y: tempy + model.namePosition.y,
|
||||
fontWeight: style.Section.text.fontWeight,
|
||||
fontSize: style.Section.text.fontSize,
|
||||
fontFamily: style.textFontFormat,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.name,
|
||||
textFill: style.Section.text.fontColor,
|
||||
textAlign: style.Section.text.textAlign,
|
||||
@ -283,7 +283,7 @@ export default class Section extends Group {
|
||||
y: tempy + model.namePosition.y + style.Section.text.distance * drict,
|
||||
fontWeight: style.Section.text.fontWeight,
|
||||
fontSize: style.Section.text.fontSize,
|
||||
fontFamily: style.textFontFormat,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.name,
|
||||
textFill: style.Section.text.fontColor,
|
||||
textAlign: style.Section.text.textAlign,
|
||||
@ -307,7 +307,7 @@ export default class Section extends Group {
|
||||
y: tempy + model.standTrackNamePosition.y,
|
||||
fontWeight: style.Section.standText.fontWeight,
|
||||
fontSize: style.Section.standText.fontSize,
|
||||
fontFamily: style.textFontFormat,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.standTrackName,
|
||||
textFill: style.Section.standText.fontColor,
|
||||
textAlign: style.Section.standText.textAlign,
|
||||
@ -330,7 +330,7 @@ export default class Section extends Group {
|
||||
y: tempy + model.reentryTrackNamePosition.y,
|
||||
fontWeight: style.Section.reentryText.fontWeight,
|
||||
fontSize: style.Section.reentryText.fontSize,
|
||||
fontFamily: style.textFontFormat,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.reentryTrackName,
|
||||
textFill: style.Section.reentryText.fontColor,
|
||||
textAlign: style.Section.reentryText.textAlign,
|
||||
@ -353,7 +353,7 @@ export default class Section extends Group {
|
||||
y: tempy + model.transferTrackNamePosition.y,
|
||||
fontWeight: style.Section.transferText.fontWeight,
|
||||
fontSize: style.Section.transferText.fontSize,
|
||||
fontFamily: style.textFontFormat,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.transferTrackName,
|
||||
textFill: style.Section.transferText.fontColor,
|
||||
textAlign: style.Section.transferText.textAlign,
|
||||
@ -376,7 +376,7 @@ export default class Section extends Group {
|
||||
y: tempy + model.destinationCodePoint.y,
|
||||
fontWeight: style.Section.destinationText.fontWeight,
|
||||
fontSize: style.Section.destinationText.fontSize,
|
||||
fontFamily: style.textFontFormat,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.destinationCode,
|
||||
textFill: style.Section.destinationText.fontColor,
|
||||
textAlign: style.Section.destinationText.textAlign,
|
||||
|
@ -82,7 +82,7 @@ class Signal extends Group {
|
||||
text: model.name,
|
||||
fontWeight: style.Signal.text.fontWeight,
|
||||
fontSize: style.Signal.text.fontSize,
|
||||
fontFamily: style.textFontFormat,
|
||||
fontFamily: style.fontFamily,
|
||||
textFill: style.Signal.text.defaultColor,
|
||||
textAlign: textAlign,
|
||||
textVerticalAlign: textVerticalAlign
|
||||
@ -131,7 +131,7 @@ class Signal extends Group {
|
||||
y: sigDelayY,
|
||||
fontWeight: style.Signal.delay.fontWeight,
|
||||
fontSize: style.Signal.delay.fontSize,
|
||||
fontFamily: style.textFontFormat,
|
||||
fontFamily: style.fontFamily,
|
||||
text: this.model.delayCount || '0',
|
||||
textFill: style.Signal.delay.fontColor,
|
||||
textAlign: drict > 0 ? 'right' : 'left',
|
||||
|
@ -30,7 +30,7 @@ export default class Station extends Group {
|
||||
y: model.position.y,
|
||||
fontWeight: model.fontWeight,
|
||||
fontSize: model.nameFont || 18,
|
||||
fontFamily: style.textFontFormat,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.name,
|
||||
textAlign: 'middle',
|
||||
textVerticalAlign: 'top',
|
||||
@ -48,7 +48,7 @@ export default class Station extends Group {
|
||||
y: model.position.y + ((parseInt(model.nameFont) + 2) * direction),
|
||||
fontWeight: model.fontWeight,
|
||||
fontSize: model.kmPostFont || 18,
|
||||
fontFamily: style.textFontFormat,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.kmPost,
|
||||
textAlign: 'middle',
|
||||
textVerticalAlign: 'top',
|
||||
|
@ -30,7 +30,7 @@ export default class StationCounter extends Group {
|
||||
y: model.position.y,
|
||||
fontWeight: 'normal',
|
||||
fontSize: style.textFontSize,
|
||||
fontFamily: style.textFontFormat,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.val,
|
||||
textFill: style.StationCounter.text.fontColor,
|
||||
textAlign: 'middle',
|
||||
@ -67,7 +67,7 @@ export default class StationCounter extends Group {
|
||||
y: model.position.y + this.rect.width + this.vPadding + style.textFontSize + style.StationCounter.text.distance,
|
||||
fontWeight: 'bold',
|
||||
fontSize: style.textFontSize,
|
||||
fontFamily: style.textFontFormat,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.name,
|
||||
textFill: style.StationCounter.text.fontColor,
|
||||
textAlign: 'middle',
|
||||
|
@ -30,7 +30,7 @@ export default class StationDelayUnlock extends Group {
|
||||
y: model.position.y,
|
||||
fontWeight: 'normal',
|
||||
fontSize: model.textFont,
|
||||
fontFamily: style.textFontFormat,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.deviceName + ' ',
|
||||
textFill: style.StationDelayUnlock.text.fontColor,
|
||||
textStrokeWidth: 1,
|
||||
@ -48,7 +48,7 @@ export default class StationDelayUnlock extends Group {
|
||||
y: model.position.y + fontSize + style.StationDelayUnlock.text.distance,
|
||||
fontWeight: 'normal',
|
||||
fontSize: model.textFont,
|
||||
fontFamily: style.textFontFormat,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.remainTime || '',
|
||||
textFill: style.StationDelayUnlock.text.fontColor,
|
||||
textStrokeWidth: 1,
|
||||
|
@ -24,7 +24,7 @@ class EDetain extends Group {
|
||||
text: style.StationStand.detainCar.text,
|
||||
textAlign: model.textAlign,
|
||||
textVerticalAlign: model.textVerticalAlign,
|
||||
fontSize: `${style.StationStand.stand.headFontSize} px ${style.textFontFormat}`,
|
||||
fontSize: `${style.StationStand.stand.headFontSize} px ${style.fontFamily}`,
|
||||
textFill: style.StationStand.detainCar.centerTrainColor,
|
||||
textStroke: style.backgroundColor
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ class EJump extends Group {
|
||||
y: model.y,
|
||||
fontWeight: 'normal',
|
||||
fontSize: style.StationStand.common.textFontSize,
|
||||
fontFamily: style.textFontFormat,
|
||||
fontFamily: style.fontFamily,
|
||||
text: style.StationStand.jump.text,
|
||||
textFill: style.StationStand.jump.textColor,
|
||||
textAlign: model.textAlign,
|
||||
|
@ -22,7 +22,7 @@ class ELevel extends Group {
|
||||
y: model.y,
|
||||
fontWeight: 'normal',
|
||||
fontSize: style.StationStand.common.textFontSize,
|
||||
fontFamily: style.textFontFormat,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.name,
|
||||
textFill: style.StationStand.level.textColor,
|
||||
textAlign: 'middle'
|
||||
|
@ -22,7 +22,7 @@ class ETime extends Group {
|
||||
y: model.y,
|
||||
fontWeight: 'normal',
|
||||
fontSize: style.StationStand.common.textFontSize,
|
||||
fontFamily: style.textFontFormat,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.name,
|
||||
textFill: style.StationStand.stopTime.textColor,
|
||||
textAlign: 'middle'
|
||||
|
@ -21,7 +21,7 @@ class ESwName extends Group {
|
||||
y: model.nameTextY,
|
||||
fontWeight: style.Switch.text.fontWeight,
|
||||
fontSize: style.Switch.text.fontSize,
|
||||
fontFamily: style.textFontFormat,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.name,
|
||||
textAlign: model.triangle.drictx === 1 ? 'left' : 'right',
|
||||
textVerticalAlign: 'middle',
|
||||
@ -62,7 +62,7 @@ class ESwName extends Group {
|
||||
y: model.arrowTextY,
|
||||
fontSize: style.arrowFontSize,
|
||||
fontWeight: style.Switch.text.fontWeight,
|
||||
fontFamily: style.textFontFormat,
|
||||
fontFamily: style.fontFamily,
|
||||
text: `道岔区段名称: ${model.sectionName}`,
|
||||
textFill: '#000',
|
||||
textAlign: 'letf',
|
||||
|
@ -18,8 +18,8 @@ export default class TrainBody extends Group {
|
||||
create() {
|
||||
const model = this.model;
|
||||
const style = this.model.style;
|
||||
const textFont = model.fontSize + 'px ' + style.Train.common.textFontFormat;
|
||||
const TextFontHSDA = style.Train.hsda.trainHSDATextFontSize + 'px ' + style.Train.common.textFontFormat;
|
||||
const textFont = model.fontSize + 'px ' + style.Train.common.fontFamily;
|
||||
const TextFontHSDA = style.Train.hsda.trainHSDATextFontSize + 'px ' + style.Train.common.fontFamily;
|
||||
|
||||
let destinationText = '';
|
||||
switch (model.destinationStatus) {
|
||||
|
@ -39,9 +39,9 @@ export default class ZcControl extends Group {
|
||||
position: [0, 0],
|
||||
x: model.position.x,
|
||||
y: model.position.y + this.style.ZcControl.lamp.radiusR + this.style.ZcControl.text.distance,
|
||||
fontWeight: 'normal',
|
||||
fontWeight: this.style.ZcControl.text.fontWeight,
|
||||
fontSize: this.style.ZcControl.text.fontSize,
|
||||
fontFamily: this.style.textFontFormat,
|
||||
fontFamily: this.style.fontFamily,
|
||||
text: model.name,
|
||||
textFill: '#fff',
|
||||
textAlign: 'middle',
|
||||
|
@ -27,8 +27,8 @@
|
||||
<el-form-item label="延时时间:" prop="unlockTime" disabled="true">
|
||||
<el-input-number v-model="editModel.unlockTime" :min="0" :max="1000" />s
|
||||
</el-form-item>
|
||||
<el-form-item label="字体:" prop="textFontFormat">
|
||||
<el-font v-model="editModel.textFontFormat" />
|
||||
<el-form-item label="字体:" prop="fontFamily">
|
||||
<el-font v-model="editModel.fontFamily" />
|
||||
</el-form-item>
|
||||
<el-form-item label="颜色:" prop="textFontColor">
|
||||
<el-color-picker v-model="editModel.textFontColor" show-alpha :predefine="skins" />
|
||||
@ -100,7 +100,7 @@ export default {
|
||||
unlockTime: 0,
|
||||
stationCode: '',
|
||||
textFontColor: '#FFFFFF',
|
||||
textFontFormat: '',
|
||||
fontFamily: '',
|
||||
position: {
|
||||
x: 0,
|
||||
y: 0
|
||||
@ -138,7 +138,7 @@ export default {
|
||||
textFontColor: [
|
||||
{ required: true, message: '请输入字体颜色', trigger: 'change' }
|
||||
],
|
||||
textFontFormat: [
|
||||
fontFamily: [
|
||||
{ required: true, message: '请输入字体格式', trigger: 'change' }
|
||||
],
|
||||
'position.x': [
|
||||
@ -171,7 +171,7 @@ export default {
|
||||
this.$nextTick(() => {
|
||||
if (selected && selected._type.toUpperCase() === 'DelayUnlock'.toUpperCase()) {
|
||||
this.editModel.code = selected.code;
|
||||
this.editModel.textFontFormat = selected.font;
|
||||
this.editModel.fontFamily = selected.font;
|
||||
this.editModel.textFontColor = selected.fontColor;
|
||||
this.editModel.stationCode = selected.stationCode;
|
||||
this.editModel.unlockTime = selected.unlockTime;
|
||||
@ -224,7 +224,7 @@ export default {
|
||||
const model = {
|
||||
_type: 'DelayUnlock',
|
||||
code: this.editModel.code,
|
||||
font: this.editModel.textFontFormat,
|
||||
font: this.editModel.fontFamily,
|
||||
fontColor: this.editModel.textFontColor,
|
||||
unlockTime: this.editModel.unlockTime,
|
||||
stationCode: this.editModel.stationCode,
|
||||
|
Loading…
Reference in New Issue
Block a user