diff --git a/src/i18n/langs/en/map.js b/src/i18n/langs/en/map.js index 15ce722a0..611dd80c9 100644 --- a/src/i18n/langs/en/map.js +++ b/src/i18n/langs/en/map.js @@ -569,11 +569,9 @@ export default { signalSectionSuccessful: 'Signal close section created successfully!', signalSectionUpdateSucceeded: 'Update signal close to section successful!', - crossCoding:'Cross code', crossName:'Cross name', - relateSwitchList:'Related switchList', + relateSectionList:'Related sectionList', cross:'cross', - generateCross:'generate cross', belongsSection: 'Belongs section:', coordinateMode: 'Coordinate mode', diff --git a/src/i18n/langs/en/rules.js b/src/i18n/langs/en/rules.js index d9ef1226a..f71c83cdd 100644 --- a/src/i18n/langs/en/rules.js +++ b/src/i18n/langs/en/rules.js @@ -25,9 +25,7 @@ export default { linkSelectName: 'Enter the Link name', linkSelectDisplayLength: 'Please enter the actual length of the Link', - pleaseSelectCross:'Please select cross', pleaseInputCrossName:'Please input cross name', - pleaseSelectSwitch:'Please select switch', lengthShow: 'According to the length of the:', lengthFact: 'The real length:', diff --git a/src/i18n/langs/zh/map.js b/src/i18n/langs/zh/map.js index b4b252df7..b2cee0a22 100644 --- a/src/i18n/langs/zh/map.js +++ b/src/i18n/langs/zh/map.js @@ -563,11 +563,9 @@ export default { interlockingBlocks: '联锁区段', alwaysRed: '是否总是显示红灯', - crossCoding:'岔心编号', crossName:'岔心名称', - relateSwitchList:'关联道岔', + relateSectionList:'关联区段', cross:'岔心', - generateCross:'一键生成岔心', belongsSection: '所属区段:', coordinateMode: '坐标方式', diff --git a/src/i18n/langs/zh/rules.js b/src/i18n/langs/zh/rules.js index 42b83ff4a..b38c1dcd6 100644 --- a/src/i18n/langs/zh/rules.js +++ b/src/i18n/langs/zh/rules.js @@ -24,9 +24,7 @@ export default { linkSelectName: '请输入Link名称', linkSelectDisplayLength: '请输入Link实际长度', - pleaseSelectCross:'请选择岔心', pleaseInputCrossName:'请输入岔心名称', - pleaseSelectSwitch:'请选择道岔', lengthShow: '显示长度:', lengthFact: '真实长度:', diff --git a/src/jlmap3d/jl3dtrafficplan/sandbox/sandboxconnect.js b/src/jlmap3d/jl3dtrafficplan/sandbox/sandboxconnect.js index 764f53d7f..1c7371430 100644 --- a/src/jlmap3d/jl3dtrafficplan/sandbox/sandboxconnect.js +++ b/src/jlmap3d/jl3dtrafficplan/sandbox/sandboxconnect.js @@ -116,7 +116,9 @@ export function sandBoxConnect(manager,routegroup,section,signal,station,train ) train.trainGroup.add(train.trainlist[data.body[i].code]); }else{ let realprogress = section.topSectionList[data.body[i].section].leftProgress+(section.topSectionList[data.body[i].section].rightProgress - section.topSectionList[data.body[i].section].leftProgress)*data.body[i].offset; - train.trainlist[data.body[i].code].position.copy(manager.topCurve.getPoint(realprogress)); + let realpos = manager.topCurve.getPoint(realprogress); + train.trainlist[data.body[i].code].position.x = realpos.x; + train.trainlist[data.body[i].code].position.z = realpos.z; train.trainlist[data.body[i].code].up = new THREE.Vector3(1,0,0); let tangent = manager.topCurve.getTangentAt(realprogress).normalize(); @@ -144,7 +146,10 @@ export function sandBoxConnect(manager,routegroup,section,signal,station,train ) }else{ let realprogress = section.downSectionList[data.body[i].section].leftProgress +(section.downSectionList[data.body[i].section].rightProgress - section.downSectionList[data.body[i].section].leftProgress)*data.body[i].offset; - train.trainlist[data.body[i].code].position.copy(manager.downCurve.getPoint(realprogress)); + let realpos = manager.downCurve.getPoint(realprogress); + train.trainlist[data.body[i].code].position.x = realpos.x; + train.trainlist[data.body[i].code].position.z = realpos.z; + train.trainlist[data.body[i].code].up = new THREE.Vector3(-1,0,0); let tangent = manager.downCurve.getTangentAt(realprogress).normalize(); diff --git a/src/jlmap3d/jl3dtrafficplan/sandbox/signalmodel.js b/src/jlmap3d/jl3dtrafficplan/sandbox/signalmodel.js index 1e416fd90..42afa1b83 100644 --- a/src/jlmap3d/jl3dtrafficplan/sandbox/signalmodel.js +++ b/src/jlmap3d/jl3dtrafficplan/sandbox/signalmodel.js @@ -23,6 +23,15 @@ export function signalModel(scene) { newsignal.position.copy(downCurve.getPoint(downData[j].leftProgress)); + newsignal.up = new THREE.Vector3(1,0,0); + newsignal.axis = new THREE.Vector3(); + let tangent = downCurve.getTangentAt(downData[j].leftProgress).normalize(); + newsignal.axis.crossVectors(newsignal.up, tangent).normalize(); + let radians = Math.acos(newsignal.up.dot(tangent)); + newsignal.quaternion.setFromAxisAngle(newsignal.axis, radians); + + + scene.add( newsignal ); j = downData.length; } diff --git a/src/jlmap3d/jl3dtrafficplan/sandbox/trainmodel.js b/src/jlmap3d/jl3dtrafficplan/sandbox/trainmodel.js index 130989847..c0fa4c3f7 100644 --- a/src/jlmap3d/jl3dtrafficplan/sandbox/trainmodel.js +++ b/src/jlmap3d/jl3dtrafficplan/sandbox/trainmodel.js @@ -11,9 +11,11 @@ export function trainModel(scene) { var trainBox = new THREE.Mesh( geometry, material ); trainBox.code = trainData[i].code; trainBox.groupNumber = trainData[i].groupNumber; + trainBox.dispose = false; trainBox.up = new THREE.Vector3(1, 0, 0); trainBox.axis = new THREE.Vector3(); + trainBox.position.y = 5; scope.trainlist[trainData[i].groupNumber] = trainBox; } } diff --git a/src/jmapNew/config/skinCode/nanjing_02.js b/src/jmapNew/config/skinCode/nanjing_02.js index fed2cefc6..0a6ffbb43 100644 --- a/src/jmapNew/config/skinCode/nanjing_02.js +++ b/src/jmapNew/config/skinCode/nanjing_02.js @@ -829,6 +829,14 @@ class SkinCode extends defaultStyle { fontOffsetY: 24 }; + // /** 岔心 */ + // this[deviceType.Cross] = { + // centerSquare:{ + // defaultColor:'#fff' + // } + + // }; + this[deviceType.Responder] = { block: { mapStyle: { diff --git a/src/jmapNew/constant/deviceRender.js b/src/jmapNew/constant/deviceRender.js index 86c379333..7f006507b 100644 --- a/src/jmapNew/constant/deviceRender.js +++ b/src/jmapNew/constant/deviceRender.js @@ -275,4 +275,5 @@ deviceRender[deviceType.Responder] = { _type: deviceType.Responder, zlevel: 1 }; + export default deviceRender; diff --git a/src/jmapNew/constant/deviceState.js b/src/jmapNew/constant/deviceState.js index ba5e12852..6e91feba0 100644 --- a/src/jmapNew/constant/deviceState.js +++ b/src/jmapNew/constant/deviceState.js @@ -253,5 +253,5 @@ deviceState[deviceType.Train] = { }; deviceState[deviceType.Responder] = { -} +}; export default deviceState; diff --git a/src/jmapNew/shape/Cross/index.js b/src/jmapNew/shape/Cross/index.js new file mode 100644 index 000000000..5ec05182c --- /dev/null +++ b/src/jmapNew/shape/Cross/index.js @@ -0,0 +1,95 @@ +import Group from 'zrender/src/container/Group'; +import Polyline from 'zrender/src/graphic/shape/Polyline'; + +export default class Cross extends Group { + // _type: 'Cross', + // code: getUID('Cross', this.crossList), + // position:each.position, + // relatedSwitch:each.relatedSwitch + constructor(model, style) { + super(); + this._code = model.code; + this._type = model._type; + this.zlevel = model.zlevel; + this.z = 0; + this.model = model; + this.style = style; + this.isShowShape = true; + this.create(); + this.setState(model); + } + + create() { + const model = this.model; + // position; + // relatedSwitch; + // model.position.x, + // model.position.y, + // const relatedSwitchList = model.relatedSwitch; + const offset = this.style.Section.line.width / (2 * 0.7071); + const points = [ + [model.position.x, model.position.y + offset], + [model.position.x + offset, model.position.y + offset], + [model.position.x, model.position.y + 2 * offset], + [model.position.x - offset, model.position.y + offset], + [model.position.x, model.position.y + offset] + ]; + this.centerSquare = new Polyline({ + zlevel: this.zlevel, + z:this.z + 1, + shape: { + points:points + }, + style: { + stroke: this.style.Cross.centerSquare.defaultColor, + fill:this.style.Cross.centerSquare.defaultColor + } + }); + this.add(this.centerSquare); + // let relatedSwitchList[0].sectionCCode + // if (model && model.points.length > 1) { + // const points = []; + // const modelPoints = model.points; + // const length = modelPoints.length; + // for (let i = 0; i < length; i++) { + // points.push([modelPoints[i].x, modelPoints[i].y]); + // } + // this.segment = new Polyline({ + // zlevel: this.zlevel, + // z:this.z, + // shape: { + // points:points + // }, + // style: { + // lineWidth: model.width, + // stroke: model.lineColor || this.style.lineColor + // } + // }); + // this.add(this.segment); + // } + } + + setLineType(type) { + switch (type) { + case '01': break; + case '02': + this.segment && this.segment.setStyle('lineDash', this.style.lineDash || [4]); + break; + } + } + + setState(model) { + if (!this.isShowShape) return; + this.setLineType(model.type); + } + setShowStation(stationCode) { + if (!stationCode || this.model.stationCode === stationCode) { + this.segment && this.segment.show(); + this.isShowShape = true; + this.setState(this.model); + } else { + this.segment && this.segment.hide(); + this.isShowShape = false; + } + } +} diff --git a/src/jmapNew/shape/Responder/index.js b/src/jmapNew/shape/Responder/index.js index bbb820874..2079e186b 100644 --- a/src/jmapNew/shape/Responder/index.js +++ b/src/jmapNew/shape/Responder/index.js @@ -17,9 +17,9 @@ export default class Responder extends Group { this.isShowShape = true; this.z = model.zIndex || 1; if (model.previewOrMapDraw) { - this.create(); - this.setState(model); - } + this.create(); + this.setState(model); + } } create() { diff --git a/src/jmapNew/shape/Section/index.js b/src/jmapNew/shape/Section/index.js index 1d779fa73..c39fab5b2 100644 --- a/src/jmapNew/shape/Section/index.js +++ b/src/jmapNew/shape/Section/index.js @@ -34,7 +34,7 @@ export default class Section extends Group { } create() { - // 区段type 01计轴区段;02逻辑区段;03道岔区段 04道岔计轴区段 + // 区段type 01计轴区段;02逻辑区段;03道岔区段 04道岔计轴区段 05 岔心 // 站台所有的绘图元素 const elementTypeList = { 'name': ETextName, // 区段名称 diff --git a/src/jmapNew/theme/xian_02/menus/menuCancel.vue b/src/jmapNew/theme/xian_02/menus/menuCancel.vue index 5099dc1ec..9d9fe17de 100644 --- a/src/jmapNew/theme/xian_02/menus/menuCancel.vue +++ b/src/jmapNew/theme/xian_02/menus/menuCancel.vue @@ -26,105 +26,105 @@ export default { label: '发送', handler: this.sendRequestList }, - { - label: '取消', - handler: this.undeveloped - }, - { - label: '全部扣车', - children: [ - { - label: '正线上全部扣车', - handler: this.undeveloped - } - ] - }, - { - label: '全部发车', - children: [ - { - label: '缓解正线所有列车', - handler: this.undeveloped - } - ] - }, - { - label: '停止所有列车', - children: [ - { - label: '停止正线所有列车', - handler: this.undeveloped - } - ] - }, + // { + // label: '取消', + // handler: this.undeveloped + // }, + // { + // label: '全部扣车', + // children: [ + // { + // label: '正线上全部扣车', + // handler: this.undeveloped + // } + // ] + // }, + // { + // label: '全部发车', + // children: [ + // { + // label: '缓解正线所有列车', + // handler: this.undeveloped + // } + // ] + // }, + // { + // label: '停止所有列车', + // children: [ + // { + // label: '停止正线所有列车', + // handler: this.undeveloped + // } + // ] + // }, { label: '车站选择', children: [] - }, - { - label: '列车选择', - handler: this.undeveloped - }, - { - label: '缩放', - handler: this.undeveloped - }, - { - label: '显示控制', - children: [ - { - label: '正线及车辆段', - handler: this.undeveloped - }, - { - label: '列车信息', - handler: this.undeveloped - } - ] - }, - { - label: '下一窗口', - handler: this.undeveloped - }, - { - label: '上一窗口', - handler: this.undeveloped - }, - { - label: '激活所有菜单', - children: [ - { - label: '确认', - handler: this.undeveloped - } - ] - }, - { - label: '恢复激活菜单', - handler: this.undeveloped - }, - { - label: '进路模式 - 授权车站', - children: [ - { - label: '自动', - handler: this.undeveloped - }, - { - label: '人工', - handler: this.undeveloped - } - ] - }, - { - label: '列车报警确认', - children: [ - { - label: '列车完整性报警确认', - handler: this.undeveloped - } - ] } + // { + // label: '列车选择', + // handler: this.undeveloped + // }, + // { + // label: '缩放', + // handler: this.undeveloped + // }, + // { + // label: '显示控制', + // children: [ + // { + // label: '正线及车辆段', + // handler: this.undeveloped + // }, + // { + // label: '列车信息', + // handler: this.undeveloped + // } + // ] + // }, + // { + // label: '下一窗口', + // handler: this.undeveloped + // }, + // { + // label: '上一窗口', + // handler: this.undeveloped + // }, + // { + // label: '激活所有菜单', + // children: [ + // { + // label: '确认', + // handler: this.undeveloped + // } + // ] + // }, + // { + // label: '恢复激活菜单', + // handler: this.undeveloped + // }, + // { + // label: '进路模式 - 授权车站', + // children: [ + // { + // label: '自动', + // handler: this.undeveloped + // }, + // { + // label: '人工', + // handler: this.undeveloped + // } + // ] + // }, + // { + // label: '列车报警确认', + // children: [ + // { + // label: '列车完整性报警确认', + // handler: this.undeveloped + // } + // ] + // } ] }; }, @@ -174,7 +174,7 @@ export default { }; }, initMenu() { - this.menuNormal[5].children = this.initStationList(); + this.menuNormal[1].children = this.initStationList(); this.menu = this.menuNormal; }, doShow(point) { diff --git a/src/views/jlmap3d/trafficplan/component/textui.vue b/src/views/jlmap3d/trafficplan/component/textui.vue index 8b75eff2f..c5fcca9f8 100644 --- a/src/views/jlmap3d/trafficplan/component/textui.vue +++ b/src/views/jlmap3d/trafficplan/component/textui.vue @@ -6,6 +6,49 @@ 'left': uiLeft, 'display': uiDisplay, }"> + + 设备信息 + + + + +
+ 列车编号:{{selectmodel.code}} +
+
+ 速度:{{selectmodel.v}} +
+
+ 行进方向:{{selectmodel.right}} +
+
+ 车内人数:{{selectmodel.num}} +
+
+ 左侧车门:{{selectmodel.leftdoor}} +
+
+ 右侧车门:{{selectmodel.rightdoor}} +
+ + +
+ 车站:{{selectmodel.name}} +
+
+ 上行站台人数:{{selectmodel.topnum}} +
+
+ 下行站台人数:{{selectmodel.downnum}} +
+
+ 上行车门:{{selectmodel.topdoor}} +
+
+ 下行车门:{{selectmodel.downdoor}} +
+
+ @@ -26,6 +69,14 @@ export default { uiDisplay:'none', uiTop:'0px', uiLeft:'0px', + selectmodel:{ + code:"asd123", + v:"80km/h", + right:"上行", + num:100, + leftdoor:"关闭", + rightdoor:"关闭" + }, } }, beforeDestroy() { @@ -63,4 +114,37 @@ export default { background-size:100%; // display:none; } +.text { + font-size: 8px; + color:#ffffff; + } + + .item { + margin-top: 5px; + margin-bottom: 5px; + margin-left: 10px; + } + + .clearfix:before, + .clearfix:after { + display: table; + content: ""; + } + .clearfix:after { + clear: both + } + .box-title{ + position: absolute; + top:20px; + left:7px; + width: 120px; + text-align: center; + } + .box-card { + position: absolute; + top:45px; + left:7px; + width: 136px; + background-color:rgba(0,0,0,0); + } diff --git a/src/views/newMap/jointTrainingNew/menuDemon.vue b/src/views/newMap/jointTrainingNew/menuDemon.vue index 75f5e5757..11bceca9e 100644 --- a/src/views/newMap/jointTrainingNew/menuDemon.vue +++ b/src/views/newMap/jointTrainingNew/menuDemon.vue @@ -9,7 +9,7 @@ {{ $t('display.demon.deviceView') }} - {{ jl3dname }} + {{ jl3dname }} {{ $t('display.demon.passengerflow') }} @@ -128,10 +128,13 @@ export default { }, isShowScheduling() { // 行调与管理员 可显示 - return (this.$store.state.training.prdType == '02' || this.isAdmin) && !this.$route.query.projectDevice; + return (this.$store.state.training.prdType == '02' || this.isAdmin) && (!this.$route.query.projectDevice); + }, + isDISPATCHER(){ + return (this.$store.state.training.prdType == '02' || this.isAdmin) && (!this.$route.query.projectDevice || this.project == 'sdy'); }, isStationSupervisor() { - return this.userRole == 'STATION_SUPERVISOR' && !this.$route.query.projectDevice; + return this.userRole == 'STATION_SUPERVISOR' && (!this.$route.query.projectDevice || this.project == 'sdy'); }, isDriver() { return this.userRole == 'DRIVER' && !this.$route.query.projectDevice; diff --git a/src/views/newMap/newMapdraft/mapoperate/cross.vue b/src/views/newMap/newMapdraft/mapoperate/cross.vue deleted file mode 100644 index f091fad49..000000000 --- a/src/views/newMap/newMapdraft/mapoperate/cross.vue +++ /dev/null @@ -1,249 +0,0 @@ - - - diff --git a/src/views/newMap/newMapdraft/mapoperate/index.vue b/src/views/newMap/newMapdraft/mapoperate/index.vue index 787d5dbbf..0f7beb327 100644 --- a/src/views/newMap/newMapdraft/mapoperate/index.vue +++ b/src/views/newMap/newMapdraft/mapoperate/index.vue @@ -67,7 +67,6 @@ import Arrow from './arrow'; import SplitScreen from './splitScreen'; import FloodGate from './floodGate'; import DirectionRod from './directionRod'; -import Cross from './cross'; import { EventBus } from '@/scripts/event-bus'; export default { @@ -98,8 +97,7 @@ export default { Arrow, SplitScreen, FloodGate, - DirectionRod, - Cross + DirectionRod }, props: { selected: { @@ -140,8 +138,7 @@ export default { {label: '站间分隔', name:'SplitStation', menus:SplitStation}, {label: '箭头', name:'Arrow', menus:Arrow}, {label: '防淹门', name: 'FloodGate', menus: FloodGate}, - {label: '方向杆', name: 'DirectionRod', menus: DirectionRod}, - {label: this.$t('map.cross'), name: 'Cross', menus: Cross} + {label: '方向杆', name: 'DirectionRod', menus: DirectionRod} ], selectDevice:'', enabledTab: 'Section', diff --git a/src/views/newMap/newMapdraft/mapoperate/section/crossSection.vue b/src/views/newMap/newMapdraft/mapoperate/section/crossSection.vue new file mode 100644 index 000000000..45b75b51c --- /dev/null +++ b/src/views/newMap/newMapdraft/mapoperate/section/crossSection.vue @@ -0,0 +1,156 @@ + + diff --git a/src/views/newMap/newMapdraft/mapoperate/section/index.vue b/src/views/newMap/newMapdraft/mapoperate/section/index.vue index 744d487e9..a5dc546b1 100644 --- a/src/views/newMap/newMapdraft/mapoperate/section/index.vue +++ b/src/views/newMap/newMapdraft/mapoperate/section/index.vue @@ -46,6 +46,9 @@ @tipInfoHandle="tipInfoHandle" /> + + + @@ -60,6 +63,7 @@ import TipInfo from './tipInfo'; import CreateSection from './create'; import SplitOrMerge from './splitOrMerge'; import BatchSettings from './batchSettings'; +import CrossSection from './crossSection'; import getModel from '../models.js'; export default { @@ -70,7 +74,8 @@ export default { TipInfo, CreateSection, SplitOrMerge, - BatchSettings + BatchSettings, + CrossSection }, props: { selected: { @@ -408,7 +413,16 @@ export default { deviceSelect(selected) { // 判断是否激活选择站台 if (selected && selected._type === 'Section') { - if (this.field === 'leftSection') { + if (this.field == 'relatedSection' ) { + if (selected.type === '01') { + this.activeName = 'six'; + this.$refs.crossSection.addSectionData(selected.code); + this.$emit('deviceSelect', ''); + } else { + this.$message.error('请选择物理区段'); + } + return; + } else if (this.field === 'leftSection') { if (selected.type === '01' || selected.type === '03') { this.editModel.leftSectionCode = selected.code; this.activeName = 'first'; diff --git a/src/views/planMonitor/editTool/menus/addPlanningTrain.vue b/src/views/planMonitor/editTool/menus/addPlanningTrain.vue index 201064a87..392e4513c 100644 --- a/src/views/planMonitor/editTool/menus/addPlanningTrain.vue +++ b/src/views/planMonitor/editTool/menus/addPlanningTrain.vue @@ -87,9 +87,9 @@ export default { } }, handleCommit() { - this.$refs.dataform.validateForm(() => { + this.$refs.form.validate(() => { if (this.$route.query.planId || this.loadRunPlanId) { - checkServiceNumberExist({ planId: this.$route.query.planId || this.loadRunPlanId, serviceNumber: this.serviceNumber }).then(resp => { + checkServiceNumberExist({ planId: this.$route.query.planId || this.loadRunPlanId, serviceNumber: this.formModel.serviceNumber }).then(resp => { if (resp.data) { this.$emit('dispatchDialog', { name: 'offLine', @@ -117,8 +117,8 @@ export default { }, handleConfirm(isNew = false) { this.doClose(); - this.$store.dispatch('runPlan/addserviceNumber', this.serviceNumber); - this.$emit('dispatchDialog', { name: 'editPlanningTrain', params: { serviceNumber: this.serviceNumber, isNew:isNew } }); + this.$store.dispatch('runPlan/addserviceNumber', this.formModel.serviceNumber); + this.$emit('dispatchDialog', { name: 'editPlanningTrain', params: { serviceNumber: this.formModel.serviceNumber, isNew:isNew } }); } } };