Merge remote-tracking branch 'origin/test' into master33
@ -29,9 +29,13 @@ export function sendSimulationCommand(group, memberId, type, data) {
|
||||
});
|
||||
}
|
||||
/** 获取仿真成员列表 */
|
||||
export function getMemberListCommon(group) {
|
||||
export function getMemberListCommon(group,role) {
|
||||
|
||||
if(!role){
|
||||
role = "";
|
||||
}
|
||||
return request({
|
||||
url: `/common/simulation/${group}/members`,
|
||||
url: `/common/simulation/${group}/members?role=${role}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ import { DriverLoadNew } from '@/jlmap3d/main/loaders/DriverLoadNew';
|
||||
// connect
|
||||
import {Jl3dDrivingNew} from '@/jlmap3d/jl3ddrive/moveupdate/DrivingConnectNew';
|
||||
|
||||
import { getPublishMapVersion, getPublishMapDetail, getPublish3dMapDetail} from '@/api/jlmap3d/load3ddata';
|
||||
import {getPublishMapDetail, getPublish3dMapDetail} from '@/api/jlmap3d/load3ddata';
|
||||
|
||||
// utils
|
||||
import { UpdateTrain } from '@/jlmap3d/jl3ddrive/moveupdate/UpdateTrain';
|
||||
|
@ -25,7 +25,7 @@ import { MaintainerLoad } from '@/jlmap3d/jl3dmaintainer/maintainerload';
|
||||
//connect
|
||||
import {Maintainerconnect } from '@/jlmap3d/jl3dmaintainer/maintainerconnect';
|
||||
|
||||
import { getPublishMapVersion, getPublishMapDetail,getPublish3dMapDetail} from '@/api/jlmap3d/load3ddata';
|
||||
import {getPublishMapDetail,getPublish3dMapDetail} from '@/api/jlmap3d/load3ddata';
|
||||
|
||||
//utils
|
||||
// import { UpdateTrain } from '@/jlmap3d/main/utils/UpdateTrain';
|
||||
|
@ -9,7 +9,7 @@ import { ModelManager } from '@/jlmap3d/jl3dpassflow/loader.js';
|
||||
//骨骼动画模型辅助工具
|
||||
import { SkeletonUtils } from '@/jlmap3d/main/utils/SkeletonUtils.js';
|
||||
//获取信息接口
|
||||
import { getPublishMapVersion, getPublishMapDetail,getPublish3dMapDetail} from '@/api/jlmap3d/load3ddata';
|
||||
import {getPublishMapDetail,getPublish3dMapDetail} from '@/api/jlmap3d/load3ddata';
|
||||
//cctv站台对象
|
||||
import { PasserStation } from '@/jlmap3d/jl3dpassflow/model/passerstation.js';
|
||||
//cctv检票机对象
|
||||
|
374
src/jlmap3d/jl3drailwaydevice/component/moveanimate.js
Normal file
@ -0,0 +1,374 @@
|
||||
//转辙机动画
|
||||
export function Moveanimate(main){
|
||||
let scope = this;
|
||||
//内容信息显示plane
|
||||
this.helpbox = null;
|
||||
this.textplane = null;
|
||||
//动画列表
|
||||
this.animatelist = [];
|
||||
this.playlist = null;
|
||||
this.playorder = 0;
|
||||
//动画播放器开关
|
||||
this.enable = true;
|
||||
//动画开关状态
|
||||
this.status = true;
|
||||
//当前动画模型
|
||||
this.nowmodelname = undefined;
|
||||
//定义转辙机零件动画
|
||||
this.initlistnew = function(switchmodel){
|
||||
scope.animatelist[switchmodel.animacode+"chaijie"] = [];
|
||||
scope.animatelist[switchmodel.animacode+"fuwei"] = [];
|
||||
for(let i=0,leni=switchmodel.children.length;i<leni;i++){
|
||||
if(switchmodel.children[i].name == "DDJ"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x-1.5,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"dizuoon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x-1.5,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"dizuooff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name == "DJZ"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x-3,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"Lxingon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x-3,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"Lxingoff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name == "DINGK"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+9,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"jiaoxingxiantieon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+9,switchmodel.children[i].position.z));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"jiaoxingxiantieoff",points2,0.5,true,0);
|
||||
}
|
||||
|
||||
if(switchmodel.children[i].name == "SZ"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x-1.5,switchmodel.children[i].position.y,switchmodel.children[i].position.z-1));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"zhongchuipianon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.xx-1.5,switchmodel.children[i].position.y,switchmodel.children[i].position.z-1));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"zhongchuipianoff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name == "JSQ"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x-3,switchmodel.children[i].position.y+3,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"laganon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x-3,switchmodel.children[i].position.y+3,switchmodel.children[i].position.z));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"laganoff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name == "YWJCQ"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+6,switchmodel.children[i].position.z+3));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"dongjiedianzhouon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+6,switchmodel.children[i].position.z+3));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"dongjiedianzhouoff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name == "ESWCJJ"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+6,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"neibuon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+6,switchmodel.children[i].position.z));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"neibuoff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name == "AQJD"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+6,switchmodel.children[i].position.z-2));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"jiedianon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+6,switchmodel.children[i].position.z-2));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"jiedianoff",points2,0.5,true,0);
|
||||
|
||||
}
|
||||
if(switchmodel.children[i].name == "QDP"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+6,switchmodel.children[i].position.z-3));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"yapianon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+6,switchmodel.children[i].position.z-3));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"yapianoff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name == "SDP"){
|
||||
let points1 = [];
|
||||
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+6,switchmodel.children[i].position.z-4));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"fanghuozhaoon",points1,0.5,true,0);
|
||||
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+6,switchmodel.children[i].position.z-4));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"fanghuozhaooff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name == "ZDKBQ"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+3,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"dianyuanpianon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+3,switchmodel.children[i].position.z));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"dianyuanpianoff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name == "ZZ"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x+3,switchmodel.children[i].position.y+3,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"xinpianon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x+3,switchmodel.children[i].position.y+3,switchmodel.children[i].position.z));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"xinpianoff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name =="BSG"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x+1,switchmodel.children[i].position.y,switchmodel.children[i].position.z-5));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"jueyuanzhouon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x+1,switchmodel.children[i].position.y,switchmodel.children[i].position.z-5));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"jueyuanzhouoff",points2,0.5,true,0);
|
||||
}
|
||||
if(switchmodel.children[i].name =="DZG"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x-1,switchmodel.children[i].position.y,switchmodel.children[i].position.z-5));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"cigangon",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x-1,switchmodel.children[i].position.y,switchmodel.children[i].position.z-5));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"cigangoff",points2,0.5,true,0);
|
||||
}
|
||||
|
||||
if(switchmodel.children[i].name =="CTK"){
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
points1.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+6,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"chaijie"],switchmodel.children[i],switchmodel.name+"ccichuihuqion",points1,0.5,true,0);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y+6,switchmodel.children[i].position.z));
|
||||
points2.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"fuwei"],switchmodel.children[i],switchmodel.name+"ccichuihuqioff",points2,0.5,true,0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// let points = [];
|
||||
// points.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
// points.push(new THREE.Vector3(switchmodel.children[i].position.x,switchmodel.children[i].position.y,switchmodel.children[i].position.z));
|
||||
// scope.initanimate(switchmodel.children[i],switchmodel.name+"select1",points,true);
|
||||
let modelorderlist = [];
|
||||
|
||||
modelorderlist[switchmodel.animacode] = [
|
||||
{name:"SZ",pos:[-1.5,0,-1]},
|
||||
{name:"DINGK",pos:[0,9,0]},
|
||||
|
||||
{name:"DJZ",pos:[-3,0,0]},
|
||||
{name:"DDJ",pos:[-1.5,0,0]},
|
||||
|
||||
{name:"JSQ",pos:[-3,3,0]},
|
||||
|
||||
{name:"ZDKBQ",pos:[0,3,0]},
|
||||
{name:"ZZ",pos:[3,3,0]},
|
||||
|
||||
{name:"ESWCJJ",pos:[0,6,0]},
|
||||
{name:"CTK",pos:[0,6,0]},
|
||||
{name:"YWJCQ",pos:[0,6,3]},
|
||||
{name:"AQJD",pos:[0,6,-2]},
|
||||
{name:"QDP",pos:[0,6,-3]},
|
||||
{name:"SDP",pos:[0,6,-4]},
|
||||
|
||||
{name:"BSG",pos:[1,0,-5]},
|
||||
{name:"DZG",pos:[-1,0,-5]}
|
||||
];
|
||||
|
||||
scope.animatelist[switchmodel.animacode+"on"] = [];
|
||||
scope.animatelist[switchmodel.animacode+"off"] = [];
|
||||
|
||||
for(let i=0,leni=modelorderlist[switchmodel.animacode].length;i<leni;i++){
|
||||
|
||||
let orderdata = modelorderlist[switchmodel.animacode];
|
||||
let modelon = switchmodel.getObjectByName(orderdata[i].name);
|
||||
// modelon.helpbox = undefined;
|
||||
let pointson = [];
|
||||
pointson.push(new THREE.Vector3(modelon.position.x,modelon.position.y,modelon.position.z));
|
||||
pointson.push(new THREE.Vector3(modelon.position.x+orderdata[i].pos[0],modelon.position.y+orderdata[i].pos[1],modelon.position.z+orderdata[i].pos[2]));
|
||||
|
||||
let pointsoff = [];
|
||||
pointsoff.push(new THREE.Vector3(modelon.position.x+orderdata[i].pos[0],modelon.position.y+orderdata[i].pos[1],modelon.position.z+orderdata[i].pos[2]));
|
||||
pointsoff.push(new THREE.Vector3(modelon.position.x,modelon.position.y,modelon.position.z));
|
||||
|
||||
// if(i == 0){
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"on"],modelon,switchmodel.animacode+modelon.name+"on",pointson,0.03,true,i);
|
||||
scope.initanimate(scope.animatelist[switchmodel.animacode+"off"],modelon,switchmodel.animacode+modelon.name+"off",pointsoff,0.03,true,leni-i-1);
|
||||
// }else if((i+1)<leni){
|
||||
// scope.initanimate(modelon,switchmodel.animacode+modelon.name+"on",pointson,0.03,true,switchmodel.animacode+orderdata[i+1].name+"on");
|
||||
// scope.initanimate(modelon,switchmodel.animacode+modelon.name+"off",pointsoff,0.03,true,switchmodel.animacode+orderdata[i-1].name+"off");
|
||||
// }else{
|
||||
// scope.initanimate(modelon,switchmodel.animacode+modelon.name+"on",pointson,0.03,true);
|
||||
// scope.initanimate(modelon,switchmodel.animacode+modelon.name+"off",pointsoff,0.03,true,switchmodel.animacode+orderdata[i-1].name+"off");
|
||||
// }
|
||||
|
||||
// if(switchmodel.children[i].name == "xinpian"){
|
||||
// }
|
||||
// if(switchmodel.children[i].name =="cigang"){
|
||||
// }
|
||||
}
|
||||
}
|
||||
//动画对象定义
|
||||
this.initanimate = function(list,modelobject,name,points,speed,type,nextname){
|
||||
|
||||
let curve = new THREE.CatmullRomCurve3(points);
|
||||
// curve动画轨迹
|
||||
// progress动画进度
|
||||
// enable当前动画开关
|
||||
// speed动画速度
|
||||
let animate = {
|
||||
name:name,
|
||||
curve:curve,
|
||||
progress:0,
|
||||
directchange:false,
|
||||
connectmodel:modelobject,
|
||||
enable:false,
|
||||
status:"start",
|
||||
speed:speed,
|
||||
next:null
|
||||
};
|
||||
// list[nextname] = [];
|
||||
if(list[nextname] == undefined){
|
||||
list[nextname] = [];
|
||||
}
|
||||
list[nextname].push(animate);
|
||||
|
||||
}
|
||||
|
||||
//设置动画播放列表
|
||||
this.setplaylist = function(nowlist,enable){
|
||||
|
||||
scope.playlist = nowlist;
|
||||
scope.enable = enable;
|
||||
scope.playorder = 0;
|
||||
for(let i=0;i<scope.playlist[scope.playorder].length;i++){
|
||||
scope.playlist[scope.playorder][i].status = "start";
|
||||
}
|
||||
}
|
||||
|
||||
//更新信息plane内容
|
||||
this.updatehelpbox = function(nowhelpbox,nowtextplane){
|
||||
scope.textplane = nowtextplane;
|
||||
scope.helpbox = nowhelpbox;
|
||||
}
|
||||
|
||||
this.startstop = function(){
|
||||
|
||||
}
|
||||
|
||||
this.next = function(){
|
||||
|
||||
}
|
||||
|
||||
this.before = function(){
|
||||
|
||||
}
|
||||
|
||||
//动画播放器
|
||||
this.animateupdate = function(){
|
||||
|
||||
if(scope.enable){
|
||||
if(scope.playlist){
|
||||
|
||||
for(let i=0;i<scope.playlist[scope.playorder].length;i++){
|
||||
if(scope.playlist[scope.playorder][i].status == "start"){
|
||||
|
||||
}
|
||||
if(scope.playlist[scope.playorder][i].progress>=1){
|
||||
let point = scope.playlist[scope.playorder][i].curve.getPointAt(1);
|
||||
//更新模型坐标
|
||||
scope.playlist[scope.playorder][i].connectmodel.position.x = point.x;
|
||||
scope.playlist[scope.playorder][i].connectmodel.position.y = point.y;
|
||||
scope.playlist[scope.playorder][i].connectmodel.position.z = point.z;
|
||||
scope.playlist[scope.playorder][i].enable = false;
|
||||
scope.playlist[scope.playorder][i].status = "end";
|
||||
scope.playlist[scope.playorder][i].progress = 0;
|
||||
|
||||
if(i >= scope.playlist[scope.playorder].length-1){
|
||||
if(scope.playorder >= scope.playlist.length-1 ){
|
||||
scope.playlist = null;
|
||||
scope.status = true;
|
||||
scope.enable = false;
|
||||
main.animationmsgshowoff();
|
||||
scope.nowmodelname = undefined;
|
||||
scope.playorder = null;
|
||||
break;
|
||||
}else{
|
||||
scope.playorder += 1;
|
||||
}
|
||||
}
|
||||
|
||||
}else{
|
||||
// console.log(scope.animatelist[k].connectmodel);
|
||||
if(scope.nowmodelname != scope.playlist[scope.playorder][i].connectmodel.name){
|
||||
scope.nowmodelname = scope.playlist[scope.playorder][i].connectmodel.name;
|
||||
main.animationmsgshowon(scope.playlist[scope.playorder][i].connectmodel);
|
||||
}
|
||||
//根据动画进度获取动画轨迹上点
|
||||
scope.status = false;
|
||||
let point = scope.playlist[scope.playorder][i].curve.getPointAt(scope.playlist[scope.playorder][i].progress);
|
||||
|
||||
//更新模型坐标
|
||||
scope.playlist[scope.playorder][i].connectmodel.position.x = point.x;
|
||||
scope.playlist[scope.playorder][i].connectmodel.position.y = point.y;
|
||||
scope.playlist[scope.playorder][i].connectmodel.position.z = point.z;
|
||||
|
||||
if(scope.helpbox){
|
||||
scope.helpbox.update();
|
||||
}
|
||||
if(scope.textplane){
|
||||
|
||||
scope.textplane.position.x = scope.playlist[scope.playorder][i].connectmodel.matrixWorld.elements[12];
|
||||
scope.textplane.position.y = scope.playlist[scope.playorder][i].connectmodel.matrixWorld.elements[13]+100;
|
||||
scope.textplane.position.z = scope.playlist[scope.playorder][i].connectmodel.matrixWorld.elements[14];
|
||||
}
|
||||
//判断模型转向
|
||||
if(scope.playlist[scope.playorder][i].directchange){
|
||||
let tangent = scope.playlist[scope.playorder][i].curve.getPointAt(scope.playlist[scope.playorder][i].progress+0.001);
|
||||
// scope.animatelist[k]
|
||||
tangent = null;
|
||||
}
|
||||
//增加动画进度,释放点变量
|
||||
scope.playlist[scope.playorder][i].progress += scope.playlist[scope.playorder][i].speed;
|
||||
point = null;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
38
src/jlmap3d/jl3drailwaydevice/component/signallight.js
Normal file
@ -0,0 +1,38 @@
|
||||
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
|
||||
|
||||
//信号机贴图
|
||||
export function Signallightload(lights) {
|
||||
|
||||
settexture(lights, "red", JL3D_LOCAL_STATIC+'/device/signal/1.jpg');
|
||||
|
||||
settexture(lights, "yellow", JL3D_LOCAL_STATIC+'/device/signal/2.jpg');
|
||||
|
||||
settexture(lights, "green", JL3D_LOCAL_STATIC+'/device/signal/3.jpg');
|
||||
|
||||
settexture(lights, "black", JL3D_LOCAL_STATIC+'/device/signal/4.jpg');
|
||||
}
|
||||
|
||||
//加载贴图
|
||||
function settexture(lights, name, textureurl) {
|
||||
var loader = new THREE.TextureLoader();
|
||||
|
||||
// 加载一个资源
|
||||
loader.load(
|
||||
// 资源URL
|
||||
textureurl,
|
||||
|
||||
// onLoad回调
|
||||
function (texture) {
|
||||
texture.name = name;
|
||||
lights[name] = texture;
|
||||
},
|
||||
|
||||
// 目前暂不支持onProgress的回调
|
||||
undefined,
|
||||
|
||||
// onError回调
|
||||
function (err) {
|
||||
console.error('An error happened.');
|
||||
}
|
||||
);
|
||||
}
|
113
src/jlmap3d/jl3drailwaydevice/component/textconfig.js
Normal file
@ -0,0 +1,113 @@
|
||||
|
||||
export function Textconfig(){
|
||||
let scope = this;
|
||||
|
||||
this.devicelist = [];
|
||||
|
||||
|
||||
//配置继电器文字信息
|
||||
this.initdevicetext = function(selectmodel){
|
||||
if(scope.devicelist.length>0){
|
||||
scope.devicelist = [];
|
||||
}
|
||||
|
||||
for(let i=0,leni=selectmodel.children.length;i<leni;i++){
|
||||
let part= {
|
||||
name:selectmodel.children[i].name,
|
||||
text:null,
|
||||
mesh:selectmodel.children[i],
|
||||
index:i,
|
||||
show:true,
|
||||
msg:null,
|
||||
};
|
||||
if(selectmodel.children[i].name == "AQJD"){
|
||||
part.text = "安全接点";
|
||||
part.msg = "安全接点应接触良好。在插入手摇把或钥匙时,安全接点应可靠断开,非经人工恢复不得接通电路。";
|
||||
selectmodel.children[i].text = "安全接点";
|
||||
}
|
||||
if(selectmodel.children[i].name == "DDJ"){
|
||||
part.text = "电动机";
|
||||
part.msg = "电动转辙机的电动机在转辙机转换时起机械传动动作源的作用。";
|
||||
selectmodel.children[i].text = "电动机";
|
||||
}
|
||||
if(selectmodel.children[i].name == "DINGK"){
|
||||
part.text = "机盖";
|
||||
part.msg = "用于防护机内零部件。";
|
||||
selectmodel.children[i].text = "机盖";
|
||||
}
|
||||
if(selectmodel.children[i].name == "SZ"){
|
||||
part.text = "锁";
|
||||
part.msg = "用于将机盖锁在底壳上,并用专用钥匙才能打开。最早锁是从底壳内紧固,机外无法拆卸,但由于加工质量及其他原因导致无法开盖,故目前已改为从底壳外紧固。";
|
||||
selectmodel.children[i].text = "锁";
|
||||
}
|
||||
if(selectmodel.children[i].name == "YWJCQ"){
|
||||
part.text = "移位接触器";
|
||||
part.msg = "移位接触器是一只非复式辙动开关,它有一组常闭接点,在转辙机中位于机壳侧壁齿条块顶杆的上方。它的作用是用它的常闭接点窜联在道岔表示电路中,监督主挤切削的状态是否完好,在道岔被挤时,如果表示杆被推或拉的动慢不足,检查柱未被顶起,而主副挤切销被挤断,动作杆在齿条块内位移,导致顶杆上升,使位移接点断开,切断转辙机表示电路,向行车值班员报警";
|
||||
selectmodel.children[i].text = "移位接触器";
|
||||
}
|
||||
if(selectmodel.children[i].name == "ZDKBQ"){
|
||||
part.text = "自动开闭器";
|
||||
part.msg = "1.构成转辙机启动电路后,在转换过程中,以其机械动作构成两次接点变位,监督转辙机转换全过程动作是否按要求完成。2.道岔被挤时,表示杆移动将检查柱顶起,使自动开闭器一排动接点离开静接点,从而切断道岔表示电路。";
|
||||
selectmodel.children[i].text = "自动开闭器";
|
||||
}
|
||||
if(selectmodel.children[i].name == "SDP"){
|
||||
part.text = "速动片";
|
||||
part.msg = "速动片的作用是检查主轴解锁、转换和锁闭三个动作过程的完成,并最后使自动开闭器迅速切断电机动作电路,接通表示电路。";
|
||||
selectmodel.children[i].text = "速动片";
|
||||
}
|
||||
if(selectmodel.children[i].name == "JSQ"){
|
||||
part.text = "减速器";
|
||||
part.msg = "将电动机输出的高转速、低转距的机械能,转变成低转速、大转距的机械能,防止非正常情况下损坏机件或烧毁电动机。";
|
||||
selectmodel.children[i].text = "减速器";
|
||||
}
|
||||
if(selectmodel.children[i].name == "BSG"){
|
||||
part.text = "表示杆";
|
||||
part.msg = "检查道岔尖轨的开通方向,监督道岔的状态,给自动开闭器的准确动作提供充分条件。";
|
||||
selectmodel.children[i].text = "表示杆";
|
||||
}
|
||||
if(selectmodel.children[i].name == "DZG"){
|
||||
part.text = "动作杆";
|
||||
part.msg = "齿条块和动作杆是转辙机转换道岔最后的执行部件。它们不仅要有足够的机械强度,还要在每次转换结束将道岔锁住。此外,当发生挤岔事故时,尽可能保证转辙机内部机件不受损坏。";
|
||||
selectmodel.children[i].text = "动作杆";
|
||||
}
|
||||
if(selectmodel.children[i].name == "CTK"){
|
||||
part.text = "齿条块";
|
||||
part.msg = "齿条块和动作杆是转辙机转换道岔最后的执行部件。它们不仅要有足够的机械强度,还要在每次转换结束将道岔锁住。此外,当发生挤岔事故时,尽可能保证转辙机内部机件不受损坏。";
|
||||
selectmodel.children[i].text = "齿条块";
|
||||
}
|
||||
if(selectmodel.children[i].name == "ZZ"){
|
||||
part.text = "主轴";
|
||||
part.msg = "主轴主要由主轴套、承轴、止挡栓和锁闭齿轮等附件与主轴组成。主轴的作用是推动大齿块以转换道岔并和削尖齿相配合完成对道岔的机械锁闭。";
|
||||
selectmodel.children[i].text = "主轴";
|
||||
}
|
||||
if(selectmodel.children[i].name == "DJZ"){
|
||||
part.text = "电机罩";
|
||||
part.msg = "保护电机。";
|
||||
selectmodel.children[i].text = "电机罩";
|
||||
}
|
||||
if(selectmodel.children[i].name == "DK"){
|
||||
part.text = "底壳";
|
||||
part.msg = "固定转辙机的各部件,确保相关部件的轴向或径向通信。";
|
||||
selectmodel.children[i].text = "底壳";
|
||||
}
|
||||
if(selectmodel.children[i].name =="QDP"){
|
||||
part.text = "启动片";
|
||||
part.msg = "1.起输出轴与主轴间的十字接头作用,使主轴随输出轴同时旋转。2.控制自动开闭器动作,在道岔转换前切断原表示电路,并为电机反转电路准备条件。";
|
||||
selectmodel.children[i].text = "启动片";
|
||||
}
|
||||
if(selectmodel.children[i].name =="ESWCJJ"){
|
||||
part.text = "二十位插接件";
|
||||
part.msg = "用于机内外电缆连接,方便更换转辙机。";
|
||||
selectmodel.children[i].text = "二十位插接件";
|
||||
}
|
||||
// if(part.text == null){
|
||||
// console.log(selectmodel.children[i].name);
|
||||
// }
|
||||
if(part.text){
|
||||
scope.devicelist.push(part);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
57
src/jlmap3d/jl3drailwaydevice/config.js
Normal file
@ -0,0 +1,57 @@
|
||||
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
|
||||
|
||||
var Staticmodel = {
|
||||
Switch: {
|
||||
id: "1",
|
||||
name: "道岔",
|
||||
deviceType: "Switch",
|
||||
type: "fuzhou",
|
||||
picUrl: "",
|
||||
assetUrl: JL3D_LOCAL_STATIC+"/device/switch/ZD6D.FBX"
|
||||
},//"https://joylink.club/oss/wx/switch/switch.FBX"
|
||||
|
||||
Signal: {
|
||||
id: "2",
|
||||
name: "信号机",
|
||||
deviceType: "Signal",
|
||||
type: "low",
|
||||
picUrl: "",
|
||||
assetUrl: JL3D_LOCAL_STATIC+"/device/signal/signal.FBX"
|
||||
},
|
||||
stationstand: {
|
||||
id: "3",
|
||||
name: "站台",
|
||||
deviceType: "stationstand",
|
||||
type: "low",
|
||||
picUrl: "",
|
||||
assetUrl: JL3D_LOCAL_STATIC+"/device/stationstand/stationstand.FBX"
|
||||
//https://joylink.club/oss/wx/stationstand/stationstand.FBX
|
||||
|
||||
|
||||
},
|
||||
section: {
|
||||
id: "4",
|
||||
name: "区段",
|
||||
deviceType: "section",
|
||||
type: "low",
|
||||
picUrl: "",
|
||||
assetUrl: JL3D_LOCAL_STATIC+"/device/section/section.FBX"
|
||||
//https://joylink.club/oss/wx/stationstand/stationstand.FBX
|
||||
|
||||
|
||||
},
|
||||
room: {
|
||||
id: "5",
|
||||
name: "通号设备间",
|
||||
deviceType: "room",
|
||||
type: "low",
|
||||
picUrl: "",
|
||||
assetUrl: JL3D_LOCAL_STATIC+"/device/room/room.FBX"
|
||||
//https://joylink.club/oss/wx/stationstand/stationstand.FBX
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export { Staticmodel }
|
1002
src/jlmap3d/jl3drailwaydevice/jl3ddeviceNew.js
Normal file
142
src/jlmap3d/jl3drailwaydevice/loader.js
Normal file
@ -0,0 +1,142 @@
|
||||
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
|
||||
import { BASE_ASSET_API } from '@/api/jlmap3d/assets3d.js';
|
||||
|
||||
export function ModelManager(){
|
||||
let scope = this;
|
||||
|
||||
this.staticswitchmodel = {
|
||||
code:"switch",
|
||||
locateType:"01",
|
||||
mesh:null,
|
||||
action:[]
|
||||
};
|
||||
|
||||
this.switchmodel = {
|
||||
code:"switch",
|
||||
locateType:"01",
|
||||
mesh:null,
|
||||
action:null
|
||||
};
|
||||
|
||||
this.signalmodel = {
|
||||
code:"signal",
|
||||
lightType:"01",
|
||||
status:"01",
|
||||
switchLocateType:"01",
|
||||
mesh:null,
|
||||
action:null
|
||||
};
|
||||
|
||||
this.standmodel = {
|
||||
code:"stand",
|
||||
screenDoorOpenStatus:"01",
|
||||
mesh:null,
|
||||
action:null
|
||||
};
|
||||
|
||||
this.sectionmodel = {
|
||||
code:"section",
|
||||
sectionstatus:"01",
|
||||
mesh:null,
|
||||
action:null
|
||||
};
|
||||
|
||||
this.roommodel = {
|
||||
code:"room",
|
||||
sectionstatus:"01",
|
||||
mesh:null,
|
||||
action:null
|
||||
};
|
||||
|
||||
this.loadpromise = function (data,mixers){
|
||||
let initlist = [];
|
||||
let staticSwitch = {
|
||||
assetname: "转辙教学模型",
|
||||
deviceType: "staticSwitch",
|
||||
id: "x11",
|
||||
packageName: "转辙教学模型",
|
||||
type: "staticSwitch",
|
||||
url: "/device/switch/511DHcongxinzuo22222222222222(1).fbx"
|
||||
};
|
||||
initlist.push(fbxpromise(staticSwitch,mixers,scope.staticswitchmodel));
|
||||
|
||||
for(let i=0,leni=data.length;i<leni;i++){
|
||||
if(data[i].deviceType == "DeviceSignal"){
|
||||
initlist.push(fbxpromise(data[i],mixers,scope.signalmodel));
|
||||
}
|
||||
if(data[i].deviceType == "DeviceSwitch"){
|
||||
initlist.push(fbxpromise(data[i],mixers,scope.switchmodel));
|
||||
}
|
||||
if(data[i].deviceType == "DeviceDoor"){
|
||||
initlist.push(fbxpromise(data[i],mixers,scope.standmodel));
|
||||
}
|
||||
if(data[i].deviceType == "DeviceSection"){
|
||||
initlist.push(fbxpromise(data[i],mixers,scope.sectionmodel));
|
||||
}
|
||||
if(data[i].deviceType == "MaintainerRoom"){
|
||||
initlist.push(fbxpromise(data[i],mixers,scope.roommodel));
|
||||
}
|
||||
}
|
||||
|
||||
return new Promise(function(resolve, reject){
|
||||
|
||||
Promise.all(initlist).then((result) => {
|
||||
resolve("success"); //['成功了', 'success']
|
||||
}).catch((error) => {
|
||||
//console.log(error);
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function fbxpromise(asset,mixers,model){
|
||||
return new Promise(function(resolve, reject){
|
||||
var loader = new THREE.FBXLoader();
|
||||
let modelurl;
|
||||
if(asset.type == "staticSwitch"){
|
||||
modelurl = JL3D_LOCAL_STATIC+asset.url;
|
||||
}else{
|
||||
modelurl = BASE_ASSET_API+asset.url;
|
||||
}
|
||||
loader.load( modelurl, function ( object ) {
|
||||
let mixer = new THREE.AnimationMixer( object );
|
||||
object.traverse( function ( child ) {
|
||||
if ( child.isMesh ) {
|
||||
child.castShadow = true;
|
||||
child.receiveShadow = true;
|
||||
}
|
||||
} );
|
||||
object.animacode = model.code;
|
||||
model.mesh = object;
|
||||
if(object.animations.length>0){
|
||||
if(asset.type == "staticSwitch"){
|
||||
|
||||
// for(let i=0;i<object.animations.length;i++){
|
||||
// model.action[object.animations[i].name] = mixer.clipAction( object.animations[ i ] );
|
||||
// model.action[object.animations[i].name].duration = object.animations[ i ].duration;
|
||||
// model.action[object.animations[i].name].setLoop(THREE.LoopOnce);
|
||||
// model.action[object.animations[i].name].clampWhenFinished = true;
|
||||
// }
|
||||
model.action = mixer.clipAction( object.animations[ 0 ] );
|
||||
model.action.setLoop(THREE.LoopOnce);
|
||||
model.action.clampWhenFinished = true;
|
||||
model.action.stopTime = 0;
|
||||
mixer.staticType = "staticSwitch";
|
||||
mixers.push(mixer);
|
||||
}else{
|
||||
model.action = mixer.clipAction( object.animations[ 0 ] );
|
||||
model.action.setLoop(THREE.LoopOnce);
|
||||
model.action.clampWhenFinished = true;
|
||||
mixers.push(mixer);
|
||||
}
|
||||
|
||||
//model.action.play();
|
||||
}
|
||||
|
||||
resolve(asset.deviceType);
|
||||
} );
|
||||
|
||||
});
|
||||
}
|
53
src/jlmap3d/jl3drailwaydevice/standtextureload.js
Normal file
@ -0,0 +1,53 @@
|
||||
import { BASE_ASSET_API } from '@/api/jlmap3d/assets3d.js';
|
||||
|
||||
export function Standtextureload(jlmap3dedit,standTextureData){
|
||||
for(let i=0,leni=standTextureData.urls.length;i<leni;i++){
|
||||
setstationtexture(jlmap3dedit.stationtexture,standTextureData.urls[i].name,BASE_ASSET_API + standTextureData.urls[i].url);
|
||||
}
|
||||
}
|
||||
|
||||
function settexture(materiallist,name,textureurl){
|
||||
var loader = new THREE.TextureLoader();
|
||||
|
||||
// 加载一个资源
|
||||
loader.load(
|
||||
// 资源URL
|
||||
textureurl,
|
||||
|
||||
// onLoad回调
|
||||
function ( texture ) {
|
||||
texture.name = name;
|
||||
materiallist.push(texture);
|
||||
},
|
||||
|
||||
// 目前暂不支持onProgress的回调
|
||||
undefined,
|
||||
|
||||
// onError回调
|
||||
function ( err ) {
|
||||
console.error( 'An error happened.' );
|
||||
}
|
||||
);
|
||||
}
|
||||
function setstationtexture(stationtexture,name,textureurl){
|
||||
var loader = new THREE.TextureLoader();
|
||||
// 加载一个资源
|
||||
loader.load(
|
||||
// 资源URL
|
||||
textureurl,
|
||||
|
||||
// onLoad回调
|
||||
function ( texture ) {
|
||||
texture.name = name;
|
||||
stationtexture[name] = texture;
|
||||
},
|
||||
|
||||
// 目前暂不支持onProgress的回调
|
||||
undefined,
|
||||
|
||||
// onError回调
|
||||
function ( err ) {
|
||||
console.error( 'An error happened.' );
|
||||
}
|
||||
);
|
||||
}
|
@ -1,4 +1,12 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
export function changeDriveTrain(group,memberId,userId) {
|
||||
return request({
|
||||
url: `/common/simulation/${group}/member/${memberId}/playby/${userId}`,
|
||||
method: 'put'
|
||||
});
|
||||
}
|
||||
|
||||
// 获取仿真成员列表(新版地图)
|
||||
export function getSimulationMembersNew(group) {
|
||||
return request({
|
||||
@ -67,10 +75,10 @@ export function trainSimulationEb(group, data) {
|
||||
});
|
||||
}
|
||||
|
||||
// 改变列车牵引/制动力
|
||||
export function trainSimulationForce(group,memberId, data) {
|
||||
// 列车驾驶
|
||||
export function trainSimulationForce(group,memberId, data,operate) {
|
||||
return request({
|
||||
url: `/common/simulation/${group}/member/${memberId}/operate/Train_Drive_Speed_Control`,
|
||||
url: `/common/simulation/${group}/member/${memberId}/operate/${operate}`,
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
|
@ -25,7 +25,7 @@ import { DriverLoadNew } from '@/jlmap3d/jl3drailwaydrive/loader/DriverLoadNew';
|
||||
// connect
|
||||
import {Jl3dDrivingNew} from '@/jlmap3d/jl3drailwaydrive/moveupdate/DrivingConnectNew';
|
||||
|
||||
import { getPublishMapVersion, getPublishMapDetail, getPublish3dMapDetail} from '@/api/jlmap3d/load3ddata';
|
||||
import {getPublishMapDetail, getPublish3dMapDetail} from '@/api/jlmap3d/load3ddata';
|
||||
|
||||
// utils
|
||||
import { UpdateTrain } from '@/jlmap3d/jl3drailwaydrive/moveupdate/UpdateTrain';
|
||||
|
@ -40,6 +40,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
|
||||
// let toppic = '/app/topic/simulation/client/'+routegroup+'/drive';
|
||||
console.log(routegroup);
|
||||
this.topic = '/queue/simulation/'+routegroup+'/trainPosition';
|
||||
let hmiTopic = '/queue/simulation/'+routegroup+'/train/001/Hmi';
|
||||
let header = {'X-Token': getToken() };
|
||||
let connectmsg = {
|
||||
type:'init',
|
||||
@ -154,6 +155,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
|
||||
try {
|
||||
// console.log("teststomp");
|
||||
scope.teststomp.subscribe(scope.topic, callback, header);
|
||||
scope.teststomp.subscribe(hmiTopic, callback, header);
|
||||
} catch (error) {
|
||||
console.error('websocket订阅失败');
|
||||
}
|
||||
@ -183,11 +185,16 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
|
||||
// 对象化数据
|
||||
|
||||
let data = JSON.parse(Response.body);
|
||||
|
||||
if(data.trainPosList){
|
||||
// console.log(data.trainPosList);
|
||||
// console.log(data.trainPosList);
|
||||
nowTrainRun(data.trainPosList);
|
||||
return;
|
||||
}
|
||||
if(data.hmi){
|
||||
// console.log(data);
|
||||
updateSpeedView(data.hmi[1]);
|
||||
}
|
||||
// stats.update();
|
||||
// 遍历后台数据
|
||||
@ -415,7 +422,6 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
|
||||
}
|
||||
//更新当前驾驶车辆
|
||||
function nowTrainRun(data){
|
||||
console.log(data);
|
||||
for(let i=0;i<data.length;i++){
|
||||
//改变当前列车code
|
||||
if(data[0][0] != trainmodel.code){
|
||||
|
@ -24,7 +24,7 @@ import { SimulationLoadNew } from '@/jlmap3d/main/loaders/SimulationLoadNew';
|
||||
//connect
|
||||
import {Jlmap3dSubscribeNew } from '@/jlmap3d/jl3dsimulation/connect/Jlmap3dSubscribeNew';
|
||||
|
||||
import { getPublishMapVersion, getPublishMapDetail,getPublish3dMapDetail} from '@/api/jlmap3d/load3ddata';
|
||||
import {getPublishMapDetail,getPublish3dMapDetail} from '@/api/jlmap3d/load3ddata';
|
||||
|
||||
//utils
|
||||
// import { UpdateTrain } from '@/jlmap3d/main/utils/UpdateTrain';
|
||||
|
@ -12,7 +12,7 @@ import { ModelManager } from '@/jlmap3d/jl3dstationmanager/loader/loader.js';
|
||||
//骨骼动画模型辅助工具
|
||||
import { SkeletonUtils } from '@/jlmap3d/main/utils/SkeletonUtils.js';
|
||||
//获取信息接口
|
||||
import { getPublishMapVersion, getPublishMapDetail,getPublish3dMapDetail} from '@/api/jlmap3d/load3ddata';
|
||||
import {getPublishMapDetail,getPublish3dMapDetail} from '@/api/jlmap3d/load3ddata';
|
||||
//cctv站台对象
|
||||
import { PasserStation } from '@/jlmap3d/jl3dstationmanager/model/passerstation.js';
|
||||
//cctv检票机对象
|
||||
|
@ -10,7 +10,7 @@ import { ModelManager } from '@/jlmap3d/jl3dtrafficplan/loader/loader.js';
|
||||
//骨骼动画模型辅助工具
|
||||
import { SkeletonUtils } from '@/jlmap3d/main/utils/SkeletonUtils.js';
|
||||
//获取信息接口
|
||||
import { getPublishMapVersion, getPublishMapDetail,getPublish3dMapDetail} from '@/api/jlmap3d/load3ddata';
|
||||
import {getPublishMapDetail,getPublish3dMapDetail} from '@/api/jlmap3d/load3ddata';
|
||||
//cctv站台对象
|
||||
import { PasserStation } from '@/jlmap3d/jl3dtrafficplan/model/passerstation.js';
|
||||
//cctv检票机对象
|
||||
|
@ -10,7 +10,7 @@ import { ModelManager } from '@/jlmap3d/jl3dtrafficplan/loader/loader.js';
|
||||
//骨骼动画模型辅助工具
|
||||
import { SkeletonUtils } from '@/jlmap3d/main/utils/SkeletonUtils.js';
|
||||
//获取信息接口
|
||||
import { getPublishMapVersion, getPublishMapDetail,getPublish3dMapDetail} from '@/api/jlmap3d/load3ddata';
|
||||
import {getPublishMapDetail,getPublish3dMapDetail} from '@/api/jlmap3d/load3ddata';
|
||||
|
||||
//cctv列车对象
|
||||
import { PasserTrain } from '@/jlmap3d/jl3dtrafficplan/model/passertrain.js';
|
||||
|
@ -1,7 +1,7 @@
|
||||
//静态资源文件路劲
|
||||
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
|
||||
//获取信息接口
|
||||
import { getPublishMapVersion, getPublishMapDetail,getPublish3dMapDetail} from '@/api/jlmap3d/load3ddata';
|
||||
import {getPublishMapDetail,getPublish3dMapDetail} from '@/api/jlmap3d/load3ddata';
|
||||
|
||||
import { sectionModel } from '@/jlmap3d/jl3dtrafficplan/sandbox/sectionmodel';
|
||||
import { signalModel } from '@/jlmap3d/jl3dtrafficplan/sandbox/signalmodel';
|
||||
|
@ -665,8 +665,7 @@ export function AssetLoader(){
|
||||
//object.traverse(function (node) {//获取其中对象
|
||||
// node.frustumCulled = true;
|
||||
//});
|
||||
console.log(asset.type);
|
||||
console.log(object);
|
||||
|
||||
if(asset.code){
|
||||
scope.modelgroup[asset.code] = object;
|
||||
}else{
|
||||
|
@ -663,10 +663,12 @@ class SkinCode extends defaultStyle {
|
||||
directionArrow: {
|
||||
},
|
||||
soonerOrLater: {
|
||||
level: 3,
|
||||
level: 5,
|
||||
serviceNumber: true,
|
||||
severeEarlyColor: '#FF00FF',
|
||||
earlyColor: '#00FF00',
|
||||
lateColor: '#800000',
|
||||
lateColor: '#FFFF00',
|
||||
severeLateColor: '#800000',
|
||||
normalColor: '#FFF'
|
||||
},
|
||||
hsda: {
|
||||
|
@ -193,27 +193,25 @@ export default class Station extends Group {
|
||||
this.add(this.stationControlAU);
|
||||
}
|
||||
createTroButton() {
|
||||
if (!this.troButton) {
|
||||
const model = this.model;
|
||||
const rect = this.stationText.getBoundingRect();
|
||||
this.troButton = new Rect({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
_subType: 'troButton',
|
||||
shape: {
|
||||
x: model.position.x + rect.width / 2 + 5,
|
||||
y: model.position.y,
|
||||
width: 25,
|
||||
height: 25
|
||||
},
|
||||
style: {
|
||||
lineWidth: 1,
|
||||
stroke: '#fff',
|
||||
fill: '#00f'
|
||||
}
|
||||
});
|
||||
this.add(this.troButton);
|
||||
}
|
||||
const model = this.model;
|
||||
const rect = this.stationText.getBoundingRect();
|
||||
this.troButton = new Rect({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
_subType: 'troButton',
|
||||
shape: {
|
||||
x: model.position.x + rect.width / 2 + 5,
|
||||
y: model.position.y,
|
||||
width: 25,
|
||||
height: 25
|
||||
},
|
||||
style: {
|
||||
lineWidth: 1,
|
||||
stroke: '#fff',
|
||||
fill: '#00f'
|
||||
}
|
||||
});
|
||||
this.add(this.troButton);
|
||||
}
|
||||
createControlModeCC() { // 西安二
|
||||
const model = this.model;
|
||||
@ -776,7 +774,11 @@ export default class Station extends Group {
|
||||
}
|
||||
setShowMode() {
|
||||
if (this.model.showMode === '05') {
|
||||
this.createTroButton(); // 创建轨道预览按钮
|
||||
if (this.troButton) {
|
||||
this.troButton.show();
|
||||
} else {
|
||||
this.createTroButton(); // 创建轨道预览按钮
|
||||
}
|
||||
} else {
|
||||
this.troButton && this.troButton.hide();
|
||||
}
|
||||
|
@ -13,7 +13,19 @@ class EMouse extends Group {
|
||||
}
|
||||
create() {
|
||||
let destinationText = LangStorage.getLang() == 'en' ? 'unknown' : '未知';
|
||||
if (this.device.style.Train.soonerOrLater && this.device.style.Train.soonerOrLater.level === 5) {
|
||||
if (this.device.style.Train.soonerOrLater && this.device.style.Train.soonerOrLater.level === 5 && this.device.style.Train.soonerOrLater.serviceNumber) {
|
||||
if (this.device.model.dt > 240) {
|
||||
destinationText = LangStorage.getLang() == 'en' ? 'early seriously' : '严重早点';
|
||||
} else if (this.device.model.dt > 120) {
|
||||
destinationText = LangStorage.getLang() == 'en' ? 'early' : '早点';
|
||||
} else if (this.device.model.dt < -240) {
|
||||
destinationText = LangStorage.getLang() == 'en' ? 'late seriously ' : '严重晚点';
|
||||
} else if (this.device.model.dt < -120) {
|
||||
destinationText = LangStorage.getLang() == 'en' ? 'late' : '晚点';
|
||||
} else {
|
||||
destinationText = LangStorage.getLang() == 'en' ? 'on time' : '准点';
|
||||
}
|
||||
} else if (this.device.style.Train.soonerOrLater && this.device.style.Train.soonerOrLater.level === 5) {
|
||||
if (this.device.model.dt > 120) {
|
||||
destinationText = LangStorage.getLang() == 'en' ? 'early seriously' : '严重早点';
|
||||
} else if (this.device.model.dt >= 15 && this.device.model.dt <= 120) {
|
||||
@ -53,7 +65,7 @@ class EMouse extends Group {
|
||||
text = ` The planned train: ${trainType} \n Table No.: ${this.device.model.serviceNumber} \n Train Trip No.: ${this.device.model.tripNumber}\n Destination: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n Train No.: ${this.device.model.groupNumber}\n Early or late: ${destinationText}\n Direction: ${direction ? 'up' : 'down'}\n Crew No.: \n Start Station: \n Terminal Station: \n Occupied Track: ${this.device.model.sectionModel ? (this.device.model.sectionModel.parentName ? this.device.model.sectionModel.parentName : this.device.model.sectionModel.name) : ''}\n Current Station: \n Train-ground communication: normal \n Operation Speed level: 4 \n Detained: ${this.device.model.hold ? 'Detained' : 'Normal'}\n \n 跳停状态: ${this.device.model.jump ? 'Skip to continue moving' : 'Normal'}Stationary: ${!this.device.model.stop ? 'No' : 'Yes'}\n Blocked: No \n Speed: ${this.device.model.speed || 0} km/h \n Authorized Distance: ${this.device.model.maLen || 0} m`;
|
||||
} else {
|
||||
if (this.device.style.Train.moreTrainDetail) {
|
||||
text = `列车类型: ${trainType}\n来\0\0\0\0源:人工标记\n车\0组\0号: ${this.device.model.groupNumber}\n表\0\0\0\0号: ${this.device.model.serviceNumber}\n车\0次\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n早\0晚\0点: ${destinationText}\n运行方向: ${direction ? '上行' : '下行'}\nATP报告方向: ${direction ? '上行' : '下行'}\n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? (this.device.model.sectionModel.parentName ? this.device.model.sectionModel.parentName : this.device.model.sectionModel.name) : ''}\n所在车站: \n车次通信: 通信车\n运行时间: \n停站时间: \n扣车状态: ${ this.device.model.hold ? '扣车' : '正常'}\n车载扣车: 不执行\n跳停状态: ${this.device.model.jump ? '跳停' : '正常'}\n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车状态: ${this.device.model.runLevel || 'CTC'}车\n最高信号系统控制: CTC\n驾驶模式: ${this.device.model.driveMode}模式\n最高ATP模式: AM\nATP1状态: 激活\nATP2状态: 备用\n速度: ${this.device.model.speed || 0} km/h\n车门状态: ${this.device.model.speed ? '关闭' : direction ? '左开右关' : '左关右开'}\n制动状态: 无紧急制动\n停车保证: 可保证停车\n站台无法进入: 否\n前方站台停车点: 中间\n折法策略: \n折返状态: \n屏蔽门开门许可: 是\n运营里程: 无效\n总重量: 196T\n车长: 11860cm\n列车编组: 1`;
|
||||
text = `列车类型: ${trainType}\n来\0\0\0\0源:人工标记\n车\0组\0号: ${this.device.model.groupNumber}\n表\0\0\0\0号: ${this.device.model.serviceNumber}\n车\0次\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n早\0晚\0点: ${destinationText}${this.parseDt(this.device.model.dt)}\n运行方向: ${direction ? '上行' : '下行'}\nATP报告方向: ${direction ? '上行' : '下行'}\n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? (this.device.model.sectionModel.parentName ? this.device.model.sectionModel.parentName : this.device.model.sectionModel.name) : ''}\n所在车站: \n车次通信: 通信车\n运行时间: \n停站时间: \n扣车状态: ${ this.device.model.hold ? '扣车' : '正常'}\n车载扣车: 不执行\n跳停状态: ${this.device.model.jump ? '跳停' : '正常'}\n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车状态: ${this.device.model.runLevel || 'CTC'}车\n最高信号系统控制: CTC\n驾驶模式: ${this.device.model.driveMode}模式\n最高ATP模式: AM\nATP1状态: 激活\nATP2状态: 备用\n速度: ${this.device.model.speed || 0} km/h\n车门状态: ${this.device.model.speed ? '关闭' : direction ? '左开右关' : '左关右开'}\n制动状态: 无紧急制动\n停车保证: 可保证停车\n站台无法进入: 否\n前方站台停车点: 中间\n折法策略: \n折返状态: \n屏蔽门开门许可: 是\n运营里程: 无效\n总重量: 196T\n车长: 11860cm\n列车编组: 1`;
|
||||
} else {
|
||||
text = `列车类型: ${trainType} \n表\0\0\0\0号: ${this.device.model.serviceNumber}\n车\0次\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n车\0组\0号: ${this.device.model.groupNumber}\n早\0晚\0点: ${destinationText}\n运行方向: ${direction ? '上行' : '下行'}\n乘务组号: \n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? (this.device.model.sectionModel.parentName ? this.device.model.sectionModel.parentName : this.device.model.sectionModel.name) : ''}\n所在车站: \n车地通信: 正常\n运行等级: 4\n扣车状态: ${this.device.model.hold ? '扣车' : '正常'}\n跳停状态: ${this.device.model.jump ? '跳停' : '正常'} \n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车速度: ${this.device.model.speed || 0} km/h\n列车移动授权距离: ${this.device.model.maLen || 0} m`;
|
||||
}
|
||||
@ -111,7 +123,21 @@ class EMouse extends Group {
|
||||
this.trainBorder.hide();
|
||||
}
|
||||
}
|
||||
|
||||
parseDt(dt) {
|
||||
const time = Math.abs(dt);
|
||||
if (time < 120) {
|
||||
return '';
|
||||
} else if (time < 3600) {
|
||||
const m = Math.floor(time / 60);
|
||||
const s = time % 60;
|
||||
return m + '分' + s + '秒';
|
||||
} else {
|
||||
const h = Math.floor(time / 3600);
|
||||
const m = Math.floor( time % 3600 / 60);
|
||||
const s = time % 60;
|
||||
return h + '小时' + m + '分' + s + '秒';
|
||||
}
|
||||
}
|
||||
mouseover() {
|
||||
if (this.device.model.style.Train.common.trainTip) {
|
||||
this.device.deviceModel.__down = true;
|
||||
|
@ -381,7 +381,17 @@ export default class TrainBody extends Group {
|
||||
}
|
||||
}
|
||||
setSoonerOrLater(dt) {
|
||||
if (this.style.Train.soonerOrLater && this.style.Train.soonerOrLater.level === 5) {
|
||||
if (this.style.Train.soonerOrLater && this.style.Train.soonerOrLater.level === 5 && this.style.Train.soonerOrLater.serviceNumber) {
|
||||
if (dt > 240) {
|
||||
this.style.Train.soonerOrLater.serviceNumber && this.textTrainServer && this.textTrainServer.setStyle({textFill: this.style.Train.soonerOrLater.severeEarlyColor});
|
||||
} else if (dt > 120) {
|
||||
this.style.Train.soonerOrLater.serviceNumber && this.textTrainServer && this.textTrainServer.setStyle({textFill: this.style.Train.soonerOrLater.earlyColor});
|
||||
} else if (dt < -240) {
|
||||
this.style.Train.soonerOrLater.serviceNumber && this.textTrainServer && this.textTrainServer.setStyle({textFill: this.style.Train.soonerOrLater.severeLateColor});
|
||||
} else if (dt < -120) {
|
||||
this.style.Train.soonerOrLater.serviceNumber && this.textTrainServer && this.textTrainServer.setStyle({textFill: this.style.Train.soonerOrLater.lateColor});
|
||||
}
|
||||
} else if (this.style.Train.soonerOrLater && this.style.Train.soonerOrLater.level === 5) {
|
||||
if (dt > 120) {
|
||||
this.trainBodyBox && this.trainBodyBox.setColor({stroke: this.style.Train.soonerOrLater.severeEarlyColor});
|
||||
this.delayTime && this.delayTime.setStyle({textFill: this.style.Train.soonerOrLater.severeEarlyColor});
|
||||
|
@ -121,51 +121,56 @@ export default {
|
||||
],
|
||||
menuDirective: [
|
||||
{
|
||||
label: '确认运行至前方站',
|
||||
handler: this.nextStation
|
||||
},
|
||||
{
|
||||
label: '越引导信号行驶',
|
||||
handler: this.handleOverFuideSignal
|
||||
},
|
||||
{
|
||||
label: '越红灯行驶',
|
||||
handler: this.handleOverEedLight
|
||||
},
|
||||
{
|
||||
label: '开关门',
|
||||
handler: this.handleOpenOrCloseDoor
|
||||
},
|
||||
{
|
||||
label: '限速指令',
|
||||
handler: this.handleSpeedLimit
|
||||
},
|
||||
{
|
||||
label: '换端',
|
||||
handler: this.handleTurnDirection
|
||||
},
|
||||
{
|
||||
label: '驾驶至',
|
||||
handler: this.handleDriveTo
|
||||
},
|
||||
{
|
||||
label: '切换驾驶模式',
|
||||
label: '故障处理',
|
||||
children: [
|
||||
{
|
||||
label: '转URM模式',
|
||||
handler: this.handleApplyUrmMode
|
||||
label: '确认运行至前方站',
|
||||
handler: this.nextStation
|
||||
},
|
||||
{
|
||||
label: '转RM模式',
|
||||
handler: this.handleApplyRmMode
|
||||
label: '越引导信号行驶',
|
||||
handler: this.handleOverFuideSignal
|
||||
},
|
||||
{
|
||||
label: '转CM模式',
|
||||
handler: this.handleApplyCmMode
|
||||
label: '越红灯行驶',
|
||||
handler: this.handleOverEedLight
|
||||
},
|
||||
{
|
||||
label: '转AM模式',
|
||||
handler: this.handleApplyAmMode
|
||||
label: '开关门',
|
||||
handler: this.handleOpenOrCloseDoor
|
||||
},
|
||||
{
|
||||
label: '限速指令',
|
||||
handler: this.handleSpeedLimit
|
||||
},
|
||||
{
|
||||
label: '换端',
|
||||
handler: this.handleTurnDirection
|
||||
},
|
||||
{
|
||||
label: '驾驶至',
|
||||
handler: this.handleDriveTo
|
||||
},
|
||||
{
|
||||
label: '切换驾驶模式',
|
||||
children: [
|
||||
{
|
||||
label: '转URM模式',
|
||||
handler: this.handleApplyUrmMode
|
||||
},
|
||||
{
|
||||
label: '转RM模式',
|
||||
handler: this.handleApplyRmMode
|
||||
},
|
||||
{
|
||||
label: '转CM模式',
|
||||
handler: this.handleApplyCmMode
|
||||
},
|
||||
{
|
||||
label: '转AM模式',
|
||||
handler: this.handleApplyAmMode
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -207,11 +212,13 @@ export default {
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
if (this.operatemode === OperateMode.ADMIN) {
|
||||
this.menu = [...this.menu, ...this.menuForce];
|
||||
} else {
|
||||
this.menu = [...this.menu, ...this.menuDirective];
|
||||
}
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
if (!this.$store.state.scriptRecord.bgSet) {
|
||||
this.menu = [...this.menuForce, ...this.menuDirective];
|
||||
this.menu = [...this.menuForce];
|
||||
} else {
|
||||
this.menu = [...this.menuForce];
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ const Jlmap3dSandbox = () => import('@/views/jlmap3d/simulation/jl3dsimulation')
|
||||
const Jlmap3dPassFlow = () => import('@/views/jlmap3d/passflow/jl3dpassflow');
|
||||
const Jlmap3dTrafficPlan = () => import('@/views/jlmap3d/trafficplan/jl3dtrafficplan');
|
||||
const Jlmap3dTrafficTrain = () => import('@/views/jlmap3d/trafficplan/jl3dtraffictrain');
|
||||
const Jl3dRailwayDrive = () => import('@/views/jlmap3d/railwaydrive/jl3drailwaydrive');
|
||||
// 三维沙盘测试
|
||||
const Jlmap3dSandBoxTest = () => import('@/views/jlmap3d/trafficplan/jl3dtestview');
|
||||
// 三维车站管理测试
|
||||
@ -328,6 +329,11 @@ export const constantRoutes = [
|
||||
hidden: true
|
||||
},
|
||||
|
||||
{
|
||||
path: '/jlmap3d/lesson3dplayer',
|
||||
component: Jl3dRailwayDrive,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/jlmap3d/devicemodel',
|
||||
component: Jlmap3dModel,
|
||||
|
153
src/views/jlmap3d/railwaydevice/component/devicelist.vue
Normal file
@ -0,0 +1,153 @@
|
||||
<template>
|
||||
<div class="editassets" :style="{'background-image': 'url('+localStatic+'/texture/devicelistpane.png)'}">
|
||||
<div class="asset-list">
|
||||
<!-- <el-tabs v-model="activeName"> -->
|
||||
<div class="devicelisttop">
|
||||
<p style="font-size:20px;color:#FFFFFF;">设备部件</p>
|
||||
</div>
|
||||
<div class="devicelistbottom">
|
||||
<div class="displaylist " v-for="(part,index) in devicelist" @click="deviceselect(index,part)" v-show="true" >
|
||||
<div >
|
||||
<p style="border:1px solid #FFFFFF;">{{part.text}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- </el-tabs> -->
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
|
||||
export default {
|
||||
name: 'Jl3ddeviceList',
|
||||
components: {
|
||||
|
||||
},
|
||||
props: ['devicelist'],
|
||||
data() {
|
||||
return {
|
||||
localStatic:JL3D_LOCAL_STATIC,
|
||||
activeName: 'train',
|
||||
filterText: '',
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'label'
|
||||
},
|
||||
devicetype:true,
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
||||
},
|
||||
watch: {
|
||||
filterText(val) {
|
||||
this.$refs.tree2.filter(val);
|
||||
},
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
deviceselect(index,train){
|
||||
this.$emit('sdevice',train);
|
||||
},
|
||||
filterNode(value, data) {
|
||||
if (!value) return true;
|
||||
return data.label.indexOf(value) !== -1;
|
||||
},
|
||||
init: function() {
|
||||
|
||||
},
|
||||
back() {
|
||||
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
.editassets {
|
||||
position: absolute;
|
||||
float:right;
|
||||
right:2%;
|
||||
top:10%;
|
||||
width: 20%;
|
||||
height: 80%;
|
||||
// background-color: #FFFFFF;
|
||||
|
||||
// border-radius:5px;
|
||||
background-repeat: no-repeat;
|
||||
overflow: hidden;
|
||||
background-size:90% 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.asset-list{
|
||||
// position:absolute;
|
||||
|
||||
width: 85%;
|
||||
height: 100%;
|
||||
|
||||
|
||||
|
||||
}
|
||||
.el-tabs{
|
||||
height:100%;
|
||||
}
|
||||
|
||||
.el-scrollbar__wrap.default-scrollbar__wrap {
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.devicelisttop{
|
||||
height:10%;
|
||||
width:100%;
|
||||
top:0;
|
||||
}
|
||||
.devicelistbottom{
|
||||
height:85%;
|
||||
width:100%;
|
||||
top:10%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.displaylist {
|
||||
float:left;
|
||||
position: relative;
|
||||
width:90px;
|
||||
// height:20px;
|
||||
font-size:19px;
|
||||
color:#FFFFFF;
|
||||
margin:0px 5px 0px 5px;
|
||||
|
||||
}
|
||||
.modelpic{
|
||||
left:0;
|
||||
position: absolute;
|
||||
width:100%;
|
||||
height:100%;
|
||||
}
|
||||
|
||||
.modeltop{
|
||||
bottom:0;
|
||||
z-index:0;
|
||||
}
|
||||
.modeldown{
|
||||
top:0;
|
||||
z-index:0;
|
||||
}
|
||||
|
||||
</style>
|
99
src/views/jlmap3d/railwaydevice/component/devicemsg.vue
Normal file
@ -0,0 +1,99 @@
|
||||
<template>
|
||||
<div class="showmsg"
|
||||
:style="{'background-image': 'url('+localStatic+'/texture/devicemsgpane.png)'}"
|
||||
v-show="msgshow">
|
||||
|
||||
<div class="msgtop">
|
||||
{{devicename}}
|
||||
</div>
|
||||
<div class="msgdown">
|
||||
{{devicemsg}}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
|
||||
export default {
|
||||
name: 'Jl3ddeviceMsg',
|
||||
components: {
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
localStatic:JL3D_LOCAL_STATIC,
|
||||
msgshow:false,
|
||||
devicename:"",
|
||||
devicemsg:"",
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
||||
},
|
||||
watch: {
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
updatemsg(name,text) {
|
||||
// console.log(name);
|
||||
// console.log(text);
|
||||
if(name){
|
||||
this.msgshow = true;
|
||||
this.devicename = name;
|
||||
this.devicemsg = text;
|
||||
}else{
|
||||
this.msgshow = false;
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
mounted() {
|
||||
window.updatemsg = this.updatemsg;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
|
||||
.showmsg{
|
||||
position: absolute;
|
||||
float:left;
|
||||
left:2%;
|
||||
bottom:15%;
|
||||
width: 20%;
|
||||
height: 70%;
|
||||
z-index: 10;
|
||||
background-repeat:no-repeat;
|
||||
background-size: 90% 100%;
|
||||
|
||||
}
|
||||
.msgtop{
|
||||
text-align: center;
|
||||
width: 80%;
|
||||
height:10%;
|
||||
float: left;
|
||||
position: absolute;
|
||||
top:10%;
|
||||
font-size:18px;
|
||||
color:#FFFFFF;
|
||||
}
|
||||
|
||||
.msgdown{
|
||||
position: absolute;
|
||||
top:20%;
|
||||
left:5%;
|
||||
width: 80%;
|
||||
height:75%;
|
||||
float: left;
|
||||
font-size:16px;
|
||||
color:#FFFFFF;
|
||||
word-wrap:break-word;
|
||||
letter-spacing:2px;
|
||||
overflow-y:scroll;
|
||||
}
|
||||
|
||||
</style>
|
348
src/views/jlmap3d/railwaydevice/jl3drailwaydevice.vue
Normal file
@ -0,0 +1,348 @@
|
||||
<template>
|
||||
<div id="jl3d" style="z-index: 2010" class="jl3ddraw">
|
||||
<Jl3ddevice-Msg v-show="isswitch ">
|
||||
</Jl3ddevice-Msg>
|
||||
<Jl3ddevice-List v-show="!actionshow &&isswitch" :devicelist="devicelist" @sdevice="sdevice">
|
||||
</Jl3ddevice-List>
|
||||
<canvas id="canvastexture" ></canvas>
|
||||
<div class="jl3dcontrolpane" v-show="isswitch">
|
||||
<el-button-group>
|
||||
<el-button type="primary" @click="back">初始化</el-button>
|
||||
<el-button type="primary" @click="alldisper">{{disperreset}}</el-button>
|
||||
<el-button type="primary" @click="dispersed">{{devicestats}}</el-button>
|
||||
<el-button type="primary" @click="switchhide">{{switchshow}}</el-button>
|
||||
<el-button type="primary" @click="actionmodechange">{{actioncontrol}}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
|
||||
<div class="jl3dactionpane" v-show="actionshow && isswitch">
|
||||
<el-button-group>
|
||||
<el-button type="primary" v-for="item in actionList" :key="item.type" @click="changeAction(item)">{{item.name}}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
|
||||
<div id="jl3dwindow" v-show="isPsd" class="windowbutton"
|
||||
:style="{'background-image': 'url('+localStatic+'/texture/fk.png)'}"
|
||||
@click="windowchange"></div>
|
||||
|
||||
<div id="jl3dclose" v-show="isPsd" class="backbutton"
|
||||
:style="{'background-image': 'url('+localStatic+'/texture/xx.png)'}"
|
||||
@click="close3ddeviceview"></div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Vue from 'vue';
|
||||
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
|
||||
import { Jl3ddeviceNew } from '@/jlmap3d/jl3drailwaydevice/jl3ddeviceNew.js';
|
||||
|
||||
import Jl3ddeviceMsg from '@/views/jlmap3d/railwaydevice/component/devicemsg';
|
||||
import Jl3ddeviceList from '@/views/jlmap3d/railwaydevice/component/devicelist';
|
||||
|
||||
export default {
|
||||
name: 'Jl3dRailwayDevice',
|
||||
components: {
|
||||
Jl3ddeviceMsg,
|
||||
Jl3ddeviceList
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
localStatic:JL3D_LOCAL_STATIC,
|
||||
datastatus:"",
|
||||
jl3d: null,
|
||||
psdlist:this.$store.state.map.map.psdList,
|
||||
windowstatus:false,
|
||||
devicelist:[],
|
||||
devicestats:"分步拆解",
|
||||
disperreset:"整体拆解",
|
||||
switchshow:"隐藏轨道",
|
||||
switchstatus:true,
|
||||
actioncontrol:"启用手摇道岔操作模式",
|
||||
actionshow:false,
|
||||
isPsd:true,
|
||||
isswitch:false,
|
||||
actionList:[
|
||||
{
|
||||
name:"步骤1:查看道岔",
|
||||
type:"action1",
|
||||
text:"看道岔开通位置,判断道岔是否需要改变,道岔上是否已加有钩锁器。尖轨与基本轨间空隙是否有异物。面对尖轨如左侧尖轨密贴基本轨,右侧尖轨与基本轨之间有缝隙,则该道岔开通右位。右侧尖轨密贴基本轨,左侧尖轨与基本轨之间有缝隙,则该道岔开通左位。",
|
||||
},
|
||||
{
|
||||
name:"步骤2:断电开锁",
|
||||
type:"action2",
|
||||
text:"断开道岔电源,打开盖孔板,如道岔原先已加锁,断电之后方可拆下钩锁器。",
|
||||
},
|
||||
{
|
||||
name:"步骤3:摇动道岔",
|
||||
type:"action3",
|
||||
text:"插入手摇把,摇动道岔,转到所需位置,在听到“咔嚓”落槽声后停止。如何判断手摇把摇动方向:手摇把插入转辙机时,手柄指向轨道侧时采用“顺拉逆推”,反之则采用“顺推逆拉”。这里“推”和“拉”指面向轨道时尖轨的运动方向",
|
||||
},
|
||||
{
|
||||
name:"步骤4:确认道岔",
|
||||
type:"action4",
|
||||
text:"面对道岔尖轨手指尖轨和另一人共同确认,尖轨与基本轨密贴,尖轨与基本轨无异物,才可以加锁。",
|
||||
},
|
||||
{
|
||||
name:"步骤5:加锁",
|
||||
type:"action5",
|
||||
text:"双人确认,道岔位置开通正确后,用钩锁器,锁定道岔,密贴尖轨。加锁器位置应在距尖轨头端,第二和第三块枕木之间",
|
||||
},
|
||||
{
|
||||
name:"步骤6:汇报情况",
|
||||
type:"action6",
|
||||
text:"人员及工器具出清,至安全区域后,向车控室汇报,道岔开通位置及加锁情况。",
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'jl3d.animastats': {
|
||||
handler: function (newVal, oldVal) {
|
||||
if (newVal != oldVal) {
|
||||
if(newVal == false){
|
||||
this.devicestats = "分步拆解";
|
||||
|
||||
this.disperreset = "整体拆解";
|
||||
}
|
||||
if(newVal == true){
|
||||
this.devicestats = "分步复位";
|
||||
|
||||
this.disperreset = "整体复位";
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
'$store.state.menuOperation.selectedCount': {
|
||||
handler: function (newVal, oldVal) {
|
||||
if(this.datastatus == "new"){
|
||||
if (newVal != oldVal) {
|
||||
if(this.$store.state.menuOperation.selected._type){
|
||||
if(this.$store.state.menuOperation.selected._type == "StationStand"){
|
||||
let standcode = this.$store.state.menuOperation.selected.code;
|
||||
for(let i=0,leni=this.psdlist.length;i<leni;i++){
|
||||
if(standcode == this.psdlist[i].standCode){
|
||||
this.jl3d.selectmodel(Vue.prototype.$jlmap.mapDevice[this.psdlist[i].code]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
this.jl3d.selectmodel(this.$store.state.menuOperation.selected);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
// '$store.state.socket.device': {
|
||||
// deep: true,
|
||||
// handler: function (newVal, oldVal) {
|
||||
// if (newVal.code == oldVal.code) {
|
||||
// this.jl3d.updateaction(newVal);
|
||||
// } else {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// },
|
||||
// '$store.state.socket.simulationOverCount': function () {
|
||||
// this.unsubscribe();
|
||||
// }
|
||||
},
|
||||
computed: {
|
||||
code() {
|
||||
return this.$route.query.code;
|
||||
},
|
||||
mapId() {
|
||||
return this.$route.query.mapId;
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
window.updatemenulist = this.updatemenulist;
|
||||
window.psdModelShow = this.psdModelShow;
|
||||
let code = this.$route.query.code;
|
||||
let group = this.$route.query.group;
|
||||
let header = this.$route.query.token;
|
||||
// console.log(this.$store.state.menuOperation);
|
||||
// console.log(this.$store.state.map.map.linkList);
|
||||
// console.log(this.$store.state.map.map.linkList);
|
||||
|
||||
if(this.$route.query.type == "VR_PSD"){
|
||||
this.isPsd = false;
|
||||
let changeelement = document.getElementById('jl3d');
|
||||
changeelement.style.width = '100%';
|
||||
changeelement.style.height = '100%';
|
||||
changeelement.style.top = '0';
|
||||
this.windowstatus = true;
|
||||
// this.jl3d.updatewindowstatus('1');
|
||||
}
|
||||
//定义转辙机动画
|
||||
this.datastatus = "new";
|
||||
this.initnewdata(group,header);
|
||||
|
||||
if(this.$route.query.type == "VR_PSD"){
|
||||
this.jl3d.updatewindowstatus('1');
|
||||
this.psdCode = this.$route.query.psdCode;
|
||||
}
|
||||
// const mapdata = this.$store.getters['map/map'];
|
||||
// console.log(mapdata);
|
||||
// if (group) {
|
||||
// this.init(group,header);
|
||||
// // this.subscribe(code,group,header);
|
||||
// }
|
||||
},
|
||||
beforeDestroy() {
|
||||
},
|
||||
methods: {
|
||||
initnewdata: function (group,header){
|
||||
let dom = document.getElementById('jl3d');
|
||||
this.jl3d = new Jl3ddeviceNew(dom,group,header,this.mapId);
|
||||
},
|
||||
close3ddeviceview: function(){
|
||||
this.$emit('closedevice3dview');
|
||||
},
|
||||
windowchange: function(){
|
||||
let changeelement = document.getElementById('jl3d');
|
||||
if(this.windowstatus){
|
||||
changeelement.style.width = '50%';
|
||||
changeelement.style.height = '50%';
|
||||
changeelement.style.top = '25%';
|
||||
this.windowstatus = false;
|
||||
this.jl3d.updatewindowstatus('0');
|
||||
}else{
|
||||
changeelement.style.width = '100%';
|
||||
changeelement.style.height = '100%';
|
||||
changeelement.style.top = '0';
|
||||
this.windowstatus = true;
|
||||
this.jl3d.updatewindowstatus('1');
|
||||
}
|
||||
if(this.jl3d.domresize){
|
||||
this.jl3d.domresize();
|
||||
}
|
||||
},
|
||||
updatemenulist(devicelist) {
|
||||
if(devicelist){
|
||||
this.devicelist = devicelist;
|
||||
this.isswitch = true;
|
||||
}else{
|
||||
this.devicelist = [];
|
||||
this.isswitch = false;
|
||||
}
|
||||
|
||||
this.actionshow = false;
|
||||
this.actioncontrol = "启用手摇道岔操作模式";
|
||||
},
|
||||
sdevice(changedata) {
|
||||
this.jl3d.updateselect(changedata);
|
||||
},
|
||||
dispersed(){
|
||||
this.jl3d.disperdevice1();
|
||||
},
|
||||
alldisper(){
|
||||
this.jl3d.disperdevice2();
|
||||
},
|
||||
back(){
|
||||
this.jl3d.resetmodel();
|
||||
},
|
||||
switchhide(){
|
||||
if(this.switchstatus){
|
||||
this.switchstatus = false;
|
||||
this.switchshow = "显示轨道";
|
||||
this.jl3d.hideswitch(this.switchstatus);
|
||||
}else{
|
||||
this.switchstatus = true;
|
||||
this.switchshow = "隐藏轨道";
|
||||
this.jl3d.hideswitch(this.switchstatus);
|
||||
}
|
||||
},
|
||||
actionmodechange(){
|
||||
if(this.actionshow == false){
|
||||
this.actionshow = true;
|
||||
this.actioncontrol = "关闭手摇道岔操作模式";
|
||||
this.jl3d.changeStaticSwitch(false);
|
||||
}else{
|
||||
this.actionshow = false;
|
||||
this.actioncontrol = "启用手摇道岔操作模式";
|
||||
this.jl3d.changeStaticSwitch(true);
|
||||
this.jl3d.changeAnimate("reset");
|
||||
}
|
||||
},
|
||||
changeAction(action){
|
||||
if(action.text){
|
||||
updatemsg(action.name,action.text);
|
||||
}
|
||||
this.jl3d.changeAnimate(action.type);
|
||||
},
|
||||
psdModelShow(){
|
||||
if(this.psdCode){
|
||||
let data={
|
||||
code:this.$route.query.psdCode,
|
||||
_type:"Psd"
|
||||
};
|
||||
this.jl3d.selectmodel(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
/* #jl3d {
|
||||
width: 937px;
|
||||
height: 937px;
|
||||
} */
|
||||
|
||||
.jl3ddraw {
|
||||
z-index: 3001;
|
||||
position: absolute;
|
||||
float: right;
|
||||
top:25%;
|
||||
/* left: 0; */
|
||||
width: 50%;
|
||||
height: 50%;
|
||||
z-index: 1500;
|
||||
}
|
||||
|
||||
#canvastexture {
|
||||
position: absolute;
|
||||
float: left;
|
||||
left: 0;
|
||||
z-index: -12;
|
||||
}
|
||||
|
||||
.windowbutton{
|
||||
width:25px;
|
||||
height:25px;
|
||||
position: absolute;
|
||||
right:60px;
|
||||
top:5px;
|
||||
background-repeat:no-repeat;
|
||||
background-size:100%;
|
||||
}
|
||||
.backbutton{
|
||||
width:25px;
|
||||
height:25px;
|
||||
position: absolute;
|
||||
right:15px;
|
||||
top:5px;
|
||||
background-repeat:no-repeat;
|
||||
background-size:100%;
|
||||
}
|
||||
|
||||
#canvastexture {
|
||||
position: absolute;
|
||||
float: left;
|
||||
left: 0;
|
||||
z-index: -12;
|
||||
}
|
||||
.jl3dcontrolpane{
|
||||
position: absolute;
|
||||
top:0;
|
||||
left:0;
|
||||
}
|
||||
|
||||
.jl3dactionpane{
|
||||
position: absolute;
|
||||
bottom:0;
|
||||
right:0;
|
||||
}
|
||||
|
||||
</style>
|
@ -1,23 +1,23 @@
|
||||
<template>
|
||||
<div style="width:100%;height:50%;position:absolute;bottom:4%">
|
||||
<div id="start" class="panebutton2" style="bottom:1%;left:5%;" >
|
||||
<div style="width:100%;height:100%;position:absolute;">
|
||||
<!-- <div id="start" class="panebutton2" style="bottom:1%;left:125px;" >
|
||||
<img class="buttonimg2" :src="start" />
|
||||
</div> -->
|
||||
|
||||
<div id="direct" class="brakebutton" style="bottom:5%;left:110px;">
|
||||
<img class="brakeimg" :src="brakeallimgurl" />
|
||||
<img id="directimgbrakeall" class="brakeimg" :src="brakeallimgurlt" :style="{transform:braketransall}" @mousedown="touchstartbrakeall" />
|
||||
</div>
|
||||
|
||||
<div id="direct" class="panebutton2" style="bottom:1%;left:25%;">
|
||||
<img class="buttonimg2" :src="direct" />
|
||||
<img id="directimg" class="buttonimg2" :src="directoffpng" :style="{transform:toutransform}" @mousedown="touchstart" />
|
||||
<div class="directbutton" style="top:0px;right:0;">{{ $t('jlmap3d.front') }}</div>
|
||||
<div class="directbutton" style="top:18px;right:0;">0</div>
|
||||
<div class="directbutton" style="top:36px;right:0;">{{ $t('jlmap3d.later') }}</div>
|
||||
<div id="direct" class="brakebutton" style="bottom:5%;left:440px;">
|
||||
<img class="brakeimg" :src="brakeimgurl" />
|
||||
<img id="directimgbrake" class="brakeimg" :src="brakeimgurlt" :style="{transform:braketrans}" @mousedown="touchstartbrake" />
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="div1" class ="pane-box">
|
||||
<img class="paneimg" :src="pane"/>
|
||||
<div class="panelb" :style="{right: isZh? '80px': '80px', top: isZh? '0px': '0px'}">{{ $t('jlmap3d.traction') }}</div>
|
||||
<div class="panelb" :style="{right: isZh? '80px': '80px', top: '70px'}">0</div>
|
||||
<div class="panelb" :style="{right: isZh? '80px': '80px', top: isZh? '130px': '130px'}">{{ $t('jlmap3d.braking') }}</div>
|
||||
<div class="panelb" :style="{right: isZh? '80px': '80px', top: isZh? '145px': '145px'}">{{ $t('jlmap3d.quick') }}</div>
|
||||
<img id="div2" class="lgimg" :src="lg" :style="{top:movex}" @mousedown="speedstart" />
|
||||
<!-- @mouseup="speedend" -->
|
||||
</div>
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
<script>
|
||||
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
|
||||
import { trainSimulationForce,trainSimulationGear } from '@/jlmap3d/jl3drailwaydrive/drivecontrol/simulation.js';
|
||||
import { trainSimulationForce } from '@/jlmap3d/jl3drailwaydrive/drivecontrol/simulation.js';
|
||||
|
||||
import store from '@/store/index';
|
||||
import { throttle } from '@/utils/throttle.js';
|
||||
@ -53,13 +53,17 @@
|
||||
apoimg:"",
|
||||
touchcontrol:true,
|
||||
touchstate:"Neutral",
|
||||
toutransform:"rotate(175deg)",
|
||||
braketrans:"rotate(394deg)",
|
||||
braketransall:"rotate(394deg)",
|
||||
start:JL3D_LOCAL_STATIC+"/jl3d/control/start.png",
|
||||
direct:JL3D_LOCAL_STATIC+"/jl3d/control/direct.png",
|
||||
brakeimgurl:JL3D_LOCAL_STATIC+"/jl3d/railway/st.png",
|
||||
brakeimgurlt:JL3D_LOCAL_STATIC+"/jl3d/railway/st1.png",
|
||||
brakeallimgurl:JL3D_LOCAL_STATIC+"/jl3d/railway/yuan.png",
|
||||
brakeallimgurlt:JL3D_LOCAL_STATIC+"/jl3d/railway/yuan11.png",
|
||||
directz:JL3D_LOCAL_STATIC+"/jl3d/control/directfront.png",
|
||||
directoffpng:JL3D_LOCAL_STATIC+"/jl3d/control/directoff.png",
|
||||
pane:JL3D_LOCAL_STATIC+"/jl3d/control/pane.png",
|
||||
lg:JL3D_LOCAL_STATIC+"/jl3d/control/lg.png",
|
||||
pane:JL3D_LOCAL_STATIC+"/jl3d/railway/lg.png",
|
||||
lg:JL3D_LOCAL_STATIC+"/jl3d/railway/yuahdfgdfre.png",
|
||||
|
||||
iconrotate:45,//旋转deg
|
||||
icontranslateX:100,//沿x轴位移px
|
||||
@ -103,11 +107,7 @@
|
||||
// },
|
||||
touchstate:function(val,oldval){
|
||||
if(val != oldval){
|
||||
// if(this.userRole == "DRIVER"){
|
||||
// trainSimulationGear(this.group,this.groupNum,this.touchstate).then(netdata => {
|
||||
//
|
||||
// });
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -147,11 +147,11 @@
|
||||
centerstate : function(gear){
|
||||
this.touchstate = gear;
|
||||
if(this.touchstate == "Drive"){
|
||||
this.toutransform = "rotate(140deg)";
|
||||
this.braketransall = "rotate(140deg)";
|
||||
}else if(this.touchstate == "Neutral"){
|
||||
this.toutransform = "rotate(175deg)";
|
||||
this.braketransall = "rotate(175deg)";
|
||||
}else if(this.touchstate == "Reverse"){
|
||||
this.toutransform = "rotate(205deg)";
|
||||
this.braketransall = "rotate(205deg)";
|
||||
}
|
||||
},
|
||||
centercontrol : function(){
|
||||
@ -205,51 +205,33 @@
|
||||
// if(this.atostate == true){
|
||||
// this.$store.dispatch('app/setAtoState', false);
|
||||
// }
|
||||
if(this.moveheight<=1){
|
||||
this.moveheight=1;
|
||||
this.movex=-6+"px";
|
||||
}
|
||||
if(this.moveheight>=159){
|
||||
this.moveheight=159;
|
||||
this.movex=153+"px";
|
||||
}
|
||||
if(this.moveheight<86&&this.moveheight>73){
|
||||
this.movex=72+"px";
|
||||
|
||||
this.move = this.moveheight/235;
|
||||
if(this.moveheight<=30){
|
||||
this.moveheight=30;
|
||||
this.movex=23+"px";
|
||||
this.move = 0;
|
||||
}else if(this.moveheight<0&&this.moveheight>159){
|
||||
|
||||
}else{
|
||||
|
||||
if(this.moveheight>=86){
|
||||
this.move = -(this.moveheight-82)/65;
|
||||
}
|
||||
if(this.moveheight<=73){
|
||||
this.move = (73 - this.moveheight)/75;
|
||||
}
|
||||
this.movex=this.moveheight-7+"px";
|
||||
if(this.moveheight>=145){
|
||||
this.movex= 150+"px";
|
||||
this.move = -1;
|
||||
}
|
||||
|
||||
}
|
||||
if(this.moveheight>=235){
|
||||
this.moveheight=235;
|
||||
this.movex=235+"px";
|
||||
this.move = 1;
|
||||
}
|
||||
let param = {
|
||||
// id:this.groupNum,
|
||||
id:"001",
|
||||
p:parseInt(this.move*100)
|
||||
pos:parseInt(this.move*100)
|
||||
};
|
||||
console.log(param.p);
|
||||
const userInfo = store.state.training.simulationUserList.find(el => el.id == store.state.user.id);
|
||||
console.log(this.group);
|
||||
console.log(userInfo.memberId);
|
||||
|
||||
throttle(
|
||||
trainSimulationForce(this.group,userInfo.memberId,param).then(res => {
|
||||
trainSimulationForce(this.group,userInfo.memberId,param,"Train_Drive_Throttle_Change").then(res => {
|
||||
// console.log(res);
|
||||
}).catch((error) => {
|
||||
console.log(error);
|
||||
})
|
||||
,200,true);
|
||||
// updatemmic1(param.percent);
|
||||
updatemmic1(param.percent);
|
||||
},
|
||||
speedend: function(event){
|
||||
document.getElementById("div1").onmousemove = null;
|
||||
@ -265,35 +247,36 @@
|
||||
this.iconrotate=0;
|
||||
}
|
||||
},
|
||||
touchstart:function(e){
|
||||
touchstartbrake:function(e){
|
||||
|
||||
|
||||
let domoffset = document.getElementById("directimg").getBoundingClientRect();
|
||||
let domoffset = document.getElementById("directimgbrake").getBoundingClientRect();
|
||||
// movelimit
|
||||
this.angleoffset.x = domoffset.x;
|
||||
this.angleoffset.y = domoffset.y;
|
||||
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
document.getElementById("directimg").onmousemove = this.touchmove;
|
||||
document.getElementById("directimg").onmouseup = this.touchend;
|
||||
document.getElementById("directimgbrake").onmousemove = this.touchmovebrake;
|
||||
document.getElementById("directimgbrake").onmouseup = this.touchendbrake;
|
||||
|
||||
|
||||
},
|
||||
touchmove:function(e){//finger move 触发
|
||||
touchmovebrake:function(e){//finger move 触发
|
||||
// console.log(e);
|
||||
this.getAngle(e.pageX-this.angleoffset.x ,e.pageY-this.angleoffset.y);
|
||||
this.getAnglebrake(e.pageX-this.angleoffset.x ,e.pageY-this.angleoffset.y);
|
||||
},
|
||||
touchend:function(e){
|
||||
document.getElementById("directimg").onmousemove = null;
|
||||
document.getElementById("directimg").onmouseup = null;
|
||||
touchendbrake:function(e){
|
||||
document.getElementById("directimgbrake").onmousemove = null;
|
||||
document.getElementById("directimgbrake").onmouseup = null;
|
||||
},
|
||||
getAngle:function(mx,my){
|
||||
getAnglebrake:function(mx,my){
|
||||
//圆心坐标
|
||||
// console.log(mx);
|
||||
// console.log(my);
|
||||
let px=30;
|
||||
let py=30;
|
||||
let px=150;
|
||||
let py=150;
|
||||
let x = Math.abs(px-mx);
|
||||
let y = Math.abs(py-my);
|
||||
let z = Math.sqrt(Math.pow(x,2)+Math.pow(y,2));
|
||||
@ -324,59 +307,128 @@
|
||||
if(mx<px&&my<py){//鼠标在第二象限
|
||||
angle = 360 - angle;
|
||||
}
|
||||
console.log(angle);
|
||||
console.log(this.userRole );
|
||||
if(angle<127 && angle>46){
|
||||
if(angle<63 && angle>46){
|
||||
if(this.touchstate != "Drive"){
|
||||
let data = {
|
||||
groupNumber:this.groupNum,
|
||||
gear:"Drive"
|
||||
};
|
||||
trainSimulationGear(this.group,data).then(netdata => {
|
||||
console.log(netdata);
|
||||
if(netdata.code == "200"){
|
||||
this.toutransform = "rotate(140deg)";
|
||||
this.touchstate = "Drive";
|
||||
document.getElementById("directimg").onmousemove = null;
|
||||
document.getElementById("directimg").onmouseup = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}else if(angle<93 && angle>68){
|
||||
if(this.touchstate != "Neutral"){
|
||||
let data = {
|
||||
groupNumber:this.groupNum,
|
||||
gear:"Neutral"
|
||||
};
|
||||
trainSimulationGear(this.group,data).then(netdata => {
|
||||
if(netdata.code == "200"){
|
||||
this.toutransform = "rotate(175deg)";
|
||||
this.touchstate = "Neutral";
|
||||
document.getElementById("directimg").onmousemove = null;
|
||||
document.getElementById("directimg").onmouseup = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}else if(angle<127 && angle>101){
|
||||
if(this.touchstate != "Reverse"){
|
||||
let data = {
|
||||
groupNumber:this.groupNum,
|
||||
gear:"Reverse"
|
||||
};
|
||||
trainSimulationGear(this.group,data).then(netdata => {
|
||||
if(netdata.code == "200"){
|
||||
this.toutransform = "rotate(205deg)";
|
||||
this.touchstate = "Reverse";
|
||||
document.getElementById("directimg").onmousemove = null;
|
||||
document.getElementById("directimg").onmouseup = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
angle += 180;
|
||||
|
||||
if(angle >292 && angle<427){
|
||||
let stopspeed = 0;
|
||||
if(angle>=397){
|
||||
stopspeed = 0;
|
||||
this.braketrans = "rotate("+angle+"deg)";
|
||||
}
|
||||
|
||||
if(angle<397 && angle>314){
|
||||
stopspeed = (397 - angle)/83;
|
||||
this.braketrans = "rotate("+angle+"deg)";
|
||||
}
|
||||
|
||||
if(angle<314){
|
||||
stopspeed = 1;
|
||||
this.braketrans = "rotate("+292+"deg)";
|
||||
}
|
||||
let param = {
|
||||
// id:this.groupNum,
|
||||
id:"001",
|
||||
pos:parseInt(stopspeed*150)
|
||||
};
|
||||
const userInfo = store.state.training.simulationUserList.find(el => el.id == store.state.user.id);
|
||||
throttle(
|
||||
trainSimulationForce(this.group,userInfo.memberId,param,"Train_Drive_Auto_Break ").then(res => {
|
||||
// console.log(res);
|
||||
}).catch((error) => {
|
||||
console.log(error);
|
||||
}),200,true);
|
||||
updatemmic1(param.percent);
|
||||
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
touchstartbrakeall:function(e){
|
||||
|
||||
|
||||
let domoffset = document.getElementById("directimgbrakeall").getBoundingClientRect();
|
||||
// movelimit
|
||||
this.angleoffset.x = domoffset.x;
|
||||
this.angleoffset.y = domoffset.y;
|
||||
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
document.getElementById("directimgbrakeall").onmousemove = this.touchmovebrakeall;
|
||||
document.getElementById("directimgbrakeall").onmouseup = this.touchendbrakeall;
|
||||
|
||||
|
||||
},
|
||||
touchmovebrakeall:function(e){//finger move 触发
|
||||
// console.log(e);
|
||||
this.getAnglebrakeall(e.pageX-this.angleoffset.x ,e.pageY-this.angleoffset.y);
|
||||
},
|
||||
touchendbrakeall:function(e){
|
||||
document.getElementById("directimgbrakeall").onmousemove = null;
|
||||
document.getElementById("directimgbrakeall").onmouseup = null;
|
||||
},
|
||||
getAnglebrakeall:function(mx,my){
|
||||
//圆心坐标
|
||||
// console.log(mx);
|
||||
// console.log(my);
|
||||
|
||||
let px=150;
|
||||
let py=150;
|
||||
let x = Math.abs(px-mx);
|
||||
let y = Math.abs(py-my);
|
||||
let z = Math.sqrt(Math.pow(x,2)+Math.pow(y,2));
|
||||
let cos = y/z;
|
||||
let radina = Math.acos(cos);//用反三角函数求弧度
|
||||
let angle = Math.floor(180/(Math.PI/radina));//将弧度转换成角度
|
||||
|
||||
if(mx>px&&my>py){//鼠标在第四象限
|
||||
angle = 180 - angle;
|
||||
}
|
||||
|
||||
if(mx==px&&my>py){//鼠标在y轴负方向上
|
||||
angle = 180;
|
||||
}
|
||||
|
||||
if(mx>px&&my==py){//鼠标在x轴正方向上
|
||||
angle = 90;
|
||||
}
|
||||
|
||||
if(mx<px&&my>py){//鼠标在第三象限
|
||||
angle = 180+angle;
|
||||
}
|
||||
|
||||
if(mx<px&&my==py){//鼠标在x轴负方向
|
||||
angle = 270;
|
||||
}
|
||||
|
||||
if(mx<px&&my<py){//鼠标在第二象限
|
||||
angle = 360 - angle;
|
||||
}
|
||||
angle += 180;
|
||||
if(angle >292 && angle<431){
|
||||
let stopspeed = 0;
|
||||
this.braketransall = "rotate("+angle+"deg)";
|
||||
if(angle>=397){
|
||||
stopspeed = 0;
|
||||
}
|
||||
|
||||
if(angle<397 && angle>292){
|
||||
stopspeed = (397 - angle)/105;
|
||||
}
|
||||
let param = {
|
||||
// id:this.groupNum,
|
||||
id:"001",
|
||||
pos:parseInt(stopspeed*100)
|
||||
};
|
||||
const userInfo = store.state.training.simulationUserList.find(el => el.id == store.state.user.id);
|
||||
throttle(
|
||||
trainSimulationForce(this.group,userInfo.memberId,param,"Train_Drive_Single_Break ").then(res => {
|
||||
// console.log(res);
|
||||
}).catch((error) => {
|
||||
console.log(error);
|
||||
}),200,true);
|
||||
updatemmic1(param.percent);
|
||||
}
|
||||
|
||||
},
|
||||
@ -385,20 +437,36 @@
|
||||
</script>
|
||||
|
||||
<style >
|
||||
.brakebutton{
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
cursor:pointer;
|
||||
height: 300px;
|
||||
width: 300px;
|
||||
}
|
||||
.brakeimg{
|
||||
top:0;
|
||||
left:0px;
|
||||
position: absolute;
|
||||
height: 300px;
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
|
||||
.pane-box{
|
||||
right: 30px;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
bottom: 10px;
|
||||
width:120px;
|
||||
height:160px;
|
||||
height:300px;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
|
||||
}
|
||||
.lgimg{
|
||||
width: 60px;
|
||||
right:4px;
|
||||
left:30px;
|
||||
bottom:0px;
|
||||
height: 15px;
|
||||
height: 60px;
|
||||
position: absolute;
|
||||
cursor:pointer;
|
||||
}
|
||||
@ -415,8 +483,8 @@
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
bottom: 0px;
|
||||
width:100px;
|
||||
height:160px;
|
||||
width:120px;
|
||||
height:230px;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
|
||||
<div style="position: absolute;right:50%;top:50%;z-index:10;background: #EBEBEB;" v-show="tuoguanbutton" @click="tuoguan">{{ tuoguanbuttonmsg }}</div>
|
||||
<div style="position: absolute;right:50%;top:60%;z-index:10;background: #EBEBEB;" v-show="isTraining" >
|
||||
<!-- <div style="position: absolute;left:43%;top:5%;z-index:10;background: #EBEBEB;" v-show="isTraining" >
|
||||
<el-select v-model="value" :placeholder="initMsg" @change="currentsel" @visible-change="clickselect" >
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
@ -14,15 +14,15 @@
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<Centerc-Pane ref="centercontrol" :group-num="groupnum" :user-role="userrole" />
|
||||
|
||||
<!-- <Left-Pane ref="leftcontrol" /> -->
|
||||
|
||||
<!-- <Right-Pane ref="rightcontrol" /> -->
|
||||
<Right-Pane ref="rightcontrol" />
|
||||
|
||||
<TopRight-Pane ref="topcontrol" :group-num="groupnum" />
|
||||
<!-- <TopRight-Pane ref="topcontrol" :group-num="groupnum" /> -->
|
||||
|
||||
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import store from '@/store/index';
|
||||
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
|
||||
|
||||
import CentercPane from '@/views/jlmap3d/railwaydrive/drivecontrol/centerpane';
|
||||
@ -59,11 +60,13 @@
|
||||
import StompClient from '@/utils/sock';
|
||||
|
||||
import { creatSubscribe, clearSubscribe, displayTopic, screenTopic } from '@/utils/stomp';
|
||||
import { bindSimulationTrain,getSimulationTrainlistNew,getSimulationMembersNew,trainSimulationEb,trainSimulationForce,trainSimulationGear} from '@/jlmap3d/jl3drailwaydrive/drivecontrol/simulation.js';
|
||||
import { getSimulationInfoNew } from '@/api/simulation';
|
||||
import { bindSimulationTrain,getSimulationTrainlistNew,getSimulationMembersNew,trainSimulationEb,trainSimulationForce,trainSimulationGear,changeDriveTrain } from '@/jlmap3d/jl3drailwaydrive/drivecontrol/simulation.js';
|
||||
import { getSimulationInfoNew} from '@/api/simulation';
|
||||
import { tuoguan3ddrive } from '@/api/jlmap3d/load3ddata';
|
||||
|
||||
import { getToken } from '@/utils/auth';
|
||||
|
||||
import { getMemberListCommon, getUserListCommon } from '@/api/rtSimulation';
|
||||
// import Vue from 'vue';
|
||||
// import StompClient from '@/utils/stompclient.js';
|
||||
import axios from 'axios';
|
||||
@ -145,9 +148,12 @@ import axios from 'axios';
|
||||
}
|
||||
},
|
||||
currentsel(selVal){
|
||||
console.log(selVal);
|
||||
let oldgroupnum = this.groupnum;
|
||||
this.groupnum = selVal;
|
||||
bindSimulationTrain(this.group,this.groupnum).then(netdata => {
|
||||
const userInfo = store.state.training.simulationUserList.find(el => el.id == store.state.user.id);
|
||||
console.log(userInfo.id);
|
||||
changeDriveTrain(this.group,selVal,userInfo.id).then(netdata => {
|
||||
this.selVal = selVal;
|
||||
this.dialogVisible = true;
|
||||
// this.groupnum = selVal;
|
||||
@ -169,7 +175,6 @@ import axios from 'axios';
|
||||
},
|
||||
clickselect(e){
|
||||
if(e == true){
|
||||
|
||||
this.updatetrainlist();
|
||||
}
|
||||
},
|
||||
@ -210,7 +215,7 @@ import axios from 'axios';
|
||||
this.trainlist = netdata.data;
|
||||
for(let i=0;i<netdata.data.length;i++){
|
||||
let option= {
|
||||
value: netdata.data[i].groupNumber,
|
||||
value: netdata.data[i].id,
|
||||
label: netdata.data[i].groupNumber,
|
||||
name:null,
|
||||
}
|
||||
@ -219,7 +224,7 @@ import axios from 'axios';
|
||||
if(netdata.data[i].name){
|
||||
option.label = netdata.data[i].name+"正在驾驶"+netdata.data[i].groupNumber;
|
||||
this.initMsg = netdata.data[i].name+"正在驾驶"+netdata.data[i].groupNumber;
|
||||
this.groupNumber = netdata.data[i].groupNumber;
|
||||
this.groupNumber = netdata.data[i].id;
|
||||
option.disabled = true;
|
||||
}
|
||||
|
||||
@ -254,8 +259,8 @@ import axios from 'axios';
|
||||
}
|
||||
this.options.sort(
|
||||
function(obj1,obj2) {
|
||||
let val1 = obj1.value;
|
||||
let val2 = obj2.value;
|
||||
let val1 = obj1.label;
|
||||
let val2 = obj2.label;
|
||||
return val1 - val2;
|
||||
}
|
||||
);
|
||||
@ -290,39 +295,45 @@ import axios from 'axios';
|
||||
}
|
||||
},
|
||||
updatetrainlist(){
|
||||
getSimulationTrainlistNew(this.group).then(netdata => {
|
||||
this.options = [];
|
||||
this.trainlist = netdata.data;
|
||||
for(let i=0;i<netdata.data.length;i++){
|
||||
let option= {
|
||||
value: netdata.data[i].groupNumber,
|
||||
label: netdata.data[i].groupNumber,
|
||||
name:null,
|
||||
}
|
||||
option.disabled = false;
|
||||
|
||||
if(netdata.data[i].name){
|
||||
option.label = netdata.data[i].name+"正在驾驶"+netdata.data[i].groupNumber;
|
||||
this.initMsg = netdata.data[i].name+"正在驾驶"+netdata.data[i].groupNumber;
|
||||
this.groupNumber = netdata.data[i].groupNumber;
|
||||
option.disabled = true;
|
||||
}
|
||||
if(netdata.data[i].driverId){
|
||||
if(netdata.data[i].driverId == this.userId){
|
||||
this.selVal = netdata.data[i].groupNumber;
|
||||
this.groupnum = netdata.data[i].groupNumber;
|
||||
getMemberListCommon(this.$route.query.group,"DRIVER").then(netdata => {
|
||||
console.log(netdata.data);
|
||||
this.options = [];
|
||||
this.trainlist = netdata.data;
|
||||
for(let i=0;i<netdata.data.length;i++){
|
||||
let option= {
|
||||
value: netdata.data[i].id,
|
||||
label: netdata.data[i].deviceId,
|
||||
name:null,
|
||||
}
|
||||
}
|
||||
this.options.push(option);
|
||||
}
|
||||
this.options.sort(
|
||||
function(obj1,obj2) {
|
||||
let val1 = obj1.value;
|
||||
let val2 = obj2.value;
|
||||
return val1 - val2;
|
||||
}
|
||||
);
|
||||
option.disabled = false;
|
||||
|
||||
if(netdata.data[i].userId){
|
||||
option.label = netdata.data[i].userId+"正在驾驶"+netdata.data[i].deviceId;
|
||||
this.initMsg = netdata.data[i].userId+"正在驾驶"+netdata.data[i].deviceId;
|
||||
this.groupNumber = netdata.data[i].id;
|
||||
option.disabled = true;
|
||||
}
|
||||
if(netdata.data[i].driverId){
|
||||
if(netdata.data[i].driverId == this.userId){
|
||||
this.selVal = netdata.data[i].deviceId;
|
||||
this.groupnum = netdata.data[i].deviceId;
|
||||
}
|
||||
}
|
||||
this.options.push(option);
|
||||
}
|
||||
this.options.sort(
|
||||
function(obj1,obj2) {
|
||||
let val1 = obj1.label;
|
||||
let val2 = obj2.label;
|
||||
return val1 - val2;
|
||||
}
|
||||
);
|
||||
}).catch(() => {
|
||||
this.$messageBox('获取仿真成员列表失败!');
|
||||
});
|
||||
|
||||
|
||||
|
||||
//获取当前录制托管状态
|
||||
if(this.tuoguanbutton == true){
|
||||
|
||||
@ -343,34 +354,7 @@ import axios from 'axios';
|
||||
}
|
||||
|
||||
}
|
||||
// getSimulationMembersNew(this.group).then(netdata => {
|
||||
|
||||
// for(let i=0,leni=netdata.data.length;i<leni;i++){
|
||||
// if(netdata.data[i].userId){
|
||||
// if(netdata.data[i].userId == this.userId){
|
||||
// this.userrole = netdata.data[i].role;
|
||||
// if(netdata.data[i].trust){
|
||||
// this.tuoguanstatus = netdata.data[i].trust;
|
||||
// if(this.tuoguanstatus){
|
||||
// this.tuoguanbuttonmsg = "取消托管";
|
||||
// }else{
|
||||
// this.tuoguanbuttonmsg = "托管";
|
||||
// }
|
||||
// }
|
||||
// i=leni;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// this.userrole = netdata.data.role;
|
||||
// if(netdata.data.trust){
|
||||
// this.tuoguanstatus = netdata.data.trust;
|
||||
// if(this.tuoguanstatus){
|
||||
// this.tuoguanbuttonmsg = "取消托管";
|
||||
// }else{
|
||||
// this.tuoguanbuttonmsg = "托管";
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
}
|
||||
}
|
||||
|
||||
@ -380,9 +364,9 @@ import axios from 'axios';
|
||||
|
||||
<style>
|
||||
.drivepane{
|
||||
width:30%;
|
||||
height:320px;
|
||||
right:500px;
|
||||
width:60%;
|
||||
height:333px;
|
||||
right:0;
|
||||
bottom:0;
|
||||
position: absolute;
|
||||
background-size: 100% 100%;
|
||||
|
@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<!-- <div style="width:25%;height:100%;position:absolute;left:75%;">
|
||||
<div style="width:30%;height:100%;position:absolute;right:0%;">
|
||||
|
||||
<div id="dropen" class="panebutton" style="bottom:1%;left:1%;" @tap="droclick">
|
||||
<img class="buttonimg" :src="redlimg" />
|
||||
<div class="buttontext">{{ $t('jlmap3d.openRightDoor') }}</div>
|
||||
</div>
|
||||
<!-- <div id="dropen" class="panebutton" style="bottom:1%;left:1%;" @tap="droclick">
|
||||
<img class="buttonimg" :src="redlimg" />
|
||||
<div class="buttontext">{{ $t('jlmap3d.openRightDoor') }}</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="drclose" class="panebutton" style="bottom:1%;left:41%;" @tap="drcclick">
|
||||
@ -15,16 +15,21 @@
|
||||
<div id="urgestop" class="panebutton" style="top:1%;left:1%;">
|
||||
<img class="buttonimg" :src="urgestopimg" />
|
||||
<div class="buttontext">{{ $t('jlmap3d.emergencyBraking') }}</div>
|
||||
</div> -->
|
||||
|
||||
<div id="stallpane" class="stalldiv" style="top:10%;left:0%;">
|
||||
<img id="nowstall" :style="{top:stalltop,left:stallleft}" class="nowstallimg" :src="nowstallimgurl" />
|
||||
<img class="stallimg" :src="stallimgurl" />
|
||||
</div>
|
||||
|
||||
<div id="doorpick" class="panebutton2" style="top:1%;left:33%;">
|
||||
<img class="buttonimg2" :src="zuoimg" />
|
||||
<img class="buttonimg2" :src="niuimg" :style="{transform:doordirecttou}" @touchstart='doordirecttouchstart' @touchmove='doordirecttouchmove' @touchend='doordirecttouchend'/>
|
||||
<div class="tfbutton" style="font-size:1px;top:13px;left:5px;">{{ $t('jlmap3d.leftSide') }}</div>
|
||||
<div class="tfbutton" style="font-size:1px;top:5px;left:33px;">{{ $t('jlmap3d.location0') }}</div>
|
||||
<div class="tfbutton" style="font-size:1px;top:13px;left:50px;">{{ $t('jlmap3d.rightSide') }}</div>
|
||||
<div class="buttontext2">{{ $t('jlmap3d.doorSideChoose') }}</div>
|
||||
</div> -->
|
||||
<div id="directpane" class="directbutton" style="bottom:10%;left:0;">
|
||||
<img class="rightbuttonbcimg" :src="zuoimg" />
|
||||
<img id="directimgdiv" class="rightbuttonbcimg" :src="niuimg" :style="{transform:doordirecttou}" @mousedown='doordirecttouchstart' />
|
||||
</div>
|
||||
|
||||
<div id="clutch" class="directbutton" style="bottom:10%;left:150px;">
|
||||
<img class="rightbuttonbcimg" :src="liheimg" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
@ -34,6 +39,10 @@
|
||||
import Vue from 'vue';
|
||||
// import { sendSimulationCommand } from '@/api/simulation.js';
|
||||
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
|
||||
|
||||
import store from '@/store/index';
|
||||
import { trainSimulationForce } from '@/jlmap3d/jl3drailwaydrive/drivecontrol/simulation.js';
|
||||
|
||||
export default {
|
||||
name: 'RightPane',
|
||||
components: {
|
||||
@ -43,13 +52,25 @@
|
||||
return {
|
||||
redlimg:JL3D_LOCAL_STATIC+"/jl3d/control/redl.png",
|
||||
greenimg:JL3D_LOCAL_STATIC+"/jl3d/control/green.png",
|
||||
zuoimg:JL3D_LOCAL_STATIC+"/jl3d/control/zuo.png",
|
||||
zuoimg:JL3D_LOCAL_STATIC+"/jl3d/railway/direct.png",
|
||||
liheimg:JL3D_LOCAL_STATIC+"/jl3d/railway/lihe.png",
|
||||
stallimgurl:JL3D_LOCAL_STATIC+"/jl3d/railway/stall.jpg",
|
||||
nowstallimgurl:JL3D_LOCAL_STATIC+"/jl3d/railway/yuahdfgdfre.png",
|
||||
niuimg:JL3D_LOCAL_STATIC+"/jl3d/control/niu.png",
|
||||
urgestopimg:JL3D_LOCAL_STATIC+"/jl3d/control/urgestop.png",
|
||||
stalltop:"29px",
|
||||
stallleft:"127px",
|
||||
stallh:1,
|
||||
stalll:2,
|
||||
directType:0,
|
||||
oldDirectType:0,
|
||||
doordirecttou:"rotate(0deg)",
|
||||
doormodetou:"rotate(0deg)",
|
||||
watertou:"rotate(0deg)",
|
||||
washtou:"rotate(0deg)",
|
||||
angleoffset: {
|
||||
x: null,
|
||||
y: null
|
||||
},
|
||||
|
||||
stalls:[],
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -57,7 +78,7 @@
|
||||
},
|
||||
computed: {
|
||||
group() {
|
||||
return this.$store.state.app.group;
|
||||
return this.$route.query.group;
|
||||
},
|
||||
code() {
|
||||
return this.$store.state.app.code;
|
||||
@ -70,201 +91,187 @@
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
|
||||
window.addEventListener('keyup',this.handleKeyup);
|
||||
let stall1 = [
|
||||
{
|
||||
l:15,
|
||||
t:-15,
|
||||
type:"-1",
|
||||
},
|
||||
{
|
||||
l:68,
|
||||
t:-15,
|
||||
type:"2",
|
||||
},
|
||||
{
|
||||
l:127,
|
||||
t:-15,
|
||||
type:"5",
|
||||
},
|
||||
{
|
||||
l:169,
|
||||
t:-15,
|
||||
type:"6",
|
||||
},
|
||||
{
|
||||
l:212,
|
||||
t:-15,
|
||||
type:"8",
|
||||
}
|
||||
];
|
||||
let stall2 = [
|
||||
{
|
||||
l:15,
|
||||
t:29,
|
||||
type:"0",
|
||||
},
|
||||
{
|
||||
l:68,
|
||||
t:29,
|
||||
type:"0",
|
||||
},
|
||||
{
|
||||
l:127,
|
||||
t:29,
|
||||
type:"0",
|
||||
},
|
||||
{
|
||||
l:169,
|
||||
t:29,
|
||||
type:"0",
|
||||
},
|
||||
{
|
||||
l:212,
|
||||
t:29,
|
||||
type:"0",
|
||||
}
|
||||
];
|
||||
let stall3 = [
|
||||
{
|
||||
l:15,
|
||||
t:72,
|
||||
type:"1",
|
||||
},
|
||||
{
|
||||
l:68,
|
||||
t:72,
|
||||
type:"3",
|
||||
},
|
||||
{
|
||||
l:127,
|
||||
t:72,
|
||||
type:"4",
|
||||
},
|
||||
{
|
||||
l:169,
|
||||
t:72,
|
||||
type:"7",
|
||||
},
|
||||
{
|
||||
l:212,
|
||||
t:72,
|
||||
type:"9",
|
||||
}
|
||||
];
|
||||
this.stalls.push(stall1);
|
||||
this.stalls.push(stall2);
|
||||
this.stalls.push(stall3);
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
rightstate : function(rights){
|
||||
handleKeyup(event){
|
||||
const e = event || window.event || arguments.callee.caller.arguments[0];
|
||||
if(!e) return;
|
||||
const {key,keyCode} = e;
|
||||
//上
|
||||
if(keyCode == "38"){
|
||||
if(this.stallh >=1){
|
||||
this.stallh = this.stallh - 1;
|
||||
}
|
||||
}
|
||||
//下
|
||||
if(keyCode == "40"){
|
||||
if(this.stallh<2){
|
||||
this.stallh = this.stallh + 1;
|
||||
}
|
||||
}
|
||||
//左
|
||||
if(keyCode == "37"){
|
||||
if(this.stallh == 1){
|
||||
if(this.stalll>=1){
|
||||
this.stalll = this.stalll - 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
//右
|
||||
if(keyCode == "39"){
|
||||
if(this.stallh == 1){
|
||||
if(this.stallh == 1){
|
||||
if(this.stalll<4){
|
||||
this.stalll = this.stalll + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
rightcontrol : function(){
|
||||
this.stalltop = this.stalls[this.stallh][this.stalll].t +"px";
|
||||
this.stallleft = this.stalls[this.stallh][this.stalll].l +"px";
|
||||
|
||||
},
|
||||
showmsg:function(data){
|
||||
wx.showToast({
|
||||
title: data,
|
||||
icon: 'loading',
|
||||
duration: 2000
|
||||
});
|
||||
},
|
||||
showcontrolmsg:function(data,callback){
|
||||
this.controlmsg = data;
|
||||
this.msgshow = true;
|
||||
|
||||
callback = callback || function(){
|
||||
this.setData();
|
||||
let param = {
|
||||
// id:this.groupNum,
|
||||
id:"001",
|
||||
pos:parseInt(this.stalls[this.stallh][this.stalll].type)
|
||||
};
|
||||
setTimeout( callback.bind(this),2000);
|
||||
console.log(param);
|
||||
const userInfo = store.state.training.simulationUserList.find(el => el.id == store.state.user.id);
|
||||
|
||||
},
|
||||
droclick: function (e){
|
||||
//console.log("右侧车门开");
|
||||
if(this.movespeed == 0){
|
||||
this.showcontrolmsg(this.$t('jlmap3d.rightDoorOpen'));
|
||||
this.controlsend(this.traincode,"604","07","");
|
||||
}
|
||||
},
|
||||
drcclick: function (e){
|
||||
//console.log("右侧车门关");
|
||||
if(this.movespeed == 0){
|
||||
this.showcontrolmsg(this.$t('jlmap3d.rightDoorClose'));
|
||||
this.controlsend(this.traincode,"606","07","");
|
||||
}
|
||||
},
|
||||
urgestopclick: function (e){
|
||||
trainSimulationForce(this.group,userInfo.memberId,param,"Train_Drive_Gear_Change").then(res => {
|
||||
// console.log(res);
|
||||
}).catch((error) => {
|
||||
console.log(error);
|
||||
});
|
||||
|
||||
},
|
||||
controlsend:function(traincode,operation,type,param){
|
||||
if(this.$store.state.app.userRole == "Driver"){
|
||||
let command ={
|
||||
code: traincode,
|
||||
operation: operation,
|
||||
type: type,
|
||||
param: param
|
||||
};
|
||||
// sendSimulationCommand(this.group,command);
|
||||
}else{
|
||||
|
||||
}
|
||||
},
|
||||
watertouchstart:function(e){
|
||||
// let command ={
|
||||
// code:this.traincode,
|
||||
// operation:"607",
|
||||
// type:"07",
|
||||
// param:""
|
||||
// };
|
||||
// command.param = this.touchstate;
|
||||
// sendSimulationCommand(this.group,command).then(netdata => {
|
||||
// if(netdata.data == true){
|
||||
this.touchcontrol = true;
|
||||
// }
|
||||
// });
|
||||
},
|
||||
watertouchmove:function(e){//finger move 触发
|
||||
if(this.touchcontrol == true){
|
||||
let px=140;
|
||||
let py=400;
|
||||
let angle = this.getAngle(px,py,e.changedTouches[0].clientX,e.changedTouches[0].clientY);
|
||||
if(angle<338 && angle>245){
|
||||
if(angle<295 && angle>245){
|
||||
this.watertou = "rotate(359deg)";
|
||||
}else if(angle<338 && angle>295){
|
||||
this.watertou = "rotate(412deg)";
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
watertouchend:function(e){
|
||||
this.touchcontrol = false;
|
||||
},
|
||||
washtouchstart:function(e){
|
||||
// let command ={
|
||||
// code:this.traincode,
|
||||
// operation:"607",
|
||||
// type:"07",
|
||||
// param:""
|
||||
// };
|
||||
// command.param = this.touchstate;
|
||||
// sendSimulationCommand(this.group,command).then(netdata => {
|
||||
// if(netdata.data == true){
|
||||
this.touchcontrol = true;
|
||||
// }
|
||||
// });
|
||||
},
|
||||
washtouchmove:function(e){//finger move 触发
|
||||
if(this.touchcontrol == true){
|
||||
let px=140;
|
||||
let py=510;
|
||||
let angle = this.getAngle(px,py,e.changedTouches[0].clientX,e.changedTouches[0].clientY);
|
||||
// console.log(angle);
|
||||
// this.washtou = "rotate("+(angle+85)+"deg)";
|
||||
if(angle<360 && angle>245){
|
||||
if(angle<295 && angle>245){
|
||||
this.washtou = "rotate(359deg)";
|
||||
}else if(angle<338 && angle>295){
|
||||
this.washtou = "rotate(412deg)";
|
||||
}else if(angle<360 && angle>338){
|
||||
this.washtou = "rotate(90deg)";
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
washtouchend:function(e){
|
||||
this.touchcontrol = false;
|
||||
},
|
||||
doordirecttouchstart:function(e){
|
||||
// let command ={
|
||||
// code:this.traincode,
|
||||
// operation:"607",
|
||||
// type:"07",
|
||||
// param:""
|
||||
// };
|
||||
// command.param = this.touchstate;
|
||||
// sendSimulationCommand(this.group,command).then(netdata => {
|
||||
// if(netdata.data == true){
|
||||
this.touchcontrol = true;
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
let domoffset = document.getElementById("directimgdiv").getBoundingClientRect();
|
||||
// movelimit
|
||||
this.angleoffset.x = domoffset.x;
|
||||
this.angleoffset.y = domoffset.y;
|
||||
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
document.getElementById("directimgdiv").onmousemove = this.doordirecttouchmove;
|
||||
document.getElementById("directimgdiv").onmouseup = this.doordirecttouchup;
|
||||
|
||||
|
||||
},
|
||||
doordirecttouchmove:function(e){//finger move 触发
|
||||
if(this.touchcontrol == true){
|
||||
let px=230;
|
||||
let py=180;
|
||||
let angle = this.getAngle(px,py,e.changedTouches[0].clientX,e.changedTouches[0].clientY);
|
||||
if(angle<338 && angle>219){
|
||||
if(angle<245 && angle>219){
|
||||
this.doordirecttou = "rotate(305deg)";
|
||||
}else if(angle<295 && angle>245){
|
||||
this.doordirecttou = "rotate(359deg)";
|
||||
}else if(angle<338 && angle>295){
|
||||
this.doordirecttou = "rotate(412deg)";
|
||||
}
|
||||
}
|
||||
}
|
||||
// console.log(e);
|
||||
|
||||
this.getAngle(e.pageX-this.angleoffset.x ,e.pageY-this.angleoffset.y);
|
||||
},
|
||||
doordirecttouchend:function(e){
|
||||
this.touchcontrol = false;
|
||||
doordirecttouchup:function(e){
|
||||
document.getElementById("directimgdiv").onmousemove = null;
|
||||
document.getElementById("directimgdiv").onmouseup = null;
|
||||
},
|
||||
doormodetouchstart:function(e){
|
||||
// let command ={
|
||||
// code:this.traincode,
|
||||
// operation:"607",
|
||||
// type:"07",
|
||||
// param:""
|
||||
// };
|
||||
// command.param = this.touchstate;
|
||||
// sendSimulationCommand(this.group,command).then(netdata => {
|
||||
// if(netdata.data == true){
|
||||
this.touchcontrol = true;
|
||||
// }
|
||||
// });
|
||||
},
|
||||
doormodetouchmove:function(e){//finger move 触发
|
||||
if(this.touchcontrol == true){
|
||||
let px=230;
|
||||
let py=280;
|
||||
let angle = this.getAngle(px,py,e.changedTouches[0].clientX,e.changedTouches[0].clientY);
|
||||
if(angle<338 && angle>219){
|
||||
if(angle<245 && angle>219){
|
||||
this.doormodetou = "rotate(305deg)";
|
||||
Vue.prototype.$stomp.send("/app/topic/simulation/drive","AA");
|
||||
}else if(angle<295 && angle>245){
|
||||
this.doormodetou = "rotate(359deg)";
|
||||
Vue.prototype.$stomp.send("/app/topic/simulation/drive","AM");
|
||||
}else if(angle<338 && angle>295){
|
||||
this.doormodetou = "rotate(412deg)";
|
||||
Vue.prototype.$stomp.send("/app/topic/simulation/drive","MM");
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
doormodetouchend:function(e){
|
||||
this.touchcontrol = false;
|
||||
},
|
||||
getAngle:function(px,py,mx,my){
|
||||
|
||||
getAngle:function(mx,my){
|
||||
|
||||
let px=50;
|
||||
let py=50;
|
||||
// let x = Math.abs(px-mx);
|
||||
// let y = Math.abs(py-my);
|
||||
// let z = Math.sqrt(Math.pow(x,2)+Math.pow(y,2));
|
||||
// let cos = y/z;
|
||||
// let radina = Math.acos(cos);//用反三角函数求弧度
|
||||
// let angle = Math.floor(180/(Math.PI/radina));//将弧度转换成角度
|
||||
|
||||
|
||||
//圆心坐标
|
||||
let x = Math.abs(px-mx);
|
||||
let y = Math.abs(py-my);
|
||||
@ -277,26 +284,62 @@
|
||||
angle = 180 - angle;
|
||||
}
|
||||
|
||||
if(mx==px&&my>py){//鼠标在y轴负方向上
|
||||
angle = 180;
|
||||
}
|
||||
// if(mx==px&&my>py){//鼠标在y轴负方向上
|
||||
// angle = 180;
|
||||
// }
|
||||
|
||||
if(mx>px&&my==py){//鼠标在x轴正方向上
|
||||
angle = 90;
|
||||
}
|
||||
// if(mx>px&&my==py){//鼠标在x轴正方向上
|
||||
// angle = 90;
|
||||
// }
|
||||
|
||||
if(mx<px&&my>py){//鼠标在第三象限
|
||||
angle = 180+angle;
|
||||
}
|
||||
|
||||
if(mx<px&&my==py){//鼠标在x轴负方向
|
||||
angle = 270;
|
||||
}
|
||||
//
|
||||
// if(mx<px&&my==py){//鼠标在x轴负方向
|
||||
// angle = 270;
|
||||
// }
|
||||
|
||||
if(mx<px&&my<py){//鼠标在第二象限
|
||||
angle = 360 - angle;
|
||||
}
|
||||
return angle;
|
||||
|
||||
angle = angle + 180;
|
||||
// console.log(angle);
|
||||
if(angle<=356){
|
||||
|
||||
this.doordirecttou = "rotate("+320+"deg)";
|
||||
this.directType = 1;
|
||||
}
|
||||
if(angle>356 && angle<372){
|
||||
this.doordirecttou = "rotate("+360+"deg)";
|
||||
this.directType = 0;
|
||||
}
|
||||
|
||||
if(angle>372 && angle<421){
|
||||
this.doordirecttou = "rotate("+399+"deg)";
|
||||
this.directType = -1;
|
||||
}
|
||||
|
||||
if(angle>421){
|
||||
this.doordirecttou = "rotate("+442+"deg)";
|
||||
this.directType = 2;
|
||||
}
|
||||
if(this.oldDirectType != this.directType){
|
||||
this.oldDirectType = this.directType;
|
||||
let param = {
|
||||
// id:this.groupNum,
|
||||
id:"001",
|
||||
pos:parseInt(this.directType)
|
||||
};
|
||||
const userInfo = store.state.training.simulationUserList.find(el => el.id == store.state.user.id);
|
||||
|
||||
trainSimulationForce(this.group,userInfo.memberId,param,"Train_Drive_Change_Over_Switch").then(res => {
|
||||
// console.log(res);
|
||||
}).catch((error) => {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
@ -304,5 +347,40 @@
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.stalldiv{
|
||||
width: 280px;
|
||||
height: 140px;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
cursor:pointer;
|
||||
}
|
||||
.stallimg{
|
||||
left:0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.nowstallimg{
|
||||
width:50px;
|
||||
height:50px;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.directbutton{
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
cursor:pointer;
|
||||
}
|
||||
|
||||
.rightbuttonbcimg{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top:0;
|
||||
left:0;
|
||||
}
|
||||
</style>
|
||||
|
@ -157,6 +157,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
window.updatemmic1 = this.updatemmic1;
|
||||
window.updateSpeedView = this.updateSpeedView
|
||||
this.init();
|
||||
},
|
||||
beforeDestroy() {
|
||||
@ -218,7 +219,7 @@ export default {
|
||||
}
|
||||
|
||||
//更新车组号
|
||||
this.updateMmiSpeedView(newdata.v,newdata.pv,newdata.tv);
|
||||
this.updateSpeedView(newdata.v,newdata.pv,newdata.tv);
|
||||
|
||||
if(newdata.maLen){
|
||||
|
||||
@ -254,7 +255,7 @@ export default {
|
||||
this.m8image = this.images.m8["none"];
|
||||
}
|
||||
},
|
||||
updateMmiSpeedView(speed,atpspeed,atospeed) {
|
||||
updateSpeedView(speed) {
|
||||
|
||||
// if(this.m9state1 == false){
|
||||
// console.log(this.nowspeed);
|
||||
@ -267,15 +268,7 @@ export default {
|
||||
this.mmimodel.updatezz(0);
|
||||
}
|
||||
|
||||
this.nowatpspeed = 0;
|
||||
if(this.mmimodel.updateatp){
|
||||
this.mmimodel.updateatp(0);
|
||||
}
|
||||
|
||||
this.nowatospeed = 0;
|
||||
if(this.mmimodel.updateato){
|
||||
this.mmimodel.updateato(0);
|
||||
}
|
||||
|
||||
if(this.newa1state != this.a1state){
|
||||
this.a1state = this.newa1state;
|
||||
@ -287,24 +280,6 @@ export default {
|
||||
this.mmimodel.updatezz(speed);
|
||||
}
|
||||
|
||||
this.nowatpspeed = parseInt(atpspeed);
|
||||
if(this.mmimodel.updateatp){
|
||||
this.mmimodel.updateatp(atpspeed);
|
||||
}
|
||||
|
||||
this.nowatospeed = parseInt(atospeed);
|
||||
if(this.mmimodel.updateato){
|
||||
this.mmimodel.updateato(atospeed);
|
||||
}
|
||||
if(this.nowspeed>this.nowatospeed){
|
||||
this.newa1state = "yellow";
|
||||
}else{
|
||||
this.newa1state = "black";
|
||||
}
|
||||
if(this.newa1state != this.a1state){
|
||||
this.a1state = this.newa1state;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -110,7 +110,7 @@
|
||||
<div class="display-draft">
|
||||
<el-button-group class="button-group-box">
|
||||
<template v-if="!dataError">
|
||||
<el-button type="success" :disabled="isDisable" size="small" @click="selectBeginTime">{{ $t('display.demon.drivingByPlan') }}</el-button>
|
||||
<el-button type="success" :disabled="isRunPlan" size="small" @click="selectBeginTime">{{ $t('display.demon.drivingByPlan') }}</el-button>
|
||||
<el-button type="danger" size="small" @click="end">{{ $t('display.demon.initialize') }}</el-button>
|
||||
</template>
|
||||
<el-button type="primary" size="small" @click="back">{{ $t('display.demon.back') }}</el-button>
|
||||
@ -137,7 +137,7 @@ export default {
|
||||
type: Boolean,
|
||||
required: true
|
||||
},
|
||||
isDisable: {
|
||||
isRunPlan: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
}
|
||||
|
@ -2,17 +2,17 @@
|
||||
<div class="main" :style="{width: '100%',height:'100%',position:'absolute',overflow:'hidden'}" style="background: #000;">
|
||||
<ba-si-di
|
||||
ref="baSiDi"
|
||||
:is-disable="isDisable"
|
||||
:is-run-plan="isRunPlan"
|
||||
:data-error="dataError"
|
||||
@handleDialogShow="handleDialogShow"
|
||||
@end="end"
|
||||
@back="back"
|
||||
@selectBeginTime="selectBeginTime"
|
||||
/>
|
||||
<rps-dialog ref="rpsDialog" :train-list="trainList" />
|
||||
<tro-dialog ref="troDialog" :train-list="trainList" :station-list="stationList" />
|
||||
<rps-dialog ref="rpsDialog" :is-run-plan="isRunPlan" :train-list="trainList" />
|
||||
<tro-dialog ref="troDialog" :is-run-plan="isRunPlan" :train-list="trainList" :station-list="stationList" />
|
||||
<car-pack ref="carPack" />
|
||||
<tro-detail ref="troDetail" :train-list="trainList" :station-list="stationList" @goTroDialog="troClick" />
|
||||
<tro-detail ref="troDetail" :is-run-plan="isRunPlan" :train-list="trainList" :station-list="stationList" @goTroDialog="troClick" />
|
||||
<tra-dialog ref="traDialog" />
|
||||
<ttl-dialog ref="ttlDialog" />
|
||||
<tmt-dialog ref="tmtDialog" />
|
||||
@ -98,7 +98,7 @@ export default {
|
||||
projectDevice() {
|
||||
return this.$route.query.projectDevice;
|
||||
},
|
||||
isDisable() {
|
||||
isRunPlan() {
|
||||
return this.$store.state.training.started;
|
||||
}
|
||||
},
|
||||
|
@ -25,6 +25,10 @@ export default {
|
||||
trainList: {
|
||||
type: Array,
|
||||
required: true
|
||||
},
|
||||
isRunPlan: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -71,7 +75,6 @@ export default {
|
||||
doShow() {
|
||||
this.dialogShow = true;
|
||||
if (this.selfJmap) { Vue.prototype.$jlmap = this.selfJmap; }
|
||||
this.$jlmap && this.$jlmap.clearTrainView();
|
||||
this.$store.dispatch('config/resize', { width:this.width, height: this.height });
|
||||
this.$nextTick(function() {
|
||||
this.$refs.mapCanvas.setMap(this.$store.state.map.map);
|
||||
@ -82,6 +85,7 @@ export default {
|
||||
}
|
||||
this.$jlmap.updateShowMode(list, '02');
|
||||
this.$store.dispatch('training/updateMapState', list);
|
||||
!this.isRunPlan && this.$jlmap.clearTrainView();
|
||||
});
|
||||
},
|
||||
destroy() {
|
||||
@ -114,7 +118,7 @@ export default {
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$jlmap && this.$jlmap.clearTrainView();
|
||||
// this.$jlmap && this.$jlmap.clearTrainView();
|
||||
this.selfJmap = Vue.prototype.$jlmap;
|
||||
}
|
||||
}
|
||||
|
@ -34,6 +34,10 @@ export default {
|
||||
trainList: {
|
||||
type: Array,
|
||||
required: true
|
||||
},
|
||||
isRunPlan: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -83,7 +87,6 @@ export default {
|
||||
methods: {
|
||||
doShow() {
|
||||
this.dialogShow = true;
|
||||
this.$jlmap && this.$jlmap.clearTrainView();
|
||||
if (this.selfJmap) { Vue.prototype.$jlmap = this.selfJmap; }
|
||||
this.$store.dispatch('config/resize', { width:this.width, height: this.height });
|
||||
this.$nextTick(function() {
|
||||
@ -95,6 +98,7 @@ export default {
|
||||
}
|
||||
this.$jlmap.updateShowMode(list, '05');
|
||||
this.$store.dispatch('training/updateMapState', list);
|
||||
!this.isRunPlan && this.$jlmap.clearTrainView();
|
||||
});
|
||||
},
|
||||
destroy() {
|
||||
|
@ -39,6 +39,10 @@ export default {
|
||||
trainList: {
|
||||
type: Array,
|
||||
required: true
|
||||
},
|
||||
isRunPlan: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -92,7 +96,6 @@ export default {
|
||||
doShow(deviceCode) {
|
||||
this.dialogShow = true;
|
||||
if (this.selfJmap) { Vue.prototype.$jlmap = this.selfJmap; }
|
||||
this.$jlmap && this.$jlmap.clearTrainView();
|
||||
this.$store.dispatch('config/resize', { width:this.width, height: this.height });
|
||||
this.deviceCode = deviceCode;
|
||||
this.$nextTick(function() {
|
||||
@ -104,6 +107,7 @@ export default {
|
||||
}
|
||||
this.$jlmap.updateShowMode(list, '02');
|
||||
this.$store.dispatch('training/updateMapState', list);
|
||||
!this.isRunPlan && this.$jlmap.clearTrainView();
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
|
@ -10,19 +10,19 @@
|
||||
<el-button v-if="$route.query.lineCode === '15'" size="small" @click="normStudy">规范学习</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<Jl3d-Device
|
||||
<Jl3dRailway-Device
|
||||
v-if="deviceif"
|
||||
v-show="deviceShow"
|
||||
ref="Jl3dDevice"
|
||||
ref="Jl3dRailwayDevice"
|
||||
:panel-show="deviceShow"
|
||||
@closedevice3dview="jumpjlmap3dmodel"
|
||||
@closedevice3dview="jumpjlmap3dmodeFl"
|
||||
/>
|
||||
<Jl3dRailway-Drive v-show="drivingShow" ref="Jl3dRailwayDrive" :panel-show="drivingShow" @showdriving="showdriving" />
|
||||
<draw-select ref="drawSelect" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Jl3dDevice from '@/views/jlmap3d/device/jl3ddevice';
|
||||
import Jl3dRailwayDevice from '@/views/jlmap3d/railwaydevice/jl3drailwaydevice';
|
||||
import Jl3dRailwayDrive from '@/views/jlmap3d/railwaydrive/jl3drailwaydrive';
|
||||
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
@ -33,7 +33,7 @@ import DrawSelect from '@/jmapNew/theme/datie_01/menus/dialog/drawSelect';
|
||||
export default {
|
||||
name:'DemonMenu',
|
||||
components:{
|
||||
Jl3dDevice,
|
||||
Jl3dRailwayDevice,
|
||||
Jl3dRailwayDrive,
|
||||
DrawSelect
|
||||
},
|
||||
|
@ -64,7 +64,9 @@ export default {
|
||||
{ code: 'BLOCKING', name: '阻挡信号机'},
|
||||
{ code: 'PASSING', name: '通过信号机'},
|
||||
{ code: 'TRANSMISSION', name: '传输信号机' },
|
||||
{ code: 'SHUNTING', name: '调车信号机' }
|
||||
{ code: 'SHUNTING', name: '调车信号机' },
|
||||
{ code: 'ARRIVAL', name: '进站信号机' },
|
||||
{ code: 'EXIT', name: '出站信号机' }
|
||||
],
|
||||
field:'',
|
||||
editModel: getModel('Signal'),
|
||||
|
BIN
static/jl3d/railway/direct.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
static/jl3d/railway/lg.png
Normal file
After Width: | Height: | Size: 6.7 KiB |
BIN
static/jl3d/railway/lihe.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
static/jl3d/railway/st.png
Normal file
After Width: | Height: | Size: 152 KiB |
BIN
static/jl3d/railway/st1.png
Normal file
After Width: | Height: | Size: 70 KiB |
BIN
static/jl3d/railway/stall.jpg
Normal file
After Width: | Height: | Size: 34 KiB |
BIN
static/jl3d/railway/stall1.png
Normal file
After Width: | Height: | Size: 6.7 KiB |
BIN
static/jl3d/railway/yuahdfgdfre.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
static/jl3d/railway/yuan.png
Normal file
After Width: | Height: | Size: 221 KiB |
BIN
static/jl3d/railway/yuan11.png
Normal file
After Width: | Height: | Size: 69 KiB |