2019-07-26 13:32:43 +08:00
|
|
|
<template>
|
|
|
|
|
|
|
|
<div class="jalmap3ddiv">
|
|
|
|
|
2019-08-12 18:37:43 +08:00
|
|
|
<div class="trainstatus">
|
2019-10-25 18:42:56 +08:00
|
|
|
{{$t('jlmap3d.trainGroupNumber')}}{{ trainnum }}</br>
|
|
|
|
{{ 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-09-19 09:25:04 +08:00
|
|
|
<el-button type="primary" @click="back">{{$t('global.back')}}</el-button>
|
2019-07-26 13:32:43 +08:00
|
|
|
</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" />
|
2020-03-31 18:42:38 +08:00
|
|
|
<Drive-Control v-if="dcontrolshow" ref="dcontrol"/>
|
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';
|
|
|
|
|
2020-03-30 13:07:11 +08:00
|
|
|
import { UrlConfig } from '@/scripts/ConstDic';
|
2019-08-14 15:57:52 +08:00
|
|
|
|
|
|
|
import { JLmapDriving } from '@/jlmap3d/jl3ddrive/jl3ddrive';
|
|
|
|
|
|
|
|
import DriveMmi from '@/views/jlmap3d/drive/sceneview/mmiview';
|
|
|
|
import DriveTms from '@/views/jlmap3d/drive/sceneview/tmsview';
|
2020-03-31 18:30:15 +08:00
|
|
|
import DriveControl from '@/views/jlmap3d/drive/drivecontrol/drivecontrol';
|
2019-08-14 15:57:52 +08:00
|
|
|
var train;
|
|
|
|
export default {
|
|
|
|
name: 'Jl3dDrive',
|
|
|
|
components: {
|
|
|
|
DriveMmi,
|
2020-03-31 18:30:15 +08:00
|
|
|
DriveTms,
|
|
|
|
DriveControl
|
2019-08-14 15:57:52 +08:00
|
|
|
},
|
|
|
|
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,
|
2019-09-19 09:25:04 +08:00
|
|
|
cctvbuttonmsg: this.$t('jlmap3d.surveillanceHidden'),
|
2019-08-14 15:57:52 +08:00
|
|
|
mmishow: false,
|
2019-09-19 09:25:04 +08:00
|
|
|
showbuttonmsg: this.$t('jlmap3d.trainInstrumentationDisplay'),
|
2019-08-14 15:57:52 +08:00
|
|
|
trainnum: '',
|
2020-03-31 18:42:38 +08:00
|
|
|
stoptimes: '',
|
|
|
|
dcontrolshow: false,
|
2019-08-14 15:57:52 +08:00
|
|
|
};
|
|
|
|
},
|
|
|
|
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-11-15 17:24:13 +08:00
|
|
|
},
|
|
|
|
|
2019-08-14 15:57:52 +08:00
|
|
|
},
|
|
|
|
beforeDestroy() {
|
|
|
|
if (this.jlmap3d) {
|
|
|
|
this.jlmap3d.webwork.postMessage('off');
|
2019-12-03 13:48:15 +08:00
|
|
|
this.jlmap3d.webwork.terminate();
|
2019-08-14 15:57:52 +08:00
|
|
|
this.jlmap3d.endsocket();
|
|
|
|
this.jlmap3d.dispose();
|
|
|
|
this.jlmap3d = null;
|
|
|
|
|
|
|
|
// this.$destroy();
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
mounted() {
|
|
|
|
this.mmishow = true;
|
2020-03-31 18:42:38 +08:00
|
|
|
window.datanew = this.datanew;
|
2019-08-14 15:57:52 +08:00
|
|
|
// this.$refs.mmiui.init();
|
|
|
|
},
|
|
|
|
methods: {
|
2019-11-15 17:24:13 +08:00
|
|
|
show: function (skinCode,group) {
|
2019-08-14 15:57:52 +08:00
|
|
|
// console.log("show");
|
|
|
|
// console.log(skinCode);
|
|
|
|
// console.log(this.jlmap3d);
|
|
|
|
|
|
|
|
if (this.jlmap3d == null) {
|
2019-11-15 17:24:13 +08:00
|
|
|
this.init(skinCode,group);
|
2019-08-14 15:57:52 +08:00
|
|
|
} else {
|
|
|
|
// this.jlmap3d.restart();
|
|
|
|
this.jlmap3d.eventon();
|
|
|
|
this.jlmap3d.animateon();
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
2019-11-15 17:24:13 +08:00
|
|
|
init: function (skinCode,group) {
|
2019-08-14 15:57:52 +08:00
|
|
|
const mapdata = this.$store.getters['map/map'];
|
|
|
|
const dom = document.getElementById('app');
|
2019-10-25 18:42:56 +08:00
|
|
|
let translation = {
|
|
|
|
trainAtoOn: this.$t('jlmap3d.trainAtoOn'),
|
|
|
|
trainAtoOff: this.$t('jlmap3d.trainAtoOff'),
|
|
|
|
stopTime: this.$t('jlmap3d.stopTime')
|
|
|
|
};
|
2020-01-14 16:09:08 +08:00
|
|
|
|
|
|
|
let project = this.$route.query.project;
|
2020-01-19 18:09:34 +08:00
|
|
|
// console.log(project);
|
2020-01-14 16:09:08 +08:00
|
|
|
if(project){
|
|
|
|
this.jlmap3d = new JLmapDriving(dom, mapdata, skinCode,this.$store,translation,group,project);
|
|
|
|
}else{
|
|
|
|
this.jlmap3d = new JLmapDriving(dom, mapdata, skinCode,this.$store,translation,group,project);
|
|
|
|
}
|
|
|
|
|
2019-10-31 13:26:40 +08:00
|
|
|
// console.log(translation);
|
2020-01-19 18:09:34 +08:00
|
|
|
// this.jlmap3d = new JLmapDriving(dom, mapdata, skinCode,this.$store,translation,group);
|
2019-08-14 15:57:52 +08:00
|
|
|
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) {
|
2019-09-19 09:25:04 +08:00
|
|
|
this.showbuttonmsg = this.$t('jlmap3d.trainInstrumentationHidden');
|
2019-08-14 15:57:52 +08:00
|
|
|
this.mmishow = false;
|
|
|
|
} else {
|
2019-09-19 09:25:04 +08:00
|
|
|
this.showbuttonmsg = this.$t('jlmap3d.trainInstrumentationDisplay');
|
2019-08-14 15:57:52 +08:00
|
|
|
this.mmishow = true;
|
|
|
|
}
|
|
|
|
|
2019-09-03 16:45:56 +08:00
|
|
|
},
|
2020-03-31 18:42:38 +08:00
|
|
|
datanew(){
|
|
|
|
this.dcontrolshow = true;
|
|
|
|
},
|
2019-09-03 16:45:56 +08:00
|
|
|
cctvplane() {
|
|
|
|
if (this.cctvshow == true) {
|
2019-09-19 09:25:04 +08:00
|
|
|
this.cctvbuttonmsg = this.$t('jlmap3d.surveillanceHidden');
|
2019-09-03 16:45:56 +08:00
|
|
|
this.cctvshow = false;
|
|
|
|
this.jlmap3d.cctvoff();
|
|
|
|
} else {
|
2019-09-19 09:25:04 +08:00
|
|
|
this.cctvbuttonmsg = this.$t('jlmap3d.surveillanceDisplay');
|
2019-09-03 16:45:56 +08:00
|
|
|
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;
|
2019-10-17 18:48:36 +08:00
|
|
|
width:fit-content;
|
|
|
|
width:-webkit-fit-content;
|
|
|
|
width:-moz-fit-content;
|
2019-10-25 18:42:56 +08:00
|
|
|
height:60px;
|
2019-08-12 18:37:43 +08:00
|
|
|
background: #000000;
|
2019-07-26 13:32:43 +08:00
|
|
|
position:absolute;
|
2019-10-25 18:42:56 +08:00
|
|
|
text-align: left;
|
2019-08-12 18:37:43 +08:00
|
|
|
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>
|