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.topic = '/user/queue/simulation/drive/'+routegroup;
|
||||
let header = {'X-Token': getToken() };
|
||||
|
||||
this.updatamap = function(newsectionlist,newlinklist,newsignallist,newstationstandlist,newtrainlisttest,newrealsectionlist,newrails, materiallist, nowaction, scene) {
|
||||
// console.log(mapdata);
|
||||
// console.log(newtrainlisttest);
|
||||
@ -104,13 +103,17 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
|
||||
return;
|
||||
}
|
||||
if(data.type == "Train_Hmi_3D"){
|
||||
// console.log(data.body);
|
||||
updatestatus(data.body);
|
||||
if(data.body.trust == '1'){
|
||||
updateDriverTrust(data.body.code,true);
|
||||
}else{
|
||||
updateDriverTrust(data.body.code,false);
|
||||
}
|
||||
// trainhmi(data.body);
|
||||
|
||||
// if(data.body.trust){
|
||||
// if(data.body.trust == '1'){
|
||||
// updateDriverTrust(data.body.code,true);
|
||||
// }else{
|
||||
// updateDriverTrust(data.body.code,false);
|
||||
// }
|
||||
// }
|
||||
|
||||
return;
|
||||
}
|
||||
// if (event.data.type== 'SIGNAL' && signallist) {
|
||||
@ -338,8 +341,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
|
||||
}
|
||||
|
||||
}else{
|
||||
console.log(trainmodel.children[0].position.z);
|
||||
console.log(pos.z);
|
||||
//
|
||||
if(trainmodel.children[0].position.z < pos.z){
|
||||
trainmodel.children[0].up = new THREE.Vector3(-1,0,0);
|
||||
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){
|
||||
// console.log(data);
|
||||
|
@ -228,6 +228,10 @@ export default {
|
||||
label: '越引导信号行驶',
|
||||
handler: this.handleOverFuideSignal
|
||||
},
|
||||
{
|
||||
label: 'URM模式驾驶',
|
||||
handler: this.handleURMTrain
|
||||
},
|
||||
{
|
||||
label: '越红灯行驶',
|
||||
handler: this.handleOverEedLight
|
||||
@ -365,6 +369,18 @@ export default {
|
||||
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() { // 限速指令
|
||||
this.$refs.speedLimit.doShow(this.selected);
|
||||
},
|
||||
|
@ -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';
|
||||
|
@ -121,7 +121,7 @@ import axios from 'axios';
|
||||
if(netdata.data.type == "SCRIPT_MAKING"){
|
||||
this.tuoguanbutton = true;
|
||||
}
|
||||
this.updatetrainlist();
|
||||
this.inittrainlist();
|
||||
});
|
||||
}
|
||||
|
||||
@ -193,7 +193,7 @@ import axios from 'axios';
|
||||
this.$store.dispatch('training/updateMemberTrust', {deviceCode:code,trust:trustStatus});
|
||||
}
|
||||
},
|
||||
updatetrainlist(){
|
||||
inittrainlist(){
|
||||
getSimulationTrainlistNew(this.group).then(netdata => {
|
||||
this.options = [];
|
||||
this.trainlist = netdata.data;
|
||||
@ -268,9 +268,62 @@ 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;
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
// getSimulationMembersNew(this.group).then(netdata => {
|
||||
|
||||
// for(let i=0,leni=netdata.data.length;i<leni;i++){
|
||||
|
@ -179,11 +179,11 @@
|
||||
driverlighttf:"rotate(0deg)",
|
||||
headlighttf:"rotate(0deg)",
|
||||
|
||||
atoOn:null,
|
||||
// atoOn:null,
|
||||
atobuttonimg:"/static/jl3d/control/green.png",
|
||||
driveMode:null,
|
||||
// driveMode:null,
|
||||
rmbuttonimg:"/static/jl3d/control/green.png",
|
||||
runLevel:null,
|
||||
// runLevel:null,
|
||||
cbtcbuttonimg:"/static/jl3d/control/green.png",
|
||||
doorleftstatus:false,
|
||||
doorrightstatus:false,
|
||||
@ -390,24 +390,25 @@
|
||||
// console.log(netdata);
|
||||
});
|
||||
},
|
||||
updatedoorlight: function (doorleftmode,doorrightmode){
|
||||
if(doorleftmode != this.doorleftstatus){
|
||||
this.doorleftstatus = doorleftmode;
|
||||
if(doorleftmode == true){
|
||||
updatedoorlight: function (newdata){
|
||||
if(this.doorleftstatus != newdata.leftDoorCanClose){
|
||||
this.doorleftstatus = newdata.leftDoorCanClose;
|
||||
if(newdata.leftDoorCanClose == true){
|
||||
this.doorleftimg = this.greenlimg;
|
||||
}else{
|
||||
this.doorleftimg = this.greenimg;
|
||||
}
|
||||
}
|
||||
if(doorrightmode != this.doorrightstatus){
|
||||
this.doorrightstatus = doorrightmode;
|
||||
if(doorrightmode == true){
|
||||
if(this.doorleftstatus != newdata.rightDoorCanClose){
|
||||
this.doorrightstatus = newdata.rightDoorCanClose;
|
||||
if(newdata.rightDoorCanClose == true){
|
||||
this.doorrightimg = this.greenlimg;
|
||||
}else{
|
||||
this.doorrightimg = this.greenimg;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
dloclick: function (e){
|
||||
let data = {
|
||||
@ -473,24 +474,24 @@
|
||||
},
|
||||
updatabuttonlight: function (data){
|
||||
// console.log(data);
|
||||
if(data.runLevel!= this.runLevel){
|
||||
this.runLevel = data.runLevel;
|
||||
if(data.runLevel){
|
||||
// this.runLevel = data.runLevel;
|
||||
if(data.runLevel == "CBTC"){
|
||||
this.cbtcbuttonimg = this.greenlimg;
|
||||
}else{
|
||||
this.cbtcbuttonimg = this.greenimg;
|
||||
}
|
||||
}
|
||||
if(data.driveMode!= this.driveMode){
|
||||
this.driveMode = data.driveMode;
|
||||
if(data.driveMode){
|
||||
// this.driveMode = data.driveMode;
|
||||
if(data.driveMode == "RM"){
|
||||
this.rmbuttonimg = this.greenlimg;
|
||||
}else{
|
||||
this.rmbuttonimg = this.greenimg;
|
||||
}
|
||||
}
|
||||
if(data.atoOn!= this.atoOn){
|
||||
this.atoOn = data.atoOn;
|
||||
if(data.atoOn){
|
||||
// this.atoOn = data.atoOn;
|
||||
if(data.atoOn){
|
||||
this.atobuttonimg = this.greenlimg;
|
||||
}else{
|
||||
|
@ -285,10 +285,12 @@ export default {
|
||||
},
|
||||
|
||||
updatestatus(newdata){
|
||||
if(newdata.groupNumber){
|
||||
this.trainnum = newdata.groupNumber;
|
||||
}
|
||||
updatedoorlight(newdata);
|
||||
this.$refs.mmiui.updatetrainstatus(newdata);
|
||||
updatabuttonlight(newdata);
|
||||
updatedoorlight(newdata.leftDoorCanClose,newdata.rightDoorCanClose);
|
||||
},
|
||||
warningmsg(nowmsg){
|
||||
this.controlmsg = nowmsg;
|
||||
|
@ -4,16 +4,14 @@ export function mmirender(dom) {
|
||||
let scope = this;
|
||||
|
||||
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 ) );
|
||||
// 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 );
|
||||
|
||||
let renderer = new THREE.WebGLRenderer( { antialias: true } );
|
||||
renderer.setPixelRatio( window.devicePixelRatio );
|
||||
let renderer = new THREE.WebGLRenderer( );
|
||||
// renderer.setPixelRatio( window.devicePixelRatio );
|
||||
renderer.setSize( 360, 200 );
|
||||
|
||||
var geometry = new THREE.PlaneBufferGeometry( 80, 80, 2 );
|
||||
@ -91,16 +89,18 @@ export function mmirender(dom) {
|
||||
|
||||
|
||||
dom.appendChild( renderer.domElement);
|
||||
animate();
|
||||
renderer.render( scene, camera );
|
||||
// animate();
|
||||
|
||||
function animate() {
|
||||
//zc.rotation.z -= 0.01;
|
||||
renderer.render( scene, camera );
|
||||
requestAnimationFrame(animate);
|
||||
// requestAnimationFrame(animate);
|
||||
}
|
||||
|
||||
this.updatezz = function(speed){
|
||||
zc.rotation.z = -Math.PI*(65.8+169*speed/110)/100;
|
||||
|
||||
renderer.render( scene, camera );
|
||||
}
|
||||
this.updateatp = function(atpspeed){
|
||||
if(atpspeed<0){
|
||||
@ -110,6 +110,7 @@ export function mmirender(dom) {
|
||||
atp.rotation.z = -Math.PI*(65.8+169*atpspeed/110)/100;
|
||||
}
|
||||
|
||||
// renderer.render( scene, camera );
|
||||
}
|
||||
|
||||
this.updateato = function(atospeed){
|
||||
@ -120,5 +121,6 @@ export function mmirender(dom) {
|
||||
ato.rotation.z = -Math.PI*(65.8+169*atospeed/110)/100;
|
||||
}
|
||||
|
||||
// renderer.render( scene, camera );
|
||||
}
|
||||
}
|
||||
|
@ -211,9 +211,12 @@ export default {
|
||||
},
|
||||
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.updatammirunlevel(newdata.runLevel);
|
||||
@ -221,30 +224,38 @@ export default {
|
||||
// this.updatemmidrivemode(newdata.driveMode);
|
||||
//
|
||||
// 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);
|
||||
},
|
||||
updatemmistate(aaa){
|
||||
|
||||
},
|
||||
updatemmispeedview(speed,atpspeed,atospeed) {
|
||||
updateMmiSpeedView(speed,atpspeed,atospeed) {
|
||||
this.nowspeed = parseInt(speed);
|
||||
if(this.mmimodel.updatezz){
|
||||
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.m9state1 == false){
|
||||
if(speed>atospeed){
|
||||
if(this.nowspeed>this.nowatospeed){
|
||||
this.newa1state = "yellow";
|
||||
}else{
|
||||
this.newa1state = "black";
|
||||
@ -327,7 +338,7 @@ export default {
|
||||
// }
|
||||
},
|
||||
updatemmidrivemodelevel(runlevel,dirvemode,atoon,atpon){
|
||||
if(runlevel != this.m2state){
|
||||
if(runlevel){
|
||||
if(runlevel == "CBTC"){
|
||||
this.m2state = runlevel;
|
||||
this.m2image = this.images.m2['cbtc'];
|
||||
@ -340,7 +351,7 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
if(dirvemode != this.m1state){
|
||||
if(dirvemode){
|
||||
if(dirvemode == "CM"){
|
||||
this.m1state = dirvemode;
|
||||
this.m1image = this.images.m1['cm'];
|
||||
@ -356,7 +367,7 @@ export default {
|
||||
}
|
||||
}
|
||||
//
|
||||
if(this.m9state1 != atoon){
|
||||
if(this.m9state1){
|
||||
this.m9state1 = atoon;
|
||||
if(atoon){
|
||||
|
||||
@ -396,7 +407,7 @@ export default {
|
||||
|
||||
}
|
||||
},
|
||||
updatemmilen(len) {
|
||||
updateMmiLen(len) {
|
||||
//this.malen = 150+"px";
|
||||
if(len>=750){
|
||||
this.malen = 158+"px";
|
||||
@ -449,13 +460,18 @@ export default {
|
||||
this.c1image = this.images.c1[this.c1state];
|
||||
}
|
||||
},
|
||||
updatemmistation(end,next){
|
||||
if(next != this.nextstation || end != this.endstation){
|
||||
this.endstation = end;
|
||||
updateMmiNextStation(next){
|
||||
if(next){
|
||||
this.nextstation = next;
|
||||
}
|
||||
|
||||
},
|
||||
updateMmiEndStation(end){
|
||||
if(end){
|
||||
this.endstation = end;
|
||||
}
|
||||
|
||||
},
|
||||
},
|
||||
beforeDestroy() {
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ import { checkLoginLine } from '@/api/login';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import MenuReplay from './menuReplay';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { DeviceMenu, getDeviceMenuByDeviceType } from '@/scripts/ConstDic';
|
||||
import { getDeviceMenuByDeviceType } from '@/scripts/ConstDic';
|
||||
import { creatSubscribe, clearSubscribe, displayTopic} from '@/utils/stomp';
|
||||
export default {
|
||||
name:'RefereeDisplay',
|
||||
@ -151,7 +151,6 @@ export default {
|
||||
async initLoadData() {
|
||||
this.$store.dispatch('training/reset');
|
||||
try {
|
||||
// await this.loadSimulationInfo();
|
||||
await this.initLoadRecordData();
|
||||
this.checkLoginLineTimer();
|
||||
} catch (error) {
|
||||
@ -219,29 +218,6 @@ export default {
|
||||
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() {
|
||||
this.$nextTick(() => {
|
||||
const width = this.width;
|
||||
|
@ -141,10 +141,6 @@ export default {
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
// $store.state.config.menuBarLoadedCount
|
||||
// 'offset': function (val) {
|
||||
// this.dialogShow && this.dragEvent();
|
||||
// },
|
||||
'$store.state.socket.autoFaultTrigger':function(val) {
|
||||
this.dialogShow && this.getSimulationFaultRules();
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ import Cookies from 'js-cookie';
|
||||
|
||||
// 三维
|
||||
// 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';
|
||||
|
||||
export default {
|
||||
@ -63,8 +63,8 @@ export default {
|
||||
ScriptPreviewChat,
|
||||
MapSystemDraft,
|
||||
MenuSchema,
|
||||
MenuSystemTime,
|
||||
Jl3dDrive
|
||||
MenuSystemTime
|
||||
// Jl3dDrive
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -295,8 +295,8 @@ export default {
|
||||
lastData = Object.values(lastData);
|
||||
const lastMemberList = [];
|
||||
const dispatcherList = [];
|
||||
const electricDispatcherList = [];
|
||||
const depotDispatcherList = [];
|
||||
// const electricDispatcherList = [];
|
||||
// const depotDispatcherList = [];
|
||||
const stationSupervisorList = [];
|
||||
const driverList = [];
|
||||
const maintainerList = [];
|
||||
|
@ -12,12 +12,14 @@
|
||||
:offset-bottom="offsetBottom"
|
||||
:data-error="dataError"
|
||||
:script-id="scriptId"
|
||||
:show-station="showStation"
|
||||
@hidepanel="hidepanel"
|
||||
@passflow="passflow"
|
||||
@quitQuest="quitQuest"
|
||||
@jl3dstation="jl3dstation"
|
||||
@devicemodel="devicemodel"
|
||||
@showScheduling="showScheduling"
|
||||
@switchStationMode="switchStationMode"
|
||||
/>
|
||||
<menu-lesson
|
||||
v-if="isLesson"
|
||||
@ -212,7 +214,7 @@ export default {
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.config.menuBarLoadedCount': function (val) {
|
||||
'$store.state.config.menuBarLoadedCount': function (val) { // menuBar加载完成
|
||||
this.setPosition();
|
||||
},
|
||||
'$store.state.training.prdType': function (val) { // 根据权限类型计算高度
|
||||
@ -356,10 +358,9 @@ export default {
|
||||
this.endViewLoading();
|
||||
}
|
||||
},
|
||||
// 加载仿真信息
|
||||
// 新版地图根据仿真group获取仿真基础信息
|
||||
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});
|
||||
}).catch(() => {
|
||||
this.$messageBox('获取仿真成员列表失败!');
|
||||
@ -372,11 +373,11 @@ export default {
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`));
|
||||
this.planRunning = resp.data.planRunning;
|
||||
this.$store.dispatch('map/setRunPlanStatus', this.planRunning);
|
||||
if (!resp.data.planRunning) {
|
||||
if (!this.planRunning) {
|
||||
this.$store.dispatch('training/over');
|
||||
}
|
||||
if (this.isDemon) {
|
||||
this.$refs.menuDemon.initPlannedDriving(resp.data.planRunning);
|
||||
this.$refs.menuDemon.initPlannedDriving(this.planRunning); // 是否正在按计划行车
|
||||
} else if (this.isScript) {
|
||||
// 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>
|
||||
<template v-if="!dataError">
|
||||
<template v-if="isShowQuest">
|
||||
<!-- && !isDesignPlatform -->
|
||||
<el-button v-if="!isDesignPlatform" type="danger" size="small" @click="handleQuitQuest">{{ $t('display.demon.exitScript') }}</el-button>
|
||||
<el-button v-if="!isDesignPlatform" type="danger" size="small" @click="handleQuitQuest">退出剧本</el-button>
|
||||
</template>
|
||||
<template v-else-if="!projectDevice">
|
||||
<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>
|
||||
<!-- 设备视图 -->
|
||||
<el-button v-if="isShow3dmodel && !isShowScheduling" size="small" @click="jumpjlmap3dmodel">{{ jl3dmodel }}</el-button>
|
||||
@ -67,6 +66,12 @@ export default {
|
||||
return 0;
|
||||
}
|
||||
},
|
||||
showStation: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
dataError: {
|
||||
type: Boolean,
|
||||
default() {
|
||||
@ -129,13 +134,6 @@ export default {
|
||||
'$store.state.training.subscribeCount': function () {
|
||||
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) {
|
||||
(val || []).forEach(item => {
|
||||
if (item.messageType === 'KICK_OUT' && item.userId == this.$store.state.user.id) {
|
||||
@ -192,7 +190,7 @@ export default {
|
||||
selectBeginTime() {
|
||||
this.$refs.setTime.doShow();
|
||||
},
|
||||
start(model) {
|
||||
start(model) { // 开始仿真
|
||||
this.isDisable = true;
|
||||
const data = {
|
||||
time: model.initTime
|
||||
@ -205,6 +203,9 @@ export default {
|
||||
this.$store.dispatch('map/setRunPlanStatus', true);
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${model.initTime}`));
|
||||
this.$store.dispatch('map/setShowCentralizedStationNum');
|
||||
if (this.$route.query.lineCode == '06') {
|
||||
this.$emit('switchStationMode', this.showStation); // 宁波线 过滤列车显示
|
||||
}
|
||||
});
|
||||
}).catch(error => {
|
||||
this.isDisable = false;
|
||||
@ -249,7 +250,7 @@ export default {
|
||||
},
|
||||
handleQuitQuest() {
|
||||
quitScriptNew(this.group).then(resp => {
|
||||
getSimulationInfoNew(this.group).then(()=>{
|
||||
getSimulationInfoNew(this.group).then((res)=>{
|
||||
this.quitQuest();
|
||||
this.initLoadPage();
|
||||
this.clearAllData();
|
||||
|
@ -10,8 +10,6 @@
|
||||
</div>
|
||||
<div class="practice-bottom" :style="{bottom: offsetBottom + 'px'}">
|
||||
<el-button-group>
|
||||
<!-- v-if="!isScriptCommand" -->
|
||||
<!-- v-if="!isScriptCommand" -->
|
||||
<el-button type="success" :disabled="isDisable || dataError" @click="selectBeginTime">按计划行车</el-button>
|
||||
<el-button type="danger" :disabled="dataError" @click="end">初始化</el-button>
|
||||
<el-button type="primary" @click="back">返回</el-button>
|
||||
@ -98,14 +96,7 @@ export default {
|
||||
this.isDisable = true;
|
||||
const data = {
|
||||
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 => {
|
||||
this.$store.dispatch('training/simulationStart').then(() => {
|
||||
this.$store.dispatch('map/setRunPlanStatus', true);
|
||||
|
@ -1,28 +1,27 @@
|
||||
<template>
|
||||
<div>
|
||||
<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-option v-for="item in swchList" :key="item.value" :label="item.name" :value="item.value" />
|
||||
</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-option v-for="item in stationList" :key="item.value" :label="item.name" :value="item.value" />
|
||||
</el-select>
|
||||
<template v-if="!dataError">
|
||||
<el-button-group>
|
||||
<el-button v-if="isDemon && isDesignPlatform && !dataError" size="small" :disabled="viewDisabled" type="success" @click="viewScriptRoles">{{ $t('display.schema.selectRoles') }}</el-button>
|
||||
<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="mode==OperateMode.FAULT && !dataError" size="small" type="danger" @click="setFault">自动故障设置</el-button>
|
||||
<el-button v-if="notScript && runing" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('display.schema.previewRunDiagram') }}</el-button>
|
||||
<el-button v-if="notScript && !runing" size="small" type="warning" @click="loadRunPlan">{{ $t('display.schema.loadRunDiagram') }}</el-button>
|
||||
<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.FAULT">故障模式</el-radio-button>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</div>
|
||||
<fault-choose v-if="isDemon || isScript" ref="faultChoose" :group="group" :offset="offset" />
|
||||
<run-plan-Load ref="runPlanLoad" :group="group" />
|
||||
@ -36,9 +35,7 @@ import RunPlanLoad from './demon/runPlanLoad';
|
||||
import RunPlanView from './demon/runPlanView';
|
||||
import FaultChoose from './demon/faultChoose';
|
||||
import AddQuest from './demon/addQuest';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
// import { getStationList } from '@/api/runplan';
|
||||
import { getByGroupStationList } from '@/api/jmap/map';
|
||||
import {loadDraftScript, loadDraftScriptNew} from '@/api/designPlatform';
|
||||
import { getEveryDayRunPlanNew, loadScriptNew } from '@/api/simulation';
|
||||
@ -99,9 +96,6 @@ export default {
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('runPlan', [
|
||||
'stations'
|
||||
]),
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
},
|
||||
@ -134,9 +128,8 @@ export default {
|
||||
},
|
||||
'$store.state.training.switchcount': async function () {
|
||||
if (this.group) {
|
||||
const started = this.$store.state.training.started;
|
||||
if (started) {
|
||||
await this.loadRunData(this.$route.query);
|
||||
if (this.$store.state.training.started) {
|
||||
await this.loadRunData();
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -154,17 +147,17 @@ export default {
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
await this.loadRunData(this.$route.query);
|
||||
await this.loadRunData();
|
||||
},
|
||||
methods: {
|
||||
loadRunData(opt) {
|
||||
loadRunData() {
|
||||
this.$store.dispatch('runPlan/clear').then(() => {
|
||||
if (opt && opt.mapId) {
|
||||
if (this.group) {
|
||||
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(() => {
|
||||
getEveryDayRunPlanNew(this.group).then(resp => {
|
||||
getEveryDayRunPlanNew(this.group).then(resp => { // 获取仿真运行图
|
||||
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
||||
this.$store.dispatch('runPlan/setInitialPlanData', resp.data);
|
||||
this.viewDisabled = false;
|
||||
|
@ -46,7 +46,6 @@ export default {
|
||||
return {
|
||||
isDisable: false,
|
||||
isScriptCommand:false
|
||||
// isSaveStage: true,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -91,14 +90,7 @@ export default {
|
||||
this.isDisable = true;
|
||||
const data = {
|
||||
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 => {
|
||||
this.$store.dispatch('training/simulationStart').then(() => {
|
||||
this.$store.dispatch('map/setRunPlanStatus', true);
|
||||
|
@ -270,7 +270,6 @@ export default {
|
||||
resetSize() {
|
||||
this.$nextTick(() => {
|
||||
this.$jlmap && this.$jlmap.resize({ width: this.width, height: this.height });
|
||||
// this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: this.offsetStationCode });
|
||||
setTimeout(() => {
|
||||
this.$store.dispatch('config/resetCanvasOffset');
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
|
@ -30,9 +30,7 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
'$store.state.config.menuBarLoadedCount': function (val) {
|
||||
this.$nextTick(() => {
|
||||
this.setPosition();
|
||||
});
|
||||
},
|
||||
'$route' () {
|
||||
this.setOffsetX();
|
||||
|
@ -28,9 +28,7 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
'$store.state.config.menuBarLoadedCount': function (val) {
|
||||
this.$nextTick(() => {
|
||||
this.setPosition();
|
||||
});
|
||||
},
|
||||
'$route' () {
|
||||
this.setOffsetX();
|
||||
|
@ -38,26 +38,22 @@ export default {
|
||||
methods: {
|
||||
setPosition() {
|
||||
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 menuTool = document.getElementById('menuTool');
|
||||
if (menuBar) {
|
||||
offset += (menuBar.offsetHeight || 0);
|
||||
this.offset = (menuBar.offsetHeight || 0) + offset;
|
||||
}
|
||||
|
||||
if (menuTool) {
|
||||
offset += (menuTool.offsetHeight || 0);
|
||||
}
|
||||
|
||||
if (this.offset != offset) {
|
||||
this.offset = offset;
|
||||
this.offset = (menuTool.offsetHeight || 0) + offset;
|
||||
}
|
||||
});
|
||||
},
|
||||
setShrinkCanvas() {
|
||||
setShrinkCanvas() { // 放大
|
||||
this.$emit('setShrink');
|
||||
},
|
||||
setMagnifyCanvas() {
|
||||
setMagnifyCanvas() { // 缩小
|
||||
this.$emit('setMagnify');
|
||||
}
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ export default {
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.config.menuBarLoadedCount': function (val) {
|
||||
'$store.state.config.menuBarLoadedCount': function (val) { // menuBar加载完成
|
||||
this.setPosition();
|
||||
},
|
||||
'$store.state.training.prdType': function (prdType) {
|
||||
|
@ -47,7 +47,6 @@ import { getSimulationQrcode } from '@/api/jointSimulation';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import { refereeExitSimulation, quitCurrentRace, startPracticalCompetition, submitPracticalCompetition } from '@/api/competition';
|
||||
import { NoQrcodeList } from '@/scripts/ProjectConfig';
|
||||
// import { prefixIntrger } from '@/utils/date';
|
||||
import localStore from 'storejs';
|
||||
|
||||
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) {
|
||||
this.$store.dispatch('training/setInitTime', +new Date(val));
|
||||
this.$store.dispatch('training/simulationStart');
|
||||
this.isDisable = true;
|
||||
}
|
||||
},
|
||||
'$store.state.socket.simulationOver':function(val) {
|
||||
@ -227,7 +232,6 @@ export default {
|
||||
},
|
||||
// 开始仿真
|
||||
start(model) {
|
||||
this.isDisable = true;
|
||||
const data = {
|
||||
time: model.initTime
|
||||
};
|
||||
|
@ -56,14 +56,8 @@ export default {
|
||||
getScriptMemberDataNew(group).then(response=>{
|
||||
const lastData = JSON.stringify(response.data);
|
||||
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=>{
|
||||
const last = response.data;
|
||||
// let userdata=JSON.stringify(response.data)
|
||||
// let reg=new RegExp('\"id\":\"(.*?)\\\"','g');
|
||||
// let datalist=userdata.match(reg);
|
||||
const data = [];
|
||||
last.forEach(function(element) { data.push(element.id); });
|
||||
this.selectRoleData = data;
|
||||
@ -76,9 +70,6 @@ export default {
|
||||
this.allRoleData = this.coverData(lastData, ConstConfig.ConstSelect.roleType);
|
||||
getScriptPlayMember(group).then(response=>{
|
||||
const last = response.data;
|
||||
// let userdata=JSON.stringify(response.data)
|
||||
// let reg=new RegExp('\"id\":\"(.*?)\\\"','g');
|
||||
// let datalist=userdata.match(reg);
|
||||
const data = [];
|
||||
last.forEach(function(element) { data.push(element.id); });
|
||||
this.selectRoleData = data;
|
||||
|
Loading…
Reference in New Issue
Block a user