diff --git a/src/jmap/config/defaultStyle.js b/src/jmap/config/defaultStyle.js index 240481216..4b2fd7c46 100644 --- a/src/jmap/config/defaultStyle.js +++ b/src/jmap/config/defaultStyle.js @@ -16,7 +16,7 @@ export default class defaultStyle { this.textFontSize = 10; /** 默认字体 族类*/ - this.textFontFormat = 'consolas'; + this.fontFamily = 'consolas'; /** 默认字体颜色*/ this.textFontColor = '#C0C0C0'; diff --git a/src/jmap/config/skinStyle/bejing_01.js b/src/jmap/config/skinStyle/bejing_01.js index 0917420d5..a621dc647 100644 --- a/src/jmap/config/skinStyle/bejing_01.js +++ b/src/jmap/config/skinStyle/bejing_01.js @@ -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对象 diff --git a/src/jmap/config/skinStyle/chengdu_03.js b/src/jmap/config/skinStyle/chengdu_03.js index afd4e71b9..a416bd380 100644 --- a/src/jmap/config/skinStyle/chengdu_03.js +++ b/src/jmap/config/skinStyle/chengdu_03.js @@ -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对象 diff --git a/src/jmap/config/skinStyle/fuzhou_01.js b/src/jmap/config/skinStyle/fuzhou_01.js index 9ce78ff68..ded040d04 100644 --- a/src/jmap/config/skinStyle/fuzhou_01.js +++ b/src/jmap/config/skinStyle/fuzhou_01.js @@ -379,7 +379,7 @@ class SkinStyle extends defaultStyle { trainHeadDistance: 2, // 列车和车头之间的间距 trainWidth: 76, // 列车长度 trainTextFontSize: 15, // 列车字号 - textFontFormat: '宋体', // 默认字体 族类 + fontFamily: '宋体', // 默认字体 族类 nameFontSize: 10, // 字体大小 haveTextHSDA: false, // 是否需创建textHSDA对象 haveArrowText: true, // 是否需创建arrowText对象 diff --git a/src/jmap/shape/LcControl/EMouse.js b/src/jmap/shape/LcControl/EMouse.js index 672cb5e88..34ebf52ab 100644 --- a/src/jmap/shape/LcControl/EMouse.js +++ b/src/jmap/shape/LcControl/EMouse.js @@ -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, diff --git a/src/jmap/shape/LcControl/index.js b/src/jmap/shape/LcControl/index.js index 65757d39c..1cf1dfddd 100644 --- a/src/jmap/shape/LcControl/index.js +++ b/src/jmap/shape/LcControl/index.js @@ -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', diff --git a/src/jmap/shape/LimitControl/index.js b/src/jmap/shape/LimitControl/index.js index 17484ba58..22ac626c4 100644 --- a/src/jmap/shape/LimitControl/index.js +++ b/src/jmap/shape/LimitControl/index.js @@ -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', diff --git a/src/jmap/shape/Section/EMouse.js b/src/jmap/shape/Section/EMouse.js index f9b12a311..59da17241 100644 --- a/src/jmap/shape/Section/EMouse.js +++ b/src/jmap/shape/Section/EMouse.js @@ -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); diff --git a/src/jmap/shape/Section/index.js b/src/jmap/shape/Section/index.js index cb71c9f22..f8e7bbff5 100644 --- a/src/jmap/shape/Section/index.js +++ b/src/jmap/shape/Section/index.js @@ -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, diff --git a/src/jmap/shape/Signal/index.js b/src/jmap/shape/Signal/index.js index 497c82ed8..da1e6e258 100644 --- a/src/jmap/shape/Signal/index.js +++ b/src/jmap/shape/Signal/index.js @@ -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', diff --git a/src/jmap/shape/Station/index.js b/src/jmap/shape/Station/index.js index 3681a5948..a25fab0d5 100644 --- a/src/jmap/shape/Station/index.js +++ b/src/jmap/shape/Station/index.js @@ -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', diff --git a/src/jmap/shape/StationCounter/index.js b/src/jmap/shape/StationCounter/index.js index 2c9390a97..710a97585 100644 --- a/src/jmap/shape/StationCounter/index.js +++ b/src/jmap/shape/StationCounter/index.js @@ -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', diff --git a/src/jmap/shape/StationDelayUnlock/index.js b/src/jmap/shape/StationDelayUnlock/index.js index 03074ebec..2fe0f7b35 100644 --- a/src/jmap/shape/StationDelayUnlock/index.js +++ b/src/jmap/shape/StationDelayUnlock/index.js @@ -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, diff --git a/src/jmap/shape/StationStand/EDetain.js b/src/jmap/shape/StationStand/EDetain.js index 81cb2d93f..3a118f726 100644 --- a/src/jmap/shape/StationStand/EDetain.js +++ b/src/jmap/shape/StationStand/EDetain.js @@ -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 } diff --git a/src/jmap/shape/StationStand/EJump.js b/src/jmap/shape/StationStand/EJump.js index 12bc43583..aad405c95 100644 --- a/src/jmap/shape/StationStand/EJump.js +++ b/src/jmap/shape/StationStand/EJump.js @@ -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, diff --git a/src/jmap/shape/StationStand/ELevel.js b/src/jmap/shape/StationStand/ELevel.js index 8acd6c276..4f5e8ae39 100644 --- a/src/jmap/shape/StationStand/ELevel.js +++ b/src/jmap/shape/StationStand/ELevel.js @@ -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' diff --git a/src/jmap/shape/StationStand/ETime.js b/src/jmap/shape/StationStand/ETime.js index c8921b387..436f01981 100644 --- a/src/jmap/shape/StationStand/ETime.js +++ b/src/jmap/shape/StationStand/ETime.js @@ -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' diff --git a/src/jmap/shape/Switch/ESwName.js b/src/jmap/shape/Switch/ESwName.js index cdcfe3d91..97106f31e 100644 --- a/src/jmap/shape/Switch/ESwName.js +++ b/src/jmap/shape/Switch/ESwName.js @@ -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', diff --git a/src/jmap/shape/Train/TrainBody/index.js b/src/jmap/shape/Train/TrainBody/index.js index 6f6b2185b..bbcf7d216 100644 --- a/src/jmap/shape/Train/TrainBody/index.js +++ b/src/jmap/shape/Train/TrainBody/index.js @@ -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) { diff --git a/src/jmap/shape/ZcControl/index.js b/src/jmap/shape/ZcControl/index.js index 0dd3d4dda..0c3d7f8ab 100644 --- a/src/jmap/shape/ZcControl/index.js +++ b/src/jmap/shape/ZcControl/index.js @@ -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', diff --git a/src/views/map/mapdraft/mapedit/mapoperate/delayunlock.vue b/src/views/map/mapdraft/mapedit/mapoperate/delayunlock.vue index 157033a4c..c83aa71c8 100644 --- a/src/views/map/mapdraft/mapedit/mapoperate/delayunlock.vue +++ b/src/views/map/mapdraft/mapedit/mapoperate/delayunlock.vue @@ -27,8 +27,8 @@ s - - + + @@ -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,