修改三维view文件结构
This commit is contained in:
parent
2cbf0f0452
commit
74527e79fe
@ -40,7 +40,7 @@ export function Jlmap3ddata(mapid,scope){
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
console.log(isSection);
|
||||
if(isSection == true){
|
||||
init3d(editmapid,data.data);
|
||||
}else{
|
||||
|
@ -203,7 +203,7 @@ export function SetObj(data,scope) {
|
||||
group.add(object);
|
||||
}
|
||||
|
||||
|
||||
console.log("setobj");
|
||||
scope.exportmodel = group;
|
||||
//console.log(group);
|
||||
console.log(group);
|
||||
}
|
||||
|
@ -1,6 +1,4 @@
|
||||
import Vue from 'vue';
|
||||
//main
|
||||
import {Three} from '@/jlmap3d/main/three.min.js';
|
||||
//模型loader
|
||||
import { AssetLoader } from '@/jlmap3d/main/loaders/AssetLoader.js';
|
||||
import {DDSLoader} from '@/jlmap3d/main/loaders/DDSLoader.js';
|
||||
|
@ -1,6 +1,4 @@
|
||||
import Vue from 'vue';
|
||||
//main
|
||||
import { Three } from '@/jlmap3d/main/three.min.js';
|
||||
|
||||
//模型loader
|
||||
import { AssetLoader } from '@/jlmap3d/main/loaders/AssetLoader.js';
|
||||
@ -155,7 +153,7 @@ export function JLmap3dEdit(dom, data, mapid) {
|
||||
|
||||
this.export = function(){
|
||||
var exporter = new THREE.OBJExporter();
|
||||
|
||||
console.log(scope.exportmodel);
|
||||
var result = exporter.parse( scope.exportmodel );
|
||||
|
||||
console.log(result);
|
||||
|
15
src/jlmap3d/main/inflate.min.js
vendored
15
src/jlmap3d/main/inflate.min.js
vendored
@ -1,15 +0,0 @@
|
||||
/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */ (function() {'use strict';var l=void 0,aa=this;function r(c,d){var a=c.split("."),b=aa;!(a[0]in b)&&b.execScript&&b.execScript("var "+a[0]);for(var e;a.length&&(e=a.shift());)!a.length&&d!==l?b[e]=d:b=b[e]?b[e]:b[e]={}};var t="undefined"!==typeof Uint8Array&&"undefined"!==typeof Uint16Array&&"undefined"!==typeof Uint32Array&&"undefined"!==typeof DataView;function v(c){var d=c.length,a=0,b=Number.POSITIVE_INFINITY,e,f,g,h,k,m,n,p,s,x;for(p=0;p<d;++p)c[p]>a&&(a=c[p]),c[p]<b&&(b=c[p]);e=1<<a;f=new (t?Uint32Array:Array)(e);g=1;h=0;for(k=2;g<=a;){for(p=0;p<d;++p)if(c[p]===g){m=0;n=h;for(s=0;s<g;++s)m=m<<1|n&1,n>>=1;x=g<<16|p;for(s=m;s<e;s+=k)f[s]=x;++h}++g;h<<=1;k<<=1}return[f,a,b]};function w(c,d){this.g=[];this.h=32768;this.d=this.f=this.a=this.l=0;this.input=t?new Uint8Array(c):c;this.m=!1;this.i=y;this.r=!1;if(d||!(d={}))d.index&&(this.a=d.index),d.bufferSize&&(this.h=d.bufferSize),d.bufferType&&(this.i=d.bufferType),d.resize&&(this.r=d.resize);switch(this.i){case A:this.b=32768;this.c=new (t?Uint8Array:Array)(32768+this.h+258);break;case y:this.b=0;this.c=new (t?Uint8Array:Array)(this.h);this.e=this.z;this.n=this.v;this.j=this.w;break;default:throw Error("invalid inflate mode");
|
||||
}}var A=0,y=1,B={t:A,s:y};
|
||||
w.prototype.k=function(){for(;!this.m;){var c=C(this,3);c&1&&(this.m=!0);c>>>=1;switch(c){case 0:var d=this.input,a=this.a,b=this.c,e=this.b,f=d.length,g=l,h=l,k=b.length,m=l;this.d=this.f=0;if(a+1>=f)throw Error("invalid uncompressed block header: LEN");g=d[a++]|d[a++]<<8;if(a+1>=f)throw Error("invalid uncompressed block header: NLEN");h=d[a++]|d[a++]<<8;if(g===~h)throw Error("invalid uncompressed block header: length verify");if(a+g>d.length)throw Error("input buffer is broken");switch(this.i){case A:for(;e+
|
||||
g>b.length;){m=k-e;g-=m;if(t)b.set(d.subarray(a,a+m),e),e+=m,a+=m;else for(;m--;)b[e++]=d[a++];this.b=e;b=this.e();e=this.b}break;case y:for(;e+g>b.length;)b=this.e({p:2});break;default:throw Error("invalid inflate mode");}if(t)b.set(d.subarray(a,a+g),e),e+=g,a+=g;else for(;g--;)b[e++]=d[a++];this.a=a;this.b=e;this.c=b;break;case 1:this.j(ba,ca);break;case 2:for(var n=C(this,5)+257,p=C(this,5)+1,s=C(this,4)+4,x=new (t?Uint8Array:Array)(D.length),S=l,T=l,U=l,u=l,M=l,F=l,z=l,q=l,V=l,q=0;q<s;++q)x[D[q]]=
|
||||
C(this,3);if(!t){q=s;for(s=x.length;q<s;++q)x[D[q]]=0}S=v(x);u=new (t?Uint8Array:Array)(n+p);q=0;for(V=n+p;q<V;)switch(M=E(this,S),M){case 16:for(z=3+C(this,2);z--;)u[q++]=F;break;case 17:for(z=3+C(this,3);z--;)u[q++]=0;F=0;break;case 18:for(z=11+C(this,7);z--;)u[q++]=0;F=0;break;default:F=u[q++]=M}T=t?v(u.subarray(0,n)):v(u.slice(0,n));U=t?v(u.subarray(n)):v(u.slice(n));this.j(T,U);break;default:throw Error("unknown BTYPE: "+c);}}return this.n()};
|
||||
var G=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],D=t?new Uint16Array(G):G,H=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],I=t?new Uint16Array(H):H,J=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],K=t?new Uint8Array(J):J,L=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],da=t?new Uint16Array(L):L,ea=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,
|
||||
13,13],N=t?new Uint8Array(ea):ea,O=new (t?Uint8Array:Array)(288),P,fa;P=0;for(fa=O.length;P<fa;++P)O[P]=143>=P?8:255>=P?9:279>=P?7:8;var ba=v(O),Q=new (t?Uint8Array:Array)(30),R,ga;R=0;for(ga=Q.length;R<ga;++R)Q[R]=5;var ca=v(Q);function C(c,d){for(var a=c.f,b=c.d,e=c.input,f=c.a,g=e.length,h;b<d;){if(f>=g)throw Error("input buffer is broken");a|=e[f++]<<b;b+=8}h=a&(1<<d)-1;c.f=a>>>d;c.d=b-d;c.a=f;return h}
|
||||
function E(c,d){for(var a=c.f,b=c.d,e=c.input,f=c.a,g=e.length,h=d[0],k=d[1],m,n;b<k&&!(f>=g);)a|=e[f++]<<b,b+=8;m=h[a&(1<<k)-1];n=m>>>16;if(n>b)throw Error("invalid code length: "+n);c.f=a>>n;c.d=b-n;c.a=f;return m&65535}
|
||||
w.prototype.j=function(c,d){var a=this.c,b=this.b;this.o=c;for(var e=a.length-258,f,g,h,k;256!==(f=E(this,c));)if(256>f)b>=e&&(this.b=b,a=this.e(),b=this.b),a[b++]=f;else{g=f-257;k=I[g];0<K[g]&&(k+=C(this,K[g]));f=E(this,d);h=da[f];0<N[f]&&(h+=C(this,N[f]));b>=e&&(this.b=b,a=this.e(),b=this.b);for(;k--;)a[b]=a[b++-h]}for(;8<=this.d;)this.d-=8,this.a--;this.b=b};
|
||||
w.prototype.w=function(c,d){var a=this.c,b=this.b;this.o=c;for(var e=a.length,f,g,h,k;256!==(f=E(this,c));)if(256>f)b>=e&&(a=this.e(),e=a.length),a[b++]=f;else{g=f-257;k=I[g];0<K[g]&&(k+=C(this,K[g]));f=E(this,d);h=da[f];0<N[f]&&(h+=C(this,N[f]));b+k>e&&(a=this.e(),e=a.length);for(;k--;)a[b]=a[b++-h]}for(;8<=this.d;)this.d-=8,this.a--;this.b=b};
|
||||
w.prototype.e=function(){var c=new (t?Uint8Array:Array)(this.b-32768),d=this.b-32768,a,b,e=this.c;if(t)c.set(e.subarray(32768,c.length));else{a=0;for(b=c.length;a<b;++a)c[a]=e[a+32768]}this.g.push(c);this.l+=c.length;if(t)e.set(e.subarray(d,d+32768));else for(a=0;32768>a;++a)e[a]=e[d+a];this.b=32768;return e};
|
||||
w.prototype.z=function(c){var d,a=this.input.length/this.a+1|0,b,e,f,g=this.input,h=this.c;c&&("number"===typeof c.p&&(a=c.p),"number"===typeof c.u&&(a+=c.u));2>a?(b=(g.length-this.a)/this.o[2],f=258*(b/2)|0,e=f<h.length?h.length+f:h.length<<1):e=h.length*a;t?(d=new Uint8Array(e),d.set(h)):d=h;return this.c=d};
|
||||
w.prototype.n=function(){var c=0,d=this.c,a=this.g,b,e=new (t?Uint8Array:Array)(this.l+(this.b-32768)),f,g,h,k;if(0===a.length)return t?this.c.subarray(32768,this.b):this.c.slice(32768,this.b);f=0;for(g=a.length;f<g;++f){b=a[f];h=0;for(k=b.length;h<k;++h)e[c++]=b[h]}f=32768;for(g=this.b;f<g;++f)e[c++]=d[f];this.g=[];return this.buffer=e};
|
||||
w.prototype.v=function(){var c,d=this.b;t?this.r?(c=new Uint8Array(d),c.set(this.c.subarray(0,d))):c=this.c.subarray(0,d):(this.c.length>d&&(this.c.length=d),c=this.c);return this.buffer=c};function W(c,d){var a,b;this.input=c;this.a=0;if(d||!(d={}))d.index&&(this.a=d.index),d.verify&&(this.A=d.verify);a=c[this.a++];b=c[this.a++];switch(a&15){case ha:this.method=ha;break;default:throw Error("unsupported compression method");}if(0!==((a<<8)+b)%31)throw Error("invalid fcheck flag:"+((a<<8)+b)%31);if(b&32)throw Error("fdict flag is not supported");this.q=new w(c,{index:this.a,bufferSize:d.bufferSize,bufferType:d.bufferType,resize:d.resize})}
|
||||
W.prototype.k=function(){var c=this.input,d,a;d=this.q.k();this.a=this.q.a;if(this.A){a=(c[this.a++]<<24|c[this.a++]<<16|c[this.a++]<<8|c[this.a++])>>>0;var b=d;if("string"===typeof b){var e=b.split(""),f,g;f=0;for(g=e.length;f<g;f++)e[f]=(e[f].charCodeAt(0)&255)>>>0;b=e}for(var h=1,k=0,m=b.length,n,p=0;0<m;){n=1024<m?1024:m;m-=n;do h+=b[p++],k+=h;while(--n);h%=65521;k%=65521}if(a!==(k<<16|h)>>>0)throw Error("invalid adler-32 checksum");}return d};var ha=8;r("Zlib.Inflate",W);r("Zlib.Inflate.prototype.decompress",W.prototype.k);var X={ADAPTIVE:B.s,BLOCK:B.t},Y,Z,$,ia;if(Object.keys)Y=Object.keys(X);else for(Z in Y=[],$=0,X)Y[$++]=Z;$=0;for(ia=Y.length;$<ia;++$)Z=Y[$],r("Zlib.Inflate.BufferType."+Z,X[Z]);}).call(window);
|
971
src/jlmap3d/main/three.min.js
vendored
971
src/jlmap3d/main/three.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,34 +0,0 @@
|
||||
importScripts('stomp.min.js');
|
||||
|
||||
var i=0;
|
||||
var update = null
|
||||
function timedCount(){
|
||||
|
||||
onmessage = (e) => {
|
||||
// console.log(e.data);
|
||||
if(e.data.type){
|
||||
for(let i=e.data.body.length-1;i>=0;i--){
|
||||
|
||||
postMessage(e.data.body[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(e.data == "on"){
|
||||
|
||||
update = setInterval("uptrain()", 50);
|
||||
}
|
||||
|
||||
if(e.data == "off"){
|
||||
clearInterval(update);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
function uptrain(){
|
||||
|
||||
postMessage(i);
|
||||
}
|
||||
|
||||
timedCount();
|
@ -12,8 +12,8 @@ import LoginScreen from '@/views/login/loginScreen';
|
||||
import LoginNewPlan from '@/views/login/loginNewPlan';
|
||||
import LoginPlan from '@/views/login/loginPlan';
|
||||
|
||||
import Jlmap3dedit from '@/views/jlmap3d/jlmap3dedit';
|
||||
import Jlmap3d from '@/views/jlmap3d/index';
|
||||
import Jlmap3dedit from '@/views/jlmap3d/edit/jlmap3dedit';
|
||||
import Jlmap3d from '@/views/jlmap3d/simulation/jl3dsimulation';
|
||||
import Display from '@/views/display/index';
|
||||
import TrainRoom from '@/views/trainRoom/index';
|
||||
import JointTraining from '@/views/jointTraining/index';
|
||||
|
@ -43,10 +43,10 @@
|
||||
<menu-system-time ref="menuSystemTime" :offset="offset" :group="group" />
|
||||
</div>
|
||||
|
||||
<Three-Test v-show="simulationShow" :panelShow="simulationShow" ref="ThreeTest" @showpanel="showpanel">
|
||||
</Three-Test>
|
||||
<Jl3d-Simulation v-show="drivingShow" :panelShow="drivingShow" ref="Jl3dSimulation" @showdriving="showdriving">
|
||||
<Jl3d-Simulation v-show="simulationShow" :panelShow="simulationShow" ref="Jl3dSimulation" @showpanel="showpanel">
|
||||
</Jl3d-Simulation>
|
||||
<Jl3d-Drive v-show="drivingShow" :panelShow="drivingShow" ref="Jl3dDrive" @showdriving="showdriving">
|
||||
</Jl3d-Drive>
|
||||
|
||||
<fault-choose ref="faultChoose" :group="group" />
|
||||
<run-plan-Load ref="runPlanLoad" :group="group" />
|
||||
@ -85,8 +85,8 @@ import { EventBus } from '@/scripts/event-bus';
|
||||
import Vue from 'vue';
|
||||
|
||||
// 三维
|
||||
import ThreeTest from '@/views/jlmap3d/index';
|
||||
import Jl3dSimulation from '@/views/jlmap3d/simulation/jl3dsimulation';
|
||||
import Jl3dDrive from '@/views/jlmap3d/drive/jl3ddrive';
|
||||
|
||||
|
||||
export default {
|
||||
@ -106,8 +106,8 @@ export default {
|
||||
MenuScript,
|
||||
MenuSchema,
|
||||
MenuSystemTime,
|
||||
ThreeTest,
|
||||
Jl3dSimulation
|
||||
Jl3dSimulation,
|
||||
Jl3dDrive
|
||||
},
|
||||
mixins: [WindowResizeHandler],
|
||||
data() {
|
||||
@ -519,11 +519,11 @@ export default {
|
||||
if (this.isDrive) {
|
||||
this.panelShow = false;
|
||||
this.drivingShow = true;
|
||||
this.$refs.Jl3dSimulation.show(this.$route.query.skinStyle);
|
||||
this.$refs.Jl3dDrive.show(this.$route.query.skinStyle);
|
||||
} else {
|
||||
this.panelShow = false;
|
||||
this.simulationShow = true;
|
||||
this.$refs.ThreeTest.show(this.$route.query.skinStyle);
|
||||
this.$refs.Jl3dSimulation.show(this.$route.query.skinStyle);
|
||||
}
|
||||
},
|
||||
showpanel() {
|
||||
|
@ -2,30 +2,32 @@
|
||||
|
||||
<div class="jalmap3ddiv">
|
||||
|
||||
<div class="trainstatus">
|
||||
车组号:{{trainnum}} {{stoptimes}}
|
||||
</div>
|
||||
<div class="display-draft">
|
||||
<el-button-group>
|
||||
<!-- <el-button type="primary" @click="raystand">站台选择</el-button>
|
||||
<el-button type="primary" @click="raytrain">列车选择</el-button> -->
|
||||
<el-button type="primary" @click="raysection">轨道检查</el-button>
|
||||
<el-button type="primary" @click="rayswitch">道岔检查</el-button>
|
||||
<el-button type="primary" @click="raysignal">信号机检查</el-button>
|
||||
<!-- <el-button type="primary" @click="raystand">站台选择</el-button> -->
|
||||
<el-button type="primary" @click="showplane">{{showbuttonmsg}}</el-button>
|
||||
<el-button type="primary" @click="back">返回</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
|
||||
<Jlmap3d-Menu v-bind:trainlist="trainlist" v-bind:stationlist="stationlist" @sstation="sstation" @strain="strain">
|
||||
</Jlmap3d-Menu>
|
||||
|
||||
<Jlmap3d-Config @showstationmsg="showstationmsg" @showtrainmsg="showtrainmsg">
|
||||
</Jlmap3d-Config>
|
||||
|
||||
<!-- <Jlmap3d-Msg v-bind:msgdata="msgdata" >
|
||||
</Jlmap3d-Msg > -->
|
||||
|
||||
<div id="testjlmap3d" class="jlmap3ddraw">
|
||||
<div id="jlsimulation" class="jlmap3ddraw">
|
||||
<canvas id="canvastexture"></canvas>
|
||||
</div>
|
||||
|
||||
<Drive-Mmi ref="mmiui" v-if="mmishow">
|
||||
|
||||
</Drive-Mmi>
|
||||
|
||||
<Drive-Tms v-if="mmishow">
|
||||
|
||||
</Drive-Tms>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@ -37,75 +39,116 @@
|
||||
<script>
|
||||
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 { JLmap3d } from '@/jlmap3d/jlmap3d.js';
|
||||
import { JLmapDriving } from '@/jlmap3d/jl3dsimulation/jl3dsimulation';
|
||||
|
||||
//components
|
||||
import Jlmap3dMenu from '@/views/jlmap3d/show/menu';
|
||||
|
||||
import Jlmap3dConfig from '@/views/jlmap3d/show/configmenu';
|
||||
|
||||
//import Jlmap3dMsg from '@/views/jlmap3d/show/msg';
|
||||
import DriveMmi from '@/views/jlmap3d/drive/sceneview/mmiview';
|
||||
import DriveTms from '@/views/jlmap3d/drive/sceneview/tmsview';
|
||||
|
||||
var train;
|
||||
export default {
|
||||
name: 'ThreeTest',
|
||||
name: 'Jl3dDrive',
|
||||
components: {
|
||||
Jlmap3dMenu,
|
||||
Jlmap3dConfig,
|
||||
//Jlmap3dMsg
|
||||
//ShowProperty
|
||||
DriveMmi,
|
||||
DriveTms,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainlist: null,
|
||||
stationlist: null,
|
||||
msgdata: null,
|
||||
|
||||
training: {
|
||||
id: '',
|
||||
name: '',
|
||||
remarks: ''
|
||||
},
|
||||
|
||||
mapdata: null,
|
||||
jlmap3d: null,
|
||||
selectmodel: null
|
||||
selectmodel: null,
|
||||
mmishow:false,
|
||||
showbuttonmsg:"列车仪表——显示",
|
||||
trainnum:"",
|
||||
stoptimes:"",
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'jlmap3d.selectmodel.code': {
|
||||
deep: true,
|
||||
'jlmap3d.nowspeed': {
|
||||
handler: function (newVal, oldVal) {
|
||||
if (newVal != oldVal) {
|
||||
// this.selectmodel = this.jlmap3dedit.selectmodel;
|
||||
// this.$refs.property.switchproperty();
|
||||
// console.log(this.jlmap3dedit.selectmodel);
|
||||
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;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
beforeDestroy() {
|
||||
//console.log("destroy");
|
||||
if (this.jlmap3d) {
|
||||
this.jlmap3d.webwork.postMessage("off");
|
||||
this.jlmap3d.endsocket();
|
||||
this.jlmap3d.dispose();
|
||||
this.jlmap3d = null;
|
||||
|
||||
//this.$destroy();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
show: function (skinStyle) {
|
||||
// console.log("show");
|
||||
// console.log(skinStyle);
|
||||
// console.log(this.jlmap3d);
|
||||
|
||||
if (this.jlmap3d == null) {
|
||||
this.init(skinStyle);
|
||||
} else {
|
||||
@ -116,11 +159,11 @@
|
||||
}
|
||||
},
|
||||
init: function (skinStyle) {
|
||||
console.log("three");
|
||||
let mapdata = this.$store.getters['map/map'];
|
||||
let dom = document.getElementById('app');
|
||||
this.jlmap3d = new JLmap3d(dom, mapdata, skinStyle);
|
||||
this.jlmap3d = new JLmapDriving(dom, mapdata, skinStyle);
|
||||
this.jlmap3d.eventon();
|
||||
|
||||
},
|
||||
raystand() {
|
||||
this.jlmap3d.rayswitch("stand");
|
||||
@ -137,31 +180,10 @@
|
||||
rayswitch() {
|
||||
this.jlmap3d.rayswitch("switch");
|
||||
},
|
||||
showstationmsg(showtype) {
|
||||
this.jlmap3d.showstationmsg(showtype);
|
||||
},
|
||||
showtrainmsg(showtype) {
|
||||
this.jlmap3d.showtrainmsg(showtype);
|
||||
},
|
||||
updatemenulist(stationlist, trainlist) {
|
||||
let stations = [];
|
||||
for (let k in stationlist) {
|
||||
stations.push(stationlist[k]);
|
||||
}
|
||||
let trains = [];
|
||||
for (let k in trainlist) {
|
||||
trains.push(trainlist[k]);
|
||||
}
|
||||
this.stationlist = stations;
|
||||
this.trainlist = trains;
|
||||
|
||||
},
|
||||
|
||||
sstation(changedata) {
|
||||
this.jlmap3d.updatecamera(changedata.mesh, "station");
|
||||
},
|
||||
strain(changedata) {
|
||||
|
||||
if (changedata.dispose == false) {
|
||||
this.jlmap3d.updatecamera(changedata, "train");
|
||||
}
|
||||
@ -169,18 +191,28 @@
|
||||
},
|
||||
|
||||
back() {
|
||||
|
||||
this.$emit('showpanel');
|
||||
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;
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
mounted() {
|
||||
window.updatemenulist = this.updatemenulist;
|
||||
//this.init();
|
||||
this.mmishow = true;
|
||||
|
||||
//this.$refs.mmiui.init();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -225,17 +257,32 @@
|
||||
position: absolute;
|
||||
float: right;
|
||||
right: 40px;
|
||||
bottom: 28px;
|
||||
top: 28px;
|
||||
}
|
||||
|
||||
#testjlmap3d {
|
||||
#jlsimulation {
|
||||
width: 937px;
|
||||
height: 937px;
|
||||
}
|
||||
|
||||
.trainstatus{
|
||||
left:0;
|
||||
top:0;
|
||||
width:350px;
|
||||
height:30px;
|
||||
background: #000000;
|
||||
position:absolute;
|
||||
text-align: center;
|
||||
color:white;
|
||||
font-size:25px;
|
||||
}
|
||||
|
||||
.jalmap3ddiv {
|
||||
position:absolute;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 1;
|
||||
top:0;
|
||||
z-index: 3000;
|
||||
}
|
||||
|
||||
.jlmap3ddraw {
|
@ -1,8 +1,5 @@
|
||||
import Vue from 'vue';
|
||||
|
||||
import {Three} from '@/jlmap3d/main/three.min.js';
|
||||
|
||||
|
||||
export function mmirender(dom) {
|
||||
let scope = this;
|
||||
|
@ -95,9 +95,9 @@ import axios from 'axios';
|
||||
|
||||
import { prefixIntrger } from '@/utils/date';
|
||||
|
||||
import { mmirender } from '@/views/jlmap3d/simulation/sceneview/mmi';
|
||||
import { mmirender } from '@/views/jlmap3d/drive/sceneview/mmi';
|
||||
|
||||
import { mmiimage } from '@/views/jlmap3d/simulation/sceneview/mmiimage';
|
||||
import { mmiimage } from '@/views/jlmap3d/drive/sceneview/mmiimage';
|
||||
|
||||
export default {
|
||||
name: 'SimulationMmi',
|
@ -41,10 +41,10 @@
|
||||
import { getmodels } from '@/jlmap3d/edit/connect/getmodels';
|
||||
|
||||
//components
|
||||
import EditProperty from '@/views/jlmap3d/edit/property';
|
||||
import EditAction from '@/views/jlmap3d/edit/action';
|
||||
import EditAssets from '@/views/jlmap3d/edit/assets';
|
||||
import EditMenu from '@/views/jlmap3d/edit/menu';
|
||||
import EditProperty from '@/views/jlmap3d/edit/component/property';
|
||||
import EditAction from '@/views/jlmap3d/edit/component/action';
|
||||
import EditAssets from '@/views/jlmap3d/edit/component/assets';
|
||||
import EditMenu from '@/views/jlmap3d/edit/component/menu';
|
||||
|
||||
var train;
|
||||
export default {
|
@ -2,32 +2,30 @@
|
||||
|
||||
<div class="jalmap3ddiv">
|
||||
|
||||
<div class="trainstatus">
|
||||
车组号:{{trainnum}} {{stoptimes}}
|
||||
</div>
|
||||
<div class="display-draft">
|
||||
<el-button-group>
|
||||
<!-- <el-button type="primary" @click="raystand">站台选择</el-button> -->
|
||||
<el-button type="primary" @click="showplane">{{showbuttonmsg}}</el-button>
|
||||
<!-- <el-button type="primary" @click="raystand">站台选择</el-button>
|
||||
<el-button type="primary" @click="raytrain">列车选择</el-button> -->
|
||||
<el-button type="primary" @click="raysection">轨道检查</el-button>
|
||||
<el-button type="primary" @click="rayswitch">道岔检查</el-button>
|
||||
<el-button type="primary" @click="raysignal">信号机检查</el-button>
|
||||
<el-button type="primary" @click="back">返回</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
|
||||
<Jlmap3d-Menu v-bind:trainlist="trainlist" v-bind:stationlist="stationlist" @sstation="sstation" @strain="strain">
|
||||
</Jlmap3d-Menu>
|
||||
|
||||
<Jlmap3d-Config @showstationmsg="showstationmsg" @showtrainmsg="showtrainmsg">
|
||||
</Jlmap3d-Config>
|
||||
|
||||
<!-- <Jlmap3d-Msg v-bind:msgdata="msgdata" >
|
||||
</Jlmap3d-Msg > -->
|
||||
|
||||
<div id="jlsimulation" class="jlmap3ddraw">
|
||||
<div id="testjlmap3d" class="jlmap3ddraw">
|
||||
<canvas id="canvastexture"></canvas>
|
||||
</div>
|
||||
|
||||
<Simulation-Mmi ref="mmiui" v-if="mmishow">
|
||||
|
||||
</Simulation-Mmi>
|
||||
|
||||
<Simulation-Tms v-if="mmishow">
|
||||
|
||||
</Simulation-Tms>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@ -39,116 +37,75 @@
|
||||
<script>
|
||||
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/jl3dsimulation/jl3dsimulation';
|
||||
import { JLmap3d } from '@/jlmap3d/jlmap3d.js';
|
||||
|
||||
import SimulationMmi from '@/views/jlmap3d/simulation/sceneview/mmiview';
|
||||
import SimulationTms from '@/views/jlmap3d/simulation/sceneview/tmsview';
|
||||
//components
|
||||
import Jlmap3dMenu from '@/views/jlmap3d/simulation/show/menu';
|
||||
|
||||
import Jlmap3dConfig from '@/views/jlmap3d/simulation/show/configmenu';
|
||||
|
||||
//import Jlmap3dMsg from '@/views/jlmap3d/show/msg';
|
||||
|
||||
var train;
|
||||
export default {
|
||||
name: 'Jl3dSimulation',
|
||||
components: {
|
||||
SimulationMmi,
|
||||
SimulationTms,
|
||||
Jlmap3dMenu,
|
||||
Jlmap3dConfig,
|
||||
//Jlmap3dMsg
|
||||
//ShowProperty
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainlist: null,
|
||||
stationlist: null,
|
||||
msgdata: null,
|
||||
|
||||
training: {
|
||||
id: '',
|
||||
name: '',
|
||||
remarks: ''
|
||||
},
|
||||
|
||||
mapdata: null,
|
||||
jlmap3d: null,
|
||||
selectmodel: null,
|
||||
mmishow:false,
|
||||
showbuttonmsg:"列车仪表——显示",
|
||||
trainnum:"",
|
||||
stoptimes:"",
|
||||
selectmodel: null
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'jlmap3d.nowspeed': {
|
||||
'jlmap3d.selectmodel.code': {
|
||||
deep: true,
|
||||
handler: function (newVal, oldVal) {
|
||||
if(newVal != oldVal){
|
||||
if(this.mmishow == true){
|
||||
this.$refs.mmiui.updatespeed(newVal);
|
||||
}
|
||||
if (newVal != oldVal) {
|
||||
// this.selectmodel = this.jlmap3dedit.selectmodel;
|
||||
// this.$refs.property.switchproperty();
|
||||
// console.log(this.jlmap3dedit.selectmodel);
|
||||
}
|
||||
}
|
||||
},
|
||||
'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;
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
//console.log("destroy");
|
||||
if (this.jlmap3d) {
|
||||
this.jlmap3d.webwork.postMessage("off");
|
||||
this.jlmap3d.endsocket();
|
||||
this.jlmap3d.dispose();
|
||||
this.jlmap3d = null;
|
||||
|
||||
//this.$destroy();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
show: function (skinStyle) {
|
||||
// console.log("show");
|
||||
// console.log(skinStyle);
|
||||
// console.log(this.jlmap3d);
|
||||
|
||||
if (this.jlmap3d == null) {
|
||||
this.init(skinStyle);
|
||||
} else {
|
||||
@ -159,11 +116,11 @@
|
||||
}
|
||||
},
|
||||
init: function (skinStyle) {
|
||||
console.log("three");
|
||||
let mapdata = this.$store.getters['map/map'];
|
||||
let dom = document.getElementById('app');
|
||||
this.jlmap3d = new JLmapDriving(dom, mapdata, skinStyle);
|
||||
this.jlmap3d = new JLmap3d(dom, mapdata, skinStyle);
|
||||
this.jlmap3d.eventon();
|
||||
|
||||
},
|
||||
raystand() {
|
||||
this.jlmap3d.rayswitch("stand");
|
||||
@ -180,10 +137,31 @@
|
||||
rayswitch() {
|
||||
this.jlmap3d.rayswitch("switch");
|
||||
},
|
||||
showstationmsg(showtype) {
|
||||
this.jlmap3d.showstationmsg(showtype);
|
||||
},
|
||||
showtrainmsg(showtype) {
|
||||
this.jlmap3d.showtrainmsg(showtype);
|
||||
},
|
||||
updatemenulist(stationlist, trainlist) {
|
||||
let stations = [];
|
||||
for (let k in stationlist) {
|
||||
stations.push(stationlist[k]);
|
||||
}
|
||||
let trains = [];
|
||||
for (let k in trainlist) {
|
||||
trains.push(trainlist[k]);
|
||||
}
|
||||
this.stationlist = stations;
|
||||
this.trainlist = trains;
|
||||
|
||||
},
|
||||
|
||||
sstation(changedata) {
|
||||
this.jlmap3d.updatecamera(changedata.mesh, "station");
|
||||
},
|
||||
strain(changedata) {
|
||||
|
||||
if (changedata.dispose == false) {
|
||||
this.jlmap3d.updatecamera(changedata, "train");
|
||||
}
|
||||
@ -191,28 +169,18 @@
|
||||
},
|
||||
|
||||
back() {
|
||||
this.$emit('showdriving');
|
||||
|
||||
this.$emit('showpanel');
|
||||
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;
|
||||
}
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.mmishow = true;
|
||||
|
||||
//this.$refs.mmiui.init();
|
||||
window.updatemenulist = this.updatemenulist;
|
||||
//this.init();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -257,32 +225,17 @@
|
||||
position: absolute;
|
||||
float: right;
|
||||
right: 40px;
|
||||
top: 28px;
|
||||
bottom: 28px;
|
||||
}
|
||||
|
||||
#jlsimulation {
|
||||
width: 937px;
|
||||
height: 937px;
|
||||
}
|
||||
|
||||
.trainstatus{
|
||||
left:0;
|
||||
top:0;
|
||||
width:350px;
|
||||
height:30px;
|
||||
background: #000000;
|
||||
position:absolute;
|
||||
text-align: center;
|
||||
color:white;
|
||||
font-size:25px;
|
||||
#testjlmap3d {
|
||||
}
|
||||
|
||||
.jalmap3ddiv {
|
||||
position: absolute;
|
||||
position:absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top:0;
|
||||
z-index: 3000;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.jlmap3ddraw {
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="main" :style="{width: canvasWidth+'px'}" @mousemove="mousemove">
|
||||
<Jl3d-Simulation v-show="drivingShow" ref="Jl3dSimulation" :panel-show="drivingShow" @showdriving="showdriving" />
|
||||
<Jl3d-Drive v-show="drivingShow" ref="Jl3dDrive" :panel-show="drivingShow" @showdriving="showdriving" />
|
||||
<transition name="el-zoom-in-bottom">
|
||||
<map-system-draft ref="mapCanvas" @back="back" />
|
||||
</transition>
|
||||
@ -41,7 +41,7 @@ import { checkLoginLine } from '@/api/login';
|
||||
import { loadMapData } from '@/utils/loaddata';
|
||||
import { getUserRoles, deljointTrainRoom } from '@/api/chat';
|
||||
import { runDiagramOver } from '@/api/simulation';
|
||||
import Jl3dSimulation from '@/views/jlmap3d/simulation/jl3dsimulation';
|
||||
import Jl3dDrive from '@/views/jlmap3d/drive/jl3ddrive';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
@ -54,7 +54,7 @@ export default {
|
||||
JoinRunPlanLoad,
|
||||
JoinRunPlanView,
|
||||
menuSystemTime,
|
||||
Jl3dSimulation
|
||||
Jl3dDrive
|
||||
},
|
||||
mixins: [WindowResizeHandler],
|
||||
data() {
|
||||
@ -318,7 +318,7 @@ export default {
|
||||
hidepanel() {
|
||||
this.panelShow = false;
|
||||
this.drivingShow = true;
|
||||
this.$refs.Jl3dSimulation.show(this.$route.query.skinStyle);
|
||||
this.$refs.Jl3dDrive.show(this.$route.query.skinStyle);
|
||||
|
||||
},
|
||||
messageInfo(message, type) {
|
||||
|
Loading…
Reference in New Issue
Block a user