修改驾驶按钮逻辑,三维cctv增加列车进出站
This commit is contained in:
parent
0b94aad2a9
commit
7562b932fe
@ -76,6 +76,7 @@ export function bindSimulationTrain(group,groupNumber) {
|
||||
params: ''
|
||||
})
|
||||
}
|
||||
//EB紧急制动
|
||||
export function trainSimulationEb(group,groupNumber) {
|
||||
return request({
|
||||
url: `/simulation/driving/${group}/train/${groupNumber}/eb`,
|
||||
@ -83,6 +84,8 @@ export function trainSimulationEb(group,groupNumber) {
|
||||
params: ''
|
||||
})
|
||||
}
|
||||
|
||||
//改变列车牵引/制动力
|
||||
export function trainSimulationForce(group,groupNumber,percent) {
|
||||
return request({
|
||||
url: `/simulation/driving/${group}/train/${groupNumber}/force/${percent}`,
|
||||
@ -90,6 +93,8 @@ export function trainSimulationForce(group,groupNumber,percent) {
|
||||
params: ''
|
||||
})
|
||||
}
|
||||
|
||||
//改变列车档位
|
||||
export function trainSimulationGear(group,groupNumber,gear) {
|
||||
return request({
|
||||
url: `/simulation/driving/${group}/train/${groupNumber}/gear/${gear}`,
|
||||
@ -97,3 +102,30 @@ export function trainSimulationGear(group,groupNumber,gear) {
|
||||
params: ''
|
||||
})
|
||||
}
|
||||
|
||||
//改变列车运行级别
|
||||
export function trainSimulationDriveMode(group,groupNumber,driveMode) {
|
||||
return request({
|
||||
url: `/simulation/driving/${group}/train/${groupNumber}/driveMode/${driveMode}`,
|
||||
method: 'put',
|
||||
params: ''
|
||||
})
|
||||
}
|
||||
//ATP切除
|
||||
//ATO
|
||||
export function trainSimulationAtp(group,groupNumber) {
|
||||
return request({
|
||||
url: `/simulation/driving/${group}/train/${groupNumber}/atp`,
|
||||
method: 'put',
|
||||
params: ''
|
||||
})
|
||||
}
|
||||
|
||||
//ATO
|
||||
export function trainSimulationAto(group,groupNumber) {
|
||||
return request({
|
||||
url: `/simulation/driving/${group}/train/${groupNumber}/openAto`,
|
||||
method: 'put',
|
||||
params: ''
|
||||
})
|
||||
}
|
||||
|
@ -94,6 +94,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
|
||||
// 对象化数据
|
||||
|
||||
let data = JSON.parse(Response.body);
|
||||
|
||||
// 遍历后台数据
|
||||
// console.log(data);
|
||||
if(data.type == "Train_Position"){
|
||||
|
@ -3,14 +3,14 @@ import { getBaseUrl } from '@/utils/baseUrl'
|
||||
import { getToken } from '@/utils/auth';
|
||||
|
||||
// 定于仿真socket接口
|
||||
export function PassflowConnect(nowstation,deviceaction,lefttrain,righttrain,routegroup) {
|
||||
export function PassflowConnect(nowstation,deviceaction,toptrain,downtrain,routegroup) {
|
||||
const scope = this;
|
||||
|
||||
this.controlstation = nowstation;
|
||||
this.teststomp = new StompClient();
|
||||
|
||||
let trainleftnow = null;
|
||||
let trainrightnow = null;
|
||||
let traintopnow = null;
|
||||
let traindownnow = null;
|
||||
let topic = '/user/queue/simulation/jl3d/'+routegroup;
|
||||
let header = {'X-Token': getToken() };
|
||||
|
||||
@ -37,19 +37,7 @@ export function PassflowConnect(nowstation,deviceaction,lefttrain,righttrain,rou
|
||||
if(data.body.type == "PSD"){
|
||||
if(data.body.code == nowstation.toppsd){
|
||||
if(data.body.open == 0){
|
||||
deviceaction.down.action.reset();
|
||||
deviceaction.down.action.time = deviceaction.down.action._clip.duration;
|
||||
deviceaction.down.action.timeScale = -1;
|
||||
deviceaction.down.action.play();
|
||||
}else{
|
||||
deviceaction.down.action.reset();
|
||||
deviceaction.down.action.time = 0;
|
||||
deviceaction.down.action.timeScale = 1;
|
||||
deviceaction.down.action.play();
|
||||
}
|
||||
}
|
||||
if(data.body.code == nowstation.downpsd){
|
||||
if(data.body.open == 0){
|
||||
|
||||
deviceaction.top.action.reset();
|
||||
deviceaction.top.action.time =deviceaction.top.action._clip.duration;
|
||||
deviceaction.top.action.timeScale = -1;
|
||||
@ -61,25 +49,133 @@ export function PassflowConnect(nowstation,deviceaction,lefttrain,righttrain,rou
|
||||
deviceaction.top.action.play();
|
||||
}
|
||||
}
|
||||
if(data.body.code == nowstation.downpsd){
|
||||
if(data.body.open == 0){
|
||||
deviceaction.down.action.reset();
|
||||
deviceaction.down.action.time = deviceaction.down.action._clip.duration;
|
||||
deviceaction.down.action.timeScale = -1;
|
||||
deviceaction.down.action.play();
|
||||
}else{
|
||||
deviceaction.down.action.reset();
|
||||
deviceaction.down.action.time = 0;
|
||||
deviceaction.down.action.timeScale = 1;
|
||||
deviceaction.down.action.play();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if(data.body.type == "TRAIN_DOOR"){
|
||||
if(traintopnow == data.body.code){
|
||||
|
||||
if(data.body.open == "0"){
|
||||
closetraindoor(toptrain,data.body.doorCode,"top");
|
||||
|
||||
}else{
|
||||
opentraindoor(toptrain,data.body.doorCode,"top");
|
||||
}
|
||||
}
|
||||
if(traindownnow == data.body.code){
|
||||
// console.log(data.body);
|
||||
if(data.body.open == "0"){
|
||||
closetraindoor(downtrain,data.body.doorCode,"down");
|
||||
|
||||
}else{
|
||||
opentraindoor(downtrain,data.body.doorCode,"down");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(data.type == "TrainRun_3D"){
|
||||
console.log(data.body);
|
||||
console.log(nowstation);
|
||||
|
||||
for(let i=0,leni = data.body.length;i<leni;i++){
|
||||
if(data.body[i].section == scope.controlstation.topsection){
|
||||
console.log("top:"+data.body[i].offset);
|
||||
if(traintopnow != data.body[i].code){
|
||||
traintopnow = data.body[i].code;
|
||||
}
|
||||
toptrain.position.copy(toptrain.curve.getPointAt(data.body[i].offset));
|
||||
|
||||
// toptrain.position
|
||||
// if(){
|
||||
//
|
||||
// }
|
||||
}else{
|
||||
if(traindownnow == data.body[i].code){
|
||||
toptrain.position.x -= 1;
|
||||
}
|
||||
}
|
||||
if(data.body[i].section == scope.controlstation.downsection){
|
||||
|
||||
if(data.body[i].section == scope.controlstation.downsection){
|
||||
console.log("down:"+data.body[i].offset);
|
||||
if(traindownnow != data.body[i].code){
|
||||
traindownnow = data.body[i].code;
|
||||
}
|
||||
|
||||
downtrain.position.copy(downtrain.curve.getPointAt(data.body[i].offset));
|
||||
|
||||
}else{
|
||||
if(traindownnow == data.body[i].code){
|
||||
downtrain.position.x += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// console.log(data);
|
||||
}
|
||||
let actions;
|
||||
|
||||
function opentraindoor(train,doorcode,direct){
|
||||
if(direct == "top"){
|
||||
if(doorcode == "1"){
|
||||
actions = train.action.down;
|
||||
}
|
||||
|
||||
if(doorcode == "2"){
|
||||
actions = train.action.top;
|
||||
}
|
||||
}else{
|
||||
if(doorcode == "1"){
|
||||
actions = train.action.top;
|
||||
}
|
||||
|
||||
if(doorcode == "2"){
|
||||
actions = train.action.down;
|
||||
}
|
||||
}
|
||||
|
||||
for(let an=actions.length-1;an>=0;an--){
|
||||
actions[an].reset();
|
||||
actions[an].time = 0;
|
||||
actions[an].timeScale = 1;
|
||||
actions[an].play();
|
||||
}
|
||||
}
|
||||
function closetraindoor(train,doorcode,direct){
|
||||
if(direct == "top"){
|
||||
if(doorcode == "1"){
|
||||
actions = train.action.down;
|
||||
}
|
||||
|
||||
if(doorcode == "2"){
|
||||
actions = train.action.top;
|
||||
}
|
||||
}else{
|
||||
if(doorcode == "1"){
|
||||
actions = train.action.top;
|
||||
}
|
||||
|
||||
if(doorcode == "2"){
|
||||
actions = train.action.down;
|
||||
}
|
||||
}
|
||||
|
||||
for(let an=actions.length-1;an>=0;an--){
|
||||
actions[an].reset();
|
||||
actions[an].time = actions[an]._clip.duration;
|
||||
actions[an].timeScale = -1;
|
||||
actions[an].play();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -41,8 +41,8 @@ let originhuman1 = null;
|
||||
let originhuman2 = null;
|
||||
let originanima1 = null;
|
||||
let originanima2 = null;
|
||||
let lefttrain = null;
|
||||
let righttrain = null;
|
||||
let toptrain = null;
|
||||
let downtrain = null;
|
||||
let zhajiin = [];
|
||||
let zhajiout = [];
|
||||
|
||||
@ -395,9 +395,9 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
|
||||
|
||||
|
||||
getPublishMapDetail(skinCode).then(netdata => {
|
||||
console.log(netdata);
|
||||
// console.log(netdata);
|
||||
initstationlist(netdata.data.stationList,netdata.data.stationStandList,netdata.data.psdList);
|
||||
socktest = new PassflowConnect(nowstation,deviceaction,lefttrain,righttrain,routegroup);
|
||||
socktest = new PassflowConnect(nowstation,deviceaction,toptrain,downtrain,routegroup);
|
||||
});
|
||||
|
||||
animate();
|
||||
@ -815,7 +815,7 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
|
||||
// console.log(humanlist.children.length);
|
||||
}
|
||||
function initstationlist(stationdata,standdata,psddata){
|
||||
|
||||
// console.log(standdata);
|
||||
let list = [];
|
||||
for(let i=0,leni = standdata.length;i<leni;i++){
|
||||
for(let j=0,lenj = psddata.length;j<lenj;j++){
|
||||
@ -846,7 +846,7 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
|
||||
topsection:null,
|
||||
downsection:null,
|
||||
};
|
||||
if(list[k][0].position.y>list[k][1].position.y){
|
||||
if(list[k][0].position.y<list[k][1].position.y){
|
||||
stationobject.toppsd = list[k][0].name;
|
||||
stationobject.downpsd = list[k][1].name;
|
||||
stationobject.topsection = list[k][0].standTrackCode;
|
||||
@ -864,7 +864,7 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
|
||||
|
||||
nowstation = stationlist[0];
|
||||
updatestationlist(stationlist);
|
||||
console.log(nowstation);
|
||||
// console.log(nowstation);
|
||||
}
|
||||
function inittrain(object){
|
||||
let ntracks1,ntracks2,tclip,fclip;
|
||||
@ -879,23 +879,40 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
|
||||
|
||||
|
||||
|
||||
lefttrain = object.clone(true);
|
||||
lefttrain.action = {
|
||||
toptrain = object.clone(true);
|
||||
toptrain.action = {
|
||||
top:[],
|
||||
down:[]
|
||||
};
|
||||
let points1 = [];
|
||||
points1.push(new THREE.Vector3(-71,0.06,-6.3));
|
||||
points1.push(new THREE.Vector3(60.73,0.06,-6.3));
|
||||
|
||||
righttrain = object.clone(true);
|
||||
righttrain.action = {
|
||||
|
||||
toptrain.curve = new THREE.CatmullRomCurve3(points1);
|
||||
|
||||
downtrain = object.clone(true);
|
||||
downtrain.action = {
|
||||
top:[],
|
||||
down:[]
|
||||
};
|
||||
inittrainanimation(lefttrain,tclip,fclip);
|
||||
inittrainanimation(righttrain,tclip,fclip);
|
||||
lefttrain.position.z = 30;
|
||||
righttrain.position.z = -10;
|
||||
// scene.add(lefttrain);
|
||||
// scene.add(righttrain);
|
||||
let points2 = [];
|
||||
points2.push(new THREE.Vector3(-71,0.06,28.68));
|
||||
points2.push(new THREE.Vector3(60.73,0.06,28.68));
|
||||
downtrain.curve = new THREE.CatmullRomCurve3(points2);
|
||||
|
||||
|
||||
inittrainanimation(toptrain,tclip,fclip);
|
||||
inittrainanimation(downtrain,tclip,fclip);
|
||||
|
||||
|
||||
toptrain.position.z = -20;
|
||||
toptrain.position.y = -20000;
|
||||
toptrain.rotation.y = Math.PI;
|
||||
downtrain.position.z = 40;
|
||||
downtrain.position.y = -20000;
|
||||
scene.add(toptrain);
|
||||
scene.add(downtrain);
|
||||
}
|
||||
|
||||
function inittrainanimation(train,tclip,fclip){
|
||||
@ -960,6 +977,11 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
|
||||
for(let j=0;j<object.children.length;j++){
|
||||
|
||||
if(object.children[j].name == "top"){
|
||||
// var geometry = new THREE.BoxBufferGeometry( 50, 50, 50 );
|
||||
// var material = new THREE.MeshBasicMaterial( {color: 0x00ff00} );
|
||||
// var cube = new THREE.Mesh( geometry, material );
|
||||
// cube.position.copy(object.children[j].position);
|
||||
// scene.add( cube );
|
||||
object.children[j].animations = [];
|
||||
object.children[j].animations.push(newclip.clone());
|
||||
|
||||
|
@ -57,6 +57,30 @@ let standtop = {
|
||||
type : "stand",
|
||||
stage : "3",
|
||||
randompoint : new THREE.Vector3(-64,1.77,0.38),
|
||||
doorpoints:[
|
||||
new THREE.Vector3(-62.84,1.77,-4.38),
|
||||
new THREE.Vector3(-58.11,1.77,-4.38),
|
||||
new THREE.Vector3(-53.47,1.77,-4.38),
|
||||
new THREE.Vector3(-45.45,1.77,-4.38),
|
||||
new THREE.Vector3(-41.1,1.77,-4.38),
|
||||
new THREE.Vector3(-36.33,1.77,-4.38),
|
||||
new THREE.Vector3(-31.5,1.77,-4.38),
|
||||
new THREE.Vector3(-23.65,1.77,-4.38),
|
||||
new THREE.Vector3(-18.98,1.77,-4.38),
|
||||
new THREE.Vector3(-14.46,1.77,-4.38),
|
||||
new THREE.Vector3(-10,1.77,-4.38),
|
||||
new THREE.Vector3(-2.2,1.77,-4.38),
|
||||
new THREE.Vector3(2.49,1.77,-4.38),
|
||||
new THREE.Vector3(7.17,1.77,-4.38),
|
||||
new THREE.Vector3(11.8,1.77,-4.38),
|
||||
new THREE.Vector3(19.41,1.77,-4.38),
|
||||
new THREE.Vector3(24.09,1.77,-4.38),
|
||||
new THREE.Vector3(28.72,1.77,-4.38),
|
||||
new THREE.Vector3(33.46,1.77,-4.38),
|
||||
new THREE.Vector3(41.24,1.77,-4.38),
|
||||
new THREE.Vector3(45.82,1.77,-4.38),
|
||||
new THREE.Vector3(50.69,1.77,-4.38)
|
||||
],
|
||||
railpoints : [
|
||||
new THREE.Vector3(52.1,1.77,-1.8),
|
||||
new THREE.Vector3(-63.5,1.77,-1.8)
|
||||
@ -69,6 +93,30 @@ let standdown = {
|
||||
type : "stand",
|
||||
stage : "3",
|
||||
randompoint : new THREE.Vector3(-64,1.77,21),
|
||||
doorpoints:[
|
||||
new THREE.Vector3(-62.84,1.77,27),
|
||||
new THREE.Vector3(-58.11,1.77,27),
|
||||
new THREE.Vector3(-53.47,1.77,27),
|
||||
new THREE.Vector3(-45.45,1.77,27),
|
||||
new THREE.Vector3(-41.1,1.77,27),
|
||||
new THREE.Vector3(-36.33,1.77,27),
|
||||
new THREE.Vector3(-31.5,1.77,27),
|
||||
new THREE.Vector3(-23.65,1.77,27),
|
||||
new THREE.Vector3(-18.98,1.77,27),
|
||||
new THREE.Vector3(-14.46,1.77,27),
|
||||
new THREE.Vector3(-10,1.77,27),
|
||||
new THREE.Vector3(-2.2,1.77,27),
|
||||
new THREE.Vector3(2.49,1.77,27),
|
||||
new THREE.Vector3(7.17,1.77,27),
|
||||
new THREE.Vector3(11.8,1.77,27),
|
||||
new THREE.Vector3(19.41,1.77,27),
|
||||
new THREE.Vector3(24.09,1.77,27),
|
||||
new THREE.Vector3(28.72,1.77,27),
|
||||
new THREE.Vector3(33.46,1.77,27),
|
||||
new THREE.Vector3(41.24,1.77,27),
|
||||
new THREE.Vector3(45.82,1.77,27),
|
||||
new THREE.Vector3(50.69,1.77,27)
|
||||
],
|
||||
railpoints : [
|
||||
new THREE.Vector3(52.1,1.77,24),
|
||||
new THREE.Vector3(-64,1.77,24)
|
||||
|
@ -2,9 +2,9 @@ export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// BASE_API = 'https://joylink.club/jlcloud';
|
||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||
BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
|
@ -214,18 +214,18 @@
|
||||
this.moveheight=159;
|
||||
this.movex=153+"px";
|
||||
}
|
||||
if(this.moveheight>85&&this.moveheight<76){
|
||||
this.movex=73+"px";
|
||||
if(this.moveheight<82&&this.moveheight>73){
|
||||
this.movex=75+"px";
|
||||
this.move = 0;
|
||||
}else if(this.moveheight<0&&this.moveheight>159){
|
||||
|
||||
}else{
|
||||
|
||||
if(this.moveheight>=85){
|
||||
this.move = -(this.moveheight-85)/65;
|
||||
if(this.moveheight>=82){
|
||||
this.move = -(this.moveheight-82)/65;
|
||||
}
|
||||
if(this.moveheight<=75){
|
||||
this.move = (75 - this.moveheight)/75;
|
||||
if(this.moveheight<=73){
|
||||
this.move = (73 - this.moveheight)/75;
|
||||
}
|
||||
this.movex=this.moveheight-7+"px";
|
||||
if(this.moveheight>=145){
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
<!-- <Right-Pane ref="rightcontrol" /> -->
|
||||
|
||||
<TopRight-Pane ref="topcontrol" />
|
||||
<TopRight-Pane ref="topcontrol" :group-num="groupnum" />
|
||||
|
||||
|
||||
|
||||
@ -118,9 +118,12 @@ import axios from 'axios';
|
||||
// this.groupnum = selVal;
|
||||
for(let i=0;i<this.trainlist.length;i++){
|
||||
if(this.trainlist[i].groupNumber == this.groupnum){
|
||||
// console.log(this.trainlist[i].gear);
|
||||
// this.groupnum
|
||||
this.$refs.centercontrol.centerstate(this.trainlist[i].gear);
|
||||
}
|
||||
}
|
||||
|
||||
this.nowdrive = this.groupnum;
|
||||
}).catch(error => {
|
||||
this.groupnum = oldgroupnum;
|
||||
@ -152,6 +155,7 @@ import axios from 'axios';
|
||||
option.disabled = false;
|
||||
if(netdata.data[i].name){
|
||||
option.label = netdata.data[i].name+"正在驾驶"+netdata.data[i].groupNumber;
|
||||
this.groupNumber = netdata.data[i].groupNumber;
|
||||
option.disabled = true;
|
||||
}
|
||||
if(netdata.data[i].driverId){
|
||||
|
@ -1,42 +1,42 @@
|
||||
<template>
|
||||
<div style="width:100%;height:48%;position:absolute;top:0px;">
|
||||
<!-- ATB启动 -->
|
||||
<div id="atb" class="panebutton" style="top:8%;left:3%;" @tap="atbclick">
|
||||
<!-- <div id="atb" class="panebutton" style="top:8%;left:3%;" @click="atbclick">
|
||||
<img class="buttonimg" :src="greenimg" />
|
||||
<div class="buttontext">{{ $t('jlmap3d.ATBStart') }}</div>
|
||||
</div>
|
||||
<!-- BM/CBTC -->
|
||||
<div id="bmcbtc" class="panebutton" style="top:8%;left:17%;" @tap="bmcbtcclick">
|
||||
<img class="buttonimg" :src="greenimg" />
|
||||
<div id="bmcbtc" class="panebutton" style="top:8%;left:17%;" @click="bmcbtcclick">
|
||||
<img class="buttonimg" :src="cbtcbuttonimg" />
|
||||
<div class="buttontext">BM/CBTC</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- RM -->
|
||||
<div id="rm" class="panebutton" style="top:8%;left:31%;" @tap="rmclick">
|
||||
<img class="buttonimg" :src="greenimg" />
|
||||
<div id="rm" class="panebutton" style="top:8%;left:31%;" @click="rmclick">
|
||||
<img class="buttonimg" :src="rmbuttonimg" />
|
||||
<div class="buttontext">RM</div>
|
||||
</div>
|
||||
<!-- 关左门 -->
|
||||
<div id="dlclose" class="panebutton" style="top:8%;left:45%;" @tap="dlcclick">
|
||||
<div id="dlclose" class="panebutton" style="top:8%;left:45%;" @click="dlcclick">
|
||||
<img class="buttonimg" :src="greenimg" />
|
||||
<div class="buttontext">{{ $t('jlmap3d.closeLeftDoor') }}</div>
|
||||
</div>
|
||||
<!-- 开左门A -->
|
||||
<div id="dlopen" class="panebutton" style="top:8%;left:59%;" @tap="dloclick">
|
||||
<div id="dlopen" class="panebutton" style="top:8%;left:59%;" @click="dloclick">
|
||||
<img class="buttonimg" :src="redimg" />
|
||||
<div class="buttontext">{{ $t('jlmap3d.openLeftDoor') }}</div>
|
||||
</div>
|
||||
<!-- ATO启动A -->
|
||||
<div id="atoa" class="panebutton" style="top:8%;left:73%;" @tap="atoaclick">
|
||||
<img class="buttonimg" :src="apoimg" />
|
||||
<div id="atoa" class="panebutton" style="top:8%;left:73%;" @click="atoaclick">
|
||||
<img class="buttonimg" :src="atobuttonimg" />
|
||||
<div class="buttontext">{{ $t('jlmap3d.ATOStart') }}</div>
|
||||
</div>
|
||||
<!-- cbtc -->
|
||||
<div id="cbtc" class="panebutton" style="top:8%;left:87%;" @tap="cbtcclick">
|
||||
<img class="buttonimg" :src="greenimg" />
|
||||
<!-- <div id="cbtc" class="panebutton" style="top:8%;left:87%;" @click="cbtcclick">
|
||||
<img class="buttonimg" :src="cbtcbuttonimg" />
|
||||
<div class="buttontext">CBTC</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- 电笛按钮 -->
|
||||
<!-- <div id="elflute" class="panebutton" style="bottom:3%;left:84%;" @tap="elfluteclick">
|
||||
<!-- <div id="elflute" class="panebutton" style="bottom:3%;left:84%;" @click="elfluteclick">
|
||||
<img class="buttonimg" :src="grayimg" />
|
||||
<div class="buttontext">{{ $t('jlmap3d.electricHornButton') }}</div>
|
||||
</div> -->
|
||||
@ -75,22 +75,22 @@
|
||||
</div> -->
|
||||
|
||||
<!-- 受电弓升 -->
|
||||
<!-- <div id="sg" class="panebutton" style="bottom:6%;left:3%;" @tap="sgclink">
|
||||
<!-- <div id="sg" class="panebutton" style="bottom:6%;left:3%;" @click="sgclink">
|
||||
<img class="buttonimg" :src="sgimg" />
|
||||
<div class="buttontext">{{ $t('jlmap3d.electricGongSheng') }}</div>
|
||||
</div> -->
|
||||
<!-- 受电弓降 -->
|
||||
<!-- <div id="jg" class="panebutton" style="bottom:6%;left:17%;" @tap="jgclick">
|
||||
<!-- <div id="jg" class="panebutton" style="bottom:6%;left:17%;" @click="jgclick">
|
||||
<img class="buttonimg" :src="jgimg" />
|
||||
<div class="buttontext">{{ $t('jlmap3d.pantographFall') }}</div>
|
||||
</div> -->
|
||||
<!-- 试灯按钮 -->
|
||||
<!-- <div id="sl" class="panebutton" style="bottom:6%;left:40%;" @tap="slclick">
|
||||
<!-- <div id="sl" class="panebutton" style="bottom:6%;left:40%;" @click="slclick">
|
||||
<img class="buttonimg" :src="slimg" />
|
||||
<div class="buttontext">{{ $t('jlmap3d.lampButton') }}</div>
|
||||
</div> -->
|
||||
<!-- ATP切除 -->
|
||||
<div id="atp" class="panebutton" style="bottom:6%;left:31%;" @tap="atpclick">
|
||||
<div id="atp" class="panebutton" style="bottom:6%;left:31%;" @click="atpclick">
|
||||
<img class="buttonimg" :src="atpimg" />
|
||||
<div class="buttontext">{{ $t('jlmap3d.removalATP') }}</div>
|
||||
</div>
|
||||
@ -103,11 +103,11 @@
|
||||
<div class="tfbutton" style="top:25px;left:50px;">{{ $t('jlmap3d.remission') }}</div>
|
||||
<div class="buttontext2">{{ $t('jlmap3d.parkingBrakeMode') }}</div>
|
||||
</div> -->
|
||||
<div id="dropen" class="panebutton" style="bottom:6%;left:45%;" @tap="droclick">
|
||||
<div id="dropen" class="panebutton" style="bottom:6%;left:45%;" @click="droclick">
|
||||
<img class="buttonimg" :src="redlimg" />
|
||||
<div class="buttontext">{{ $t('jlmap3d.openRightDoor') }}</div>
|
||||
</div>
|
||||
<div id="drclose" class="panebutton" style="bottom:6%;left:59%;" @tap="drcclick">
|
||||
<div id="drclose" class="panebutton" style="bottom:6%;left:59%;" @click="drcclick">
|
||||
<img class="buttonimg" :src="greenimg" />
|
||||
<div class="buttontext">{{ $t('jlmap3d.closeRightDoor') }}</div>
|
||||
</div>
|
||||
@ -132,6 +132,7 @@
|
||||
<script>
|
||||
import Vue from 'vue';
|
||||
// import { sendSimulationCommand } from '@/api/simulation.js';
|
||||
import { trainSimulationDriveMode, trainSimulationAto ,trainSimulationAtp } from '@/jlmap3d/jl3ddrive/drivecontrol/simulation.js';
|
||||
|
||||
export default {
|
||||
name: 'TopRightPane',
|
||||
@ -169,24 +170,29 @@
|
||||
sivtf:"rotate(0deg)",
|
||||
driverlighttf:"rotate(0deg)",
|
||||
headlighttf:"rotate(0deg)",
|
||||
|
||||
atobuttonimg:"/static/jl3d/control/green.png",
|
||||
rmbuttonimg:"/static/jl3d/control/green.png",
|
||||
cbtcbuttonimg:"/static/jl3d/control/green.png",
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
},
|
||||
props: {
|
||||
groupNum: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
group() {
|
||||
return this.$store.state.app.group;
|
||||
return this.$route.query.group;
|
||||
},
|
||||
code() {
|
||||
return this.$store.state.app.code;
|
||||
},
|
||||
traincode() {
|
||||
return this.$store.state.app.driverTrain;
|
||||
}
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
window.updatabuttonlight = this.updatabuttonlight;
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
||||
@ -329,16 +335,23 @@
|
||||
},
|
||||
atpclick: function (e){
|
||||
//console.log("atp");
|
||||
trainSimulationAtp(this.group,this.groupNum).then(netdata => {
|
||||
console.log(netdata);
|
||||
});
|
||||
},
|
||||
|
||||
atbclick: function (e){
|
||||
|
||||
},
|
||||
bmcbtcclick: function (e){
|
||||
|
||||
trainSimulationDriveMode(this.group,this.groupNum,"CM").then(netdata => {
|
||||
console.log(netdata);
|
||||
});
|
||||
},
|
||||
rmclick: function (e){
|
||||
|
||||
trainSimulationDriveMode(this.group,this.groupNum,"RM").then(netdata => {
|
||||
console.log(netdata);
|
||||
});
|
||||
},
|
||||
dlcclick: function (e){
|
||||
|
||||
@ -347,7 +360,9 @@
|
||||
|
||||
},
|
||||
atoaclick: function (e){
|
||||
|
||||
trainSimulationAto(this.group,this.groupNum).then(netdata => {
|
||||
console.log(netdata);
|
||||
});
|
||||
},
|
||||
cbtcclick: function (e){
|
||||
|
||||
@ -358,6 +373,27 @@
|
||||
drcclick: function (e){
|
||||
|
||||
},
|
||||
updatabuttonlight: function (data){
|
||||
// console.log(data);
|
||||
if(data.runLevel == "CBTC"){
|
||||
this.cbtcbuttonimg = this.greenlimg;
|
||||
}else{
|
||||
this.cbtcbuttonimg = this.greenimg;
|
||||
}
|
||||
|
||||
if(data.driveMode == "RM"){
|
||||
this.rmbuttonimg = this.greenlimg;
|
||||
}else{
|
||||
this.rmbuttonimg = this.greenimg;
|
||||
}
|
||||
|
||||
if(data.atoOn){
|
||||
this.atobuttonimg = this.greenlimg;
|
||||
}else{
|
||||
this.atobuttonimg = this.greenimg;
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
@ -265,6 +265,7 @@ export default {
|
||||
updatestatus(newdata){
|
||||
this.trainnum = newdata.groupNumber;
|
||||
this.$refs.mmiui.updatetrainstatus(newdata);
|
||||
updatabuttonlight(newdata);
|
||||
},
|
||||
warningmsg(nowmsg){
|
||||
this.controlmsg = nowmsg;
|
||||
|
@ -202,6 +202,7 @@ export default {
|
||||
},
|
||||
updatetrainstatus(newdata){
|
||||
//更新车组号
|
||||
// console.log(newdata);
|
||||
this.updatespeed(newdata.v);
|
||||
|
||||
this.updateatpspeed(newdata.pv);
|
||||
@ -215,6 +216,8 @@ export default {
|
||||
this.updatedrivemode(newdata.driveMode);
|
||||
|
||||
this.updatestation(newdata.endStation,newdata.nextStation);
|
||||
|
||||
this.updateatoatp(newdata.atoOn,newdata.atpOn);
|
||||
},
|
||||
updatemmistate(aaa){
|
||||
|
||||
@ -239,7 +242,7 @@ export default {
|
||||
}
|
||||
},
|
||||
updatedrivedata(drivedata){
|
||||
console.log(drivedata);
|
||||
// console.log(drivedata);
|
||||
if(drivedata == "breaker"){
|
||||
|
||||
}
|
||||
@ -308,34 +311,68 @@ export default {
|
||||
}
|
||||
},
|
||||
updatarunlevel(drivedata){
|
||||
if(drivedata == "cbtc"){
|
||||
if(this.m2state == "start"){
|
||||
this.m2state = 'il';
|
||||
this.m2image = this.images.m2[this.m2state];
|
||||
}else if(this.m2state == "il"){
|
||||
this.m2state = 'itc';
|
||||
this.m2image = this.images.m2[this.m2state];
|
||||
}else if(this.m2state == "itc"){
|
||||
this.m2state = 'cbtc';
|
||||
this.m2image = this.images.m2[this.m2state];
|
||||
}else if(this.m2state == "cbtc"){
|
||||
this.m2state = 'start';
|
||||
this.m2image = this.images.m2[this.m2state];
|
||||
}
|
||||
if(drivedata == "CBTC"){
|
||||
this.m2state = 'cbtc';
|
||||
this.m2image = this.images.m2[this.m2state];
|
||||
// if(this.m2state == "start"){
|
||||
// this.m2state = 'il';
|
||||
// this.m2image = this.images.m2[this.m2state];
|
||||
// }else if(this.m2state == "il"){
|
||||
// this.m2state = 'itc';
|
||||
// this.m2image = this.images.m2[this.m2state];
|
||||
// }else if(this.m2state == "itc"){
|
||||
|
||||
// }else if(this.m2state == "cbtc"){
|
||||
// this.m2state = 'start';
|
||||
// this.m2image = this.images.m2[this.m2state];
|
||||
// }
|
||||
}else if(drivedata == "IL"){
|
||||
this.m2state = 'il';
|
||||
this.m2image = this.images.m2[this.m2state];
|
||||
}else{
|
||||
this.m2state = 'start';
|
||||
this.m2image = this.images.m2[this.m2state];
|
||||
}
|
||||
},
|
||||
updatedrivemode(drivedata){
|
||||
if(drivedata == "AA"){
|
||||
this.m7state = 'aoac';
|
||||
this.m7image = this.images.m7[this.m7state];
|
||||
if(drivedata == "CM"){
|
||||
this.m1state = 'cm';
|
||||
this.m1image = this.images.m1[this.m1state];
|
||||
}else if(drivedata == "RM"){
|
||||
this.m1state = 'rm';
|
||||
this.m1image = this.images.m1[this.m1state];
|
||||
}else if(drivedata == "AM"){
|
||||
this.m1state = 'am';
|
||||
this.m1image = this.images.m1[this.m1state];
|
||||
}else{
|
||||
this.m1state = 'start';
|
||||
this.m1image = this.images.m1[this.m1state];
|
||||
}
|
||||
if(drivedata == "AM"){
|
||||
this.m7state = 'aomc';
|
||||
this.m7image = this.images.m7[this.m7state];
|
||||
|
||||
// if(this.m1state == "start"){
|
||||
// this.m1state = 'rm';
|
||||
// this.m1image = this.images.m1[this.m1state];
|
||||
// }else if(this.m1state == "rm"){
|
||||
// this.m1state = 'am';
|
||||
// this.m1image = this.images.m1[this.m1state];
|
||||
// }else if(this.m1state == "am"){
|
||||
// this.m1state = 'cm';
|
||||
// this.m1image = this.images.m1[this.m1state];
|
||||
// }else if(this.m1state == "cm"){
|
||||
// this.m1state = 'start';
|
||||
// this.m1image = this.images.m1[this.m1state];
|
||||
// }
|
||||
|
||||
|
||||
},
|
||||
updateatoatp(atoon,atpon){
|
||||
if(!atoon){
|
||||
this.m9state = "ato";
|
||||
this.m9image = this.images.m9["ato"];
|
||||
}
|
||||
if(drivedata == "MM"){
|
||||
this.m7state = 'momc';
|
||||
this.m7image = this.images.m7[this.m7state];
|
||||
if(!atpon){
|
||||
this.m9state = "atp";
|
||||
this.m9image = this.images.m9["atp"];
|
||||
}
|
||||
},
|
||||
updatelen(len) {
|
||||
|
@ -85,7 +85,7 @@ export default {
|
||||
}
|
||||
},
|
||||
updatestationlist(list){
|
||||
console.log(list);
|
||||
// console.log(list);
|
||||
this.value = list[0].name
|
||||
this.stationlist = list;
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user