综合演练三维通号故障增加,北交大站台车厢三维通信修改

This commit is contained in:
sunzhenyu 2021-09-15 17:14:51 +08:00
parent a3f08b2768
commit 739d3749b7
15 changed files with 228 additions and 118 deletions

View File

@ -148,7 +148,7 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
setpsdstationmap(JSON.parse(netdata.data.stands)); setpsdstationmap(JSON.parse(netdata.data.stands));
Standtextureload(scope,netDataAssets.stationTextureList[0]); Standtextureload(scope,netDataAssets.stationTextureList[0]);
scope.modelmanager.loadpromise(JSON.parse(netdata.data.assets).maintainerAssetList, scope.mixers).then(function (data) { scope.modelmanager.loadpromise(JSON.parse(netdata.data.assets).maintainerAssetList, scope.mixers).then(function (data) {
moveanima.initlistnew(scope.modelmanager.switchmodel.mesh); moveanima.initSwitchAnima(scope.modelmanager.switchmodel.mesh);
daochamodel = scope.modelmanager.switchmodel.mesh.getObjectByName("DAOCHA"); daochamodel = scope.modelmanager.switchmodel.mesh.getObjectByName("DAOCHA");
if(scope.modelmanager.standmodel.mesh.getObjectByName("zhantailiebiao") && scope.stationtexture["devicelist"]){ if(scope.modelmanager.standmodel.mesh.getObjectByName("zhantailiebiao") && scope.stationtexture["devicelist"]){
@ -257,11 +257,10 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
scope.modelmanager.standmodel.action.time = 0; scope.modelmanager.standmodel.action.time = 0;
scope.modelmanager.standmodel.action.timeScale = 1; scope.modelmanager.standmodel.action.timeScale = 1;
scope.modelmanager.standmodel.action.play(); scope.modelmanager.standmodel.action.play();
console.log(data.standCode);
console.log(psdtexturemap);
if(psdtexturemap[data.code]){ if(psdtexturemap[data.code]){
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map =scope.stationtexture[psdtexturemap[data.code]]; scope.modelmanager.standmodel.mesh.getObjectByName("DXHDQG").material.map =scope.stationtexture[psdtexturemap[data.code]];
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map.needsUpdate = true; scope.modelmanager.standmodel.mesh.getObjectByName("DXHDQG").material.map.needsUpdate = true;
} }
@ -285,7 +284,7 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
} else { } else {
scope.nowcode = data.code; scope.nowcode = data.code;
if (data.type == "room") { if (data.type == "room") {
console.log(scope.modelmanager.roommodel.mesh); // console.log(scope.modelmanager.roommodel.mesh);
scope.showmodel = scope.modelmanager.roommodel.mesh; scope.showmodel = scope.modelmanager.roommodel.mesh;
scope.scene.add(scope.showmodel); scope.scene.add(scope.showmodel);
scope.camera.position.set(5, 7, -9); scope.camera.position.set(5, 7, -9);
@ -336,8 +335,8 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
scope.modelmanager.standmodel.action.play(); scope.modelmanager.standmodel.action.play();
if(psdtexturemap[data.code]){ if(psdtexturemap[data.code]){
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map =scope.stationtexture[psdtexturemap[data.code]]; scope.modelmanager.standmodel.mesh.getObjectByName("DXHDQG").material.map =scope.stationtexture[psdtexturemap[data.code]];
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map.needsUpdate = true; scope.modelmanager.standmodel.mesh.getObjectByName("DXHDQG").material.map.needsUpdate = true;
} }
// scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map =scope.stationtexture[psdtexturemap[data.standCode]]; // scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map =scope.stationtexture[psdtexturemap[data.standCode]];

View File

@ -475,7 +475,7 @@ export function jl3dFaultDeviceVr(dom,group,skinCode) {
// setpsdstationmap(JSON.parse(netdata.data.stands)); // setpsdstationmap(JSON.parse(netdata.data.stands));
scope.modelmanager.loadpromise(mixers).then(function (data) { scope.modelmanager.loadpromise(mixers).then(function (data) {
switchModel = scope.modelmanager.otherDevice.mesh.getObjectByName("SWITCH1"); switchModel = scope.modelmanager.otherDevice.mesh.getObjectByName("SWITCH1");
moveanima.initlistnew(switchModel); moveanima.initSwitchAnima(switchModel);
scope.devicetext.initdevicetext(switchModel); scope.devicetext.initdevicetext(switchModel);
// scope.scene.add(switchModel); // scope.scene.add(switchModel);

View File

@ -14,7 +14,7 @@ export function MoveanimateVr(main){
this.status = true; this.status = true;
//当前动画模型 //当前动画模型
this.nowmodelname = undefined; this.nowmodelname = undefined;
this.initlistnew = function(switchmodel){ this.initSwitchAnima = function(switchmodel){
scope.animatelist[switchmodel.animacode+"chaijie"] = []; scope.animatelist[switchmodel.animacode+"chaijie"] = [];

View File

@ -458,7 +458,7 @@ export function Jl3dOtherVR(dom,group,skinCode) {
// setpsdstationmap(JSON.parse(netdata.data.stands)); // setpsdstationmap(JSON.parse(netdata.data.stands));
scope.modelmanager.loadpromise(mixers).then(function (data) { scope.modelmanager.loadpromise(mixers).then(function (data) {
switchModel = scope.modelmanager.otherDevice.mesh.getObjectByName("SWITCH"); switchModel = scope.modelmanager.otherDevice.mesh.getObjectByName("SWITCH");
moveanima.initlistnew(switchModel); moveanima.initSwitchAnima(switchModel);
scope.devicetext.initdevicetext(switchModel); scope.devicetext.initdevicetext(switchModel);
// scope.scene.add(switchModel); // scope.scene.add(switchModel);

View File

@ -81,16 +81,41 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
newfault.name = lablecodemap.switch[newfault.code]; newfault.name = lablecodemap.switch[newfault.code];
newfault.typetext = "道岔"; newfault.typetext = "道岔";
if(event.data.body.fault == "SPLIT"){ if(event.data.body.fault == "SPLIT"){
newfault.text = "道岔挤岔"; newfault.text = "失表";
}
if(event.data.body.fault == "NORMAL_SPLIT"){
newfault.text = "定位失表";
}
if(event.data.body.fault == "REVERSE_SPLIT"){
newfault.text = "反位失表";
}
if(event.data.body.fault == "SQUEEZE"){
newfault.text = "挤岔";
}
if(event.data.body.fault == "CBTC_OCCUPIED_FAULT"){
newfault.text = "通信车占用";
}
if(event.data.body.fault == "AXLE_FAULT"){
newfault.text = "红光带故障";
}
if(event.data.body.fault == "ARB"){
newfault.text = "橙光带故障";
} }
} }
if(event.data.body.type == "SECTION"){ if(event.data.body.type == "SECTION"){
newfault.name = lablecodemap.section[newfault.code]; newfault.name = lablecodemap.section[newfault.code];
newfault.typetext = "区段"; newfault.typetext = "区段";
if(event.data.body.fault == "FAULT"){ if(event.data.body.fault == "FAULT"){
newfault.text = "计轴故障"; newfault.text = "红光带故障";
}
if(event.data.body.fault == "CBTC_OCCUPIED_FAULT"){
newfault.text = "通信车占用";
}
if(event.data.body.fault == "ARB"){
newfault.text = "橙光带故障";
} }
} }
@ -105,6 +130,9 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
newfault.text = "屏蔽门无法开启"; newfault.text = "屏蔽门无法开启";
} }
if(event.data.body.fault == "NO_CLOSE_AND_LOCK"){
newfault.text = "无关闭锁紧信号";
}
} }
warningmsg("新的故障设备:"+event.data.body.code); warningmsg("新的故障设备:"+event.data.body.code);
@ -147,23 +175,50 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
newfault.name = lablecodemap.switch[newfault.code]; newfault.name = lablecodemap.switch[newfault.code];
newfault.typetext = "道岔"; newfault.typetext = "道岔";
if(fault[i].fault == "SPLIT"){ if(fault[i].fault == "SPLIT"){
newfault.text = "失表";
}
if(fault[i].fault == "NORMAL_SPLIT"){
newfault.text = "定位失表";
}
if(fault[i].fault == "REVERSE_SPLIT"){
newfault.text = "道岔挤岔"; newfault.text = "道岔挤岔";
} }
if(fault[i].fault == "SQUEEZE"){
newfault.text = "反位失表";
}
if(fault[i].fault == "CBTC_OCCUPIED_FAULT"){
newfault.text = "通信车占用";
}
if(fault[i].fault == "AXLE_FAULT"){
newfault.text = "红光带故障";
}
if(fault[i].fault == "ARB"){
newfault.text = "橙光带故障";
}
} }
if(fault[i].type == "SECTION"){ if(fault[i].type == "SECTION"){
newfault.name = lablecodemap.section[newfault.code]; newfault.name = lablecodemap.section[newfault.code];
newfault.typetext = "区段"; newfault.typetext = "区段";
if(fault[i].fault == "FAULT"){ if(fault[i].fault == "FAULT"){
newfault.text = "计轴故障"; newfault.text = "红光带故障";
} }
if(fault[i].fault == "CBTC_OCCUPIED_FAULT"){
newfault.text = "通信车占用";
}
if(fault[i].fault == "ARB"){
newfault.text = "橙光带故障";
}
} }
if(fault[i].type == "STAND"){ if(fault[i].type == "STAND"){
newfault.name = newfault.code; newfault.name = newfault.code;
newfault.typetext = "屏蔽门"; newfault.typetext = "屏蔽门";
if(fault[i].fault == "PSD_CANNOT_BE_CLOSED"){ if(fault[i].fault == "PSD_CANNOT_BE_CLOSED"){
newfault.text = "屏蔽门无法关闭"; newfault.text = "屏蔽门无法关闭";
} }
@ -171,6 +226,10 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
newfault.text = "屏蔽门无法开启"; newfault.text = "屏蔽门无法开启";
} }
if(fault[i].fault == "NO_CLOSE_AND_LOCK"){
newfault.text = "无关闭锁紧信号";
}
} }
updatefault(newfault); updatefault(newfault);
} }
@ -626,20 +685,20 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
} }
function traindoorupdate(data){ function traindoorupdate(data){
let code = data.code; let code = data.trainCode;
if(trainlisttest.list[code].right == "0"){ if(trainlisttest.list[code].right == "0"){
if(data.doorCode == "2"){ if(data.code == "2"){
if(trainlisttest.list[code].open != data.open && data.open == "0"){ if(trainlisttest.list[code].open != data.command && data.command == "G"){
trainlisttest.list[code].open = "0"; trainlisttest.list[code].open = data.command;
for(let an=actions[code].top.length-1;an>=0;an--){ for(let an=actions[code].top.length-1;an>=0;an--){
actions[code].top[an].reset(); actions[code].top[an].reset();
actions[code].top[an].time = actions[code].top[an]._clip.duration; actions[code].top[an].time = actions[code].top[an]._clip.duration;
actions[code].top[an].timeScale = -1; actions[code].top[an].timeScale = -1;
actions[code].top[an].play(); actions[code].top[an].play();
} }
}else if(trainlisttest.list[code].open != data.open && data.open == "1"){ }else if(trainlisttest.list[code].open != data.command && data.command == "K"){
trainlisttest.list[code].open = "1"; trainlisttest.list[code].open = data.command;
for(let an=actions[code].top.length-1;an>=0;an--){ for(let an=actions[code].top.length-1;an>=0;an--){
actions[code].top[an].reset(); actions[code].top[an].reset();
actions[code].top[an].time = 0; actions[code].top[an].time = 0;
@ -650,16 +709,16 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
}else{ }else{
if (trainlisttest.list[code].open != data.open && data.open == '0') { if (trainlisttest.list[code].open != data.command && data.command == 'G') {
trainlisttest.list[code].open = '0'; trainlisttest.list[code].open = data.command;
for (let an=actions[code].down.length-1; an>=0; an--) { for (let an=actions[code].down.length-1; an>=0; an--) {
actions[code].down[an].reset(); actions[code].down[an].reset();
actions[code].down[an].time = actions[code].down[an]._clip.duration; actions[code].down[an].time = actions[code].down[an]._clip.duration;
actions[code].down[an].timeScale = -1; actions[code].down[an].timeScale = -1;
actions[code].down[an].play(); actions[code].down[an].play();
} }
} else if (trainlisttest.list[code].open != data.open && data.open == '1') { } else if (trainlisttest.list[code].open != data.command && data.command == 'K') {
trainlisttest.list[code].open = "1"; trainlisttest.list[code].open = data.command;
for(let an=actions[code].down.length-1;an>=0;an--){ for(let an=actions[code].down.length-1;an>=0;an--){
actions[code].down[an].reset(); actions[code].down[an].reset();
actions[code].down[an].time = 0; actions[code].down[an].time = 0;
@ -670,18 +729,18 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
} }
}else{ }else{
if(data.doorCode == "1"){ if(data.code == "1"){
if(trainlisttest.list[code].open != data.open && data.open == "0"){ if(trainlisttest.list[code].open != data.command && data.command == "G"){
trainlisttest.list[code].open = "0"; trainlisttest.list[code].open = data.command;
for(let an=actions[code].top.length-1;an>=0;an--){ for(let an=actions[code].top.length-1;an>=0;an--){
actions[code].top[an].reset(); actions[code].top[an].reset();
actions[code].top[an].time = actions[code].top[an]._clip.duration; actions[code].top[an].time = actions[code].top[an]._clip.duration;
actions[code].top[an].timeScale = -1; actions[code].top[an].timeScale = -1;
actions[code].top[an].play(); actions[code].top[an].play();
} }
}else if(trainlisttest.list[code].open != data.open && data.open == "1"){ }else if(trainlisttest.list[code].open != data.command && data.command == "K"){
trainlisttest.list[code].open = "1"; trainlisttest.list[code].open = data.command;
for(let an=actions[code].top.length-1;an>=0;an--){ for(let an=actions[code].top.length-1;an>=0;an--){
actions[code].top[an].reset(); actions[code].top[an].reset();
actions[code].top[an].time = 0; actions[code].top[an].time = 0;
@ -692,16 +751,16 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
}else{ }else{
if (trainlisttest.list[code].open != data.open && data.open == '0') { if (trainlisttest.list[code].open != data.command && data.command == 'G') {
trainlisttest.list[code].open = '0'; trainlisttest.list[code].open = data.command;
for (let an=actions[code].down.length-1; an>=0; an--) { for (let an=actions[code].down.length-1; an>=0; an--) {
actions[code].down[an].reset(); actions[code].down[an].reset();
actions[code].down[an].time = actions[code].down[an]._clip.duration; actions[code].down[an].time = actions[code].down[an]._clip.duration;
actions[code].down[an].timeScale = -1; actions[code].down[an].timeScale = -1;
actions[code].down[an].play(); actions[code].down[an].play();
} }
} else if (trainlisttest.list[code].open != data.open && data.open == '1') { } else if (trainlisttest.list[code].open != data.command && data.command == 'K') {
trainlisttest.list[code].open = "1"; trainlisttest.list[code].open = data.command;
for(let an=actions[code].down.length-1;an>=0;an--){ for(let an=actions[code].down.length-1;an>=0;an--){
actions[code].down[an].reset(); actions[code].down[an].reset();
actions[code].down[an].time = 0; actions[code].down[an].time = 0;
@ -769,18 +828,19 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
} }
} }
} }
function initstand(data) { function initstand(data) {
code = data.code; code = data.code;
if ( actions[code]) { if ( actions[code]) {
if (data.close == '1') { if (data.command == 'K') {
actions[code].status = '1'; actions[code].status = data.command;
actions[code].action.reset(); actions[code].action.reset();
actions[code].action.time = 0; actions[code].action.time = 0;
actions[code].action.timeScale = 1; actions[code].action.timeScale = 1;
actions[code].action.play(); actions[code].action.play();
} }
if (data.close == '0') { if (data.command == 'G') {
actions[code].status = '0'; actions[code].status = data.command;
actions[code].action.reset(); actions[code].action.reset();
actions[code].action.time = actions[code].action._clip.duration; actions[code].action.time = actions[code].action._clip.duration;
actions[code].action.timeScale = -1; actions[code].action.timeScale = -1;
@ -788,18 +848,19 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
} }
} }
} }
function standupdate(data) { function standupdate(data) {
code = data.code; code = data.code;
if ( actions[code]) { if ( actions[code]) {
if (data.open == '1') { if (data.command == 'K') {
actions[code].status = '1'; actions[code].status = data.command;
actions[code].action.reset(); actions[code].action.reset();
actions[code].action.time = 0; actions[code].action.time = 0;
actions[code].action.timeScale = 1; actions[code].action.timeScale = 1;
actions[code].action.play(); actions[code].action.play();
} }
if (data.open == '0') { if (data.command == 'G') {
actions[code].status = '0'; actions[code].status = data.command;
actions[code].action.reset(); actions[code].action.reset();
actions[code].action.time = actions[code].action._clip.duration; actions[code].action.time = actions[code].action._clip.duration;
actions[code].action.timeScale = -1; actions[code].action.timeScale = -1;
@ -807,74 +868,112 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
} }
} }
} }
function signalupdate(data) { function signalupdate(data) {
code = data.code; code = data.code;
if(data.red == 1){ if(data.command == 'No'){
signallist.list[code].mesh.getObjectByName("red").material.map = materials[0]; signallist.list[code].mesh.getObjectByName("red").material.map = materials["black"];
signallist.list[code].mesh.getObjectByName("red").material.map.needsUpdate = true; signallist.list[code].mesh.getObjectByName("red").material.map.needsUpdate = true;
}else{ signallist.list[code].mesh.getObjectByName("yellow").material.map = materials["black"];
signallist.list[code].mesh.getObjectByName("red").material.map = materials[3]; signallist.list[code].mesh.getObjectByName("yellow").material.map.needsUpdate = true;
signallist.list[code].mesh.getObjectByName("green").material.map = materials["black"];
signallist.list[code].mesh.getObjectByName("green").material.map.needsUpdate = true;
}
/** 红 */
if(data.command == 'R'){
signallist.list[code].mesh.getObjectByName("red").material.map = materials["red"];
signallist.list[code].mesh.getObjectByName("red").material.map.needsUpdate = true; signallist.list[code].mesh.getObjectByName("red").material.map.needsUpdate = true;
} signallist.list[code].mesh.getObjectByName("yellow").material.map = materials["black"];
if(data.yellow == 1){
signallist.list[code].mesh.getObjectByName("yellow").material.map = materials[1];
signallist.list[code].mesh.getObjectByName("yellow").material.map.needsUpdate = true; signallist.list[code].mesh.getObjectByName("yellow").material.map.needsUpdate = true;
signallist.list[code].mesh.getObjectByName("green").material.map = materials["black"];
}else{ signallist.list[code].mesh.getObjectByName("green").material.map.needsUpdate = true;
signallist.list[code].mesh.getObjectByName("yellow").material.map = materials[3];
signallist.list[code].mesh.getObjectByName("yellow").material.map.needsUpdate = true;
} }
/** 绿 */
if(data.green == 1){ if(data.command == 'G'){
signallist.list[code].mesh.getObjectByName("green").material.map = materials[2]; signallist.list[code].mesh.getObjectByName("red").material.map = materials["black"];
signallist.list[code].mesh.getObjectByName("red").material.map.needsUpdate = true;
signallist.list[code].mesh.getObjectByName("yellow").material.map = materials["black"];
signallist.list[code].mesh.getObjectByName("yellow").material.map.needsUpdate = true;
signallist.list[code].mesh.getObjectByName("green").material.map = materials["green"];
signallist.list[code].mesh.getObjectByName("green").material.map.needsUpdate = true; signallist.list[code].mesh.getObjectByName("green").material.map.needsUpdate = true;
}
}else{ /** 黄 */
signallist.list[code].mesh.getObjectByName("green").material.map = materials[3]; if(data.command == 'Y'){
signallist.list[code].mesh.getObjectByName("red").material.map = materials["black"];
signallist.list[code].mesh.getObjectByName("red").material.map.needsUpdate = true;
signallist.list[code].mesh.getObjectByName("yellow").material.map = materials["yellow"];
signallist.list[code].mesh.getObjectByName("yellow").material.map.needsUpdate = true;
signallist.list[code].mesh.getObjectByName("green").material.map = materials["black"];
signallist.list[code].mesh.getObjectByName("green").material.map.needsUpdate = true;
}
/** 月白 */
if(data.command == 'W'){
signallist.list[code].mesh.getObjectByName("red").material.map = materials["black"];
signallist.list[code].mesh.getObjectByName("red").material.map.needsUpdate = true;
signallist.list[code].mesh.getObjectByName("yellow").material.map = materials["black"];
signallist.list[code].mesh.getObjectByName("yellow").material.map.needsUpdate = true;
signallist.list[code].mesh.getObjectByName("green").material.map = materials["black"];
signallist.list[code].mesh.getObjectByName("green").material.map.needsUpdate = true;
}
/** 蓝 */
if(data.command == 'B'){
signallist.list[code].mesh.getObjectByName("red").material.map = materials["black"];
signallist.list[code].mesh.getObjectByName("red").material.map.needsUpdate = true;
signallist.list[code].mesh.getObjectByName("yellow").material.map = materials["black"];
signallist.list[code].mesh.getObjectByName("yellow").material.map.needsUpdate = true;
signallist.list[code].mesh.getObjectByName("green").material.map = materials["black"];
signallist.list[code].mesh.getObjectByName("green").material.map.needsUpdate = true;
}
/** 红黄 */
if(data.command == 'RY'){
signallist.list[code].mesh.getObjectByName("red").material.map = materials["red"];
signallist.list[code].mesh.getObjectByName("red").material.map.needsUpdate = true;
signallist.list[code].mesh.getObjectByName("yellow").material.map = materials["yellow"];
signallist.list[code].mesh.getObjectByName("yellow").material.map.needsUpdate = true;
signallist.list[code].mesh.getObjectByName("green").material.map = materials["black"];
signallist.list[code].mesh.getObjectByName("green").material.map.needsUpdate = true; signallist.list[code].mesh.getObjectByName("green").material.map.needsUpdate = true;
} }
} }
function initswitch(data) { function initswitch(data) {
code = data.code; code = data.code;
if (data.routeLock == '0') { if (data.command == 'NP') {
// sectionlist.switchs.modellist[j].normal = data.normal; // sectionlist.switchs.modellist[j].normal = data.normal;
actions[code].action.reset(); actions[code].action.reset();
actions[code].action.time = 0; actions[code].action.time = 0;
actions[code].action.timeScale = 1; actions[code].action.timeScale = 1;
actions[code].action.play(); actions[code].action.play();
actions[code].normal = "02"; actions[code].command = data.command;
} else if (data.routeLock == '1') { } else if (data.command == 'RP') {
// sectionlist.switchs.modellist[j].normal = data.normal; // sectionlist.switchs.modellist[j].normal = data.normal;
actions[code].action.reset(); actions[code].action.reset();
actions[code].action.time = actions[code].action._clip.duration; actions[code].action.time = actions[code].action._clip.duration;
actions[code].action.timeScale = -1; actions[code].action.timeScale = -1;
actions[code].action.play(); actions[code].action.play();
actions[code].normal = "01"; actions[code].command = data.command;
} }
} }
function switchupdate(data) { function switchupdate(data) {
code = data.code; code = data.code;
if (actions[code].normal != data.normal) {
if (data.normal == '02') { if (actions[code].command != data.command) {
if (data.command == 'NP') {
// sectionlist.switchs.modellist[j].normal = data.normal; // sectionlist.switchs.modellist[j].normal = data.normal;
actions[code].action.reset(); actions[code].action.reset();
actions[code].action.time = 0; actions[code].action.time = 0;
actions[code].action.timeScale = 1; actions[code].action.timeScale = 1;
actions[code].action.play(); actions[code].action.play();
actions[code].normal = "02"; actions[code].command = data.command;
} else if (data.normal == '01') { } else if (data.command == 'RP') {
// sectionlist.switchs.modellist[j].normal = data.normal; // sectionlist.switchs.modellist[j].normal = data.normal;
actions[code].action.reset(); actions[code].action.reset();
actions[code].action.time = actions[code].action._clip.duration; actions[code].action.time = actions[code].action._clip.duration;
actions[code].action.timeScale = -1; actions[code].action.timeScale = -1;
actions[code].action.play(); actions[code].action.play();
actions[code].normal = "01"; actions[code].command = data.command;
} }
} }
} }

View File

@ -15,7 +15,7 @@ export function Moveanimate(main){
//当前动画模型 //当前动画模型
this.nowmodelname = undefined; this.nowmodelname = undefined;
//定义转辙机零件动画 //定义转辙机零件动画
this.initlistnew = function(switchmodel){ this.initSwitchAnima = function(switchmodel){
scope.animatelist[switchmodel.animacode+"chaijie"] = []; scope.animatelist[switchmodel.animacode+"chaijie"] = [];
scope.animatelist[switchmodel.animacode+"fuwei"] = []; scope.animatelist[switchmodel.animacode+"fuwei"] = [];
for(let i=0,leni=switchmodel.children.length;i<leni;i++){ for(let i=0,leni=switchmodel.children.length;i<leni;i++){

View File

@ -197,7 +197,7 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
scope.modelmanager.loadpromise(netDataAssets.deviceAssetList, scope.mixers).then(function (data) { scope.modelmanager.loadpromise(netDataAssets.deviceAssetList, scope.mixers).then(function (data) {
//综合演练情况下当模型加载后显示 //综合演练情况下当模型加载后显示
moveanima.initlistnew(scope.modelmanager.switchmodel.mesh); moveanima.initSwitchAnima(scope.modelmanager.switchmodel.mesh);
daochamodel = scope.modelmanager.switchmodel.mesh.getObjectByName("DAOCHA"); daochamodel = scope.modelmanager.switchmodel.mesh.getObjectByName("DAOCHA");

View File

@ -30,14 +30,14 @@ export function silumationConnect(deviceaction,toptrain,downtrain,routegroup,pas
// 仿真socket接口回调函数 // 仿真socket接口回调函数
function callback(Response) { function callback(Response) {
let data = JSON.parse(Response.body); let data = JSON.parse(Response.body);
if(data.type == "DeviceCtrl_3D"){ if(data.type == "DeviceCtrl_3D"){
if(data.body.type == "PSD"){ if(data.body.type == "PSD"){
if(data.body.code == passerStation.nowStation.toppsd){ if(data.body.code == passerStation.nowStation.toppsd){
if(data.body.open == 0){ if(data.body.command == 'G'){
passerAi.passerout("top","end"); passerAi.passerout("top","end");
deviceaction.top.action.reset(); deviceaction.top.action.reset();
@ -54,7 +54,7 @@ export function silumationConnect(deviceaction,toptrain,downtrain,routegroup,pas
} }
} }
if(data.body.code == passerStation.nowStation.downpsd){ if(data.body.code == passerStation.nowStation.downpsd){
if(data.body.open == 0){ if(data.body.command == 'G'){
deviceaction.down.action.reset(); deviceaction.down.action.reset();
deviceaction.down.action.time = deviceaction.down.action._clip.duration; deviceaction.down.action.time = deviceaction.down.action._clip.duration;
@ -74,9 +74,9 @@ export function silumationConnect(deviceaction,toptrain,downtrain,routegroup,pas
if(data.body.type == "TRAIN_DOOR"){ if(data.body.type == "TRAIN_DOOR"){
if(toptrain.nowcode == data.body.code){ if(toptrain.nowcode == data.body.trainCode){
if(data.body.open == "0"){ if(data.body.command == "G"){
closetraindoor(toptrain,data.body.doorCode,"top"); closetraindoor(toptrain,data.body.doorCode,"top");
}else{ }else{
@ -86,9 +86,9 @@ export function silumationConnect(deviceaction,toptrain,downtrain,routegroup,pas
} }
if(downtrain.nowcode == data.body.code){ if(downtrain.nowcode == data.body.trainCode){
if(data.body.open == "0"){ if(data.body.command == "G"){
closetraindoor(downtrain,data.body.doorCode,"down"); closetraindoor(downtrain,data.body.doorCode,"down");
}else{ }else{

View File

@ -104,7 +104,7 @@ export function PassflowConnect(deviceaction,toptrain,downtrain,routegroup,passe
if(data.body.type == "PSD"){ if(data.body.type == "PSD"){
if(data.body.code == passerStation.nowStation.toppsd){ if(data.body.code == passerStation.nowStation.toppsd){
if(data.body.open == 0){ if(data.body.command == 'G'){
passerAi.passerout("top","end"); passerAi.passerout("top","end");
deviceaction.top.action.reset(); deviceaction.top.action.reset();
@ -121,7 +121,7 @@ export function PassflowConnect(deviceaction,toptrain,downtrain,routegroup,passe
} }
} }
if(data.body.code == passerStation.nowStation.downpsd){ if(data.body.code == passerStation.nowStation.downpsd){
if(data.body.open == 0){ if(data.body.command == 'G'){
deviceaction.down.action.reset(); deviceaction.down.action.reset();
deviceaction.down.action.time = deviceaction.down.action._clip.duration; deviceaction.down.action.time = deviceaction.down.action._clip.duration;
@ -141,25 +141,25 @@ export function PassflowConnect(deviceaction,toptrain,downtrain,routegroup,passe
if(data.body.type == "TRAIN_DOOR"){ if(data.body.type == "TRAIN_DOOR"){
if(toptrain.nowcode == data.body.code){ if(toptrain.nowcode == data.body.trainCode){
if(data.body.open == "0"){ if(data.body.command == "G"){
closetraindoor(toptrain,data.body.doorCode,"top"); closetraindoor(toptrain,data.body.code,"top");
}else{ }else{
opentraindoor(toptrain,data.body.doorCode,"top"); opentraindoor(toptrain,data.body.code,"top");
} }
} }
if(downtrain.nowcode == data.body.code){ if(downtrain.nowcode == data.body.trainCode){
if(data.body.open == "0"){ if(data.body.command == "K"){
closetraindoor(downtrain,data.body.doorCode,"down"); closetraindoor(downtrain,data.body.code,"down");
}else{ }else{
opentraindoor(downtrain,data.body.doorCode,"down"); opentraindoor(downtrain,data.body.code,"down");
} }

View File

@ -83,7 +83,6 @@ export function PassflowPassConnect(deviceaction,toptrain,downtrain,routegroup,p
} }
if(data.type == "TRAIN_PFI_BL"){ if(data.type == "TRAIN_PFI_BL"){
if(toptrain.nowcode == data.body.code && scope.topswitch == true){ if(toptrain.nowcode == data.body.code && scope.topswitch == true){
//根据上下车人数创建人 //根据上下车人数创建人

View File

@ -35,8 +35,8 @@ export function TrainConnect(trafficTrain,deviceaction,toptrain,routegroup,passe
// console.log(trafficTrain.trainList); // console.log(trafficTrain.trainList);
for(let k in trafficTrain.trainList){ for(let k in trafficTrain.trainList){
if(trafficTrain.trainList[k].code == data.body){ if(trafficTrain.trainList[k].code == data.body){
console.log( trafficTrain.trainList[k].code); // console.log( trafficTrain.trainList[k].code);
console.log( data.body); // console.log( data.body);
updateTrafficTrainValue(data.body); updateTrafficTrainValue(data.body);
trafficTrain.updateNowTrainCode(data.body); trafficTrain.updateNowTrainCode(data.body);
trafficTrain.updateNowTrunk(0+''); trafficTrain.updateNowTrunk(0+'');
@ -116,19 +116,19 @@ export function TrainConnect(trafficTrain,deviceaction,toptrain,routegroup,passe
if(data.body.type == "TRAIN_DOOR"){ if(data.body.type == "TRAIN_DOOR"){
for(let i=0;i<trafficTrain.trainList.length;i++){ for(let i=0;i<trafficTrain.trainList.length;i++){
if(trafficTrain.trainList[i].code == data.body.code){ if(trafficTrain.trainList[i].code == data.body.trainCode){
trafficTrain.trainList[i].open = data.body.open; trafficTrain.trainList[i].open = data.body.command;
trafficTrain.trainList[i].doorCode = data.body.doorCode; trafficTrain.trainList[i].doorCode = data.body.code;
i = trafficTrain.trainList.length; i = trafficTrain.trainList.length;
} }
} }
if(toptrain.nowcode == data.body.code){ if(toptrain.nowcode == data.body.trainCode){
trafficTrain.updatePasserMove(data.body); trafficTrain.updatePasserMove(data.body);
if(data.body.open == "0"){ if(data.body.command == "G"){
closetraindoor(toptrain,data.body.doorCode,"top"); closetraindoor(toptrain,data.body.code,"top");
}else{ }else{
opentraindoor(toptrain,data.body.doorCode,"top"); opentraindoor(toptrain,data.body.code,"top");
} }

View File

@ -325,7 +325,7 @@ export function Jl3dTrafficTrain(dom,skinCode,routegroup,viewMap,initCode) {
let nowLeaveDoor = null; let nowLeaveDoor = null;
this.updatePasserMove = function(doorData){ this.updatePasserMove = function(doorData){
nowLeaveDoor = doorData.doorCode; nowLeaveDoor = doorData.code;
// console.log(doorData); // console.log(doorData);
} }

View File

@ -2,10 +2,10 @@ export function getBaseUrl() {
let BASE_API; let BASE_API;
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud'; // 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.8.107:9000'; // 袁琪 // BASE_API = 'http://192.168.8.107:9000'; // 袁琪
// BASE_API = 'http://192.168.2.175:9000'; // 旭强 有线 // BASE_API = 'http://192.168.2.175:9000'; // 旭强 有线
BASE_API = 'http://192.168.8.177:9000'; // 旭强 无线 // BASE_API = 'http://192.168.8.177:9000'; // 旭强 无线
// BASE_API = 'http://192.168.2.183:9000'; // 张赛 // BASE_API = 'http://192.168.2.183:9000'; // 张赛
// BASE_API = 'http://192.168.8.140:9000'; // 杜康 // BASE_API = 'http://192.168.8.140:9000'; // 杜康
// BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://b29z135112.zicp.vip';

View File

@ -229,7 +229,7 @@
} }
}, },
devicerepir(){ devicerepir(){
console.log(this.nowdevice); // console.log(this.nowdevice);
if(this.nowdevice){ if(this.nowdevice){
let command = { let command = {
code:this.nowdevice.code, code:this.nowdevice.code,

View File

@ -194,7 +194,20 @@ export default {
this.devicelist = []; this.devicelist = [];
}, },
updatefault(fault) { updatefault(fault) {
let isNew = true;
for(let i=0;i<this.devicelist.length;i++){
if(this.devicelist[i].name == fault.name){
isNew = false;
this.devicelist[i].name = fault.name;
this.devicelist[i].type = fault.type;
this.devicelist[i].typetext = fault.typetext;
this.devicelist[i].text = fault.text;
this.devicelist[i].fault = fault.fault;
}
}
if(isNew == true){
this.devicelist.push(fault); this.devicelist.push(fault);
}
}, },
deletefault(code) { deletefault(code) {
for (let i = 0, leni = this.devicelist.length; i < leni; i++) { for (let i = 0, leni = this.devicelist.length; i < leni; i++) {
@ -228,10 +241,10 @@ export default {
this.deviceShow = true; this.deviceShow = true;
this.$refs.faultdevice.showroom(); this.$refs.faultdevice.showroom();
}, },
quit() { quit() {
// this.$emit('back'); // this.$emit('back');
this.isswitch = false; this.isswitch = false;
window.close(); window.close();
}, },
onMouseOverNormal() { onMouseOverNormal() {
this.normalShow=true; this.normalShow=true;