From 815e4446d4843c9b470005eb20ad759e1aeb2a30 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Mon, 9 Mar 2020 09:58:49 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E5=93=88=E5=B0=94=E6=BB=A8=E5=88=97?= =?UTF-8?q?=E8=BD=A6=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/haerbin_01.js | 43 ++- src/jmapNew/shape/Train/TrainBody.js | 450 +++++++++++----------- 2 files changed, 248 insertions(+), 245 deletions(-) diff --git a/src/jmapNew/config/skinCode/haerbin_01.js b/src/jmapNew/config/skinCode/haerbin_01.js index 80670bf0f..a4a32b5a8 100644 --- a/src/jmapNew/config/skinCode/haerbin_01.js +++ b/src/jmapNew/config/skinCode/haerbin_01.js @@ -127,19 +127,19 @@ class SkinCode extends defaultStyle { color: '#3149C3' // 区段边界符颜色 }, block: { - special: true, // 区段特殊显示 + special: true // 区段特殊显示 }, trainPosition:{ - display: false // 列车实时位置显示 + display: false // 列车实时位置显示 } }; this[deviceType.Signal] = { distance: 10, // 设备距离区段的距离 post: { - standardShow: true, // 灯柱显示 - standardLength: 4, // 高柱长度 - standardHeight: 5, // 灯柱高度 + standardShow: true, // 灯柱显示 + standardLength: 4, // 高柱长度 + standardHeight: 5, // 灯柱高度 standardColor: '#3149C3', // 灯柱颜色 standardWidth: 4 // 灯柱宽度 }, @@ -155,7 +155,7 @@ class SkinCode extends defaultStyle { nameBorderShow: true // 信号机名字边框显示 }, lamp: { - logicDisplayNone: true, // 逻辑点灯斜线不显示 + logicDisplayNone: true, // 逻辑点灯斜线不显示 guidName: 'defult', // 默认引导类型 stopWidth: 2, // 禁止线宽度 borderWidth: 1, // 信号灯边框线宽度 @@ -215,7 +215,7 @@ class SkinCode extends defaultStyle { }, stand: { // 站台 headFontSize: 11, // 站台首端字体大小 - textFill: '#fff', // 站台字体颜色 + textFill: '#fff', // 站台字体颜色 spareColor: '#00ffff', // 站台空闲颜色 stopColor: '#FEFE00', // 站台列车停站颜色 jumpStopColor: '#9A99FF', // 站台跳停颜色 @@ -234,11 +234,11 @@ class SkinCode extends defaultStyle { }, detainCar: { // 扣车 text: 'H', // 扣车显示内容 - fontSize: 18, // 扣车字体大小 + fontSize: 18, // 扣车字体大小 position: -1, // 扣车方向 offset: { x: -8, y: -6 }, // 扣车偏移量 trainColor: '#E4EF50', // 车站扣车颜色 - centerTrainColor: 'red', // 中心扣车颜色 + centerTrainColor: 'red', // 中心扣车颜色 andCenterTrainColor: '#F61107', // 车站+中心扣车颜色 detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色 }, @@ -268,7 +268,7 @@ class SkinCode extends defaultStyle { }, lamp: { radiusR: 6, // 控制灯大小 - lampColor: '#5A5D5A' // 功能按钮颜色 + lampColor: '#5A5D5A' // 功能按钮颜色 } }; @@ -296,7 +296,7 @@ class SkinCode extends defaultStyle { functionButtonShow: ['01'], // 功能灯按钮(引导总锁)显示条件(prdType) kilometerPosition: 'up', // 公里标朝向 text: { - borderShow: true, // 车站包围框显示 + borderShow: true, // 车站包围框显示 fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 distance: 5 // 灯跟文字距离 @@ -369,19 +369,19 @@ class SkinCode extends defaultStyle { monolockColor: '#fff' // 道岔单锁颜色 }, sectionAction: { - flag: true, // 道岔 关联区段显示 - spareColor: '#5b5b5b', // 区段显示颜色 + flag: true, // 道岔 关联区段显示 + spareColor: '#5b5b5b' // 区段显示颜色 }, core: { - splice: true, // 哈尔滨特殊显示 + splice: true, // 哈尔滨特殊显示 length: 6 // 道岔单边长度 }, block: { // 道岔封锁配置 - blockName: 'default', // 默认道岔封锁类型 + blockName: 'default', // 默认道岔封锁类型 nameBorderShow: false, // 道岔名称是否有包围框 显示 contentRectShow: false, // 道岔封锁显示 - contentRectColor: '#fff', // 道岔封锁名称颜色 - rhomboidShow: true, // 道岔单独显示 + contentRectColor: '#fff', // 道岔封锁名称颜色 + rhomboidShow: true // 道岔单独显示 }, monolock: { // 道岔单锁配置 locationColor: '#fff', // 道岔单锁定位颜色 (红色) @@ -471,7 +471,7 @@ class SkinCode extends defaultStyle { distance: 5 // 灯跟文字距离 }, lamp: { - fill: 'rgba(0,0,0,0)', // 填充色 + fill: 'rgba(0,0,0,0)', // 填充色 radiusR: 6, // 控制灯大小 controlColor: '#b5b3b3' // 控制灯颜色 (灰色) } @@ -514,11 +514,12 @@ class SkinCode extends defaultStyle { textAContent: '警' // textA文本 }, trainAtrStatus: { - trainAtrStatusOffset: { x: 68, y: 9}, + trainAtrStatusOffset: { x: 74, y: 8}, r: 5 }, travelSigns: { - trainTravelSignsOffset: { x:3, y: 3} + trainTravelLeftSignsOffset: { x:3, y: 3}, + trainTravelRightSignsOffset: { x: 62, y: 3} }, delayTime: { trainDelayTimeOffset: { x:5, y: 14} @@ -573,7 +574,7 @@ class SkinCode extends defaultStyle { fixedCoordinates: true, // 列车车组号等固定坐标 trainHeight: 40, // 列车高度 trainHeadDistance: 2, // 列车和车头之间的间距 - trainWidth: 76, // 列车长度 + trainWidth: 82, // 列车长度 trainTextFontSize: 12, // 列车字号 fontFamily: 'consolas', // 默认字体 族类 nameFontSize: 12, // 字体大小 diff --git a/src/jmapNew/shape/Train/TrainBody.js b/src/jmapNew/shape/Train/TrainBody.js index 807344ea8..030487617 100644 --- a/src/jmapNew/shape/Train/TrainBody.js +++ b/src/jmapNew/shape/Train/TrainBody.js @@ -5,167 +5,167 @@ import ETextName from '../element/ETextName'; // 名称文字 (共有) import EMouse from './EMouse'; import store from '@/store'; import Circle from 'zrender/src/graphic/shape/Circle'; -import BoundingRect from "zrender/src/core/BoundingRect"; +import BoundingRect from 'zrender/src/core/BoundingRect'; /** 车身*/ export default class TrainBody extends Group { - constructor(model) { - super(); - this.model = model; - this.deviceModel = model.model; - this.nameFormat = model.nameFormat; - this.create(); - this.createMouse(); // 鼠标事件 - } + constructor(model) { + super(); + this.model = model; + this.deviceModel = model.model; + this.nameFormat = model.nameFormat; + this.create(); + this.createMouse(); // 鼠标事件 + } - createMouse() { - this.mouseEvent = new EMouse(this); - this.add(this.mouseEvent); - if (this.deviceModel.down) { - store.dispatch('map/setTrainDetails', this.deviceModel); - this.mouseEvent.mouseover(); - } + createMouse() { + this.mouseEvent = new EMouse(this); + this.add(this.mouseEvent); + if (this.deviceModel.down) { + store.dispatch('map/setTrainDetails', this.deviceModel); + this.mouseEvent.mouseover(); + } - this.on('mouseover', () => { - store.dispatch('map/setTrainDetails', this.deviceModel); - this.mouseEvent.mouseover(); - }); - this.on('mouseout', () => { - store.dispatch('map/setTrainDetails', null); - this.mouseEvent.mouseout(); - }); - } + this.on('mouseover', () => { + store.dispatch('map/setTrainDetails', this.deviceModel); + this.mouseEvent.mouseover(); + }); + this.on('mouseout', () => { + store.dispatch('map/setTrainDetails', null); + this.mouseEvent.mouseout(); + }); + } - create() { - const model = this.model; - const style = this.model.style; - this.trainBodyBox = new TrainBodyBox({ - zlevel: model.zlevel, - z: model.z, - point: model.point, - style: style - }); + create() { + const model = this.model; + const style = this.model.style; + this.trainBodyBox = new TrainBodyBox({ + zlevel: model.zlevel, + z: model.z, + point: model.point, + style: style + }); - const beginX = (model.point.x + style.Train.trainBody.lrPadding); - const beginY = (model.point.y - style.Train.hsda.trainHSDATextFontSize - style.Train.hsda.upPaddingHSDA); - const margin = (style.Train.common.trainWidth - style.Train.hsda.lrPaddingHSDA * 2) / 4; + const beginX = (model.point.x + style.Train.trainBody.lrPadding); + const beginY = (model.point.y - style.Train.hsda.trainHSDATextFontSize - style.Train.hsda.upPaddingHSDA); + const margin = (style.Train.common.trainWidth - style.Train.hsda.lrPaddingHSDA * 2) / 4; - this.textH = style.Train.common.haveTextHSDA ? new ETextName({ - zlevel: model.zlevel, - z: model.z, - x: parseInt(beginX + margin * 0), - y: parseInt(beginY), - text: style.Train.hsda.textHContent, - textFill: style.trainYellowColor, - fontSize: style.Train.hsda.trainHSDATextFontSize, - fontFamily: style.Train.common.fontFamily, - textAlign: 'middle', - textVerticalAlign: 'top' - }) : ''; - this.textS = style.Train.common.haveTextHSDA ? new ETextName({ - zlevel: model.zlevel, - z: model.z, - x: parseInt(beginX + margin * 1), - y: parseInt(beginY), - text: style.Train.hsda.textSContent, - textFill: style.trainBlueColor, - fontSize: style.Train.hsda.trainHSDATextFontSize, - fontFamily: style.Train.common.fontFamily, - textAlign: 'middle', - textVerticalAlign: 'top' - }) : ''; - this.textD = style.Train.common.haveTextHSDA ? new ETextName({ - zlevel: model.zlevel, - z: model.z, - x: parseInt(beginX + margin * 2), - y: parseInt(beginY), - text: style.Train.hsda.textDContent, - textFill: style.trainGreenColor, - fontSize: style.Train.hsda.trainHSDATextFontSize, - fontFamily: style.Train.common.fontFamily, - textAlign: 'middle', - textVerticalAlign: 'top' - }) : ''; - this.textA = style.Train.common.haveTextHSDA ? new ETextName({ - zlevel: model.zlevel, - z: model.z, - x: parseInt(beginX + margin * 3), - y: parseInt(beginY), - text: style.Train.hsda.textAContent, - textFill: style.trainRedColor, - fontSize: style.Train.hsda.trainHSDATextFontSize, - fontFamily: style.Train.common.fontFamily, - textAlign: 'middle', - textVerticalAlign: 'top' - }) : ''; - const serviceNumber = style.Train.trainServer.serviceNumberPrefix + (model.serviceNumber || style.Train.trainServer.defaultServiceNumber) + '';// 服务号(表号) - const tripNumber = style.Train.trainTarget.tripNumberPrefix + (style.Train.trainTarget.defaultDirectionCode - ?(model.directionCode||style.Train.trainTarget.defaultDirectionCode) + (model.tripNumber || style.Train.trainTarget.defaultTripNumber) - :model.tripNumber || style.Train.trainTarget.defaultTripNumber) + ''; // 车次号 - const targetCode = style.Train.trainNumber.targetCodePrefix + (model.targetCode || style.Train.trainNumber.defaultTargetCode) + ''; // 目的地码 - const groupNumber = style.Train.trainTargetNumber.groupNumberPrefix + (model.groupNumber || style.Train.trainTargetNumber.defaultGroupNumber) + ''; // 车组号 - this.textTrainServer = new ETextName({ - zlevel: model.zlevel, - z: model.z+1, - x: parseInt(model.point.x + style.Train.trainServer.trainServerOffset.x), - y: parseInt(model.point.y + style.Train.trainServer.trainServerOffset.y), - text: serviceNumber.substring(serviceNumber.length - style.Train.trainServer.serviceNumberPrefix.length), - textFill: model.style.Train.trainServer.fontColor || style.trainTextColor, - fontSize: model.fontSize, - fontFamily: style.Train.common.fontFamily, - textAlign: 'left', - textVerticalAlign: 'top' - }); - this.textTrainTarget = new ETextName({ - zlevel: this.model.zlevel, - z: this.model.z+1, - x: parseInt(model.point.x + model.style.Train.trainTarget.trainTargetOffset.x), - y: parseInt(model.point.y + model.style.Train.trainTarget.trainTargetOffset.y), - text: tripNumber.substring(tripNumber.length - style.Train.trainTarget.tripNumberPrefix.length), - textFill: model.style.Train.trainTarget.fontColor || style.trainTextColor, - fontSize: model.fontSize, - fontFamily: style.Train.common.fontFamily, - textAlign: style.Train.trainTarget.trainTargetTextAlign, - textVerticalAlign: 'top' - }); - this.textTrainNumber = new ETextName({ - zlevel: model.zlevel, - z: model.z+1, - x: parseInt(model.point.x + style.Train.trainNumber.trainNumberOffset.x), - y: parseInt(model.point.y + style.Train.trainNumber.trainNumberOffset.y), - text: targetCode.substring(targetCode.length - 3), - textFill: style.trainTextColor, - textStroke: style.trainTextColor, - fontWeight: 400, - textStrokeWidth: 0, - fontSize: model.fontSize, - fontFamily: style.Train.common.fontFamily, - textAlign: 'left', - textVerticalAlign: 'top' - }); - this.textTrainTargetNumber = new ETextName({ - zlevel: model.zlevel, - z: model.z+1, - x: parseInt(model.point.x + style.Train.trainTargetNumber.trainTargetNumberOffset.x), - y: parseInt(model.point.y + style.Train.trainTargetNumber.trainTargetNumberOffset.y), - text: groupNumber.substring(groupNumber.length - 3), - textFill: style.trainTextColor, - textStroke: style.trainTextColor, - textStrokeWidth: 0, - fontSize: model.fontSize, - fontFamily: style.Train.common.fontFamily, - textAlign: 'left', - textVerticalAlign: 'top' - }); - this.formatChangePosition(model, style); - this.add(this.trainBodyBox); - if (style.Train.common.haveTextHSDA) { - this.add(this.textH); - this.add(this.textS); - this.add(this.textD); - this.add(this.textA); - } - if (style.Train.common.hasAtrStatus) { + this.textH = style.Train.common.haveTextHSDA ? new ETextName({ + zlevel: model.zlevel, + z: model.z, + x: parseInt(beginX + margin * 0), + y: parseInt(beginY), + text: style.Train.hsda.textHContent, + textFill: style.trainYellowColor, + fontSize: style.Train.hsda.trainHSDATextFontSize, + fontFamily: style.Train.common.fontFamily, + textAlign: 'middle', + textVerticalAlign: 'top' + }) : ''; + this.textS = style.Train.common.haveTextHSDA ? new ETextName({ + zlevel: model.zlevel, + z: model.z, + x: parseInt(beginX + margin * 1), + y: parseInt(beginY), + text: style.Train.hsda.textSContent, + textFill: style.trainBlueColor, + fontSize: style.Train.hsda.trainHSDATextFontSize, + fontFamily: style.Train.common.fontFamily, + textAlign: 'middle', + textVerticalAlign: 'top' + }) : ''; + this.textD = style.Train.common.haveTextHSDA ? new ETextName({ + zlevel: model.zlevel, + z: model.z, + x: parseInt(beginX + margin * 2), + y: parseInt(beginY), + text: style.Train.hsda.textDContent, + textFill: style.trainGreenColor, + fontSize: style.Train.hsda.trainHSDATextFontSize, + fontFamily: style.Train.common.fontFamily, + textAlign: 'middle', + textVerticalAlign: 'top' + }) : ''; + this.textA = style.Train.common.haveTextHSDA ? new ETextName({ + zlevel: model.zlevel, + z: model.z, + x: parseInt(beginX + margin * 3), + y: parseInt(beginY), + text: style.Train.hsda.textAContent, + textFill: style.trainRedColor, + fontSize: style.Train.hsda.trainHSDATextFontSize, + fontFamily: style.Train.common.fontFamily, + textAlign: 'middle', + textVerticalAlign: 'top' + }) : ''; + const serviceNumber = style.Train.trainServer.serviceNumberPrefix + (model.serviceNumber || style.Train.trainServer.defaultServiceNumber) + '';// 服务号(表号) + const tripNumber = style.Train.trainTarget.tripNumberPrefix + (style.Train.trainTarget.defaultDirectionCode + ? (model.directionCode || style.Train.trainTarget.defaultDirectionCode) + (model.tripNumber || style.Train.trainTarget.defaultTripNumber) + : model.tripNumber || style.Train.trainTarget.defaultTripNumber) + ''; // 车次号 + const targetCode = style.Train.trainNumber.targetCodePrefix + (model.targetCode || style.Train.trainNumber.defaultTargetCode) + ''; // 目的地码 + const groupNumber = style.Train.trainTargetNumber.groupNumberPrefix + (model.groupNumber || style.Train.trainTargetNumber.defaultGroupNumber) + ''; // 车组号 + this.textTrainServer = new ETextName({ + zlevel: model.zlevel, + z: model.z + 1, + x: parseInt(model.point.x + style.Train.trainServer.trainServerOffset.x), + y: parseInt(model.point.y + style.Train.trainServer.trainServerOffset.y), + text: serviceNumber.substring(serviceNumber.length - style.Train.trainServer.serviceNumberPrefix.length), + textFill: model.style.Train.trainServer.fontColor || style.trainTextColor, + fontSize: model.fontSize, + fontFamily: style.Train.common.fontFamily, + textAlign: 'left', + textVerticalAlign: 'top' + }); + this.textTrainTarget = new ETextName({ + zlevel: this.model.zlevel, + z: this.model.z + 1, + x: parseInt(model.point.x + model.style.Train.trainTarget.trainTargetOffset.x), + y: parseInt(model.point.y + model.style.Train.trainTarget.trainTargetOffset.y), + text: tripNumber.substring(tripNumber.length - style.Train.trainTarget.tripNumberPrefix.length), + textFill: model.style.Train.trainTarget.fontColor || style.trainTextColor, + fontSize: model.fontSize, + fontFamily: style.Train.common.fontFamily, + textAlign: style.Train.trainTarget.trainTargetTextAlign, + textVerticalAlign: 'top' + }); + this.textTrainNumber = new ETextName({ + zlevel: model.zlevel, + z: model.z + 1, + x: parseInt(model.point.x + style.Train.trainNumber.trainNumberOffset.x), + y: parseInt(model.point.y + style.Train.trainNumber.trainNumberOffset.y), + text: targetCode.substring(targetCode.length - 3), + textFill: style.trainTextColor, + textStroke: style.trainTextColor, + fontWeight: 400, + textStrokeWidth: 0, + fontSize: model.fontSize, + fontFamily: style.Train.common.fontFamily, + textAlign: 'left', + textVerticalAlign: 'top' + }); + this.textTrainTargetNumber = new ETextName({ + zlevel: model.zlevel, + z: model.z + 1, + x: parseInt(model.point.x + style.Train.trainTargetNumber.trainTargetNumberOffset.x), + y: parseInt(model.point.y + style.Train.trainTargetNumber.trainTargetNumberOffset.y), + text: groupNumber.substring(groupNumber.length - 3), + textFill: style.trainTextColor, + textStroke: style.trainTextColor, + textStrokeWidth: 0, + fontSize: model.fontSize, + fontFamily: style.Train.common.fontFamily, + textAlign: 'left', + textVerticalAlign: 'top' + }); + this.formatChangePosition(model, style); + this.add(this.trainBodyBox); + if (style.Train.common.haveTextHSDA) { + this.add(this.textH); + this.add(this.textS); + this.add(this.textD); + this.add(this.textA); + } + if (style.Train.common.hasAtrStatus) { this.atrStatus = new Circle({ zlevel: model.zlevel, z: model.z + 1, @@ -180,12 +180,14 @@ export default class TrainBody extends Group { }); // this.add(this.atrStatus); } + const travelSignsOffsetX = this.deviceModel.right ? style.Train.travelSigns.trainTravelRightSignsOffset.x : style.Train.travelSigns.trainTravelLeftSignsOffset.x; + const travelSignsOffsetY = this.deviceModel.right ? style.Train.travelSigns.trainTravelRightSignsOffset.y : style.Train.travelSigns.trainTravelLeftSignsOffset.y; if (style.Train.common.hasTravelSigns) { this.travelSigns = new ETextName({ zlevel: model.zlevel, z: model.z + 1, - x: parseInt(model.point.x + style.Train.travelSigns.trainTravelSignsOffset.x), - y: parseInt(model.point.y + style.Train.travelSigns.trainTravelSignsOffset.y), + x: parseInt(model.point.x + travelSignsOffsetX), + y: parseInt(model.point.y + travelSignsOffsetY), text: this.deviceModel.right ? '>' : '<', textFill: '#00C300', textStroke: style.trainTextColor, @@ -248,55 +250,55 @@ export default class TrainBody extends Group { }); this.add(this.delayTime); } - } + } - removeTrainDetail() { - this.mouseEvent.mouseout(); - store.dispatch('map/setTrainDetails', null); - this.deviceModel.down = false; - } - setTrainColor(color) { - this.trainBodyBox && this.trainBodyBox.setStyle('fill', color); - } - setTextTrainServerColor(color) { - this.textTrainServer&&this.textTrainServer.setStyle('textFill', color); - this.textTrainServer&&this.textTrainServer.setStyle('textStroke', color); - } - setTextTrainTargetColor(color) { - this.textTrainTarget&&this.textTrainTarget.setStyle('textFill', color); - this.textTrainTarget&&this.textTrainTarget.setStyle('textStroke', color); - } - setTextTrainNumberColor(color) { - this.textTrainNumber&&this.textTrainNumber.setStyle('textFill', color); - this.textTrainNumber&&this.textTrainNumber.setStyle('textStroke', color); - } - setTextTrainTargetNumberColor(color) { - this.textTrainTargetNumber&&this.textTrainTargetNumber.setStyle('textFill', color); - this.textTrainTargetNumber&&this.textTrainTargetNumber.setStyle('textStroke', color); - } - setHShow(isShow) { - if (this.textH) { - isShow ? this.textH.show() : this.textH.hide(); - } - } - setSShow(isShow) { - if (this.textS) { - isShow ? this.textS.show() : this.textS.hide(); - } - } - setDShow(isShow) { - if (this.textD) { - isShow ? this.textD.show() : this.textD.hide(); - } - } - setAShow(isShow) { - if (this.textA) { - isShow ? this.textA.show() : this.textA.hide(); - } - } - setBodyBoxShape(key, color) { - this.trainBodyBox && this.trainBodyBox.setColor(key, color); - } + removeTrainDetail() { + this.mouseEvent.mouseout(); + store.dispatch('map/setTrainDetails', null); + this.deviceModel.down = false; + } + setTrainColor(color) { + this.trainBodyBox && this.trainBodyBox.setStyle('fill', color); + } + setTextTrainServerColor(color) { + this.textTrainServer && this.textTrainServer.setStyle('textFill', color); + this.textTrainServer && this.textTrainServer.setStyle('textStroke', color); + } + setTextTrainTargetColor(color) { + this.textTrainTarget && this.textTrainTarget.setStyle('textFill', color); + this.textTrainTarget && this.textTrainTarget.setStyle('textStroke', color); + } + setTextTrainNumberColor(color) { + this.textTrainNumber && this.textTrainNumber.setStyle('textFill', color); + this.textTrainNumber && this.textTrainNumber.setStyle('textStroke', color); + } + setTextTrainTargetNumberColor(color) { + this.textTrainTargetNumber && this.textTrainTargetNumber.setStyle('textFill', color); + this.textTrainTargetNumber && this.textTrainTargetNumber.setStyle('textStroke', color); + } + setHShow(isShow) { + if (this.textH) { + isShow ? this.textH.show() : this.textH.hide(); + } + } + setSShow(isShow) { + if (this.textS) { + isShow ? this.textS.show() : this.textS.hide(); + } + } + setDShow(isShow) { + if (this.textD) { + isShow ? this.textD.show() : this.textD.hide(); + } + } + setAShow(isShow) { + if (this.textA) { + isShow ? this.textA.show() : this.textA.hide(); + } + } + setBodyBoxShape(key, color) { + this.trainBodyBox && this.trainBodyBox.setColor(key, color); + } getBoundingRect() { let rect = null; this.eachChild(elem => { @@ -313,29 +315,29 @@ export default class TrainBody extends Group { }); return rect || new BoundingRect(0, 0, 0, 0); } - formatChangePosition(model, style) { - if (this.nameFormat) { - const arr = this.nameFormat.split(':'); - let widthText = 0; - arr.forEach(ele => { - if (ele == 'targetCode') { + formatChangePosition(model, style) { + if (this.nameFormat) { + const arr = this.nameFormat.split(':'); + let widthText = 0; + arr.forEach(ele => { + if (ele == 'targetCode') { !style.Train.common.fixedCoordinates && this.textTrainNumber.setStyle('x', parseInt(model.point.x + widthText + style.Train.common.textOffset) ); - widthText += this.textTrainNumber.getBoundingRect().width; - this.add(this.textTrainNumber); - } else if (ele == 'serviceNumber') { + widthText += this.textTrainNumber.getBoundingRect().width; + this.add(this.textTrainNumber); + } else if (ele == 'serviceNumber') { !style.Train.common.fixedCoordinates && this.textTrainServer.setStyle('x', parseInt(model.point.x + widthText + style.Train.common.textOffset)); - widthText += this.textTrainServer.getBoundingRect().width; - this.add(this.textTrainServer); - } else if (ele == 'tripNumber') { + widthText += this.textTrainServer.getBoundingRect().width; + this.add(this.textTrainServer); + } else if (ele == 'tripNumber') { !style.Train.common.fixedCoordinates && this.textTrainTarget.setStyle('x', parseInt(model.point.x + widthText + style.Train.common.textOffset)); - widthText += this.textTrainTarget.getBoundingRect().width; - this.add(this.textTrainTarget); - } else if (ele == 'groupNumber') { + widthText += this.textTrainTarget.getBoundingRect().width; + this.add(this.textTrainTarget); + } else if (ele == 'groupNumber') { !style.Train.common.fixedCoordinates && this.textTrainTargetNumber.setStyle('x', parseInt(model.point.x + widthText + style.Train.common.textOffset)); - widthText += this.textTrainTargetNumber.getBoundingRect().width; - this.add(this.textTrainTargetNumber); - } - }); - } - } + widthText += this.textTrainTargetNumber.getBoundingRect().width; + this.add(this.textTrainTargetNumber); + } + }); + } + } } From 2b971cdf12a8cf5e79809d20363b138313b8c804 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Mon, 9 Mar 2020 14:23:44 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E6=8C=89?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E8=A1=8C=E8=BD=A6=E7=8A=B6=E6=80=81and?= =?UTF-8?q?=E5=85=B6=E4=BB=96=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/shape/Station/index.js | 51 +++++++++---------- src/jmapNew/shape/StationStand/index.js | 2 +- src/store/modules/socket.js | 2 +- src/utils/stomp.js | 2 +- src/views/newMap/displayNew/index.vue | 10 ++++ src/views/newMap/displayNew/menuDemon.vue | 13 ++--- src/views/newMap/displayNew/menuScript.vue | 13 ++--- .../mapoperate/automaticControl.vue | 6 +-- 8 files changed, 47 insertions(+), 52 deletions(-) diff --git a/src/jmapNew/shape/Station/index.js b/src/jmapNew/shape/Station/index.js index b9f7ce994..fba42a0e9 100644 --- a/src/jmapNew/shape/Station/index.js +++ b/src/jmapNew/shape/Station/index.js @@ -20,14 +20,10 @@ export default class Station extends Group { this.z = 40; this.model = model; this.style = style; - + this.create(); this.createTurnBack(); // 创建按图折返 const path = window.location.href; - if (!path.includes('/map/draw')) { - this.createGuideTotalLock(); // 创建引导总锁 - } - this.prdType = ''; if (path.includes('?')) { const arr = window.location.href.split('?')[1].split('&'); arr.forEach(elem => { @@ -36,6 +32,9 @@ export default class Station extends Group { } }); } + if ((!this.prdType || this.style.StationStand.common.functionButtonShow.indexOf(this.prdType) !== -1) && model.guideTotalLockPoint) { + this.createGuideTotalLock(); // 创建引导总锁 + } this.createControlMode(); this.setState(model); this.checkIsDrawMap(); @@ -121,7 +120,7 @@ export default class Station extends Group { createGuideTotalLock() { // 创建引导总锁 const model = this.model; const style = this.style; - if (model.guideTotalLock || (!this.prdType && style.Station.functionButtonShow.indexOf(this.prdType) !== -1 && model.guideTotalLockPoint)) { + if (model.guideTotalLock) { this.guideLamp = new EControl({ zlevel: this.zlevel, z: this.z, @@ -316,26 +315,26 @@ export default class Station extends Group { // 设置状态 setState(model) { switch (model.controlMode) { - case '': // 无状态 - this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.grayColor); - this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor); - this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor); - break; - case 'Center': // 中控 - this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.grayColor); - this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor); - this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.greenColor); - break; - case 'Local': // 站控 - this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.grayColor); - this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.yellowColor); - this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor); - break; - case 'Emergency': // 紧急站控 - this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.redColor); - this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor); - this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor); - break; + case '': // 无状态 + this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.grayColor); + this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor); + this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor); + break; + case 'Center': // 中控 + this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.grayColor); + this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor); + this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.greenColor); + break; + case 'Local': // 站控 + this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.grayColor); + this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.yellowColor); + this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor); + break; + case 'Emergency': // 紧急站控 + this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.redColor); + this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor); + this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor); + break; } } diff --git a/src/jmapNew/shape/StationStand/index.js b/src/jmapNew/shape/StationStand/index.js index 2b220547c..d49aaadce 100644 --- a/src/jmapNew/shape/StationStand/index.js +++ b/src/jmapNew/shape/StationStand/index.js @@ -35,7 +35,7 @@ class StationStand extends Group { } this.create(); this.createMouseEvent(); - if (!this.prdType || (this.style.StationStand.common.functionButtonShow.indexOf(this.prdType) !== -1 && model.guideTotalLockPoint)) { + if (!this.prdType || this.style.StationStand.common.functionButtonShow.indexOf(this.prdType) !== -1) { this.createFunctionButton(); } this.setVisible(model.visible); diff --git a/src/store/modules/socket.js b/src/store/modules/socket.js index 8649dab82..7fbc857b4 100644 --- a/src/store/modules/socket.js +++ b/src/store/modules/socket.js @@ -2,7 +2,7 @@ import store from '@/store'; import { Notification } from 'element-ui'; function handle(state, data) { - console.log(data, 'socket订阅'); + // console.log(data, 'socket订阅'); const msg = data.body; const path = window.location.href; switch (data.type) { diff --git a/src/utils/stomp.js b/src/utils/stomp.js index 5928fd34e..87ff7f943 100644 --- a/src/utils/stomp.js +++ b/src/utils/stomp.js @@ -22,7 +22,7 @@ export function creatSubscribe(topic, header) { function callback(Response) { if (store) { var data = JSON.parse(Response.body); - // console.log(data); + // console.log(Response.body); store.dispatch('socket/setStomp', data); } else { callback(Response); diff --git a/src/views/newMap/displayNew/index.vue b/src/views/newMap/displayNew/index.vue index 13beb5cbb..428e2919f 100644 --- a/src/views/newMap/displayNew/index.vue +++ b/src/views/newMap/displayNew/index.vue @@ -322,6 +322,16 @@ export default { this.$store.dispatch('scriptRecord/updateSimulationPause', resp.data.pause); this.questId = Number(resp.data.questId) || 0; this.$store.dispatch('training/setInitTime', +new Date(`${new Date().getFullYear()} ${timeFormat(resp.data.systemTime)}`)); + if (resp.data.planRunning) { + this.$store.dispatch('training/simulationStart'); + } else { + this.$store.dispatch('training/over'); + } + if (this.isDemon) { + this.$refs.menuDemon.initPlannedDriving(resp.data.planRunning); + } else if (this.isScript) { + this.$refs.menuScript.initPlannedDriving(resp.data.planRunning); + } } }, // 加载地图数据 diff --git a/src/views/newMap/displayNew/menuDemon.vue b/src/views/newMap/displayNew/menuDemon.vue index 02eb77f64..948e2c5e0 100644 --- a/src/views/newMap/displayNew/menuDemon.vue +++ b/src/views/newMap/displayNew/menuDemon.vue @@ -113,21 +113,14 @@ export default { if (this.try != '0') { this.loadInitData(); } - - const resp = '';// await runDiagramIsStart(this.group); - if (resp && resp.data) { - this.isDisable = true; - this.$store.dispatch('training/simulationStart'); - } else { - this.isDisable = false; - this.$store.dispatch('training/over'); - } - this.change3dname(); } catch (error) { console.log(error); } }, + initPlannedDriving(isDisable) { + this.isDisable = isDisable; + }, loadInitData() { const data = { mapId: this.$route.query.mapId, diff --git a/src/views/newMap/displayNew/menuScript.vue b/src/views/newMap/displayNew/menuScript.vue index 9ee7c62c3..64ff914e1 100644 --- a/src/views/newMap/displayNew/menuScript.vue +++ b/src/views/newMap/displayNew/menuScript.vue @@ -21,7 +21,6 @@ import SetTime from './demon/setTime'; import { Notification } from 'element-ui'; import { ranAsPlan, runDiagramOver, runDiagramGetTime } from '@/api/simulation'; -import { runDiagramIsStart } from '@/api/simulation'; import { timeFormat } from '@/utils/date'; import { EventBus } from '@/scripts/event-bus'; @@ -76,20 +75,14 @@ export default { methods: { async initLoadPage() { try { - const resp = '';// await runDiagramIsStart(this.group); - if (resp && resp.data) { - this.isDisable = true; - this.$store.dispatch('training/simulationStart'); - } else { - this.isDisable = false; - this.$store.dispatch('training/over'); - } - await this.loadSystemTime(); } catch (error) { console.log(error); } }, + initPlannedDriving(isDisable) { + this.isDisable = isDisable; + }, selectBeginTime() { this.$refs.setTime.doShow(); }, diff --git a/src/views/newMap/newMapdraft/mapoperate/automaticControl.vue b/src/views/newMap/newMapdraft/mapoperate/automaticControl.vue index 33968a55c..aa89ea47d 100644 --- a/src/views/newMap/newMapdraft/mapoperate/automaticControl.vue +++ b/src/views/newMap/newMapdraft/mapoperate/automaticControl.vue @@ -115,7 +115,7 @@ export default { { prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' }, { prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' } ] }, - { prop:'cycleCode', label: '自动折返进路code:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.autoList }, + { prop:'cycleCode', label: '自动折返进路code:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.autoList }, ] } } @@ -126,14 +126,14 @@ export default { const form = { labelWidth: '150px', items: [ - { prop:'cycleCode', label: '自动折返进路:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.autoList }, + { prop:'cycleCode', label: '自动折返进路:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.autoList }, { prop: 'name', label: '自动折返名称:', type: 'input' }, { prop: 'subtitleName', label: '副标题名称:', type: 'input' }, { prop: 'position', label: '坐标:', type: 'coordinate', width: '140px', children: [ { prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' }, { prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' } ] }, - + ] }; return form; From 103afa9f05c3f84a1ff484f52a5922a8d21677f5 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Mon, 9 Mar 2020 17:02:13 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=93=88=E5=B0=94?= =?UTF-8?q?=E6=BB=A8=E7=BA=BF=E8=B7=AF=E9=81=93=E5=B2=94=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/haerbin_01.js | 2 +- src/jmapNew/shape/Psd/index.js | 3 +++ src/jmapNew/shape/Section/index.js | 12 +++++++++--- src/jmapNew/shape/Switch/index.js | 10 ++++++++++ 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/jmapNew/config/skinCode/haerbin_01.js b/src/jmapNew/config/skinCode/haerbin_01.js index 80670bf0f..664441199 100644 --- a/src/jmapNew/config/skinCode/haerbin_01.js +++ b/src/jmapNew/config/skinCode/haerbin_01.js @@ -370,7 +370,7 @@ class SkinCode extends defaultStyle { }, sectionAction: { flag: true, // 道岔 关联区段显示 - spareColor: '#5b5b5b', // 区段显示颜色 + spareColor: '#5b5b5b', // 区段显示颜色 (灰色) }, core: { splice: true, // 哈尔滨特殊显示 diff --git a/src/jmapNew/shape/Psd/index.js b/src/jmapNew/shape/Psd/index.js index e479a92b5..111828796 100644 --- a/src/jmapNew/shape/Psd/index.js +++ b/src/jmapNew/shape/Psd/index.js @@ -65,6 +65,9 @@ export default class Line2 extends Group { setState(model) { /** 设置屏蔽门开关*/ + // if (model.name == 'Psd44') { + // console.log(model, model.screenDoorOpenStatus, '1 为关门 0 为开门'); + // } model.screenDoorOpenStatus == 0 && this.openDoor(); /** 开门*/ model.screenDoorOpenStatus != 0 && this.closeDoor(); /** 关门*/ diff --git a/src/jmapNew/shape/Section/index.js b/src/jmapNew/shape/Section/index.js index 63bf15174..3c5e62866 100644 --- a/src/jmapNew/shape/Section/index.js +++ b/src/jmapNew/shape/Section/index.js @@ -781,18 +781,24 @@ export default class Section extends Group { } /** 设置状态*/ - setState(model) { + setState(model, flag = false) { this.recover(); // 实际上就是 状态重置 必须在设置其他状态之前 设置颜色之类的 - if (this.style.Switch.sectionAction.flag && model.relSwitchCode) { + if (this.style.Switch.sectionAction.flag && model.relSwitchCode && !flag) { const switchModel = Vue.prototype.$jlmap.mapDevice[model.relSwitchCode]; - // const switchModel = store.getters['map/getDeviceByCode'](model.relSwitchCode); + // if (switchModel.name == 'D1801' || switchModel.name == 'D1802' || switchModel.name == 'D1803' || switchModel.name == 'D1804') { + // console.log('switchModel', switchModel, switchModel.name, switchModel.normalPosition, '1 定位 0 反位'); + // } if (switchModel.normalPosition != 0) { // 定位情况 const sectionC = Vue.prototype.$jlmap.mapDevice[switchModel.sectionCCode]; sectionC && sectionC.instance && sectionC.instance.section.setStyle({ stroke: this.style.Switch.sectionAction.spareColor }); + const sectionB = Vue.prototype.$jlmap.mapDevice[switchModel.sectionBCode]; + sectionB && sectionB.instance && sectionB.instance.setState(sectionB, true); } else if (switchModel.normalPosition == 0) { // 反位情况 const sectionB = Vue.prototype.$jlmap.mapDevice[switchModel.sectionBCode]; sectionB && sectionB.instance && sectionB.instance.section.setStyle({ stroke: this.style.Switch.sectionAction.spareColor }); + const sectionC = Vue.prototype.$jlmap.mapDevice[switchModel.sectionCCode]; + sectionC && sectionC.instance && sectionC.instance.setState(sectionC, true); } } /** 道岔保护区段锁闭 */ diff --git a/src/jmapNew/shape/Switch/index.js b/src/jmapNew/shape/Switch/index.js index bad5eac3b..d47c73450 100644 --- a/src/jmapNew/shape/Switch/index.js +++ b/src/jmapNew/shape/Switch/index.js @@ -441,6 +441,16 @@ export default class Switch extends Group { model.blockade && this.block(); /** 区段切除*/ model.cutOff && this.setSwitchCutOff(); + if (this.style.Switch.sectionAction.flag) { + const switchModel = Vue.prototype.$jlmap.mapDevice[model.code]; + if (switchModel.normalPosition != 0) { // 定位情况 + const sectionC = Vue.prototype.$jlmap.mapDevice[switchModel.sectionCCode]; + sectionC && sectionC.instance && sectionC.instance.setState(sectionC); + } else if (switchModel.normalPosition == 0) { // 反位情况 + const sectionB = Vue.prototype.$jlmap.mapDevice[switchModel.sectionBCode]; + sectionB && sectionB.instance && sectionB.instance.setState(sectionB); + } + } } getBoundingRect() { From 7f4e6fb13cd0606c0ff99617902e4317514f6af7 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Mon, 9 Mar 2020 17:38:15 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E6=8C=89?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E8=A1=8C=E8=BD=A6=E7=8A=B6=E6=80=81and?= =?UTF-8?q?=E5=85=B6=E4=BB=96=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/langs/en/map.js | 6 +- src/i18n/langs/zh/map.js | 6 +- src/jmapNew/config/skinCode/bejing_01.js | 30 ++-- src/jmapNew/config/skinCode/chengdu_03.js | 55 +++++-- src/jmapNew/config/skinCode/ningbo_01.js | 42 ++--- src/jmapNew/shape/Automactic/index.js | 15 +- src/jmapNew/shape/Text/index.js | 79 +++++----- src/utils/baseUrl.js | 2 +- .../dataRelation/turnedoperate/route.vue | 143 ++++++++++++++---- .../newMap/newMapdraft/mapoperate/line.vue | 15 ++ .../mapoperate/outFrameControl.vue | 15 +- .../newMap/newMapdraft/mapoperate/text.vue | 15 ++ 12 files changed, 294 insertions(+), 129 deletions(-) diff --git a/src/i18n/langs/en/map.js b/src/i18n/langs/en/map.js index 46636dae3..ffe35dbb3 100644 --- a/src/i18n/langs/en/map.js +++ b/src/i18n/langs/en/map.js @@ -587,5 +587,9 @@ export default { logicalSectionEndOffset: 'Logical section start offset:', associateSwitchSection: 'Associate switch section:', failedToSetParkingPointOffset: 'failed to set parking point offset: the actual length of the section is less than the offset distance.', - correlationWindow: 'Correlation window' + correlationWindow: 'Correlation window', + showConditions: 'Show conditions:', + localCenter: 'Local&Center', + local: 'Local', + center: 'Center' }; diff --git a/src/i18n/langs/zh/map.js b/src/i18n/langs/zh/map.js index c4bfdb1a9..890ac0ea8 100644 --- a/src/i18n/langs/zh/map.js +++ b/src/i18n/langs/zh/map.js @@ -580,5 +580,9 @@ export default { logicalSectionEndOffset: '逻辑区段终点偏移:', associateSwitchSection: '关联道岔区段:', failedToSetParkingPointOffset: '设置停车点偏移量失败:区段实际长度小于偏移距离。', - correlationWindow: '关联车次窗' + correlationWindow: '关联车次窗', + showConditions: '显示条件:', + localCenter: '现地&行调', + local: '现地', + center: '行调' }; diff --git a/src/jmapNew/config/skinCode/bejing_01.js b/src/jmapNew/config/skinCode/bejing_01.js index 03e6c8f8d..ada8ab466 100644 --- a/src/jmapNew/config/skinCode/bejing_01.js +++ b/src/jmapNew/config/skinCode/bejing_01.js @@ -134,18 +134,18 @@ class SkinCode extends defaultStyle { color: '#7F7F7F' // 区段边界符颜色 }, block: { - special: false, // 区段特殊显示 + special: false // 区段特殊显示 }, trainPosition:{ - display: false // 列车实时位置显示 + display: false // 列车实时位置显示 } }; this[deviceType.Signal] = { distance: 0, // 设备距离区段的距离 post: { - standardLength: 6, // 高柱长度 - standardHeight: 6, // 灯柱高度 + standardLength: 6, // 高柱长度 + standardHeight: 6, // 灯柱高度 standardColor: '#5578B6', // 灯灯柱颜色 standardWidth: 1.5 // 灯柱宽度 }, @@ -212,7 +212,7 @@ class SkinCode extends defaultStyle { this[deviceType.MapCycleButtonVO] = { // 是否显示 - visible: true, + visibleConditions: ['01'], text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -221,13 +221,13 @@ class SkinCode extends defaultStyle { subtitleText: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 - distance: 17 // 等于副标题距离 + distance: 17 // 等于副标题距离 }, lamp: { - lineDash: null, // 灯的包围框 - borderShow: false, // 是否显示边框 - stroke: '#FFFFFF', // 框的颜色 - fill: 'rgba(0,0,0,0)', // 填充色 + lineDash: null, // 灯的包围框 + borderShow: false, // 是否显示边框 + stroke: '#FFFFFF', // 框的颜色 + fill: 'rgba(0,0,0,0)', // 填充色 radiusR: 6, // 控制灯大小 controlColor: '#b5b3b3' // 控制灯颜色 (灰色) }, @@ -295,7 +295,7 @@ class SkinCode extends defaultStyle { }, lamp: { radiusR: 6, // 控制灯大小 - lampColor: '#5A5D5A' // 功能按钮颜色 + lampColor: '#5A5D5A' // 功能按钮颜色 } }; @@ -396,8 +396,8 @@ class SkinCode extends defaultStyle { monolockColor: '#870E10' // 道岔单锁颜色 }, sectionAction: { - flag: false, // 道岔 关联区段显示 - spareColor: '#5b5b5b', // 区段显示颜色 + flag: false, // 道岔 关联区段显示 + spareColor: '#5b5b5b' // 区段显示颜色 }, core: { length: 6 // 道岔单边长度 @@ -408,7 +408,7 @@ class SkinCode extends defaultStyle { rectShow: false // 道岔单锁 矩形框是否显示 }, block: { // 道岔封锁配置 - blockName: 'default', // 默认道岔封锁类型 + blockName: 'default', // 默认道岔封锁类型 nameBorderShow: true, // 道岔名称是否有包围框 显示 contentRectShow: false // 道岔封锁显示 }, @@ -499,7 +499,7 @@ class SkinCode extends defaultStyle { distance: 5 // 灯跟文字距离 }, lamp: { - fill: 'rgba(0,0,0,0)', // 填充色 + fill: 'rgba(0,0,0,0)', // 填充色 radiusR: 6, // 控制灯大小 controlColor: '#b5b3b3' // 控制灯颜色 (灰色) } diff --git a/src/jmapNew/config/skinCode/chengdu_03.js b/src/jmapNew/config/skinCode/chengdu_03.js index 34d802344..ad1c8fba2 100644 --- a/src/jmapNew/config/skinCode/chengdu_03.js +++ b/src/jmapNew/config/skinCode/chengdu_03.js @@ -137,18 +137,18 @@ class SkinCode extends defaultStyle { distance: 5 // 限速线距离区段距离 }, block: { - special: false, // 区段特殊显示 + special: false // 区段特殊显示 }, trainPosition:{ - display: false // 列车实时位置显示 + display: false // 列车实时位置显示 } }; this[deviceType.Signal] = { distance: 10, // 设备距离区段的距离 post: { - standardLength: 6, // 高柱长度 - standardHeight: 6, // 灯柱高度 + standardLength: 6, // 高柱长度 + standardHeight: 6, // 灯柱高度 standardColor: '#FFFFFF', // 灯柱颜色 standardWidth: 2 // 灯柱宽度 }, @@ -228,7 +228,7 @@ class SkinCode extends defaultStyle { designatedJumpStopColor: '#808080' // 站台指定列车跳停颜色 }, standEmergent: { // 紧急关闭 - flicker: true, // 闪烁 + flicker: true, // 闪烁 mergentR: 5, // 站台紧急关闭半径 offset: {x: 0, y: 15}, // 站台紧急关闭偏移量 closeColor: '#F61107' // 站台紧急关闭颜色 @@ -275,7 +275,7 @@ class SkinCode extends defaultStyle { }, lamp: { radiusR: 6, // 控制灯大小 - lampColor: '#5A5D5A' // 功能按钮颜色 + lampColor: '#5A5D5A' // 功能按钮颜色 } }; @@ -310,7 +310,7 @@ class SkinCode extends defaultStyle { lamp: { radiusR: 6, // 控制灯大小 controlColor: '#FFFF00', // 控制灯颜色 - guideColor: '#5A5D5A' // 引导总锁灯颜色 + guideColor: '#5A5D5A' // 引导总锁灯颜色 }, turnBack: { // 按图折返 lamp: 1, // 灯数量 @@ -368,8 +368,8 @@ class SkinCode extends defaultStyle { monolockColor: '#FFFFFF' // 道岔单锁颜色 }, sectionAction: { - flag: false, // 道岔 关联区段显示 - spareColor: '#5b5b5b', // 区段显示颜色 + flag: false, // 道岔 关联区段显示 + spareColor: '#5b5b5b' // 区段显示颜色 }, core: { length: 6 // 道岔单边长度 @@ -382,7 +382,7 @@ class SkinCode extends defaultStyle { rectBorderColor: '#fff' // 矩形边框颜色 }, block: { // 道岔封锁配置 - blockName: 'default', // 默认道岔封锁类型 + blockName: 'default', // 默认道岔封锁类型 nameBorderShow: false, // 道岔名称是否有包围框 显示 contentRectShow: true, // 道岔封锁显示 contentRectColor: 'red' // 道岔封锁边框颜色 @@ -439,12 +439,12 @@ class SkinCode extends defaultStyle { subtitleText: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 - distance: 17 // 等于副标题距离 + distance: 17 // 等于副标题距离 }, lamp: { - lineDash: null, // 灯的包围框 - stroke: '#FFFFFF', // 框的颜色 - fill: 'rgba(0,0,0,0)', // 填充色 + lineDash: null, // 灯的包围框 + stroke: '#FFFFFF', // 框的颜色 + fill: 'rgba(0,0,0,0)', // 填充色 radiusR: 6, // 控制灯大小 controlColor: '#b5b3b3' // 控制灯颜色 (灰色) } @@ -458,11 +458,36 @@ class SkinCode extends defaultStyle { distance: 5 // 灯跟文字距离 }, lamp: { - fill: 'rgba(0,0,0,0)', // 填充色 + fill: 'rgba(0,0,0,0)', // 填充色 radiusR: 6, // 控制灯大小 controlColor: '#b5b3b3' // 控制灯颜色 (灰色) } }; + this[deviceType.MapCycleButtonVO] = { + // 是否显示 + visibleConditions: ['01'], + text: { + fontSize: 11, // 字体大小 + fontWeight: 'normal', // 字体粗细 + distance: 5 // 灯跟文字距离 + }, + subtitleText: { + fontSize: 11, // 字体大小 + fontWeight: 'normal', // 字体粗细 + distance: 17 // 等于副标题距离 + }, + lamp: { + borderShow: false, // 是否显示边框 + lineDash: null, // 灯的包围框 + stroke: '#FFFFFF', // 框的颜色 + fill: 'rgba(0,0,0,0)', // 填充色 + radiusR: 6, // 控制灯大小 + controlColor: '#b5b3b3' // 控制灯颜色 (灰色) + }, + OutFrame: { + + } + }; this[deviceType.TrainWindow] = { lineColor: '#4DD43F', // 车次窗颜色 lineDash: null, // 车次窗虚线间隔 diff --git a/src/jmapNew/config/skinCode/ningbo_01.js b/src/jmapNew/config/skinCode/ningbo_01.js index cdda94d20..c8ddb61a5 100644 --- a/src/jmapNew/config/skinCode/ningbo_01.js +++ b/src/jmapNew/config/skinCode/ningbo_01.js @@ -134,19 +134,19 @@ class SkinCode extends defaultStyle { color: 'white' // 区段边界符颜色 }, block: { - special: false, // 区段特殊显示 - blockGlint: true, // 区段封锁闪烁显示 + special: false, // 区段特殊显示 + blockGlint: true // 区段封锁闪烁显示 }, trainPosition:{ - display: false // 列车实时位置显示 + display: false // 列车实时位置显示 } }; this[deviceType.Signal] = { distance: 8, // 设备距离区段的距离 post: { - standardLength: 6, // 高柱长度 - standardHeight: 6, // 灯柱高度 + standardLength: 6, // 高柱长度 + standardHeight: 6, // 灯柱高度 standardColor: '#C0C0C0', // 灯柱颜色 standardWidth: 2 // 灯柱宽度 }, @@ -208,7 +208,7 @@ class SkinCode extends defaultStyle { this[deviceType.MapCycleButtonVO] = { // 是否显示 - visible: true, + visibleConditions: ['01', '02'], text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 @@ -217,13 +217,13 @@ class SkinCode extends defaultStyle { subtitleText: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 - distance: 17 // 等于副标题距离 + distance: 17 // 等于副标题距离 }, lamp: { - borderShow: true, // 是否显示边框 - lineDash: null, // 灯的包围框 - stroke: '#FFFFFF', // 框的颜色 - fill: 'rgba(0,0,0,0)', // 填充色 + borderShow: true, // 是否显示边框 + lineDash: null, // 灯的包围框 + stroke: '#FFFFFF', // 框的颜色 + fill: 'rgba(0,0,0,0)', // 填充色 radiusR: 6, // 控制灯大小 controlColor: '#b5b3b3' // 控制灯颜色 (灰色) }, @@ -297,7 +297,7 @@ class SkinCode extends defaultStyle { }, lamp: { radiusR: 6, // 控制灯大小 - lampColor: '#5A5D5A' // 功能按钮颜色 + lampColor: '#5A5D5A' // 功能按钮颜色 } }; @@ -368,8 +368,8 @@ class SkinCode extends defaultStyle { substationControlShow: true, // 站控按钮显示 interconnectedControlShow: false, // 联锁控显示 centerControlButtonShow: true, // 中控显示 - stroke: '#FFFFFF', // 框的颜色 - fill: 'rgba(0,0,0,0)', // 填充色 + stroke: '#FFFFFF', // 框的颜色 + fill: 'rgba(0,0,0,0)' // 填充色 }, arrow: { show: false // 控制模式箭头显隐 @@ -388,12 +388,12 @@ class SkinCode extends defaultStyle { borderColor: '#FE0000', // 道岔边框颜色 lossColor: 'lightgreen', // 道岔失去颜色 locateColor: 'lightgreen', // 道岔定位颜色 - inversionColor: '#FFFF00', // 道岔反位颜色 + inversionColor: '#FFFF00', // 道岔反位颜色 monolockColor: '#FFFFFF' // 道岔单锁颜色 }, sectionAction: { - flag: false, // 道岔 关联区段显示 - spareColor: '#5b5b5b', // 区段显示颜色 + flag: false, // 道岔 关联区段显示 + spareColor: '#5b5b5b' // 区段显示颜色 }, core: { length: 10 // 道岔单边长度 @@ -402,13 +402,13 @@ class SkinCode extends defaultStyle { locationColor: '#FF0000', // 道岔单锁'定位'颜色 (红色) inversionColor: '#FF0000', // 道岔单锁'反位'颜色 (红色) rectShow: false, // 道岔单锁 矩形框是否显示 - arcShow: true, // 道岔单锁 圆形显示 - arcBorderColor: 'green', // 圆形单锁框边框颜色 + arcShow: true, // 道岔单锁 圆形显示 + arcBorderColor: 'green', // 圆形单锁框边框颜色 rectWidth: 22, // 矩形框 宽高 rectBorderColor: '#fff' // 矩形边框颜色 }, block: { // 道岔封锁配置 - blockName: 'ningbo_01', // 默认道岔封锁类型 + blockName: 'ningbo_01', // 默认道岔封锁类型 nameBorderShow: true, // 道岔名称是否有包围框 显示 contentRectShow: false, // 道岔封锁显示 contentRectColor: 'red' // 道岔封锁边框颜色 @@ -465,7 +465,7 @@ class SkinCode extends defaultStyle { distance: 5 // 灯跟文字距离 }, lamp: { - fill: 'rgba(0,0,0,0)', // 填充色 + fill: 'rgba(0,0,0,0)', // 填充色 radiusR: 6, // 控制灯大小 controlColor: '#b5b3b3' // 控制灯颜色 (灰色) } diff --git a/src/jmapNew/shape/Automactic/index.js b/src/jmapNew/shape/Automactic/index.js index a7e7fcc63..f9f52758f 100644 --- a/src/jmapNew/shape/Automactic/index.js +++ b/src/jmapNew/shape/Automactic/index.js @@ -16,9 +16,18 @@ export default class Automactic extends Group { this.zlevel = model.zlevel; this.model = model; this.style = style; - this.create(); - this.createMouseEvent(); - this.setState(model); + const arr = window.location.href.split('?')[1].split('&'); + this.prdType = ''; + arr.forEach(elem => { + if (elem.split('=')[0] === 'prdType') { + this.prdType = elem.split('=')[1]; + } + }); + if (!this.prdType || this.style.AutomaticRoute.displayCondition.indexOf(this.prdType) !== -1) { + this.create(); + this.createMouseEvent(); + this.setState(model); + } } create() { diff --git a/src/jmapNew/shape/Text/index.js b/src/jmapNew/shape/Text/index.js index 08b27ddf3..f17ef21bf 100644 --- a/src/jmapNew/shape/Text/index.js +++ b/src/jmapNew/shape/Text/index.js @@ -2,43 +2,50 @@ import Text from 'zrender/src/graphic/Text'; import Group from 'zrender/src/container/Group'; export default class Text2 extends Group { - constructor(model, style) { - super(); - this._code = model.code; - this._type = model._type; - this.name = model.code; - this.zlevel = model.zlevel; - this.model = model; - this.style = style; - this.z = 6; - this.create(); - this.setState(model); - } + constructor(model, style) { + super(); + this._code = model.code; + this._type = model._type; + this.name = model.code; + this.zlevel = model.zlevel; + this.model = model; + this.style = style; + this.z = 6; + const arr = window.location.href.split('?')[1].split('&'); + this.prdType = ''; + arr.forEach(elem => { + if (elem.split('=')[0] === 'prdType') { + this.prdType = elem.split('=')[1]; + } + }); + this.create(); + this.setState(model); + } - create() { - var model = this.model; - var [direction, content] = model.content.split('::'); - if (direction == 'V') { - content = content.split('').join('\n'); - } else if (direction != 'H') { - content = model.content; - } + create() { + var model = this.model; + var [direction, content] = model.content.split('::'); + if (direction == 'V') { + content = content.split('').join('\n'); + } else if (direction != 'H') { + content = model.content; + } - this.text = new Text({ - zlevel: this.zlevel, - z: this.z, - style: { - x: model.position.x, - y: model.position.y, - text: content, - textFont: model.font, - textFill: model.fontColor, - textAlign: 'middle' - } - }); - this.add(this.text); - } + this.text = new Text({ + zlevel: this.zlevel, + z: this.z, + style: { + x: model.position.x, + y: model.position.y, + text: content, + textFont: model.font, + textFill: model.fontColor, + textAlign: 'middle' + } + }); + this.add(this.text); + } - setState(model) { - } + setState(model) { + } } diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index ae880e5e3..4d1d2ed3b 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -3,7 +3,7 @@ export function getBaseUrl() { let BASE_API; if (process.env.NODE_ENV === 'development') { // BASE_API = 'https://joylink.club/jlcloud'; - BASE_API = 'https://test.joylink.club/jlcloud'; + // BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'http://192.168.3.5:9000'; // 袁琪 // BASE_API = 'http://192.168.3.6:9000'; // 旭强 // BASE_API = 'http://192.168.3.41:9000'; // 张赛 diff --git a/src/views/newMap/newMapdraft/dataRelation/turnedoperate/route.vue b/src/views/newMap/newMapdraft/dataRelation/turnedoperate/route.vue index 12982be47..60d072668 100644 --- a/src/views/newMap/newMapdraft/dataRelation/turnedoperate/route.vue +++ b/src/views/newMap/newMapdraft/dataRelation/turnedoperate/route.vue @@ -6,38 +6,81 @@ - - - - - - - - 选择 - - - - 选择 - - - + + - {{ $t('map.activate') }} + + + + 选择 + + + + 选择 + + + + + + {{ $t('map.activate') }} + + + + + + + 选择 + + + + 选择 + + + + + + {{ $t('map.activate') }} + + + {{ $t('map.save') }} @@ -92,6 +135,7 @@ export default { field: '', isSave: true, loading: false, + showSecond: false, addModel: { id: '', code: '', @@ -103,7 +147,12 @@ export default { turnBackRouteCode: '', basicRouteCode:'', priority: 0, - reentryTrackCode: '' + reentryTrackCode: '', + turnBackRoute2Name: '', + basicRoute2Name: '', + reentryTrack2Code: null, + turnBackRoute2Code: null, + basicRoute2Code: null }, editShow: false, rules: { @@ -164,6 +213,9 @@ export default { } } }, + setShowSecond(flag) { + this.showSecond = flag; + }, buildModel(code) { const model = Object.assign({}, this.addModel); if (code) { model['code'] = code; } @@ -207,6 +259,11 @@ export default { this.addModel.basicRouteCode = ''; this.addModel.turnBackRouteName = ''; this.addModel.turnBackRouteCode = ''; + this.addModel.turnBackRoute2Name = ''; + this.addModel.basicRoute2Name = ''; + this.addModel.reentryTrack2Code = null; + this.addModel.turnBackRoute2Code = null; + this.addModel.basicRoute2Code = null; this.addModel.stationCode = ''; this.addModel.mapId = this.mapInfo.id; this.addModel.code = ''; @@ -221,16 +278,36 @@ export default { } else if (type === 'turnBackRoute') { this.addModel.turnBackRouteName = data.name; this.addModel.turnBackRouteCode = data.code; + } else if (type === 'basicRoute2') { + this.addModel.basicRoute2Name = data.name; + this.addModel.basicRoute2Code = data.code; + } else if (type === 'turnBackRoute2') { + this.addModel.turnBackRoute2Name = data.name; + this.addModel.turnBackRoute2Code = data.code; } }, async handelRouteName(data) { - const model = {}; - const resp1 = await getRouteNewList(this.$route.params.mapId, {pageSize:10, pageNum:1, code: data.basicRouteCode}); - model.basicRouteName = resp1.data.list.length ? resp1.data.list[0].name : ''; - - const resp2 = await getRouteNewList(this.$route.params.mapId, {pageSize:10, pageNum:1, code: data.turnBackRouteCode}); - model.turnBackRouteName = resp2.data.list.length ? resp2.data.list[0].name : ''; - + const model = { + reentryTrack2Code: null, + turnBackRoute2Code: null, + basicRoute2Code: null + }; + const resp1 = await getRouteNewList(this.$route.params.mapId, {pageSize:9999, pageNum:1}); + if (resp1 && resp1.code == '200') { + resp1.data.list.forEach(item => { + if (item.code === data.turnBackRouteCode) { + model.turnBackRouteName = item.name; + } else if (item.code === data.basicRouteCode) { + model.basicRouteName = item.name; + } else if (item.code === data.turnBackRoute2Code) { + model.turnBackRoute2Name = item.name; + } else if (item.code === data.basicRoute2Code) { + model.basicRoute2Name = item.name; + } + }); + } else { + this.$messageBox('获取进路列表失败!'); + } this.addModel = deepAssign(model, data); } } diff --git a/src/views/newMap/newMapdraft/mapoperate/line.vue b/src/views/newMap/newMapdraft/mapoperate/line.vue index 5fb4316fb..443cf9144 100644 --- a/src/views/newMap/newMapdraft/mapoperate/line.vue +++ b/src/views/newMap/newMapdraft/mapoperate/line.vue @@ -28,6 +28,13 @@ px + + + {{ $t('map.localCenter') }} + {{ $t('map.center') }} + {{ $t('map.local') }} + +
{{ $t('map.linePoint') }}
@@ -101,15 +108,22 @@ export default { return { activeName: 'first', LineTypeList: [], + showConditionsList: [ + { label: this.$t('map.localCenter'), value: '01'}, + { label: this.$t('map.center'), value: '02' }, + { label: this.$t('map.local'), value: '03'} + ], editModel: { code: '', type: '', width: 1, + showConditions: '01', points: [] }, addModel: { type: '', width: 1, + showConditions: '01', points: [ { x: 0, y: 0 }, { x: 100, y: 100 } @@ -159,6 +173,7 @@ export default { { prop: 'code', label: this.$t('map.lineCoding'), type: 'select', optionLabel: 'code', optionValue: 'code', options: this.lineList, change: true, deviceChange: this.deviceChange }, { prop: 'type', label: this.$t('map.lineType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.LineTypeList }, { prop: 'width', label: this.$t('map.lineWidth'), type: 'number', min: 1, placeholder: 'px' }, + { prop: 'showConditions', label: this.$t('map.showConditions'), type: 'radio', optionLabel: 'label', optionValue:'value', radioList: this.showConditionsList}, { prop: 'points', label: this.$t('map.segmentCoordinates'), type: 'points', width: '100px', isHidden: !this.isPointsShow, addPoint: this.addPoint, delPoint: this.delPoint } ] }, diff --git a/src/views/newMap/newMapdraft/mapoperate/outFrameControl.vue b/src/views/newMap/newMapdraft/mapoperate/outFrameControl.vue index 1443f11ee..486e8dbf1 100644 --- a/src/views/newMap/newMapdraft/mapoperate/outFrameControl.vue +++ b/src/views/newMap/newMapdraft/mapoperate/outFrameControl.vue @@ -102,10 +102,16 @@ export default { return { activeName: 'first', LineTypeList: [], + showConditionsList: [ + { label: this.$t('map.localCenter'), value: '01'}, + { label: this.$t('map.center'), value: '02' }, + { label: this.$t('map.local'), value: '03'} + ], editModel: { code: '', width: 1, height: 1, + showConditions: '01', position: { x: 0, y: 0 @@ -115,6 +121,7 @@ export default { code: '', width: 200, height: 100, + showConditions: '01', position: { x: 0, y: 0 @@ -158,10 +165,11 @@ export default { { prop: 'code', label: this.$t('map.lineCoding'), type: 'select', optionLabel: 'code', optionValue: 'code', options: this.outerFrameList, change: true, deviceChange: this.deviceChange }, { prop: 'width', label: '宽度:', type: 'number', min: 1, placeholder: 'px' }, { prop: 'height', label: '高度:', type: 'number', min: 1, placeholder: 'px' }, + { prop: 'showConditions', label: this.$t('map.showConditions'), type: 'radio', optionLabel: 'label', optionValue:'value', radioList: this.showConditionsList}, { prop: 'position', label: '坐标:', type: 'coordinate', width: '140px', children: [ { prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' }, { prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' } - ] }, + ] } ] } } @@ -177,14 +185,15 @@ export default { item: [ { prop: 'width', label: '宽度:', type: 'number', min: 1, placeholder: 'px' }, { prop: 'height', label: '高度:', type: 'number', min: 1, placeholder: 'px' }, + { prop: 'showConditions', label: this.$t('map.showConditions'), type: 'radio', optionLabel: 'label', optionValue:'value', radioList: this.showConditionsList}, { prop: 'position', label: '坐标:', type: 'coordinate', width: '110px', children: [ { prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' }, { prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' } - ] }, + ] } ] } } - } + }; }, isPointsShow() { return this.editModel.points.length > 0; diff --git a/src/views/newMap/newMapdraft/mapoperate/text.vue b/src/views/newMap/newMapdraft/mapoperate/text.vue index 63ffcf263..393a95cfa 100644 --- a/src/views/newMap/newMapdraft/mapoperate/text.vue +++ b/src/views/newMap/newMapdraft/mapoperate/text.vue @@ -25,6 +25,13 @@ + + + {{ $t('map.localCenter') }} + {{ $t('map.center') }} + {{ $t('map.local') }} + +
{{ $t('map.textPoints') }} Date: Mon, 9 Mar 2020 18:25:25 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E5=88=97=E8=BD=A6=E4=BD=8D=E7=BD=AE?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/haerbin_01.js | 2 +- src/jmapNew/shape/Train/TrainBody.js | 4 ++-- src/jmapNew/shape/Train/index.js | 6 ++++-- src/utils/baseUrl.js | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/jmapNew/config/skinCode/haerbin_01.js b/src/jmapNew/config/skinCode/haerbin_01.js index a72e399ff..4b7256d8c 100644 --- a/src/jmapNew/config/skinCode/haerbin_01.js +++ b/src/jmapNew/config/skinCode/haerbin_01.js @@ -560,7 +560,7 @@ class SkinCode extends defaultStyle { trainHeadTriangleSecond: { x: 4, y: 7.5 }, // 列车车头三角坐标2偏移量 trainHeadTriangleThird: { x: 0, y: 15 }, // 列车车头三角坐标3偏移量 trainHeadRectHeight: 15, // 列车车头矩形高度 - trainConntWidth: 4, // 列车竖杠的宽度 + trainConntWidth: 0, // 列车竖杠的宽度 trainHeadFillColor: '#EF0C08'// 列车车头矩形填充颜色 }, common: { diff --git a/src/jmapNew/shape/Train/TrainBody.js b/src/jmapNew/shape/Train/TrainBody.js index 030487617..c58218619 100644 --- a/src/jmapNew/shape/Train/TrainBody.js +++ b/src/jmapNew/shape/Train/TrainBody.js @@ -180,9 +180,9 @@ export default class TrainBody extends Group { }); // this.add(this.atrStatus); } - const travelSignsOffsetX = this.deviceModel.right ? style.Train.travelSigns.trainTravelRightSignsOffset.x : style.Train.travelSigns.trainTravelLeftSignsOffset.x; - const travelSignsOffsetY = this.deviceModel.right ? style.Train.travelSigns.trainTravelRightSignsOffset.y : style.Train.travelSigns.trainTravelLeftSignsOffset.y; if (style.Train.common.hasTravelSigns) { + const travelSignsOffsetX = this.deviceModel.right ? style.Train.travelSigns.trainTravelRightSignsOffset.x : style.Train.travelSigns.trainTravelLeftSignsOffset.x; + const travelSignsOffsetY = this.deviceModel.right ? style.Train.travelSigns.trainTravelRightSignsOffset.y : style.Train.travelSigns.trainTravelLeftSignsOffset.y; this.travelSigns = new ETextName({ zlevel: model.zlevel, z: model.z + 1, diff --git a/src/jmapNew/shape/Train/index.js b/src/jmapNew/shape/Train/index.js index 82d26edd4..5c9324e66 100644 --- a/src/jmapNew/shape/Train/index.js +++ b/src/jmapNew/shape/Train/index.js @@ -43,9 +43,11 @@ export default class Train extends Group { y: model.trainWindowModel.point.y }; if (model.right) { - this.point.x = this.point.x + model.trainWindowModel.width / 2 - style.Train.trainHead.trainConntWidth * this.newScale - style.Train.common.trainWidth; + this.point.x = this.point.x - style.Train.trainHead.trainConntWidth * this.newScale - style.Train.common.trainWidth / 2; + this.point.y = this.point.y - style.Train.common.trainHeight/2; } else { - this.point.x = this.point.x - model.trainWindowModel.width / 2 + style.Train.trainHead.trainConntWidth * this.newScale; + this.point.x = this.point.x + style.Train.trainHead.trainConntWidth * this.newScale - style.Train.common.trainWidth / 2; + this.point.y = this.point.y + model.trainWindowModel.height - style.Train.common.trainHeight/2; } } else { this.point = model.position; diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 4d1d2ed3b..ae880e5e3 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -3,7 +3,7 @@ export function getBaseUrl() { let BASE_API; if (process.env.NODE_ENV === 'development') { // BASE_API = 'https://joylink.club/jlcloud'; - // BASE_API = 'https://test.joylink.club/jlcloud'; + BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'http://192.168.3.5:9000'; // 袁琪 // BASE_API = 'http://192.168.3.6:9000'; // 旭强 // BASE_API = 'http://192.168.3.41:9000'; // 张赛 From d45950fa68999e4ac707b0a6a71789dea2d8dba5 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Mon, 9 Mar 2020 18:35:01 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=8A=98=E8=BF=94?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/baseUrl.js | 4 ++-- .../newMap/newMapdraft/dataRelation/turnedoperate/route.vue | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index ae880e5e3..0a29bb813 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -3,9 +3,9 @@ export function getBaseUrl() { let BASE_API; if (process.env.NODE_ENV === 'development') { // BASE_API = 'https://joylink.club/jlcloud'; - BASE_API = 'https://test.joylink.club/jlcloud'; + // BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'http://192.168.3.5:9000'; // 袁琪 - // BASE_API = 'http://192.168.3.6:9000'; // 旭强 + BASE_API = 'http://192.168.3.6:9000'; // 旭强 // BASE_API = 'http://192.168.3.41:9000'; // 张赛 // BASE_API = 'http://192.168.3.82:9000'; // 杜康 // BASE_API = 'http://b29z135112.zicp.vip'; diff --git a/src/views/newMap/newMapdraft/dataRelation/turnedoperate/route.vue b/src/views/newMap/newMapdraft/dataRelation/turnedoperate/route.vue index 60d072668..b50eec2f4 100644 --- a/src/views/newMap/newMapdraft/dataRelation/turnedoperate/route.vue +++ b/src/views/newMap/newMapdraft/dataRelation/turnedoperate/route.vue @@ -210,6 +210,8 @@ export default { if (selected) { if (selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'reentryTrackCode'.toUpperCase()) { this.addModel.reentryTrackCode = selected.code; + } else if (selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'reentryTrack2Code'.toUpperCase()) { + this.addModel.reentryTrack2Code = selected.code; } } }, From 75218e87ce13b49910fa144130e863cd5b414bcb Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Mon, 9 Mar 2020 18:47:50 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=8A=98=E8=BF=94?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/shape/Automactic/index.js | 2 +- src/utils/baseUrl.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/jmapNew/shape/Automactic/index.js b/src/jmapNew/shape/Automactic/index.js index f9f52758f..f9d2ae27c 100644 --- a/src/jmapNew/shape/Automactic/index.js +++ b/src/jmapNew/shape/Automactic/index.js @@ -23,7 +23,7 @@ export default class Automactic extends Group { this.prdType = elem.split('=')[1]; } }); - if (!this.prdType || this.style.AutomaticRoute.displayCondition.indexOf(this.prdType) !== -1) { + if (!this.prdType || this.style.MapCycleButtonVO.visibleConditions.indexOf(this.prdType) !== -1) { this.create(); this.createMouseEvent(); this.setState(model); diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 0a29bb813..ae880e5e3 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -3,9 +3,9 @@ export function getBaseUrl() { let BASE_API; if (process.env.NODE_ENV === 'development') { // BASE_API = 'https://joylink.club/jlcloud'; - // BASE_API = 'https://test.joylink.club/jlcloud'; + BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'http://192.168.3.5:9000'; // 袁琪 - BASE_API = 'http://192.168.3.6:9000'; // 旭强 + // BASE_API = 'http://192.168.3.6:9000'; // 旭强 // BASE_API = 'http://192.168.3.41:9000'; // 张赛 // BASE_API = 'http://192.168.3.82:9000'; // 杜康 // BASE_API = 'http://b29z135112.zicp.vip';