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);
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){
@ -314,6 +326,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
}
}
function tdtUpdate(data){
tdt.updateTdt(data.body);

View File

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

View File

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