diff --git a/src/jlmap3d/jl3drailwaydevice/component/signallight.js b/src/jlmap3d/jl3drailwaydevice/component/signallight.js index 0f7c4f720..cb637bf3d 100644 --- a/src/jlmap3d/jl3drailwaydevice/component/signallight.js +++ b/src/jlmap3d/jl3drailwaydevice/component/signallight.js @@ -3,13 +3,19 @@ import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js'; //信号机贴图 export function Signallightload(lights) { - settexture(lights, "red", JL3D_LOCAL_STATIC+'/device/signal/1.jpg'); + settexture(lights,"red",JL3D_LOCAL_STATIC+'/jl3d/railway/texture/1.jpg'); - settexture(lights, "yellow", JL3D_LOCAL_STATIC+'/device/signal/2.jpg'); + settexture(lights,"yellow",JL3D_LOCAL_STATIC+'/jl3d/railway/texture/2.jpg'); + + settexture( lights,"green",JL3D_LOCAL_STATIC+'/jl3d/railway/texture/3.jpg'); + + settexture( lights,"white",JL3D_LOCAL_STATIC+'/jl3d/railway/texture/4.jpg'); + + settexture( lights,"blue",JL3D_LOCAL_STATIC+'/jl3d/railway/texture/5.jpg'); + + settexture( lights,"black",JL3D_LOCAL_STATIC+'/jl3d/railway/texture/6.jpg'); - settexture(lights, "green", JL3D_LOCAL_STATIC+'/device/signal/3.jpg'); - settexture(lights, "black", JL3D_LOCAL_STATIC+'/device/signal/4.jpg'); } //加载贴图 diff --git a/src/jlmap3d/jl3drailwaydevice/jl3ddeviceNew.js b/src/jlmap3d/jl3drailwaydevice/jl3ddeviceNew.js index 087d6cfc7..1b5a4ee4a 100644 --- a/src/jlmap3d/jl3drailwaydevice/jl3ddeviceNew.js +++ b/src/jlmap3d/jl3drailwaydevice/jl3ddeviceNew.js @@ -27,8 +27,6 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) { var scope = this; let helpbox,textplane; let daochamodel; - let psdtexturemap = []; - let psdVoiceStationList = []; this.dom = dom; this.nowcode = null; @@ -110,9 +108,6 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) { for(let i=0,leni=mapnetdata.switchList.length;i { - location.reload(); - }); - } - - } } let changeelement = document.getElementById('jl3d'); window.addEventListener('resize', () => @@ -237,23 +194,12 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) { getPublish3dMapDetail(skinCode).then(netdata => { let netDataAssets = JSON.parse(netdata.data.assets); - if(netDataAssets.stationTextureList[0].urls.length > 1){ - setpsdstationmap(JSON.parse(netdata.data.stands)); - Standtextureload(scope,netDataAssets.stationTextureList[0]); - } scope.modelmanager.loadpromise(netDataAssets.deviceAssetList, scope.mixers).then(function (data) { //综合演练情况下当模型加载后显示 - psdModelShow(); + moveanima.initlistnew(scope.modelmanager.switchmodel.mesh); daochamodel = scope.modelmanager.switchmodel.mesh.getObjectByName("DAOCHA"); - if(scope.stationtexture["devicelist"]){ - scope.modelmanager.standmodel.mesh.getObjectByName("zhantailiebiao").material.map =scope.stationtexture["devicelist"]; - scope.modelmanager.standmodel.mesh.getObjectByName("zhantailiebiao").material.map.needsUpdate = true; - } - if(scope.stationtexture["pingbimen"]){ - scope.modelmanager.standmodel.mesh.getObjectByName("pingbimen1").material.map =scope.stationtexture["pingbimen"]; - scope.modelmanager.standmodel.mesh.getObjectByName("pingbimen1").material.map.needsUpdate = true; - } + }) let checkobject = setInterval(function(){ @@ -267,15 +213,6 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) { }); - //初始化屏蔽门贴图 - function setpsdstationmap(stationlist){ - for(let i=0,leni=stationlist.length;i0){ - if(asset.type == "staticSwitch"){ + if(asset.deviceType == "staticSwitch"){ // for(let i=0;i=0;an--){ - actions["traindoor"].top[an].reset(); - actions["traindoor"].top[an].time = actions["traindoor"].top[an]._clip.duration; - actions["traindoor"].top[an].timeScale = -1; - actions["traindoor"].top[an].play(); - } - }else if(trainmodel.openleft != data.open && data.open == "1"){ - trainmodel.openleft = "1"; - console.log(data); - for(let an=actions["traindoor"].top.length-1;an>=0;an--){ - actions["traindoor"].top[an].reset(); - actions["traindoor"].top[an].time = 0; - actions["traindoor"].top[an].timeScale = 1; - actions["traindoor"].top[an].play(); - } - } - }else{ - - - if (trainmodel.openright != data.open && data.open == '0') { - trainmodel.openright = '0'; - for (let an=actions["traindoor"].down.length-1; an>=0; an--) { - actions["traindoor"].down[an].reset(); - actions["traindoor"].down[an].time = actions["traindoor"].down[an]._clip.duration; - actions["traindoor"].down[an].timeScale = -1; - actions["traindoor"].down[an].play(); - } - } else if (trainmodel.openright != data.open && data.open == '1') { - trainmodel.openright = "1"; - for(let an=actions["traindoor"].down.length-1;an>=0;an--){ - actions["traindoor"].down[an].reset(); - actions["traindoor"].down[an].time = 0; - actions["traindoor"].down[an].timeScale = 1; - actions["traindoor"].down[an].play(); - } - } - - } - }else{ - if(data.doorCode == "1"){ - - if(trainmodel.openleft != data.open && data.open == "0"){ - trainmodel.openleft = "0"; - for(let an=actions["traindoor"].top.length-1;an>=0;an--){ - actions["traindoor"].top[an].reset(); - actions["traindoor"].top[an].time = actions["traindoor"].top[an]._clip.duration; - actions["traindoor"].top[an].timeScale = -1; - actions["traindoor"].top[an].play(); - } - }else if(trainmodel.openleft != data.open && data.open == "1"){ - trainmodel.openleft = "1"; - for(let an=actions["traindoor"].top.length-1;an>=0;an--){ - actions["traindoor"].top[an].reset(); - actions["traindoor"].top[an].time = 0; - actions["traindoor"].top[an].timeScale = 1; - actions["traindoor"].top[an].play(); - } - } - }else{ - if (trainmodel.openright != data.open && data.open == '0') { - trainmodel.openright = '0'; - for (let an=actions["traindoor"].down.length-1; an>=0; an--) { - actions["traindoor"].down[an].reset(); - actions["traindoor"].down[an].time = actions["traindoor"].down[an]._clip.duration; - actions["traindoor"].down[an].timeScale = -1; - actions["traindoor"].down[an].play(); - } - } else if (trainmodel.openright != data.open && data.open == '1') { - trainmodel.openright = "1"; - for(let an=actions["traindoor"].down.length-1;an>=0;an--){ - actions["traindoor"].down[an].reset(); - actions["traindoor"].down[an].time = 0; - actions["traindoor"].down[an].timeScale = 1; - actions["traindoor"].down[an].play(); - } - } - } - } - - } - - } - function trainstatus(data){ // 遍历列车对象组 if (trainlisttest) { @@ -701,56 +588,8 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta } } } - function standupdate(data) { - code = data.code; - if ( actions[code]) { - if (data.open == '1') { - actions[code].status = '1'; - actions[code].action.reset(); - actions[code].action.time = 0; - actions[code].action.timeScale = 1; - actions[code].action.play(); - } - if (data.open == '0') { - actions[code].status = '0'; - actions[code].action.reset(); - actions[code].action.time = actions[code].action._clip.duration; - actions[code].action.timeScale = -1; - actions[code].action.play(); - } - } - } - function signalupdate(data) { - code = data.code; - if(data.red == 1){ - signallist.list[code].mesh.getObjectByName("red").material.map = materials["red"]; - signallist.list[code].mesh.getObjectByName("red").material.map.needsUpdate = true; - }else{ - signallist.list[code].mesh.getObjectByName("red").material.map = materials["white"]; - signallist.list[code].mesh.getObjectByName("red").material.map.needsUpdate = true; - } - if(data.yellow == 1){ - signallist.list[code].mesh.getObjectByName("yellow").material.map = materials["yellow"]; - signallist.list[code].mesh.getObjectByName("yellow").material.map.needsUpdate = true; - }else{ - signallist.list[code].mesh.getObjectByName("yellow").material.map = materials["white"]; - signallist.list[code].mesh.getObjectByName("yellow").material.map.needsUpdate = true; - - } - - if(data.green == 1){ - signallist.list[code].mesh.getObjectByName("green").material.map = materials["green"]; - signallist.list[code].mesh.getObjectByName("green").material.map.needsUpdate = true; - - }else{ - signallist.list[code].mesh.getObjectByName("green").material.map = materials["white"]; - signallist.list[code].mesh.getObjectByName("green").material.map.needsUpdate = true; - - } - - } function initswitch(data) { code = data.code; @@ -771,26 +610,6 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta } } - function switchupdate(data) { - code = data.code; - if (actions[code].normal != data.normal) { - if (data.normal == '02') { - // sectionlist.switchs.modellist[j].normal = data.normal; - actions[code].action.reset(); - actions[code].action.time = 0; - actions[code].action.timeScale = 1; - actions[code].action.play(); - actions[code].normal = "02"; - } else if (data.normal == '01') { - // sectionlist.switchs.modellist[j].normal = data.normal; - actions[code].action.reset(); - actions[code].action.time = actions[code].action._clip.duration; - actions[code].action.timeScale = -1; - actions[code].action.play(); - actions[code].normal = "01"; - } - } - } function signalLightUpdate(code,lightType){ signallist.list[code].mesh.lightType = lightType; diff --git a/src/jmapNew/config/skinCode/xian_01.js b/src/jmapNew/config/skinCode/xian_01.js index 3ffac135d..2f634e12a 100644 --- a/src/jmapNew/config/skinCode/xian_01.js +++ b/src/jmapNew/config/skinCode/xian_01.js @@ -243,6 +243,7 @@ class SkinCode extends defaultStyle { centerTrainColor: '#FFFFFF', // 中心扣车颜色 andCenterTrainColor: '#F61107', // 车站+中心扣车颜色 detainTrainTextColor: '#E4EF50', // 车站扣除文字颜色 + ibpDetainTrainColor: '#0F16DA', // IBP盘扣车文字颜色 fontSize: 11, // 字体大小 fontWeight: 'normal' }, @@ -274,7 +275,8 @@ class SkinCode extends defaultStyle { common: { // 通用属性 textFontSize: 11, // 站台默认字体大小 - functionButtonShow: '03' // 功能灯按钮显示条件(01所有模式下显示 02 行调显示 03现地显示) + functionButtonShow: '03', // 功能灯按钮显示条件(01所有模式下显示 02 行调显示 03现地显示) + ibpDetainDiffStation: true // ibp扣车不同于现地扣车 }, safetyDoor: { // 屏蔽门 height: 3, // 站台屏蔽门高度 diff --git a/src/jmapNew/painter.js b/src/jmapNew/painter.js index d1a251778..3bc597c6a 100644 --- a/src/jmapNew/painter.js +++ b/src/jmapNew/painter.js @@ -148,6 +148,8 @@ class Painter { const overlapTrainList = this.checkTrainOverlap(device); overlapTrainList.forEach((item, index) => { const trainDevice = this.$jmap.getDeviceByCode(item); + trainDevice._type = deviceRender['Train']._type; + trainDevice.zlevel = deviceRender['Train'].zlevel; trainDevice.overLapIndex = index; trainDevice.instance && this.mapInstanceLevel[deviceType.Train].remove(trainDevice.instance); trainDevice.instance = null; diff --git a/src/jmapNew/shape/graph/StationStand/detain/EDetain.js b/src/jmapNew/shape/graph/StationStand/detain/EDetain.js index d21b88942..d6051f944 100644 --- a/src/jmapNew/shape/graph/StationStand/detain/EDetain.js +++ b/src/jmapNew/shape/graph/StationStand/detain/EDetain.js @@ -65,15 +65,18 @@ class EDetain extends Group { setState(model, deviceParam = this.model.style.StationStand.detainNormal) { /** 设置扣车*/ - if (model.stationHoldTrain && model.centerHoldTrain) { + if ((model.stationHoldTrain || model.ibpHoldTrain) && model.centerHoldTrain) { this.showMode(deviceParam); this.setColor(deviceParam.andCenterTrainColor); - } else if (model.stationHoldTrain) { + } else if (model.stationHoldTrain || (model.ibpHoldTrain && !this.model.style.StationStand.common.ibpDetainDiffStation)) { this.showMode(deviceParam); this.setColor(deviceParam.detainTrainTextColor); } else if (model.centerHoldTrain) { this.showMode(deviceParam); this.setColor(deviceParam.centerTrainColor); + } else if (model.ibpHoldTrain) { + this.showMode(deviceParam); + this.setColor(deviceParam.ibpDetainTrainColor); } } } diff --git a/src/jmapNew/shape/graph/StationStand/detain/EDetainHollow.js b/src/jmapNew/shape/graph/StationStand/detain/EDetainHollow.js index 2617a3a85..c6574d2d3 100644 --- a/src/jmapNew/shape/graph/StationStand/detain/EDetainHollow.js +++ b/src/jmapNew/shape/graph/StationStand/detain/EDetainHollow.js @@ -44,6 +44,7 @@ class EDetainHollow extends EDetain { recover() { this.hideMode(); + this.circleDetain && this.circleDetain.setStyle({ fill: '#000' }); } hideMode() { @@ -58,6 +59,9 @@ class EDetainHollow extends EDetain { setState(model) { super.setState(model, this.model.style.StationStand.detainHollow); + if (model.ibpHoldTrain && this.model.style.StationStand.common.ibpDetainDiffStation) { + this.circleDetain && this.circleDetain.setStyle({ fill: '#fff' }); + } } } diff --git a/src/jmapNew/theme/xian_01/menus/menuTrain.vue b/src/jmapNew/theme/xian_01/menus/menuTrain.vue index 0417c7bbc..0abd101e0 100644 --- a/src/jmapNew/theme/xian_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/xian_01/menus/menuTrain.vue @@ -127,7 +127,9 @@ export default { label: '切换驾驶模式', children: [ { - label: '转URM模式', + // label: '转URM模式', + // 西安三需要把URM改成NRM + label: '转NRM模式', handler: this.handleApplyUrmMode }, { @@ -135,7 +137,9 @@ export default { handler: this.handleApplyRmMode }, { - label: '转CM模式', + // label: '转CM模式', + // 西安三需要把CM改成SM + label: '转SM模式', handler: this.handleApplyCmMode }, { diff --git a/src/views/newMap/displayBaSiDi/tmt.vue b/src/views/newMap/displayBaSiDi/tmt.vue index f50e80785..04a78cbfc 100644 --- a/src/views/newMap/displayBaSiDi/tmt.vue +++ b/src/views/newMap/displayBaSiDi/tmt.vue @@ -1,110 +1,250 @@ - + diff --git a/src/views/newMap/displayCity/demonMenu.vue b/src/views/newMap/displayCity/demonMenu.vue index 432390341..b8d5cbfb7 100644 --- a/src/views/newMap/displayCity/demonMenu.vue +++ b/src/views/newMap/displayCity/demonMenu.vue @@ -15,7 +15,7 @@ v-show="deviceShow" ref="Jl3dRailwayDevice" :panel-show="deviceShow" - @closedevice3dview="jumpjlmap3dmodeFl" + @closedevice3dview="jumpjlmap3dmodel" />