Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
40624c3177
@ -148,7 +148,7 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
|
||||
setpsdstationmap(JSON.parse(netdata.data.stands));
|
||||
Standtextureload(scope,netDataAssets.stationTextureList[0]);
|
||||
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");
|
||||
|
||||
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.timeScale = 1;
|
||||
scope.modelmanager.standmodel.action.play();
|
||||
console.log(data.standCode);
|
||||
console.log(psdtexturemap);
|
||||
|
||||
if(psdtexturemap[data.code]){
|
||||
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").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 =scope.stationtexture[psdtexturemap[data.code]];
|
||||
scope.modelmanager.standmodel.mesh.getObjectByName("DXHDQG").material.map.needsUpdate = true;
|
||||
|
||||
}
|
||||
|
||||
@ -285,7 +284,7 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
|
||||
} else {
|
||||
scope.nowcode = data.code;
|
||||
if (data.type == "room") {
|
||||
console.log(scope.modelmanager.roommodel.mesh);
|
||||
// console.log(scope.modelmanager.roommodel.mesh);
|
||||
scope.showmodel = scope.modelmanager.roommodel.mesh;
|
||||
scope.scene.add(scope.showmodel);
|
||||
scope.camera.position.set(5, 7, -9);
|
||||
@ -336,8 +335,8 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
|
||||
scope.modelmanager.standmodel.action.play();
|
||||
|
||||
if(psdtexturemap[data.code]){
|
||||
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").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 =scope.stationtexture[psdtexturemap[data.code]];
|
||||
scope.modelmanager.standmodel.mesh.getObjectByName("DXHDQG").material.map.needsUpdate = true;
|
||||
|
||||
}
|
||||
// scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map =scope.stationtexture[psdtexturemap[data.standCode]];
|
||||
|
@ -475,7 +475,7 @@ export function jl3dFaultDeviceVr(dom,group,skinCode) {
|
||||
// setpsdstationmap(JSON.parse(netdata.data.stands));
|
||||
scope.modelmanager.loadpromise(mixers).then(function (data) {
|
||||
switchModel = scope.modelmanager.otherDevice.mesh.getObjectByName("SWITCH1");
|
||||
moveanima.initlistnew(switchModel);
|
||||
moveanima.initSwitchAnima(switchModel);
|
||||
|
||||
scope.devicetext.initdevicetext(switchModel);
|
||||
// scope.scene.add(switchModel);
|
||||
|
@ -14,7 +14,7 @@ export function MoveanimateVr(main){
|
||||
this.status = true;
|
||||
//当前动画模型
|
||||
this.nowmodelname = undefined;
|
||||
this.initlistnew = function(switchmodel){
|
||||
this.initSwitchAnima = function(switchmodel){
|
||||
|
||||
|
||||
scope.animatelist[switchmodel.animacode+"chaijie"] = [];
|
||||
|
@ -458,7 +458,7 @@ export function Jl3dOtherVR(dom,group,skinCode) {
|
||||
// setpsdstationmap(JSON.parse(netdata.data.stands));
|
||||
scope.modelmanager.loadpromise(mixers).then(function (data) {
|
||||
switchModel = scope.modelmanager.otherDevice.mesh.getObjectByName("SWITCH");
|
||||
moveanima.initlistnew(switchModel);
|
||||
moveanima.initSwitchAnima(switchModel);
|
||||
|
||||
scope.devicetext.initdevicetext(switchModel);
|
||||
// scope.scene.add(switchModel);
|
||||
|
@ -81,16 +81,41 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
|
||||
newfault.name = lablecodemap.switch[newfault.code];
|
||||
newfault.typetext = "道岔";
|
||||
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"){
|
||||
newfault.name = lablecodemap.section[newfault.code];
|
||||
newfault.typetext = "区段";
|
||||
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 = "屏蔽门无法开启";
|
||||
}
|
||||
|
||||
if(event.data.body.fault == "NO_CLOSE_AND_LOCK"){
|
||||
newfault.text = "无关闭锁紧信号";
|
||||
}
|
||||
}
|
||||
|
||||
warningmsg("新的故障设备:"+event.data.body.code);
|
||||
@ -147,23 +175,50 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
|
||||
newfault.name = lablecodemap.switch[newfault.code];
|
||||
newfault.typetext = "道岔";
|
||||
if(fault[i].fault == "SPLIT"){
|
||||
newfault.text = "失表";
|
||||
}
|
||||
if(fault[i].fault == "NORMAL_SPLIT"){
|
||||
newfault.text = "定位失表";
|
||||
}
|
||||
if(fault[i].fault == "REVERSE_SPLIT"){
|
||||
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"){
|
||||
newfault.name = lablecodemap.section[newfault.code];
|
||||
newfault.typetext = "区段";
|
||||
|
||||
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"){
|
||||
newfault.name = newfault.code;
|
||||
newfault.typetext = "屏蔽门";
|
||||
|
||||
if(fault[i].fault == "PSD_CANNOT_BE_CLOSED"){
|
||||
newfault.text = "屏蔽门无法关闭";
|
||||
}
|
||||
@ -171,6 +226,10 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
|
||||
newfault.text = "屏蔽门无法开启";
|
||||
}
|
||||
|
||||
if(fault[i].fault == "NO_CLOSE_AND_LOCK"){
|
||||
newfault.text = "无关闭锁紧信号";
|
||||
}
|
||||
|
||||
}
|
||||
updatefault(newfault);
|
||||
}
|
||||
@ -626,20 +685,20 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
|
||||
}
|
||||
|
||||
function traindoorupdate(data){
|
||||
let code = data.code;
|
||||
let code = data.trainCode;
|
||||
if(trainlisttest.list[code].right == "0"){
|
||||
if(data.doorCode == "2"){
|
||||
if(data.code == "2"){
|
||||
|
||||
if(trainlisttest.list[code].open != data.open && data.open == "0"){
|
||||
trainlisttest.list[code].open = "0";
|
||||
if(trainlisttest.list[code].open != data.command && data.command == "G"){
|
||||
trainlisttest.list[code].open = data.command;
|
||||
for(let an=actions[code].top.length-1;an>=0;an--){
|
||||
actions[code].top[an].reset();
|
||||
actions[code].top[an].time = actions[code].top[an]._clip.duration;
|
||||
actions[code].top[an].timeScale = -1;
|
||||
actions[code].top[an].play();
|
||||
}
|
||||
}else if(trainlisttest.list[code].open != data.open && data.open == "1"){
|
||||
trainlisttest.list[code].open = "1";
|
||||
}else if(trainlisttest.list[code].open != data.command && data.command == "K"){
|
||||
trainlisttest.list[code].open = data.command;
|
||||
for(let an=actions[code].top.length-1;an>=0;an--){
|
||||
actions[code].top[an].reset();
|
||||
actions[code].top[an].time = 0;
|
||||
@ -650,16 +709,16 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
|
||||
}else{
|
||||
|
||||
|
||||
if (trainlisttest.list[code].open != data.open && data.open == '0') {
|
||||
trainlisttest.list[code].open = '0';
|
||||
if (trainlisttest.list[code].open != data.command && data.command == 'G') {
|
||||
trainlisttest.list[code].open = data.command;
|
||||
for (let an=actions[code].down.length-1; an>=0; an--) {
|
||||
actions[code].down[an].reset();
|
||||
actions[code].down[an].time = actions[code].down[an]._clip.duration;
|
||||
actions[code].down[an].timeScale = -1;
|
||||
actions[code].down[an].play();
|
||||
}
|
||||
} else if (trainlisttest.list[code].open != data.open && data.open == '1') {
|
||||
trainlisttest.list[code].open = "1";
|
||||
} else if (trainlisttest.list[code].open != data.command && data.command == 'K') {
|
||||
trainlisttest.list[code].open = data.command;
|
||||
for(let an=actions[code].down.length-1;an>=0;an--){
|
||||
actions[code].down[an].reset();
|
||||
actions[code].down[an].time = 0;
|
||||
@ -670,18 +729,18 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
|
||||
|
||||
}
|
||||
}else{
|
||||
if(data.doorCode == "1"){
|
||||
if(data.code == "1"){
|
||||
|
||||
if(trainlisttest.list[code].open != data.open && data.open == "0"){
|
||||
trainlisttest.list[code].open = "0";
|
||||
if(trainlisttest.list[code].open != data.command && data.command == "G"){
|
||||
trainlisttest.list[code].open = data.command;
|
||||
for(let an=actions[code].top.length-1;an>=0;an--){
|
||||
actions[code].top[an].reset();
|
||||
actions[code].top[an].time = actions[code].top[an]._clip.duration;
|
||||
actions[code].top[an].timeScale = -1;
|
||||
actions[code].top[an].play();
|
||||
}
|
||||
}else if(trainlisttest.list[code].open != data.open && data.open == "1"){
|
||||
trainlisttest.list[code].open = "1";
|
||||
}else if(trainlisttest.list[code].open != data.command && data.command == "K"){
|
||||
trainlisttest.list[code].open = data.command;
|
||||
for(let an=actions[code].top.length-1;an>=0;an--){
|
||||
actions[code].top[an].reset();
|
||||
actions[code].top[an].time = 0;
|
||||
@ -692,16 +751,16 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
|
||||
}else{
|
||||
|
||||
|
||||
if (trainlisttest.list[code].open != data.open && data.open == '0') {
|
||||
trainlisttest.list[code].open = '0';
|
||||
if (trainlisttest.list[code].open != data.command && data.command == 'G') {
|
||||
trainlisttest.list[code].open = data.command;
|
||||
for (let an=actions[code].down.length-1; an>=0; an--) {
|
||||
actions[code].down[an].reset();
|
||||
actions[code].down[an].time = actions[code].down[an]._clip.duration;
|
||||
actions[code].down[an].timeScale = -1;
|
||||
actions[code].down[an].play();
|
||||
}
|
||||
} else if (trainlisttest.list[code].open != data.open && data.open == '1') {
|
||||
trainlisttest.list[code].open = "1";
|
||||
} else if (trainlisttest.list[code].open != data.command && data.command == 'K') {
|
||||
trainlisttest.list[code].open = data.command;
|
||||
for(let an=actions[code].down.length-1;an>=0;an--){
|
||||
actions[code].down[an].reset();
|
||||
actions[code].down[an].time = 0;
|
||||
@ -769,18 +828,19 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function initstand(data) {
|
||||
code = data.code;
|
||||
if ( actions[code]) {
|
||||
if (data.close == '1') {
|
||||
actions[code].status = '1';
|
||||
if (data.command == 'K') {
|
||||
actions[code].status = data.command;
|
||||
actions[code].action.reset();
|
||||
actions[code].action.time = 0;
|
||||
actions[code].action.timeScale = 1;
|
||||
actions[code].action.play();
|
||||
}
|
||||
if (data.close == '0') {
|
||||
actions[code].status = '0';
|
||||
if (data.command == 'G') {
|
||||
actions[code].status = data.command;
|
||||
actions[code].action.reset();
|
||||
actions[code].action.time = actions[code].action._clip.duration;
|
||||
actions[code].action.timeScale = -1;
|
||||
@ -788,18 +848,19 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function standupdate(data) {
|
||||
code = data.code;
|
||||
if ( actions[code]) {
|
||||
if (data.open == '1') {
|
||||
actions[code].status = '1';
|
||||
if (data.command == 'K') {
|
||||
actions[code].status = data.command;
|
||||
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';
|
||||
if (data.command == 'G') {
|
||||
actions[code].status = data.command;
|
||||
actions[code].action.reset();
|
||||
actions[code].action.time = actions[code].action._clip.duration;
|
||||
actions[code].action.timeScale = -1;
|
||||
@ -807,74 +868,112 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function signalupdate(data) {
|
||||
code = data.code;
|
||||
if(data.red == 1){
|
||||
signallist.list[code].mesh.getObjectByName("red").material.map = materials[0];
|
||||
if(data.command == 'No'){
|
||||
signallist.list[code].mesh.getObjectByName("red").material.map = materials["black"];
|
||||
signallist.list[code].mesh.getObjectByName("red").material.map.needsUpdate = true;
|
||||
}else{
|
||||
signallist.list[code].mesh.getObjectByName("red").material.map = materials[3];
|
||||
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 == 'R'){
|
||||
signallist.list[code].mesh.getObjectByName("red").material.map = materials["red"];
|
||||
signallist.list[code].mesh.getObjectByName("red").material.map.needsUpdate = true;
|
||||
}
|
||||
|
||||
if(data.yellow == 1){
|
||||
signallist.list[code].mesh.getObjectByName("yellow").material.map = materials[1];
|
||||
signallist.list[code].mesh.getObjectByName("yellow").material.map = materials["black"];
|
||||
signallist.list[code].mesh.getObjectByName("yellow").material.map.needsUpdate = true;
|
||||
|
||||
}else{
|
||||
signallist.list[code].mesh.getObjectByName("yellow").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.green == 1){
|
||||
signallist.list[code].mesh.getObjectByName("green").material.map = materials[2];
|
||||
/** 绿 */
|
||||
if(data.command == 'G'){
|
||||
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;
|
||||
|
||||
}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;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function initswitch(data) {
|
||||
code = data.code;
|
||||
if (data.routeLock == '0') {
|
||||
if (data.command == 'NP') {
|
||||
// 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.routeLock == '1') {
|
||||
actions[code].command = data.command;
|
||||
} else if (data.command == 'RP') {
|
||||
// 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";
|
||||
actions[code].command = data.command;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function switchupdate(data) {
|
||||
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;
|
||||
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') {
|
||||
actions[code].command = data.command;
|
||||
} else if (data.command == 'RP') {
|
||||
// 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";
|
||||
actions[code].command = data.command;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ export function Moveanimate(main){
|
||||
//当前动画模型
|
||||
this.nowmodelname = undefined;
|
||||
//定义转辙机零件动画
|
||||
this.initlistnew = function(switchmodel){
|
||||
this.initSwitchAnima = function(switchmodel){
|
||||
scope.animatelist[switchmodel.animacode+"chaijie"] = [];
|
||||
scope.animatelist[switchmodel.animacode+"fuwei"] = [];
|
||||
for(let i=0,leni=switchmodel.children.length;i<leni;i++){
|
||||
|
@ -197,7 +197,7 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
|
||||
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");
|
||||
|
||||
|
||||
|
@ -37,7 +37,7 @@ export function silumationConnect(deviceaction,toptrain,downtrain,routegroup,pas
|
||||
if(data.body.type == "PSD"){
|
||||
|
||||
if(data.body.code == passerStation.nowStation.toppsd){
|
||||
if(data.body.open == 0){
|
||||
if(data.body.command == 'G'){
|
||||
|
||||
passerAi.passerout("top","end");
|
||||
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.open == 0){
|
||||
if(data.body.command == 'G'){
|
||||
|
||||
deviceaction.down.action.reset();
|
||||
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(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");
|
||||
|
||||
}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");
|
||||
|
||||
}else{
|
||||
|
@ -104,7 +104,7 @@ export function PassflowConnect(deviceaction,toptrain,downtrain,routegroup,passe
|
||||
if(data.body.type == "PSD"){
|
||||
|
||||
if(data.body.code == passerStation.nowStation.toppsd){
|
||||
if(data.body.open == 0){
|
||||
if(data.body.command == 'G'){
|
||||
|
||||
passerAi.passerout("top","end");
|
||||
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.open == 0){
|
||||
if(data.body.command == 'G'){
|
||||
|
||||
deviceaction.down.action.reset();
|
||||
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(toptrain.nowcode == data.body.code){
|
||||
if(toptrain.nowcode == data.body.trainCode){
|
||||
|
||||
if(data.body.open == "0"){
|
||||
closetraindoor(toptrain,data.body.doorCode,"top");
|
||||
if(data.body.command == "G"){
|
||||
closetraindoor(toptrain,data.body.code,"top");
|
||||
|
||||
}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"){
|
||||
closetraindoor(downtrain,data.body.doorCode,"down");
|
||||
if(data.body.command == "K"){
|
||||
closetraindoor(downtrain,data.body.code,"down");
|
||||
|
||||
}else{
|
||||
opentraindoor(downtrain,data.body.doorCode,"down");
|
||||
opentraindoor(downtrain,data.body.code,"down");
|
||||
|
||||
}
|
||||
|
||||
|
@ -83,7 +83,6 @@ export function PassflowPassConnect(deviceaction,toptrain,downtrain,routegroup,p
|
||||
}
|
||||
|
||||
if(data.type == "TRAIN_PFI_BL"){
|
||||
|
||||
if(toptrain.nowcode == data.body.code && scope.topswitch == true){
|
||||
|
||||
//根据上下车人数创建人
|
||||
|
@ -35,8 +35,8 @@ export function TrainConnect(trafficTrain,deviceaction,toptrain,routegroup,passe
|
||||
// console.log(trafficTrain.trainList);
|
||||
for(let k in trafficTrain.trainList){
|
||||
if(trafficTrain.trainList[k].code == data.body){
|
||||
console.log( trafficTrain.trainList[k].code);
|
||||
console.log( data.body);
|
||||
// console.log( trafficTrain.trainList[k].code);
|
||||
// console.log( data.body);
|
||||
updateTrafficTrainValue(data.body);
|
||||
trafficTrain.updateNowTrainCode(data.body);
|
||||
trafficTrain.updateNowTrunk(0+'');
|
||||
@ -116,19 +116,19 @@ export function TrainConnect(trafficTrain,deviceaction,toptrain,routegroup,passe
|
||||
|
||||
if(data.body.type == "TRAIN_DOOR"){
|
||||
for(let i=0;i<trafficTrain.trainList.length;i++){
|
||||
if(trafficTrain.trainList[i].code == data.body.code){
|
||||
trafficTrain.trainList[i].open = data.body.open;
|
||||
trafficTrain.trainList[i].doorCode = data.body.doorCode;
|
||||
if(trafficTrain.trainList[i].code == data.body.trainCode){
|
||||
trafficTrain.trainList[i].open = data.body.command;
|
||||
trafficTrain.trainList[i].doorCode = data.body.code;
|
||||
i = trafficTrain.trainList.length;
|
||||
}
|
||||
}
|
||||
if(toptrain.nowcode == data.body.code){
|
||||
if(toptrain.nowcode == data.body.trainCode){
|
||||
trafficTrain.updatePasserMove(data.body);
|
||||
if(data.body.open == "0"){
|
||||
closetraindoor(toptrain,data.body.doorCode,"top");
|
||||
if(data.body.command == "G"){
|
||||
closetraindoor(toptrain,data.body.code,"top");
|
||||
|
||||
}else{
|
||||
opentraindoor(toptrain,data.body.doorCode,"top");
|
||||
opentraindoor(toptrain,data.body.code,"top");
|
||||
|
||||
}
|
||||
|
||||
|
@ -325,7 +325,7 @@ export function Jl3dTrafficTrain(dom,skinCode,routegroup,viewMap,initCode) {
|
||||
|
||||
let nowLeaveDoor = null;
|
||||
this.updatePasserMove = function(doorData){
|
||||
nowLeaveDoor = doorData.doorCode;
|
||||
nowLeaveDoor = doorData.code;
|
||||
// console.log(doorData);
|
||||
}
|
||||
|
||||
|
@ -229,7 +229,7 @@
|
||||
}
|
||||
},
|
||||
devicerepir(){
|
||||
console.log(this.nowdevice);
|
||||
// console.log(this.nowdevice);
|
||||
if(this.nowdevice){
|
||||
let command = {
|
||||
code:this.nowdevice.code,
|
||||
|
@ -194,7 +194,20 @@ export default {
|
||||
this.devicelist = [];
|
||||
},
|
||||
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);
|
||||
}
|
||||
},
|
||||
deletefault(code) {
|
||||
for (let i = 0, leni = this.devicelist.length; i < leni; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user