diff --git a/src/jmapNew/config/skinCode/nanjing_02.js b/src/jmapNew/config/skinCode/nanjing_02.js index 2396a087d..d44f61eb7 100644 --- a/src/jmapNew/config/skinCode/nanjing_02.js +++ b/src/jmapNew/config/skinCode/nanjing_02.js @@ -136,6 +136,7 @@ class SkinCode extends defaultStyle { endColor: '#C0C0C0', // 尽头分隔符颜色 color: '#000', // 区段边界符颜色 halfHeight: 5, // 区段分隔符高度的一半 + sepical:true, // 特殊类型 道岔C区段 分隔符为横向 isLikeT:true // 特殊类型尽头分隔 类似与右躺着的T }, trainPosition:{ @@ -688,7 +689,7 @@ class SkinCode extends defaultStyle { }, travelSigns: { trainTravelLeftSignsOffset: { x:3, y: 3}, - trainTravelRightSignsOffset: { x: 62, y: 3} + trainTravelRightSignsOffset: { x: 65, y: 3} }, delayTime: { trainDelayTimeOffset: { x:5, y: 14} @@ -708,14 +709,14 @@ class SkinCode extends defaultStyle { trainServer: { serviceNumberPrefix: '000', // 服务号(表号)前缀 defaultServiceNumber: 'BBB', // 默认服务号(表号) - trainServerOffset: { x: 33, y: 3 }, // 列车服务号偏移 + trainServerOffset: { x: 36, y: 3 }, // 列车服务号偏移 fontColor: '#00C300' }, trainTarget: { tripNumberPrefix: '00', // 车次号前缀 defaultDirectionCode: '', // 默认车次号1 defaultTripNumber: 'CC', // 默认车次号2 - trainTargetOffset: { x: 53, y: 3 }, // 列车车次号偏移 + trainTargetOffset: { x: 56, y: 3 }, // 列车车次号偏移 fontColor: '#00C300' }, trainTargetNumber: { diff --git a/src/jmapNew/shape/Arrow/index.js b/src/jmapNew/shape/Arrow/index.js index 377e50953..c21a2e453 100644 --- a/src/jmapNew/shape/Arrow/index.js +++ b/src/jmapNew/shape/Arrow/index.js @@ -1,4 +1,3 @@ -import Line from 'zrender/src/graphic/shape/Line'; import Group from 'zrender/src/container/Group'; import {isShowThePrdType} from '../../utils/handlePath'; import Polygon from 'zrender/src/graphic/shape/Polygon'; @@ -24,36 +23,25 @@ export default class Arrow extends Group { create() { const model = this.model; - this.triangle = new Polygon({ + this.arrow = new Polygon({ zlevel: this.zlevel, z: this.z, shape: { points: [ [model.position.x, model.position.y], - [model.position.x + model.triangleLength, model.position.y + model.triangleHeight / 2], - [model.position.x + model.triangleLength, model.position.y - model.triangleHeight / 2] + [model.position.x + model.triangleLength, model.position.y - model.triangleHeight / 2], + [model.position.x + model.triangleLength, model.position.y - model.lineWidth / 2], + [model.position.x + model.length, model.position.y - model.lineWidth / 2], + [model.position.x + model.length, model.position.y + model.lineWidth / 2], + [model.position.x + model.triangleLength, model.position.y + model.lineWidth / 2], + [model.position.x + model.triangleLength, model.position.y + model.triangleHeight / 2] ] }, style: { fill: model.color } }); - this.line = new Line({ - zlevel: this.zlevel, - z: this.z, - shape: { - x1: model.position.x + model.triangleLength, - y1: model.position.y, - x2: model.position.x + model.length, - y2: model.position.y - }, - style: { - lineWidth: model.lineWidth, - stroke: model.color - } - }); - this.add(this.triangle); - this.add(this.line); + this.add(this.arrow); } setState(model) { @@ -64,26 +52,18 @@ export default class Arrow extends Group { const showMode = this.model.showMode; const showConditions = this.model.showConditions; if (!showConditions || showConditions === '01' || showMode === showConditions) { - this.eachChild((child) => { - child.show(); - }); + this.arrow.show(); } else { - this.eachChild((child) => { - child.hide(); - }); + this.arrow.hide(); } } setShowStation(stationCode) { if (!stationCode || this.model.stationCode === stationCode) { - this.eachChild((child) => { - child.show(); - }); + this.arrow.show(); this.isShowShape = true; this.setState(this.model); } else { - this.eachChild((child) => { - child.hide(); - }); + this.arrow.hide(); this.isShowShape = false; } } diff --git a/src/jmapNew/shape/Section/ESeparator.js b/src/jmapNew/shape/Section/ESeparator.js index b7739d9d7..5121db447 100644 --- a/src/jmapNew/shape/Section/ESeparator.js +++ b/src/jmapNew/shape/Section/ESeparator.js @@ -116,45 +116,26 @@ export default class ESeparator extends Group { let partition = null; if (type === '01') { // 普通分割 let points = []; - const lineWidth = 0; - // const tanRate = modelData.traingle.getTanRate(); - // if (modelData.type == '03' && tanRate != 0 && tanRate != 1) { - // points = [ - // [modelData.point.x, - // modelData.point.y + modelData.drict * (style.Section.separator.halfHeight) / 2], - // [modelData.point.x - modelData.drict * (style.Section.separator.halfHeight) / tanRate, - // modelData.point.y - modelData.drict * (style.Section.separator.halfHeight) / 2], - // [modelData.point.x, - // modelData.point.y - modelData.drict * (style.Section.separator.halfHeight) / 2], - // [modelData.point.x + modelData.drict * (style.Section.separator.halfHeight) / tanRate, - // modelData.point.y + modelData.drict * (style.Section.separator.halfHeight) / 2], - // [modelData.point.x, - // modelData.point.y + modelData.drict * (style.Section.separator.halfHeight) / 2] - // // 待处理 - // // [modelData.point.x - (style.Section.separator.halfHeight) * modelData.traingle.getSinRate() / 2, - // // modelData.point.y - (style.Section.separator.halfHeight) * modelData.traingle.getCosRate() / 2], - // // [modelData.point.x + (style.Section.separator.halfHeight) / modelData.traingle.getCosRate() / 2, - // // modelData.point.y - (style.Section.separator.halfHeight) * modelData.traingle.getCosRate() / 2], - // // [modelData.point.x, modelData.point.y] - // // [modelData.point.x + (style.Section.separator.halfHeight) * modelData.traingle.getSinRate(), - // // modelData.point.y + (style.Section.separator.halfHeight) * modelData.traingle.getCosRate()] - // // [modelData.point.x - (style.Section.separator.halfHeight) * modelData.traingle.getSinRate() / 2, - // // modelData.point.y + (style.Section.separator.halfHeight) * modelData.traingle.getCosRate() / 2], - // // [modelData.point.x - (style.Section.separator.halfHeight) * modelData.traingle.getSinRate() / 2, - // // modelData.point.y + (style.Section.separator.halfHeight) * modelData.traingle.getCosRate() / 2] - // ]; - // console.log(points, '11111111111111111'); - // lineWidth = 1; - // const stroke = style.Section.separator.color; - // partition = this.createModel(modelData, points, lineWidth, stroke); - // } else { - points = [ - [modelData.point.x, modelData.point.y - (style.Section.separator.halfHeight)], - [modelData.point.x, modelData.point.y + (style.Section.separator.halfHeight)] - ]; - // lineWidth = modelData.type == '02' ? style.Section.separator.logicWidth : style.Section.separator.width; - partition = this.createModel(modelData, points); - // } + let lineWidth = 0; + const tanRate = modelData.traingle.getTanRate(); + if (style.Section.separator.sepical && modelData.type == '03' && tanRate != 0 && tanRate != 1) { + // 转换坐标系计算 + const dataDirection = modelData.traingle.getRotation() > 0 ? 1 : -1; + points = [ + [modelData.point.x - (style.Section.separator.halfHeight) * modelData.traingle.getCosRate(), + modelData.point.y + dataDirection * (style.Section.separator.halfHeight) * modelData.traingle.getSinRate()], + [modelData.point.x + (style.Section.separator.halfHeight) * modelData.traingle.getCosRate(), + modelData.point.y - dataDirection * (style.Section.separator.halfHeight) * modelData.traingle.getSinRate()] + ]; + partition = this.createModel(modelData, points); + } else { + points = [ + [modelData.point.x, modelData.point.y - (style.Section.separator.halfHeight)], + [modelData.point.x, modelData.point.y + (style.Section.separator.halfHeight)] + ]; + lineWidth = modelData.type == '02' ? style.Section.separator.logicWidth : style.Section.separator.width; + partition = this.createModel(modelData, points, lineWidth); + } } else if (type === '02') { // 单侧分割符 const points = [ [modelData.point.x + modelData.drict * (style.Section.separator.halfHeight), modelData.point.y - (style.Section.separator.halfHeight * 1.5)], diff --git a/src/jmapNew/shape/Signal/ESigPost.js b/src/jmapNew/shape/Signal/ESigPost.js index 3f1fc12f2..6e5ef608c 100644 --- a/src/jmapNew/shape/Signal/ESigPost.js +++ b/src/jmapNew/shape/Signal/ESigPost.js @@ -79,6 +79,7 @@ class ESigPost extends Group { setColor(color) { if (color) { this.ver && this.ver.setStyle({ stroke: color }); + this.ver && this.ver.setStyle({ fill: color }); this.hor && this.hor.setStyle({ stroke: color }); } } diff --git a/src/jmapNew/theme/haerbin_01/menus/menuDialog/logDetail.vue b/src/jmapNew/theme/haerbin_01/menus/menuDialog/logDetail.vue index 49d097474..b3cf77c06 100644 --- a/src/jmapNew/theme/haerbin_01/menus/menuDialog/logDetail.vue +++ b/src/jmapNew/theme/haerbin_01/menus/menuDialog/logDetail.vue @@ -183,10 +183,8 @@ export default { } }; - -