修改三维驾驶消息加边框,按钮和后端同步,ato亮灯规则修改

This commit is contained in:
sunzhenyu 2021-09-26 11:21:00 +08:00
parent 7b5f4de1bd
commit bf8631c521
4 changed files with 52 additions and 32 deletions

View File

@ -138,27 +138,26 @@
}
},
mounted() {
window.jl3dUpdateDriveCenterUi = this.jl3dUpdateDriveCenterUi;
},
beforeDestroy() {
},
methods: {
centerstate : function(gear){
this.touchstate = gear;
console.log(gear);
if(this.touchstate == "ATO"){
this.toutransform = "rotate(30deg)";
}else if(this.touchstate == "MANUAL"){
this.toutransform = "rotate(360deg)";
}else if(this.touchstate == "WASH"){
this.toutransform = "rotate(330deg)";
}else if(this.touchstate == "DISCONNECT"){
this.toutransform = "rotate(300deg)";
}else if(this.touchstate == "REVERSE"){
this.toutransform = "rotate(270deg)";
}
},
// centerstate : function(gear){
// this.touchstate = gear;
// if(this.touchstate == "ATO"){
// this.toutransform = "rotate(30deg)";
// }else if(this.touchstate == "MANUAL"){
// this.toutransform = "rotate(360deg)";
// }else if(this.touchstate == "WASH"){
// this.toutransform = "rotate(330deg)";
// }else if(this.touchstate == "DISCONNECT"){
// this.toutransform = "rotate(300deg)";
// }else if(this.touchstate == "REVERSE"){
// this.toutransform = "rotate(270deg)";
// }
// },
centercontrol : function(){
},
@ -269,6 +268,20 @@
this.iconrotate=0;
}
},
jl3dUpdateDriveCenterUi:function(gear){
this.touchstate = gear;
if(this.touchstate == "ATO"){
this.toutransform = "rotate(30deg)";
}else if(this.touchstate == "MANUAL"){
this.toutransform = "rotate(360deg)";
}else if(this.touchstate == "WASH"){
this.toutransform = "rotate(330deg)";
}else if(this.touchstate == "DISCONNECT"){
this.toutransform = "rotate(300deg)";
}else if(this.touchstate == "REVERSE"){
this.toutransform = "rotate(270deg)";
}
},
directSelect:function(type){
let data = {
groupNumber:this.groupNum,
@ -276,28 +289,22 @@
};
let directAngle = "";
if(type == "0"){
directAngle = "rotate(270deg)";
data.gear = "REVERSE";
}
if(type == "1"){
directAngle = "rotate(300deg)";
data.gear = "DISCONNECT";
}
if(type == "2"){
directAngle = "rotate(330deg)";
data.gear = "WASH";
}
if(type == "3"){
directAngle = "rotate(360deg)";
data.gear = "MANUAL";
}
if(type == "4"){
directAngle = "rotate(30deg)";
data.gear = "ATO";
}
trainSimulationGear(this.group,data).then(netdata => {
if(netdata.code == "200"){
this.toutransform = directAngle;
this.touchstate = data.gear;
}

View File

@ -106,7 +106,7 @@ import axios from 'axios';
centerstate : function(gear){
this.$refs.centercontrol.centerstate(gear);
// this.$refs.centercontrol.centerstate(gear);
},
},
}

View File

@ -608,6 +608,7 @@
this.cbtcbuttonimg = this.greenlimg;
}
}
if(typeof(data.atoOn) != "undefined"){
// console.log(data.atoOn);
this.atoOn = data.atoOn;
@ -618,8 +619,12 @@
this.atobuttonimg = this.greenimg;
}
}
if(data.atoCanOpen){
if(data.gear){
jl3dUpdateDriveCenterUi(data.gear);
}
if(data.atoCanOpen == true){
if(data.atoCanOpen == true && this.atoOn != true){
this.atoLightTimer = setInterval(()=>{
if(this.atoLights == false){
@ -631,15 +636,17 @@
}
}, 1000);
}else{
}
}
if(data.atoCanOpen == false){
clearInterval(this.atoLightTimer);
if(data.atoOn){
if(this.atoOn){
this.atobuttonimg = this.greenlimg;
}else{
this.atobuttonimg = this.greenimg;
}
}
}
if(typeof(data.circuitEB) != "undefined"){
if(data.circuitEB){

View File

@ -57,7 +57,7 @@
<div class = "rightstatus m10area m10-querenxinhao" :style="{backgroundImage: 'url(' + m10image + ')' }">
</div>
<div class = "righttext" style="left:0px;bottom:0;">
<div class = "righttext" style="left:0px;bottom:0;" :style="{borderColor:mmimsgcolor}">
{{mmimsg}}
</div>
</div>
@ -159,6 +159,7 @@ export default {
a1state:"black",
ebStatus:false,
mmimsg:"",
mmimsgcolor:"#000",
}
},
mounted() {
@ -622,7 +623,9 @@ export default {
jl3dUpdateMmiMsg(msg,type){
this.mmimsgcolor = "#000";
if(type){
this.mmimsgcolor = "#FFFF6F";
if(type == "Exit_TGMT"){
msg = "由于离开TGMT区域确认转换到RM模式的请求";
}
@ -642,6 +645,7 @@ export default {
}
this.mmimsg = msg;
}
},
beforeDestroy() {
@ -726,6 +730,8 @@ export default {
color:white;
font-size: 18px;
position:absolute;
border-radius:5px;
border:1px solid;
}
.down{