Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test_new
This commit is contained in:
commit
06ed0a6f76
@ -41,7 +41,6 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
|
|||||||
this.teststomp = new StompClient();
|
this.teststomp = new StompClient();
|
||||||
this.topic = '/user/queue/simulation/drive/'+routegroup;
|
this.topic = '/user/queue/simulation/drive/'+routegroup;
|
||||||
let header = {'X-Token': getToken() };
|
let header = {'X-Token': getToken() };
|
||||||
|
|
||||||
this.updatamap = function(newsectionlist,newlinklist,newsignallist,newstationstandlist,newtrainlisttest,newrealsectionlist,newrails, materiallist, nowaction, scene) {
|
this.updatamap = function(newsectionlist,newlinklist,newsignallist,newstationstandlist,newtrainlisttest,newrealsectionlist,newrails, materiallist, nowaction, scene) {
|
||||||
// console.log(mapdata);
|
// console.log(mapdata);
|
||||||
// console.log(newtrainlisttest);
|
// console.log(newtrainlisttest);
|
||||||
@ -104,13 +103,17 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(data.type == "Train_Hmi_3D"){
|
if(data.type == "Train_Hmi_3D"){
|
||||||
|
// console.log(data.body);
|
||||||
updatestatus(data.body);
|
updatestatus(data.body);
|
||||||
if(data.body.trust == '1'){
|
|
||||||
updateDriverTrust(data.body.code,true);
|
// if(data.body.trust){
|
||||||
}else{
|
// if(data.body.trust == '1'){
|
||||||
updateDriverTrust(data.body.code,false);
|
// updateDriverTrust(data.body.code,true);
|
||||||
}
|
// }else{
|
||||||
// trainhmi(data.body);
|
// updateDriverTrust(data.body.code,false);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// if (event.data.type== 'SIGNAL' && signallist) {
|
// if (event.data.type== 'SIGNAL' && signallist) {
|
||||||
@ -338,8 +341,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
|
|||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
console.log(trainmodel.children[0].position.z);
|
//
|
||||||
console.log(pos.z);
|
|
||||||
if(trainmodel.children[0].position.z < pos.z){
|
if(trainmodel.children[0].position.z < pos.z){
|
||||||
trainmodel.children[0].up = new THREE.Vector3(-1,0,0);
|
trainmodel.children[0].up = new THREE.Vector3(-1,0,0);
|
||||||
let tangent = trainmodel.curve.getTangentAt(data.offset).normalize();
|
let tangent = trainmodel.curve.getTangentAt(data.offset).normalize();
|
||||||
@ -427,18 +429,6 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function trainhmi(data){
|
|
||||||
|
|
||||||
// for(let i=0,leni=data.length;i<leni;i++){
|
|
||||||
|
|
||||||
// if(trainmodel.code == data[0].code){
|
|
||||||
// console.log(data[i]);
|
|
||||||
//
|
|
||||||
// updatestatus(data[0]);
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
function traindoorupdate(data){
|
function traindoorupdate(data){
|
||||||
// console.log(data);
|
// console.log(data);
|
||||||
|
@ -228,6 +228,10 @@ export default {
|
|||||||
label: '越引导信号行驶',
|
label: '越引导信号行驶',
|
||||||
handler: this.handleOverFuideSignal
|
handler: this.handleOverFuideSignal
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: 'URM模式驾驶',
|
||||||
|
handler: this.handleURMTrain
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '越红灯行驶',
|
label: '越红灯行驶',
|
||||||
handler: this.handleOverEedLight
|
handler: this.handleOverEedLight
|
||||||
@ -365,6 +369,18 @@ export default {
|
|||||||
this.$refs.noticeInfo.doShow(error.message);
|
this.$refs.noticeInfo.doShow(error.message);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
handleURMTrain() {
|
||||||
|
const group = this.$route.query.group;
|
||||||
|
const param = {
|
||||||
|
commandType: 'Drive_In_Urm_Mode',
|
||||||
|
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
|
||||||
|
params: {}
|
||||||
|
};
|
||||||
|
commitTrainSend(group, param).then(({valid, operate})=>{
|
||||||
|
}).catch((error) => {
|
||||||
|
this.$refs.noticeInfo.doShow(error.message);
|
||||||
|
});
|
||||||
|
},
|
||||||
handleSpeedLimit() { // 限速指令
|
handleSpeedLimit() { // 限速指令
|
||||||
this.$refs.speedLimit.doShow(this.selected);
|
this.$refs.speedLimit.doShow(this.selected);
|
||||||
},
|
},
|
||||||
|
@ -2,9 +2,9 @@ export function getBaseUrl() {
|
|||||||
let BASE_API;
|
let BASE_API;
|
||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
// BASE_API = 'https://joylink.club/jlcloud';
|
// 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.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.41:9000'; // 张赛
|
||||||
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||||
|
@ -121,7 +121,7 @@ import axios from 'axios';
|
|||||||
if(netdata.data.type == "SCRIPT_MAKING"){
|
if(netdata.data.type == "SCRIPT_MAKING"){
|
||||||
this.tuoguanbutton = true;
|
this.tuoguanbutton = true;
|
||||||
}
|
}
|
||||||
this.updatetrainlist();
|
this.inittrainlist();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -193,7 +193,7 @@ import axios from 'axios';
|
|||||||
this.$store.dispatch('training/updateMemberTrust', {deviceCode:code,trust:trustStatus});
|
this.$store.dispatch('training/updateMemberTrust', {deviceCode:code,trust:trustStatus});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updatetrainlist(){
|
inittrainlist(){
|
||||||
getSimulationTrainlistNew(this.group).then(netdata => {
|
getSimulationTrainlistNew(this.group).then(netdata => {
|
||||||
this.options = [];
|
this.options = [];
|
||||||
this.trainlist = netdata.data;
|
this.trainlist = netdata.data;
|
||||||
@ -240,6 +240,62 @@ import axios from 'axios';
|
|||||||
|
|
||||||
this.options.push(option);
|
this.options.push(option);
|
||||||
}
|
}
|
||||||
|
this.options.sort(
|
||||||
|
function(obj1,obj2) {
|
||||||
|
let val1 = obj1.value;
|
||||||
|
let val2 = obj2.value;
|
||||||
|
return val1 - val2;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
//获取当前录制托管状态
|
||||||
|
if(this.tuoguanbutton == true){
|
||||||
|
|
||||||
|
let netdata = this.$store.state.training.memberData;
|
||||||
|
for(let k in netdata){
|
||||||
|
if(netdata[k].userId == this.userId){
|
||||||
|
// console.log(this.$store.state.scriptRecord.type);
|
||||||
|
this.userrole = netdata[k].type;
|
||||||
|
if(netdata[k].trust){
|
||||||
|
this.tuoguanstatus = netdata[k].trust;
|
||||||
|
if(this.tuoguanstatus){
|
||||||
|
this.tuoguanbuttonmsg = "取消托管";
|
||||||
|
}else{
|
||||||
|
this.tuoguanbuttonmsg = "托管";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.options.push(option);
|
||||||
|
}
|
||||||
this.options.sort(
|
this.options.sort(
|
||||||
function(obj1,obj2) {
|
function(obj1,obj2) {
|
||||||
let val1 = obj1.value;
|
let val1 = obj1.value;
|
||||||
@ -268,9 +324,6 @@ import axios from 'axios';
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// getSimulationMembersNew(this.group).then(netdata => {
|
// getSimulationMembersNew(this.group).then(netdata => {
|
||||||
|
|
||||||
// for(let i=0,leni=netdata.data.length;i<leni;i++){
|
// for(let i=0,leni=netdata.data.length;i<leni;i++){
|
||||||
|
@ -179,11 +179,11 @@
|
|||||||
driverlighttf:"rotate(0deg)",
|
driverlighttf:"rotate(0deg)",
|
||||||
headlighttf:"rotate(0deg)",
|
headlighttf:"rotate(0deg)",
|
||||||
|
|
||||||
atoOn:null,
|
// atoOn:null,
|
||||||
atobuttonimg:"/static/jl3d/control/green.png",
|
atobuttonimg:"/static/jl3d/control/green.png",
|
||||||
driveMode:null,
|
// driveMode:null,
|
||||||
rmbuttonimg:"/static/jl3d/control/green.png",
|
rmbuttonimg:"/static/jl3d/control/green.png",
|
||||||
runLevel:null,
|
// runLevel:null,
|
||||||
cbtcbuttonimg:"/static/jl3d/control/green.png",
|
cbtcbuttonimg:"/static/jl3d/control/green.png",
|
||||||
doorleftstatus:false,
|
doorleftstatus:false,
|
||||||
doorrightstatus:false,
|
doorrightstatus:false,
|
||||||
@ -390,24 +390,25 @@
|
|||||||
// console.log(netdata);
|
// console.log(netdata);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
updatedoorlight: function (doorleftmode,doorrightmode){
|
updatedoorlight: function (newdata){
|
||||||
if(doorleftmode != this.doorleftstatus){
|
if(this.doorleftstatus != newdata.leftDoorCanClose){
|
||||||
this.doorleftstatus = doorleftmode;
|
this.doorleftstatus = newdata.leftDoorCanClose;
|
||||||
if(doorleftmode == true){
|
if(newdata.leftDoorCanClose == true){
|
||||||
this.doorleftimg = this.greenlimg;
|
this.doorleftimg = this.greenlimg;
|
||||||
}else{
|
}else{
|
||||||
this.doorleftimg = this.greenimg;
|
this.doorleftimg = this.greenimg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(doorrightmode != this.doorrightstatus){
|
if(this.doorleftstatus != newdata.rightDoorCanClose){
|
||||||
this.doorrightstatus = doorrightmode;
|
this.doorrightstatus = newdata.rightDoorCanClose;
|
||||||
if(doorrightmode == true){
|
if(newdata.rightDoorCanClose == true){
|
||||||
this.doorrightimg = this.greenlimg;
|
this.doorrightimg = this.greenlimg;
|
||||||
}else{
|
}else{
|
||||||
this.doorrightimg = this.greenimg;
|
this.doorrightimg = this.greenimg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
dloclick: function (e){
|
dloclick: function (e){
|
||||||
let data = {
|
let data = {
|
||||||
@ -473,24 +474,24 @@
|
|||||||
},
|
},
|
||||||
updatabuttonlight: function (data){
|
updatabuttonlight: function (data){
|
||||||
// console.log(data);
|
// console.log(data);
|
||||||
if(data.runLevel!= this.runLevel){
|
if(data.runLevel){
|
||||||
this.runLevel = data.runLevel;
|
// this.runLevel = data.runLevel;
|
||||||
if(data.runLevel == "CBTC"){
|
if(data.runLevel == "CBTC"){
|
||||||
this.cbtcbuttonimg = this.greenlimg;
|
this.cbtcbuttonimg = this.greenlimg;
|
||||||
}else{
|
}else{
|
||||||
this.cbtcbuttonimg = this.greenimg;
|
this.cbtcbuttonimg = this.greenimg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(data.driveMode!= this.driveMode){
|
if(data.driveMode){
|
||||||
this.driveMode = data.driveMode;
|
// this.driveMode = data.driveMode;
|
||||||
if(data.driveMode == "RM"){
|
if(data.driveMode == "RM"){
|
||||||
this.rmbuttonimg = this.greenlimg;
|
this.rmbuttonimg = this.greenlimg;
|
||||||
}else{
|
}else{
|
||||||
this.rmbuttonimg = this.greenimg;
|
this.rmbuttonimg = this.greenimg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(data.atoOn!= this.atoOn){
|
if(data.atoOn){
|
||||||
this.atoOn = data.atoOn;
|
// this.atoOn = data.atoOn;
|
||||||
if(data.atoOn){
|
if(data.atoOn){
|
||||||
this.atobuttonimg = this.greenlimg;
|
this.atobuttonimg = this.greenlimg;
|
||||||
}else{
|
}else{
|
||||||
|
@ -285,10 +285,12 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
updatestatus(newdata){
|
updatestatus(newdata){
|
||||||
this.trainnum = newdata.groupNumber;
|
if(newdata.groupNumber){
|
||||||
|
this.trainnum = newdata.groupNumber;
|
||||||
|
}
|
||||||
|
updatedoorlight(newdata);
|
||||||
this.$refs.mmiui.updatetrainstatus(newdata);
|
this.$refs.mmiui.updatetrainstatus(newdata);
|
||||||
updatabuttonlight(newdata);
|
updatabuttonlight(newdata);
|
||||||
updatedoorlight(newdata.leftDoorCanClose,newdata.rightDoorCanClose);
|
|
||||||
},
|
},
|
||||||
warningmsg(nowmsg){
|
warningmsg(nowmsg){
|
||||||
this.controlmsg = nowmsg;
|
this.controlmsg = nowmsg;
|
||||||
|
@ -4,16 +4,14 @@ export function mmirender(dom) {
|
|||||||
let scope = this;
|
let scope = this;
|
||||||
|
|
||||||
let scene = new THREE.Scene();
|
let scene = new THREE.Scene();
|
||||||
scene.background = new THREE.Color( 0xcce0ff );
|
|
||||||
scene.fog = new THREE.Fog( 0xcce0ff, 500, 10000 );
|
|
||||||
scene.add( new THREE.AmbientLight( 0xffffff ) );
|
scene.add( new THREE.AmbientLight( 0xffffff ) );
|
||||||
// camera
|
// camera
|
||||||
|
|
||||||
let camera = new THREE.PerspectiveCamera( 30, 360 / 200, 1, 10000 );
|
let camera = new THREE.PerspectiveCamera( 30, 360 / 200, 1, 100 );
|
||||||
camera.position.set( 0, 0, 80 );
|
camera.position.set( 0, 0, 80 );
|
||||||
|
|
||||||
let renderer = new THREE.WebGLRenderer( { antialias: true } );
|
let renderer = new THREE.WebGLRenderer( );
|
||||||
renderer.setPixelRatio( window.devicePixelRatio );
|
// renderer.setPixelRatio( window.devicePixelRatio );
|
||||||
renderer.setSize( 360, 200 );
|
renderer.setSize( 360, 200 );
|
||||||
|
|
||||||
var geometry = new THREE.PlaneBufferGeometry( 80, 80, 2 );
|
var geometry = new THREE.PlaneBufferGeometry( 80, 80, 2 );
|
||||||
@ -91,16 +89,18 @@ export function mmirender(dom) {
|
|||||||
|
|
||||||
|
|
||||||
dom.appendChild( renderer.domElement);
|
dom.appendChild( renderer.domElement);
|
||||||
animate();
|
renderer.render( scene, camera );
|
||||||
|
// animate();
|
||||||
|
|
||||||
function animate() {
|
function animate() {
|
||||||
//zc.rotation.z -= 0.01;
|
//zc.rotation.z -= 0.01;
|
||||||
renderer.render( scene, camera );
|
// requestAnimationFrame(animate);
|
||||||
requestAnimationFrame(animate);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.updatezz = function(speed){
|
this.updatezz = function(speed){
|
||||||
zc.rotation.z = -Math.PI*(65.8+169*speed/110)/100;
|
zc.rotation.z = -Math.PI*(65.8+169*speed/110)/100;
|
||||||
|
|
||||||
|
renderer.render( scene, camera );
|
||||||
}
|
}
|
||||||
this.updateatp = function(atpspeed){
|
this.updateatp = function(atpspeed){
|
||||||
if(atpspeed<0){
|
if(atpspeed<0){
|
||||||
@ -110,6 +110,7 @@ export function mmirender(dom) {
|
|||||||
atp.rotation.z = -Math.PI*(65.8+169*atpspeed/110)/100;
|
atp.rotation.z = -Math.PI*(65.8+169*atpspeed/110)/100;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// renderer.render( scene, camera );
|
||||||
}
|
}
|
||||||
|
|
||||||
this.updateato = function(atospeed){
|
this.updateato = function(atospeed){
|
||||||
@ -120,5 +121,6 @@ export function mmirender(dom) {
|
|||||||
ato.rotation.z = -Math.PI*(65.8+169*atospeed/110)/100;
|
ato.rotation.z = -Math.PI*(65.8+169*atospeed/110)/100;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// renderer.render( scene, camera );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -211,9 +211,12 @@ export default {
|
|||||||
},
|
},
|
||||||
updatetrainstatus(newdata){
|
updatetrainstatus(newdata){
|
||||||
//更新车组号
|
//更新车组号
|
||||||
this.updatemmispeedview(newdata.v,newdata.pv,newdata.tv);
|
this.updateMmiSpeedView(newdata.v,newdata.pv,newdata.tv);
|
||||||
|
|
||||||
|
if(newdata.maLen){
|
||||||
|
this.updateMmiLen(newdata.maLen);
|
||||||
|
}
|
||||||
|
|
||||||
this.updatemmilen(newdata.maLen);
|
|
||||||
|
|
||||||
this.updatemmidrivemodelevel(newdata.runLevel,newdata.driveMode,newdata.atoOn,newdata.atpOn);
|
this.updatemmidrivemodelevel(newdata.runLevel,newdata.driveMode,newdata.atoOn,newdata.atpOn);
|
||||||
// this.updatammirunlevel(newdata.runLevel);
|
// this.updatammirunlevel(newdata.runLevel);
|
||||||
@ -221,30 +224,38 @@ export default {
|
|||||||
// this.updatemmidrivemode(newdata.driveMode);
|
// this.updatemmidrivemode(newdata.driveMode);
|
||||||
//
|
//
|
||||||
// this.updatemmiatoatp(newdata.atoOn,newdata.atpOn);
|
// this.updatemmiatoatp(newdata.atoOn,newdata.atpOn);
|
||||||
|
if(newdata.nextStation){
|
||||||
|
this.updateMmiNextStation(newdata.nextStation);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(newdata.endStation){
|
||||||
|
this.updateMmiEndStation(newdata.endStation);
|
||||||
|
}
|
||||||
|
|
||||||
this.updatemmistation(newdata.endStation,newdata.nextStation);
|
|
||||||
this.updatemmidoormode(newdata.leftDoorCanClose,newdata.rightDoorCanClose);
|
this.updatemmidoormode(newdata.leftDoorCanClose,newdata.rightDoorCanClose);
|
||||||
},
|
},
|
||||||
updatemmistate(aaa){
|
updatemmistate(aaa){
|
||||||
|
|
||||||
},
|
},
|
||||||
updatemmispeedview(speed,atpspeed,atospeed) {
|
updateMmiSpeedView(speed,atpspeed,atospeed) {
|
||||||
this.nowspeed = parseInt(speed);
|
this.nowspeed = parseInt(speed);
|
||||||
if(this.mmimodel.updatezz){
|
if(this.mmimodel.updatezz){
|
||||||
this.mmimodel.updatezz(speed);
|
this.mmimodel.updatezz(speed);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.nowatpspeed = parseInt(atpspeed);
|
this.nowatpspeed = parseInt(atpspeed);
|
||||||
if(this.mmimodel.updateatp){
|
if(this.mmimodel.updateatp){
|
||||||
this.mmimodel.updateatp(atpspeed);
|
this.mmimodel.updateatp(atpspeed);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.nowatospeed = parseInt(atospeed);
|
this.nowatospeed = parseInt(atospeed);
|
||||||
if(this.mmimodel.updateato){
|
if(this.mmimodel.updateato){
|
||||||
this.mmimodel.updateato(atospeed);
|
this.mmimodel.updateato(atospeed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(this.m9state1 == false){
|
if(this.m9state1 == false){
|
||||||
if(speed>atospeed){
|
if(this.nowspeed>this.nowatospeed){
|
||||||
this.newa1state = "yellow";
|
this.newa1state = "yellow";
|
||||||
}else{
|
}else{
|
||||||
this.newa1state = "black";
|
this.newa1state = "black";
|
||||||
@ -327,7 +338,7 @@ export default {
|
|||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
updatemmidrivemodelevel(runlevel,dirvemode,atoon,atpon){
|
updatemmidrivemodelevel(runlevel,dirvemode,atoon,atpon){
|
||||||
if(runlevel != this.m2state){
|
if(runlevel){
|
||||||
if(runlevel == "CBTC"){
|
if(runlevel == "CBTC"){
|
||||||
this.m2state = runlevel;
|
this.m2state = runlevel;
|
||||||
this.m2image = this.images.m2['cbtc'];
|
this.m2image = this.images.m2['cbtc'];
|
||||||
@ -340,7 +351,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(dirvemode != this.m1state){
|
if(dirvemode){
|
||||||
if(dirvemode == "CM"){
|
if(dirvemode == "CM"){
|
||||||
this.m1state = dirvemode;
|
this.m1state = dirvemode;
|
||||||
this.m1image = this.images.m1['cm'];
|
this.m1image = this.images.m1['cm'];
|
||||||
@ -356,7 +367,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
if(this.m9state1 != atoon){
|
if(this.m9state1){
|
||||||
this.m9state1 = atoon;
|
this.m9state1 = atoon;
|
||||||
if(atoon){
|
if(atoon){
|
||||||
|
|
||||||
@ -396,7 +407,7 @@ export default {
|
|||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updatemmilen(len) {
|
updateMmiLen(len) {
|
||||||
//this.malen = 150+"px";
|
//this.malen = 150+"px";
|
||||||
if(len>=750){
|
if(len>=750){
|
||||||
this.malen = 158+"px";
|
this.malen = 158+"px";
|
||||||
@ -449,13 +460,18 @@ export default {
|
|||||||
this.c1image = this.images.c1[this.c1state];
|
this.c1image = this.images.c1[this.c1state];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updatemmistation(end,next){
|
updateMmiNextStation(next){
|
||||||
if(next != this.nextstation || end != this.endstation){
|
if(next){
|
||||||
this.endstation = end;
|
|
||||||
this.nextstation = next;
|
this.nextstation = next;
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
updateMmiEndStation(end){
|
||||||
|
if(end){
|
||||||
|
this.endstation = end;
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ import { checkLoginLine } from '@/api/login';
|
|||||||
import { EventBus } from '@/scripts/event-bus';
|
import { EventBus } from '@/scripts/event-bus';
|
||||||
import MenuReplay from './menuReplay';
|
import MenuReplay from './menuReplay';
|
||||||
import { getToken } from '@/utils/auth';
|
import { getToken } from '@/utils/auth';
|
||||||
import { DeviceMenu, getDeviceMenuByDeviceType } from '@/scripts/ConstDic';
|
import { getDeviceMenuByDeviceType } from '@/scripts/ConstDic';
|
||||||
import { creatSubscribe, clearSubscribe, displayTopic} from '@/utils/stomp';
|
import { creatSubscribe, clearSubscribe, displayTopic} from '@/utils/stomp';
|
||||||
export default {
|
export default {
|
||||||
name:'RefereeDisplay',
|
name:'RefereeDisplay',
|
||||||
@ -151,7 +151,6 @@ export default {
|
|||||||
async initLoadData() {
|
async initLoadData() {
|
||||||
this.$store.dispatch('training/reset');
|
this.$store.dispatch('training/reset');
|
||||||
try {
|
try {
|
||||||
// await this.loadSimulationInfo();
|
|
||||||
await this.initLoadRecordData();
|
await this.initLoadRecordData();
|
||||||
this.checkLoginLineTimer();
|
this.checkLoginLineTimer();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -219,29 +218,6 @@ export default {
|
|||||||
this.endViewLoading();
|
this.endViewLoading();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 加载仿真信息
|
|
||||||
// async loadSimulationInfo() {
|
|
||||||
// this.dataError = false;
|
|
||||||
// const resp = await getSimulationInfoNew(this.group);
|
|
||||||
// if (resp && resp.code == 200 && resp.data && !resp.data.dataError) {
|
|
||||||
// this.$store.dispatch('scriptRecord/updateSimulationPause', resp.data.pause);
|
|
||||||
// this.questId = Number(resp.data.questId) || 0;
|
|
||||||
// this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`));
|
|
||||||
// if (resp.data.planRunning) {
|
|
||||||
// this.planRunning = resp.data.planRunning;
|
|
||||||
// } else {
|
|
||||||
// this.$store.dispatch('training/over');
|
|
||||||
// }
|
|
||||||
// if (this.isDemon) {
|
|
||||||
// this.$refs.menuDemon.initPlannedDriving(resp.data.planRunning);
|
|
||||||
// } else if (this.isScript) {
|
|
||||||
// this.$refs.menuScript.initPlannedDriving(resp.data.planRunning);
|
|
||||||
// }
|
|
||||||
// } else if (resp && resp.code == 200 && resp.data && resp.data.dataError) {
|
|
||||||
// this.dataError = true;
|
|
||||||
// this.$messageBox('此地图数据正在维护中,无法运行!');
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
setWindowSize() {
|
setWindowSize() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
const width = this.width;
|
const width = this.width;
|
||||||
|
@ -141,10 +141,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
// $store.state.config.menuBarLoadedCount
|
|
||||||
// 'offset': function (val) {
|
|
||||||
// this.dialogShow && this.dragEvent();
|
|
||||||
// },
|
|
||||||
'$store.state.socket.autoFaultTrigger':function(val) {
|
'$store.state.socket.autoFaultTrigger':function(val) {
|
||||||
this.dialogShow && this.getSimulationFaultRules();
|
this.dialogShow && this.getSimulationFaultRules();
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ import Cookies from 'js-cookie';
|
|||||||
|
|
||||||
// 三维
|
// 三维
|
||||||
// import Jl3dSimulation from '@/views/jlmap3d/simulation/jl3dsimulation';
|
// import Jl3dSimulation from '@/views/jlmap3d/simulation/jl3dsimulation';
|
||||||
import Jl3dDrive from '@/views/jlmap3d/drive/jl3ddrive';
|
// import Jl3dDrive from '@/views/jlmap3d/drive/jl3ddrive';
|
||||||
import { timeFormat } from '@/utils/date';
|
import { timeFormat } from '@/utils/date';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -63,8 +63,8 @@ export default {
|
|||||||
ScriptPreviewChat,
|
ScriptPreviewChat,
|
||||||
MapSystemDraft,
|
MapSystemDraft,
|
||||||
MenuSchema,
|
MenuSchema,
|
||||||
MenuSystemTime,
|
MenuSystemTime
|
||||||
Jl3dDrive
|
// Jl3dDrive
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -100,8 +100,8 @@ export default {
|
|||||||
'canvasHeight'
|
'canvasHeight'
|
||||||
]),
|
]),
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
'map',
|
'map',
|
||||||
'stationList'
|
'stationList'
|
||||||
]),
|
]),
|
||||||
// ...mapGetters('training', [
|
// ...mapGetters('training', [
|
||||||
// 'offsetStationCode'
|
// 'offsetStationCode'
|
||||||
@ -146,8 +146,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
'$store.state.training.prdType':function(val) {
|
'$store.state.training.prdType':function(val) {
|
||||||
this.setPosition();
|
this.setPosition();
|
||||||
this.setMode();
|
this.setMode();
|
||||||
},
|
},
|
||||||
// '$store.state.training.prdType': function(val) {
|
// '$store.state.training.prdType': function(val) {
|
||||||
// debugger;
|
// debugger;
|
||||||
@ -160,7 +160,7 @@ export default {
|
|||||||
},
|
},
|
||||||
'stationList': function () {
|
'stationList': function () {
|
||||||
this.setStationList();
|
this.setStationList();
|
||||||
},
|
},
|
||||||
$route() {
|
$route() {
|
||||||
// this.$nextTick(() => {
|
// this.$nextTick(() => {
|
||||||
this.initLoadData();
|
this.initLoadData();
|
||||||
@ -246,11 +246,11 @@ export default {
|
|||||||
},
|
},
|
||||||
setPosition() {
|
setPosition() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
const menuBar = document.getElementById('menuBar');
|
const menuBar = document.getElementById('menuBar');
|
||||||
const menuTool = document.getElementById('menuTool');
|
const menuTool = document.getElementById('menuTool');
|
||||||
const menuBottom = document.getElementById('menuButton');
|
const menuBottom = document.getElementById('menuButton');
|
||||||
this.offset = 15 + (menuBar ? menuBar.offsetHeight || 0 : 0) + (menuTool ? menuTool.offsetHeight || 0 : 0);
|
this.offset = 15 + (menuBar ? menuBar.offsetHeight || 0 : 0) + (menuTool ? menuTool.offsetHeight || 0 : 0);
|
||||||
this.offsetBottom = 15 + (menuBottom ? menuBottom.offsetHeight || 0 : 0);
|
this.offsetBottom = 15 + (menuBottom ? menuBottom.offsetHeight || 0 : 0);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
async back() {
|
async back() {
|
||||||
@ -295,8 +295,8 @@ export default {
|
|||||||
lastData = Object.values(lastData);
|
lastData = Object.values(lastData);
|
||||||
const lastMemberList = [];
|
const lastMemberList = [];
|
||||||
const dispatcherList = [];
|
const dispatcherList = [];
|
||||||
const electricDispatcherList = [];
|
// const electricDispatcherList = [];
|
||||||
const depotDispatcherList = [];
|
// const depotDispatcherList = [];
|
||||||
const stationSupervisorList = [];
|
const stationSupervisorList = [];
|
||||||
const driverList = [];
|
const driverList = [];
|
||||||
const maintainerList = [];
|
const maintainerList = [];
|
||||||
@ -386,10 +386,10 @@ export default {
|
|||||||
},
|
},
|
||||||
switchMode(prdType) {
|
switchMode(prdType) {
|
||||||
this.$store.dispatch('training/setPrdType', prdType);
|
this.$store.dispatch('training/setPrdType', prdType);
|
||||||
},
|
},
|
||||||
setMode() {
|
setMode() {
|
||||||
this.showSelectStation = this.$store.state.map.map.skinVO.code === '06' && this.$store.state.training.prdType === '01';
|
this.showSelectStation = this.$store.state.map.map.skinVO.code === '06' && this.$store.state.training.prdType === '01';
|
||||||
},
|
},
|
||||||
// hidepanel() {
|
// hidepanel() {
|
||||||
// if (this.isDrive) {
|
// if (this.isDrive) {
|
||||||
// this.panelShow = false;
|
// this.panelShow = false;
|
||||||
|
@ -12,12 +12,14 @@
|
|||||||
:offset-bottom="offsetBottom"
|
:offset-bottom="offsetBottom"
|
||||||
:data-error="dataError"
|
:data-error="dataError"
|
||||||
:script-id="scriptId"
|
:script-id="scriptId"
|
||||||
|
:show-station="showStation"
|
||||||
@hidepanel="hidepanel"
|
@hidepanel="hidepanel"
|
||||||
@passflow="passflow"
|
@passflow="passflow"
|
||||||
@quitQuest="quitQuest"
|
@quitQuest="quitQuest"
|
||||||
@jl3dstation="jl3dstation"
|
@jl3dstation="jl3dstation"
|
||||||
@devicemodel="devicemodel"
|
@devicemodel="devicemodel"
|
||||||
@showScheduling="showScheduling"
|
@showScheduling="showScheduling"
|
||||||
|
@switchStationMode="switchStationMode"
|
||||||
/>
|
/>
|
||||||
<menu-lesson
|
<menu-lesson
|
||||||
v-if="isLesson"
|
v-if="isLesson"
|
||||||
@ -142,7 +144,7 @@ export default {
|
|||||||
offset: 15,
|
offset: 15,
|
||||||
offsetBottom: 15,
|
offsetBottom: 15,
|
||||||
tipBottom: 0,
|
tipBottom: 0,
|
||||||
scriptId:0,
|
scriptId: 0,
|
||||||
dataError: false,
|
dataError: false,
|
||||||
group:'',
|
group:'',
|
||||||
showStation: '',
|
showStation: '',
|
||||||
@ -212,7 +214,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.config.menuBarLoadedCount': function (val) {
|
'$store.state.config.menuBarLoadedCount': function (val) { // menuBar加载完成
|
||||||
this.setPosition();
|
this.setPosition();
|
||||||
},
|
},
|
||||||
'$store.state.training.prdType': function (val) { // 根据权限类型计算高度
|
'$store.state.training.prdType': function (val) { // 根据权限类型计算高度
|
||||||
@ -356,10 +358,9 @@ export default {
|
|||||||
this.endViewLoading();
|
this.endViewLoading();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 加载仿真信息
|
// 新版地图根据仿真group获取仿真基础信息
|
||||||
async loadSimulationInfo() {
|
async loadSimulationInfo() {
|
||||||
// 单人仿真获取人员列表
|
getSimulationMemberList(this.$route.query.group).then(resp => { // 单人仿真获取人员列表
|
||||||
getSimulationMemberList(this.$route.query.group).then(resp => {
|
|
||||||
this.$store.dispatch('training/setMemberList', {memberList:resp.data, userId: this.$store.state.user.id});
|
this.$store.dispatch('training/setMemberList', {memberList:resp.data, userId: this.$store.state.user.id});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$messageBox('获取仿真成员列表失败!');
|
this.$messageBox('获取仿真成员列表失败!');
|
||||||
@ -372,11 +373,11 @@ export default {
|
|||||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`));
|
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`));
|
||||||
this.planRunning = resp.data.planRunning;
|
this.planRunning = resp.data.planRunning;
|
||||||
this.$store.dispatch('map/setRunPlanStatus', this.planRunning);
|
this.$store.dispatch('map/setRunPlanStatus', this.planRunning);
|
||||||
if (!resp.data.planRunning) {
|
if (!this.planRunning) {
|
||||||
this.$store.dispatch('training/over');
|
this.$store.dispatch('training/over');
|
||||||
}
|
}
|
||||||
if (this.isDemon) {
|
if (this.isDemon) {
|
||||||
this.$refs.menuDemon.initPlannedDriving(resp.data.planRunning);
|
this.$refs.menuDemon.initPlannedDriving(this.planRunning); // 是否正在按计划行车
|
||||||
} else if (this.isScript) {
|
} else if (this.isScript) {
|
||||||
// this.$refs.menuScript.initPlannedDriving(resp.data.planRunning);
|
// this.$refs.menuScript.initPlannedDriving(resp.data.planRunning);
|
||||||
}
|
}
|
||||||
|
@ -11,12 +11,11 @@
|
|||||||
<el-button type="primary" size="small" @click="back">{{ projectDevice?'退出':$t('display.demon.back') }}</el-button>
|
<el-button type="primary" size="small" @click="back">{{ projectDevice?'退出':$t('display.demon.back') }}</el-button>
|
||||||
<template v-if="!dataError">
|
<template v-if="!dataError">
|
||||||
<template v-if="isShowQuest">
|
<template v-if="isShowQuest">
|
||||||
<!-- && !isDesignPlatform -->
|
<el-button v-if="!isDesignPlatform" type="danger" size="small" @click="handleQuitQuest">退出剧本</el-button>
|
||||||
<el-button v-if="!isDesignPlatform" type="danger" size="small" @click="handleQuitQuest">{{ $t('display.demon.exitScript') }}</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="!projectDevice">
|
<template v-else-if="!projectDevice">
|
||||||
<el-button type="danger" size="small" @click="end">{{ $t('display.demon.initialize') }}</el-button>
|
<el-button type="danger" size="small" @click="end">{{ $t('display.demon.initialize') }}</el-button>
|
||||||
<el-button type="success" :disabled="isDisable || dataError" size="small" @click="selectBeginTime">{{ $t('display.demon.drivingByPlan') }}</el-button>
|
<el-button type="success" :disabled="isDisable" size="small" @click="selectBeginTime">{{ $t('display.demon.drivingByPlan') }}</el-button>
|
||||||
</template>
|
</template>
|
||||||
<!-- 设备视图 -->
|
<!-- 设备视图 -->
|
||||||
<el-button v-if="isShow3dmodel && !isShowScheduling" size="small" @click="jumpjlmap3dmodel">{{ jl3dmodel }}</el-button>
|
<el-button v-if="isShow3dmodel && !isShowScheduling" size="small" @click="jumpjlmap3dmodel">{{ jl3dmodel }}</el-button>
|
||||||
@ -67,6 +66,12 @@ export default {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
showStation: {
|
||||||
|
type: String,
|
||||||
|
default() {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
},
|
||||||
dataError: {
|
dataError: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default() {
|
default() {
|
||||||
@ -129,13 +134,6 @@ export default {
|
|||||||
'$store.state.training.subscribeCount': function () {
|
'$store.state.training.subscribeCount': function () {
|
||||||
this.group && this.initLoadPage();
|
this.group && this.initLoadPage();
|
||||||
},
|
},
|
||||||
'$store.state.socket.tipOperateCount': function (val) {
|
|
||||||
this.$alert(this.$t('display.demon.taskOperateSuccess'), this.$t('global.tips'), {
|
|
||||||
confirmButtonText: this.$t('global.confirm'),
|
|
||||||
callback: action => {
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
'$store.state.socket.simulationRoleList':function(val) {
|
'$store.state.socket.simulationRoleList':function(val) {
|
||||||
(val || []).forEach(item => {
|
(val || []).forEach(item => {
|
||||||
if (item.messageType === 'KICK_OUT' && item.userId == this.$store.state.user.id) {
|
if (item.messageType === 'KICK_OUT' && item.userId == this.$store.state.user.id) {
|
||||||
@ -192,7 +190,7 @@ export default {
|
|||||||
selectBeginTime() {
|
selectBeginTime() {
|
||||||
this.$refs.setTime.doShow();
|
this.$refs.setTime.doShow();
|
||||||
},
|
},
|
||||||
start(model) {
|
start(model) { // 开始仿真
|
||||||
this.isDisable = true;
|
this.isDisable = true;
|
||||||
const data = {
|
const data = {
|
||||||
time: model.initTime
|
time: model.initTime
|
||||||
@ -205,6 +203,9 @@ export default {
|
|||||||
this.$store.dispatch('map/setRunPlanStatus', true);
|
this.$store.dispatch('map/setRunPlanStatus', true);
|
||||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${model.initTime}`));
|
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${model.initTime}`));
|
||||||
this.$store.dispatch('map/setShowCentralizedStationNum');
|
this.$store.dispatch('map/setShowCentralizedStationNum');
|
||||||
|
if (this.$route.query.lineCode == '06') {
|
||||||
|
this.$emit('switchStationMode', this.showStation); // 宁波线 过滤列车显示
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.isDisable = false;
|
this.isDisable = false;
|
||||||
@ -249,7 +250,7 @@ export default {
|
|||||||
},
|
},
|
||||||
handleQuitQuest() {
|
handleQuitQuest() {
|
||||||
quitScriptNew(this.group).then(resp => {
|
quitScriptNew(this.group).then(resp => {
|
||||||
getSimulationInfoNew(this.group).then(()=>{
|
getSimulationInfoNew(this.group).then((res)=>{
|
||||||
this.quitQuest();
|
this.quitQuest();
|
||||||
this.initLoadPage();
|
this.initLoadPage();
|
||||||
this.clearAllData();
|
this.clearAllData();
|
||||||
|
@ -10,8 +10,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="practice-bottom" :style="{bottom: offsetBottom + 'px'}">
|
<div class="practice-bottom" :style="{bottom: offsetBottom + 'px'}">
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
<!-- v-if="!isScriptCommand" -->
|
|
||||||
<!-- v-if="!isScriptCommand" -->
|
|
||||||
<el-button type="success" :disabled="isDisable || dataError" @click="selectBeginTime">按计划行车</el-button>
|
<el-button type="success" :disabled="isDisable || dataError" @click="selectBeginTime">按计划行车</el-button>
|
||||||
<el-button type="danger" :disabled="dataError" @click="end">初始化</el-button>
|
<el-button type="danger" :disabled="dataError" @click="end">初始化</el-button>
|
||||||
<el-button type="primary" @click="back">返回</el-button>
|
<el-button type="primary" @click="back">返回</el-button>
|
||||||
@ -98,14 +96,7 @@ export default {
|
|||||||
this.isDisable = true;
|
this.isDisable = true;
|
||||||
const data = {
|
const data = {
|
||||||
time: model.initTime
|
time: model.initTime
|
||||||
// loadNumber:this.trainList.length
|
|
||||||
};
|
};
|
||||||
// const data = {
|
|
||||||
// time: model.initTime
|
|
||||||
// };
|
|
||||||
// if (this.$route.query.prdType === '04') {
|
|
||||||
// data.loadNumber = model.loadNum;
|
|
||||||
// }
|
|
||||||
ranAsPlan(data, this.group).then(res => {
|
ranAsPlan(data, this.group).then(res => {
|
||||||
this.$store.dispatch('training/simulationStart').then(() => {
|
this.$store.dispatch('training/simulationStart').then(() => {
|
||||||
this.$store.dispatch('map/setRunPlanStatus', true);
|
this.$store.dispatch('map/setRunPlanStatus', true);
|
||||||
|
@ -1,28 +1,27 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="schema" :style="{top: offset+'px'}">
|
<div class="schema" :style="{top: offset+'px'}">
|
||||||
<!-- (isScript&&!isScriptCommand) || -->
|
|
||||||
<el-select v-if="isDesignPlatform" v-model="swch" size="small" :placeholder="$t('display.schema.selectProduct')" @change="switchMode">
|
<el-select v-if="isDesignPlatform" v-model="swch" size="small" :placeholder="$t('display.schema.selectProduct')" @change="switchMode">
|
||||||
<el-option v-for="item in swchList" :key="item.value" :label="item.name" :value="item.value" />
|
<el-option v-for="item in swchList" :key="item.value" :label="item.name" :value="item.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
<!-- showSelectStation&&((!isScriptCommand&&swch=='01')||(isScriptCommand && isLocalStation)) -->
|
|
||||||
<el-select v-if="showSelectStation && isLocalStation && !isScript" v-model="showStationContent" style="width: 100px;" size="small" @change="switchStationModeInfo">
|
<el-select v-if="showSelectStation && isLocalStation && !isScript" v-model="showStationContent" style="width: 100px;" size="small" @change="switchStationModeInfo">
|
||||||
<el-option v-for="item in stationList" :key="item.value" :label="item.name" :value="item.value" />
|
<el-option v-for="item in stationList" :key="item.value" :label="item.name" :value="item.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-button-group>
|
<template v-if="!dataError">
|
||||||
<el-button v-if="isDemon && isDesignPlatform && !dataError" size="small" :disabled="viewDisabled" type="success" @click="viewScriptRoles">{{ $t('display.schema.selectRoles') }}</el-button>
|
<el-button-group>
|
||||||
<!-- 加载剧本 -->
|
<el-button v-if="isDemon && isDesignPlatform" size="small" :disabled="viewDisabled" type="success" @click="viewScriptRoles">{{ $t('display.schema.selectRoles') }}</el-button>
|
||||||
<el-button v-if="isDemon && !isDesignPlatform && !isScheduling && !dataError" size="small" :disabled="viewDisabled" type="success" @click="viewRunQuest">{{ $t('display.schema.loadScript') }}</el-button>
|
<!-- 加载剧本 -->
|
||||||
<!-- 运行图加载 -->
|
<el-button v-if="isDemon && !isDesignPlatform && !isScheduling" size="small" :disabled="viewDisabled" type="success" @click="viewRunQuest">{{ $t('display.schema.loadScript') }}</el-button>
|
||||||
<el-button v-if="notScript && runing && !dataError" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('display.schema.previewRunDiagram') }}</el-button>
|
<!-- 运行图加载 -->
|
||||||
<el-button v-if="!runing && notScript && !dataError" size="small" type="warning" @click="loadRunPlan">{{ $t('display.schema.loadRunDiagram') }}</el-button>
|
<el-button v-if="notScript && runing" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('display.schema.previewRunDiagram') }}</el-button>
|
||||||
<el-button v-if="mode==OperateMode.FAULT && !dataError" size="small" type="danger" @click="setFault">自动故障设置</el-button>
|
<el-button v-if="notScript && !runing" size="small" type="warning" @click="loadRunPlan">{{ $t('display.schema.loadRunDiagram') }}</el-button>
|
||||||
</el-button-group>
|
<el-button v-if="mode==OperateMode.FAULT" size="small" type="danger" @click="setFault">自动故障设置</el-button>
|
||||||
|
</el-button-group>
|
||||||
<el-radio-group v-if="!isScheduling && !dataError" v-model="mode" size="small" @change="changeOperateMode(mode)">
|
<el-radio-group v-if="!isScheduling" v-model="mode" size="small" @change="changeOperateMode(mode)">
|
||||||
<el-radio-button class="mode" :label="OperateMode.NORMAL">{{ $t('display.schema.normalOperation') }}</el-radio-button>
|
<el-radio-button class="mode" :label="OperateMode.NORMAL">{{ $t('display.schema.normalOperation') }}</el-radio-button>
|
||||||
<el-radio-button class="mode" :label="OperateMode.FAULT">故障模式</el-radio-button>
|
<el-radio-button class="mode" :label="OperateMode.FAULT">故障模式</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<fault-choose v-if="isDemon || isScript" ref="faultChoose" :group="group" :offset="offset" />
|
<fault-choose v-if="isDemon || isScript" ref="faultChoose" :group="group" :offset="offset" />
|
||||||
<run-plan-Load ref="runPlanLoad" :group="group" />
|
<run-plan-Load ref="runPlanLoad" :group="group" />
|
||||||
@ -36,9 +35,7 @@ import RunPlanLoad from './demon/runPlanLoad';
|
|||||||
import RunPlanView from './demon/runPlanView';
|
import RunPlanView from './demon/runPlanView';
|
||||||
import FaultChoose from './demon/faultChoose';
|
import FaultChoose from './demon/faultChoose';
|
||||||
import AddQuest from './demon/addQuest';
|
import AddQuest from './demon/addQuest';
|
||||||
import { mapGetters } from 'vuex';
|
|
||||||
import { OperateMode } from '@/scripts/ConstDic';
|
import { OperateMode } from '@/scripts/ConstDic';
|
||||||
// import { getStationList } from '@/api/runplan';
|
|
||||||
import { getByGroupStationList } from '@/api/jmap/map';
|
import { getByGroupStationList } from '@/api/jmap/map';
|
||||||
import {loadDraftScript, loadDraftScriptNew} from '@/api/designPlatform';
|
import {loadDraftScript, loadDraftScriptNew} from '@/api/designPlatform';
|
||||||
import { getEveryDayRunPlanNew, loadScriptNew } from '@/api/simulation';
|
import { getEveryDayRunPlanNew, loadScriptNew } from '@/api/simulation';
|
||||||
@ -99,9 +96,6 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('runPlan', [
|
|
||||||
'stations'
|
|
||||||
]),
|
|
||||||
group() {
|
group() {
|
||||||
return this.$route.query.group;
|
return this.$route.query.group;
|
||||||
},
|
},
|
||||||
@ -134,9 +128,8 @@ export default {
|
|||||||
},
|
},
|
||||||
'$store.state.training.switchcount': async function () {
|
'$store.state.training.switchcount': async function () {
|
||||||
if (this.group) {
|
if (this.group) {
|
||||||
const started = this.$store.state.training.started;
|
if (this.$store.state.training.started) {
|
||||||
if (started) {
|
await this.loadRunData();
|
||||||
await this.loadRunData(this.$route.query);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -154,17 +147,17 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
await this.loadRunData(this.$route.query);
|
await this.loadRunData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadRunData(opt) {
|
loadRunData() {
|
||||||
this.$store.dispatch('runPlan/clear').then(() => {
|
this.$store.dispatch('runPlan/clear').then(() => {
|
||||||
if (opt && opt.mapId) {
|
if (this.group) {
|
||||||
this.viewDisabled = true;
|
this.viewDisabled = true;
|
||||||
getByGroupStationList(this.$route.query.group).then(response => {
|
// 获取排序的车站列表
|
||||||
// getStationList(opt.mapId).then(response => {
|
getByGroupStationList(this.group).then(response => {
|
||||||
this.$store.dispatch('runPlan/setStations', response.data).then(() => {
|
this.$store.dispatch('runPlan/setStations', response.data).then(() => {
|
||||||
getEveryDayRunPlanNew(this.group).then(resp => {
|
getEveryDayRunPlanNew(this.group).then(resp => { // 获取仿真运行图
|
||||||
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
||||||
this.$store.dispatch('runPlan/setInitialPlanData', resp.data);
|
this.$store.dispatch('runPlan/setInitialPlanData', resp.data);
|
||||||
this.viewDisabled = false;
|
this.viewDisabled = false;
|
||||||
|
@ -46,7 +46,6 @@ export default {
|
|||||||
return {
|
return {
|
||||||
isDisable: false,
|
isDisable: false,
|
||||||
isScriptCommand:false
|
isScriptCommand:false
|
||||||
// isSaveStage: true,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -91,14 +90,7 @@ export default {
|
|||||||
this.isDisable = true;
|
this.isDisable = true;
|
||||||
const data = {
|
const data = {
|
||||||
time: model.initTime
|
time: model.initTime
|
||||||
// loadNumber:this.trainList.length
|
|
||||||
};
|
};
|
||||||
// const data = {
|
|
||||||
// time: model.initTime
|
|
||||||
// };
|
|
||||||
// if (this.$route.query.prdType === '04') {
|
|
||||||
// data.loadNumber = model.loadNum;
|
|
||||||
// }
|
|
||||||
ranAsPlan(data, this.group).then(res => {
|
ranAsPlan(data, this.group).then(res => {
|
||||||
this.$store.dispatch('training/simulationStart').then(() => {
|
this.$store.dispatch('training/simulationStart').then(() => {
|
||||||
this.$store.dispatch('map/setRunPlanStatus', true);
|
this.$store.dispatch('map/setRunPlanStatus', true);
|
||||||
|
@ -270,7 +270,6 @@ export default {
|
|||||||
resetSize() {
|
resetSize() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$jlmap && this.$jlmap.resize({ width: this.width, height: this.height });
|
this.$jlmap && this.$jlmap.resize({ width: this.width, height: this.height });
|
||||||
// this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: this.offsetStationCode });
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$store.dispatch('config/resetCanvasOffset');
|
this.$store.dispatch('config/resetCanvasOffset');
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
@ -30,9 +30,7 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.config.menuBarLoadedCount': function (val) {
|
'$store.state.config.menuBarLoadedCount': function (val) {
|
||||||
this.$nextTick(() => {
|
this.setPosition();
|
||||||
this.setPosition();
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
'$route' () {
|
'$route' () {
|
||||||
this.setOffsetX();
|
this.setOffsetX();
|
||||||
|
@ -28,9 +28,7 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.config.menuBarLoadedCount': function (val) {
|
'$store.state.config.menuBarLoadedCount': function (val) {
|
||||||
this.$nextTick(() => {
|
this.setPosition();
|
||||||
this.setPosition();
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
'$route' () {
|
'$route' () {
|
||||||
this.setOffsetX();
|
this.setOffsetX();
|
||||||
|
@ -38,26 +38,22 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
setPosition() {
|
setPosition() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
let offset = (this.$route.path.includes('displayNew') || this.$route.path.includes('scriptDisplayNew')) && (this.$route.query.lineCode == 10 || this.$route.query.lineCode == 11) ? 73 : 15;
|
const offset = (this.$route.path.includes('displayNew') || this.$route.path.includes('scriptDisplayNew')) && (this.$route.query.lineCode == 10 || this.$route.query.lineCode == 11) ? 73 : 15;
|
||||||
const menuBar = document.getElementById('menuBar');
|
const menuBar = document.getElementById('menuBar');
|
||||||
const menuTool = document.getElementById('menuTool');
|
const menuTool = document.getElementById('menuTool');
|
||||||
if (menuBar) {
|
if (menuBar) {
|
||||||
offset += (menuBar.offsetHeight || 0);
|
this.offset = (menuBar.offsetHeight || 0) + offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (menuTool) {
|
if (menuTool) {
|
||||||
offset += (menuTool.offsetHeight || 0);
|
this.offset = (menuTool.offsetHeight || 0) + offset;
|
||||||
}
|
|
||||||
|
|
||||||
if (this.offset != offset) {
|
|
||||||
this.offset = offset;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
setShrinkCanvas() {
|
setShrinkCanvas() { // 放大
|
||||||
this.$emit('setShrink');
|
this.$emit('setShrink');
|
||||||
},
|
},
|
||||||
setMagnifyCanvas() {
|
setMagnifyCanvas() { // 缩小
|
||||||
this.$emit('setMagnify');
|
this.$emit('setMagnify');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -167,7 +167,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.config.menuBarLoadedCount': function (val) {
|
'$store.state.config.menuBarLoadedCount': function (val) { // menuBar加载完成
|
||||||
this.setPosition();
|
this.setPosition();
|
||||||
},
|
},
|
||||||
'$store.state.training.prdType': function (prdType) {
|
'$store.state.training.prdType': function (prdType) {
|
||||||
|
@ -47,7 +47,6 @@ import { getSimulationQrcode } from '@/api/jointSimulation';
|
|||||||
import { getSessionStorage } from '@/utils/auth';
|
import { getSessionStorage } from '@/utils/auth';
|
||||||
import { refereeExitSimulation, quitCurrentRace, startPracticalCompetition, submitPracticalCompetition } from '@/api/competition';
|
import { refereeExitSimulation, quitCurrentRace, startPracticalCompetition, submitPracticalCompetition } from '@/api/competition';
|
||||||
import { NoQrcodeList } from '@/scripts/ProjectConfig';
|
import { NoQrcodeList } from '@/scripts/ProjectConfig';
|
||||||
// import { prefixIntrger } from '@/utils/date';
|
|
||||||
import localStore from 'storejs';
|
import localStore from 'storejs';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -140,10 +139,16 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'$store.state.socket.simulationStart': async function (val) {
|
// '$store.state.socket.simulationStart': async function (val) {
|
||||||
|
// if (val) {
|
||||||
|
// // this.$store.dispatch('training/setInitTime', +new Date(val));
|
||||||
|
// // this.$store.dispatch('training/simulationStart');
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
'$store.state.training.started': function (val) {
|
||||||
|
this.isDisable = false;
|
||||||
if (val) {
|
if (val) {
|
||||||
this.$store.dispatch('training/setInitTime', +new Date(val));
|
this.isDisable = true;
|
||||||
this.$store.dispatch('training/simulationStart');
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'$store.state.socket.simulationOver':function(val) {
|
'$store.state.socket.simulationOver':function(val) {
|
||||||
@ -227,7 +232,6 @@ export default {
|
|||||||
},
|
},
|
||||||
// 开始仿真
|
// 开始仿真
|
||||||
start(model) {
|
start(model) {
|
||||||
this.isDisable = true;
|
|
||||||
const data = {
|
const data = {
|
||||||
time: model.initTime
|
time: model.initTime
|
||||||
};
|
};
|
||||||
|
@ -261,8 +261,8 @@ export default {
|
|||||||
this.$messageBox(`${this.$t('approval.revokeScriptFailed')}: ${error.message}`);
|
this.$messageBox(`${this.$t('approval.revokeScriptFailed')}: ${error.message}`);
|
||||||
});
|
});
|
||||||
}).catch(() => { });
|
}).catch(() => { });
|
||||||
},
|
},
|
||||||
// 剧本预览
|
// 剧本预览
|
||||||
previewScript(index, row) {
|
previewScript(index, row) {
|
||||||
const drawWay = this.$route.query.drawWay;
|
const drawWay = this.$route.query.drawWay;
|
||||||
if (drawWay && JSON.parse(drawWay)) {
|
if (drawWay && JSON.parse(drawWay)) {
|
||||||
|
@ -56,14 +56,8 @@ export default {
|
|||||||
getScriptMemberDataNew(group).then(response=>{
|
getScriptMemberDataNew(group).then(response=>{
|
||||||
const lastData = JSON.stringify(response.data);
|
const lastData = JSON.stringify(response.data);
|
||||||
this.allRoleData = this.coverData(lastData, ConstConfig.ConstSelect.roleTypeNew);
|
this.allRoleData = this.coverData(lastData, ConstConfig.ConstSelect.roleTypeNew);
|
||||||
// lastData = lastData.replace(new RegExp('id', 'g'), 'key');
|
|
||||||
// lastData = JSON.parse(lastData);
|
|
||||||
// this.allRoleData = lastData;
|
|
||||||
getScriptPlayMemberNew(group).then(response=>{
|
getScriptPlayMemberNew(group).then(response=>{
|
||||||
const last = response.data;
|
const last = response.data;
|
||||||
// let userdata=JSON.stringify(response.data)
|
|
||||||
// let reg=new RegExp('\"id\":\"(.*?)\\\"','g');
|
|
||||||
// let datalist=userdata.match(reg);
|
|
||||||
const data = [];
|
const data = [];
|
||||||
last.forEach(function(element) { data.push(element.id); });
|
last.forEach(function(element) { data.push(element.id); });
|
||||||
this.selectRoleData = data;
|
this.selectRoleData = data;
|
||||||
@ -76,9 +70,6 @@ export default {
|
|||||||
this.allRoleData = this.coverData(lastData, ConstConfig.ConstSelect.roleType);
|
this.allRoleData = this.coverData(lastData, ConstConfig.ConstSelect.roleType);
|
||||||
getScriptPlayMember(group).then(response=>{
|
getScriptPlayMember(group).then(response=>{
|
||||||
const last = response.data;
|
const last = response.data;
|
||||||
// let userdata=JSON.stringify(response.data)
|
|
||||||
// let reg=new RegExp('\"id\":\"(.*?)\\\"','g');
|
|
||||||
// let datalist=userdata.match(reg);
|
|
||||||
const data = [];
|
const data = [];
|
||||||
last.forEach(function(element) { data.push(element.id); });
|
last.forEach(function(element) { data.push(element.id); });
|
||||||
this.selectRoleData = data;
|
this.selectRoleData = data;
|
||||||
|
Loading…
Reference in New Issue
Block a user