Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
706335aadf
@ -31,12 +31,13 @@ export function TrainConnect(trafficTrain,deviceaction,toptrain,routegroup,passe
|
||||
const data = JSON.parse(Response.body);
|
||||
|
||||
if(data.type == "PFV"){
|
||||
console.log(data);
|
||||
console.log(trafficTrain.trainList);
|
||||
// console.log(data);
|
||||
// console.log(trafficTrain.trainList);
|
||||
for(let k in trafficTrain.trainList){
|
||||
if(trafficTrain.trainList[k].code == data.body){
|
||||
updateValue(data.body);
|
||||
trafficTrain.updateNowTrainCode(data.body);
|
||||
trafficTrain.updateNowTrunk(0+'');
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -55,8 +56,9 @@ export function TrainConnect(trafficTrain,deviceaction,toptrain,routegroup,passe
|
||||
}
|
||||
|
||||
}
|
||||
if(data.type == "TRAIN_PFI_BL"){
|
||||
|
||||
if(data.type == "TRAIN_PFI_BL"){
|
||||
// console.log(data);
|
||||
trafficTrain.updateTrainData(data.body);
|
||||
|
||||
|
||||
|
@ -244,7 +244,9 @@ export function Jl3dTrafficTrain(dom,skinCode,routegroup,viewMap,initCode) {
|
||||
window.onresize = function () {
|
||||
passerRender.reSize(scope.dom.offsetWidth,scope.dom.offsetHeight);
|
||||
}
|
||||
|
||||
this.updateNowTrunk = function(newTrunkNum){
|
||||
passerHuman.nowTrunk = newTrunkNum;
|
||||
};
|
||||
this.switchcamera = function(trunkNum){
|
||||
|
||||
passerHuman.nowTrunk = trunkNum;
|
||||
@ -316,10 +318,14 @@ export function Jl3dTrafficTrain(dom,skinCode,routegroup,viewMap,initCode) {
|
||||
|
||||
|
||||
this.updateTrainData = function(newData){
|
||||
if(scope.trainList.length > 0){
|
||||
for(let i=0;i<scope.trainList.length;i++){
|
||||
if(newData.code == scope.trainList[i].code){
|
||||
scope.trainList[i].num = scope.trainList[i].num + newData.in - newData.out;
|
||||
// console.log(scope.trainList);
|
||||
// if(scope.trainList.length > 0){
|
||||
// for(let k in scope.trainList.length){
|
||||
let k = newData.code;
|
||||
if(scope.trainList[k]){
|
||||
// console.log(newData);
|
||||
// console.log(scope.trainList[k].num);
|
||||
scope.trainList[k].num = scope.trainList[k].num + newData.in - newData.out;
|
||||
|
||||
if(passerTrain.toptrain.nowcode == newData.code){
|
||||
scope.humanWaitIn = getnum(newData.in,6);
|
||||
@ -330,15 +336,15 @@ export function Jl3dTrafficTrain(dom,skinCode,routegroup,viewMap,initCode) {
|
||||
// console.log("------------------");
|
||||
passerHuman.initTrainRail(humanlist,scope.humanWaitIn,scope.humanWaitOut,nowLeaveDoor);
|
||||
|
||||
let trainDataList = getnum(scope.trainList[i].num,6);
|
||||
let trainDataList = getnum(scope.trainList[k].num,6);
|
||||
// nowTrunk.code = newCode;
|
||||
scope.nowTrunk.numList = trainDataList;
|
||||
updateTrainNum(trainDataList);
|
||||
}
|
||||
i = scope.trainList.length;
|
||||
// i = scope.trainList.length;
|
||||
}
|
||||
}
|
||||
}
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
this.updateNowTrainCode = function(newCode){
|
||||
|
Loading…
Reference in New Issue
Block a user