This commit is contained in:
fan 2021-08-12 13:39:10 +08:00
commit 2cd974565e
3 changed files with 21 additions and 4 deletions

View File

@ -107,6 +107,18 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
DeviceDestroy(data.body); DeviceDestroy(data.body);
return; return;
} }
if(data.type == "Simulation_Reset"){
if(data.body == true ){
restartTrain();
}
}
}
function restartTrain(){
for(let i=0;i<trainlisttest.otherTrainmodels.length;i++){
trainlisttest.otherTrainmodels[i].position.x = -99999;
}
} }
//切换车辆修改列车属性 //切换车辆修改列车属性
function changeNowTrain(data){ function changeNowTrain(data){
@ -314,6 +326,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
} }
} }
function tdtUpdate(data){ function tdtUpdate(data){
tdt.updateTdt(data.body); tdt.updateTdt(data.body);

View File

@ -339,7 +339,7 @@ export default {
// updateDriveValue(this.trainnum); // updateDriveValue(this.trainnum);
// } // }
updatedoorlight(newdata); updatedoorlight(newdata);
console.log(newdata.v); // console.log(newdata.v);
updatetmsstatus(newdata); updatetmsstatus(newdata);
if(this.$refs.mmiui){ if(this.$refs.mmiui){

View File

@ -687,8 +687,9 @@ function timedCount() {
function callback(Response) { function callback(Response) {
data = JSON.parse(Response.body); data = JSON.parse(Response.body);
//
// console.log(data);
// console.log(data.type);
if(data.type == "Train_Position"){ if(data.type == "Train_Position"){
postMessage(data); postMessage(data);
return; return;
@ -731,7 +732,10 @@ function timedCount() {
if(data.type == "Device_Load_Destroy_3D"){ if(data.type == "Device_Load_Destroy_3D"){
postMessage(data); postMessage(data);
}
if(data.type == "Simulation_Reset"){
postMessage(data);
} }
} }