2019-07-26 13:32:43 +08:00
|
|
|
<template>
|
|
|
|
|
|
|
|
<div class="jalmap3ddiv">
|
|
|
|
|
2019-08-12 18:37:43 +08:00
|
|
|
<div class="trainstatus">
|
2019-08-14 15:57:52 +08:00
|
|
|
车组号:{{ trainnum }} {{ stoptimes }}
|
2019-08-12 18:37:43 +08:00
|
|
|
</div>
|
2019-07-26 13:32:43 +08:00
|
|
|
<div class="display-draft">
|
|
|
|
<el-button-group>
|
2019-08-12 18:37:43 +08:00
|
|
|
<!-- <el-button type="primary" @click="raystand">站台选择</el-button> -->
|
2019-09-03 16:45:56 +08:00
|
|
|
<el-button type="primary" @click="cctvplane">{{ cctvbuttonmsg }}</el-button>
|
2019-08-14 15:57:52 +08:00
|
|
|
<el-button type="primary" @click="showplane">{{ showbuttonmsg }}</el-button>
|
2019-07-26 13:32:43 +08:00
|
|
|
<el-button type="primary" @click="back">返回</el-button>
|
|
|
|
</el-button-group>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- <Jlmap3d-Msg v-bind:msgdata="msgdata" >
|
|
|
|
</Jlmap3d-Msg > -->
|
|
|
|
|
2019-08-12 18:37:43 +08:00
|
|
|
<div id="jlsimulation" class="jlmap3ddraw">
|
2019-08-14 15:57:52 +08:00
|
|
|
<canvas id="canvastexture" />
|
2019-07-26 13:32:43 +08:00
|
|
|
</div>
|
2019-09-03 16:45:56 +08:00
|
|
|
<div id="jlcctv" v-show="cctvshow" class="jlmap3cctv">
|
2019-08-20 18:30:17 +08:00
|
|
|
</div>
|
2019-07-26 13:32:43 +08:00
|
|
|
|
2019-08-14 15:57:52 +08:00
|
|
|
<Drive-Mmi v-if="mmishow" ref="mmiui" />
|
2019-08-12 18:37:43 +08:00
|
|
|
|
2019-08-14 15:57:52 +08:00
|
|
|
<Drive-Tms v-if="mmishow" />
|
2019-07-26 13:32:43 +08:00
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2019-08-14 15:57:52 +08:00
|
|
|
import Vue from 'vue';
|
|
|
|
import localStore from 'storejs';
|
|
|
|
import axios from 'axios';
|
|
|
|
|
|
|
|
import { mapGetters } from 'vuex';
|
|
|
|
|
|
|
|
// import ShowProperty from '@/views/jlmap3d/show/property';
|
|
|
|
|
|
|
|
import { simulationNotify, setTrainingCbtcInitTime } from '@/api/simulation';
|
|
|
|
|
|
|
|
import { getPublishMapDetail, getPublish3dMapDetail } from '@/api/jlmap3d/load3ddata';
|
|
|
|
|
|
|
|
import { UrlConfig } from '@/router/index';
|
|
|
|
|
|
|
|
import { JLmapDriving } from '@/jlmap3d/jl3ddrive/jl3ddrive';
|
|
|
|
|
|
|
|
import DriveMmi from '@/views/jlmap3d/drive/sceneview/mmiview';
|
|
|
|
import DriveTms from '@/views/jlmap3d/drive/sceneview/tmsview';
|
|
|
|
|
|
|
|
var train;
|
|
|
|
export default {
|
|
|
|
name: 'Jl3dDrive',
|
|
|
|
components: {
|
|
|
|
DriveMmi,
|
|
|
|
DriveTms
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
trainlist: null,
|
|
|
|
stationlist: null,
|
|
|
|
msgdata: null,
|
|
|
|
training: {
|
|
|
|
id: '',
|
|
|
|
name: '',
|
|
|
|
remarks: ''
|
|
|
|
},
|
|
|
|
mapdata: null,
|
|
|
|
jlmap3d: null,
|
|
|
|
selectmodel: null,
|
2019-09-03 16:45:56 +08:00
|
|
|
cctvshow:true,
|
|
|
|
cctvbuttonmsg: '车内监控——隐藏',
|
2019-08-14 15:57:52 +08:00
|
|
|
mmishow: false,
|
|
|
|
showbuttonmsg: '列车仪表——显示',
|
|
|
|
trainnum: '',
|
|
|
|
stoptimes: ''
|
|
|
|
};
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
'jlmap3d.nowspeed': {
|
|
|
|
handler: function (newVal, oldVal) {
|
|
|
|
if (newVal != oldVal) {
|
|
|
|
if (this.mmishow == true) {
|
|
|
|
this.$refs.mmiui.updatespeed(newVal);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
'jlmap3d.nowmxlen': {
|
|
|
|
handler: function (newVal, oldVal) {
|
|
|
|
if (newVal != oldVal) {
|
|
|
|
if (this.mmishow == true) {
|
|
|
|
this.$refs.mmiui.updatelen(newVal);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
'jlmap3d.atpspeed': {
|
|
|
|
handler: function (newVal, oldVal) {
|
|
|
|
if (newVal != oldVal) {
|
|
|
|
if (this.mmishow == true) {
|
|
|
|
this.$refs.mmiui.updateatpspeed(newVal);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
'jlmap3d.atospeed': {
|
|
|
|
handler: function (newVal, oldVal) {
|
|
|
|
if (newVal != oldVal) {
|
|
|
|
if (this.mmishow == true) {
|
|
|
|
this.$refs.mmiui.updateatospeed(newVal);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
'jlmap3d.trainnum': {
|
|
|
|
handler: function (newVal, oldVal) {
|
|
|
|
if (newVal != oldVal) {
|
|
|
|
this.trainnum = newVal;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
'jlmap3d.stime': {
|
|
|
|
handler: function (newVal, oldVal) {
|
|
|
|
if (newVal != oldVal) {
|
|
|
|
this.stoptimes = newVal;
|
|
|
|
}
|
|
|
|
}
|
2019-08-16 18:38:35 +08:00
|
|
|
},
|
|
|
|
'jlmap3d.drivecount': {
|
|
|
|
handler: function (newVal, oldVal) {
|
|
|
|
if (newVal != oldVal) {
|
|
|
|
this.$refs.mmiui.updatedrivedata(this.jlmap3d.drivedata);
|
|
|
|
}
|
|
|
|
}
|
2019-08-14 15:57:52 +08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
beforeDestroy() {
|
|
|
|
if (this.jlmap3d) {
|
|
|
|
this.jlmap3d.webwork.postMessage('off');
|
|
|
|
this.jlmap3d.endsocket();
|
|
|
|
this.jlmap3d.dispose();
|
|
|
|
this.jlmap3d = null;
|
|
|
|
|
|
|
|
// this.$destroy();
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
mounted() {
|
|
|
|
this.mmishow = true;
|
|
|
|
|
|
|
|
// this.$refs.mmiui.init();
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
show: function (skinCode) {
|
|
|
|
// console.log("show");
|
|
|
|
// console.log(skinCode);
|
|
|
|
// console.log(this.jlmap3d);
|
|
|
|
|
|
|
|
if (this.jlmap3d == null) {
|
|
|
|
this.init(skinCode);
|
|
|
|
} else {
|
|
|
|
// this.jlmap3d.restart();
|
|
|
|
this.jlmap3d.eventon();
|
|
|
|
this.jlmap3d.animateon();
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
init: function (skinCode) {
|
|
|
|
const mapdata = this.$store.getters['map/map'];
|
|
|
|
const dom = document.getElementById('app');
|
|
|
|
this.jlmap3d = new JLmapDriving(dom, mapdata, skinCode);
|
|
|
|
this.jlmap3d.eventon();
|
2019-09-03 16:45:56 +08:00
|
|
|
this.cctvshow = false;
|
2019-08-14 15:57:52 +08:00
|
|
|
|
|
|
|
},
|
|
|
|
raystand() {
|
|
|
|
this.jlmap3d.rayswitch('stand');
|
|
|
|
},
|
|
|
|
raytrain() {
|
|
|
|
this.jlmap3d.rayswitch('train');
|
|
|
|
},
|
|
|
|
raysection() {
|
|
|
|
this.jlmap3d.rayswitch('section');
|
|
|
|
},
|
|
|
|
raysignal() {
|
|
|
|
this.jlmap3d.rayswitch('signal');
|
|
|
|
},
|
|
|
|
rayswitch() {
|
|
|
|
this.jlmap3d.rayswitch('switch');
|
|
|
|
},
|
|
|
|
sstation(changedata) {
|
|
|
|
this.jlmap3d.updatecamera(changedata.mesh, 'station');
|
|
|
|
},
|
|
|
|
strain(changedata) {
|
|
|
|
if (changedata.dispose == false) {
|
|
|
|
this.jlmap3d.updatecamera(changedata, 'train');
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
back() {
|
|
|
|
this.$emit('showdriving');
|
|
|
|
this.jlmap3d.eventoff();
|
|
|
|
this.jlmap3d.animateoff();
|
|
|
|
// this.jlmap3d = null;
|
|
|
|
},
|
|
|
|
showplane() {
|
|
|
|
if (this.mmishow == true) {
|
|
|
|
this.showbuttonmsg = '列车仪表——隐藏';
|
|
|
|
this.mmishow = false;
|
|
|
|
} else {
|
|
|
|
this.showbuttonmsg = '列车仪表——显示';
|
|
|
|
this.mmishow = true;
|
|
|
|
}
|
|
|
|
|
2019-09-03 16:45:56 +08:00
|
|
|
},
|
|
|
|
cctvplane() {
|
|
|
|
if (this.cctvshow == true) {
|
|
|
|
this.cctvbuttonmsg = '车内监控——隐藏';
|
|
|
|
this.cctvshow = false;
|
|
|
|
this.jlmap3d.cctvoff();
|
|
|
|
} else {
|
|
|
|
this.cctvbuttonmsg = '车内监控——显示';
|
|
|
|
this.cctvshow = true;
|
|
|
|
this.jlmap3d.cctvon();
|
|
|
|
}
|
|
|
|
|
2019-08-14 15:57:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
};
|
2019-07-26 13:32:43 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
|
|
@import "src/styles/mixin.scss";
|
|
|
|
|
|
|
|
.display-card {
|
|
|
|
z-index: 9;
|
|
|
|
display: inline;
|
|
|
|
position: absolute;
|
|
|
|
top: 17px;
|
|
|
|
float: left;
|
|
|
|
left: 160px;
|
|
|
|
height: 32px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.display-card .el-row {
|
|
|
|
line-height: 32px !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
.display-score {
|
|
|
|
background-color: black;
|
|
|
|
display: -moz-inline-box;
|
|
|
|
display: inline-block;
|
|
|
|
text-align: left;
|
|
|
|
/* border: 1px solid lightskyblue; */
|
|
|
|
/* width: 100px; */
|
|
|
|
height: 32px;
|
|
|
|
line-height: 24px;
|
|
|
|
border-radius: 4px;
|
|
|
|
padding-left: 2px;
|
|
|
|
margin-left: 10px;
|
|
|
|
font-family: "Microsoft" !important;
|
|
|
|
font-size: 18px !important;
|
|
|
|
color: #fff;
|
|
|
|
}
|
|
|
|
|
|
|
|
.display-draft {
|
|
|
|
/* z-index: 1000; */
|
|
|
|
position: absolute;
|
|
|
|
float: right;
|
|
|
|
right: 40px;
|
2019-08-12 18:37:43 +08:00
|
|
|
top: 28px;
|
2019-07-26 13:32:43 +08:00
|
|
|
}
|
|
|
|
|
2019-08-12 18:37:43 +08:00
|
|
|
#jlsimulation {
|
|
|
|
width: 937px;
|
|
|
|
height: 937px;
|
2019-07-26 13:32:43 +08:00
|
|
|
}
|
|
|
|
|
2019-08-12 18:37:43 +08:00
|
|
|
.trainstatus{
|
|
|
|
left:0;
|
|
|
|
top:0;
|
|
|
|
width:350px;
|
|
|
|
height:30px;
|
|
|
|
background: #000000;
|
2019-07-26 13:32:43 +08:00
|
|
|
position:absolute;
|
2019-08-12 18:37:43 +08:00
|
|
|
text-align: center;
|
|
|
|
color:white;
|
|
|
|
font-size:25px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.jalmap3ddiv {
|
|
|
|
position: absolute;
|
2019-07-26 13:32:43 +08:00
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
2019-08-12 18:37:43 +08:00
|
|
|
top:0;
|
2019-09-03 16:45:56 +08:00
|
|
|
z-index: 1500;
|
2019-07-26 13:32:43 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.jlmap3ddraw {
|
|
|
|
float: left;
|
|
|
|
left: 0;
|
|
|
|
//left:20%;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
2019-08-07 11:28:46 +08:00
|
|
|
position:absolute;
|
|
|
|
z-index: -1;
|
2019-07-26 13:32:43 +08:00
|
|
|
}
|
|
|
|
|
2019-08-20 18:30:17 +08:00
|
|
|
.jlmap3cctv{
|
|
|
|
float: left;
|
|
|
|
left: 0;
|
|
|
|
top:0;
|
|
|
|
//left:20%;
|
|
|
|
width: 20%;
|
|
|
|
height: 20%;
|
|
|
|
position:absolute;
|
|
|
|
z-index: -1;
|
|
|
|
}
|
|
|
|
|
2019-07-26 13:32:43 +08:00
|
|
|
#canvastexture {
|
|
|
|
position: absolute;
|
|
|
|
float: left;
|
|
|
|
left: 0;
|
|
|
|
z-index: -12;
|
|
|
|
}
|
|
|
|
</style>
|