From 9c0df60188ff3d4bf5562c0e982296fdee9250a1 Mon Sep 17 00:00:00 2001 From: sunzhenyu Date: Wed, 8 Jul 2020 10:21:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=89=E7=BB=B4=E7=BC=96=E8=BE=91=E5=99=A8?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=8C=E4=B8=89=E7=BB=B4cctv=E4=BB=BF?= =?UTF-8?q?=E7=9C=9F=E7=BB=93=E6=9D=9F=E7=99=BB=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jlmap3d/edit/config/editassetconfig.js | 259 ++++++++++++++++ .../jl3dpassflow/connect/passflowconnect.js | 12 +- src/views/jlmap3d/edit/component/action.vue | 282 +++++++++++++++--- src/views/jlmap3d/edit/component/assets.vue | 225 ++++++++------ src/views/jlmap3d/edit/jlmap3dedit.vue | 2 +- 5 files changed, 649 insertions(+), 131 deletions(-) create mode 100644 src/jlmap3d/edit/config/editassetconfig.js diff --git a/src/jlmap3d/edit/config/editassetconfig.js b/src/jlmap3d/edit/config/editassetconfig.js new file mode 100644 index 000000000..ba038649b --- /dev/null +++ b/src/jlmap3d/edit/config/editassetconfig.js @@ -0,0 +1,259 @@ +export let driverListConfig = [ + { + assetname:"列车模型", + id:'', + packageName:'', + type:'', + url:'' + }, + { + assetname:"信号机模型", + id:'', + packageName:'', + type:'', + url:'' + }, + { + assetname:"道岔模型", + id:'', + packageName:'', + type:'', + url:'' + }, + { + assetname:"内侧车站", + id:'', + packageName:'', + type:'', + url:'' + }, + { + assetname:"外侧车站", + id:'', + packageName:'', + type:'', + url:'' + }, + { + assetname:"三站台", + id:'', + packageName:'', + type:'', + url:'' + }, + { + assetname:"隧道背景", + id:'', + packageName:'', + type:'', + url:'' + } +]; +export let sceneListConfig = [ + { + assetname:"列车模型", + id:'', + packageName:'', + type:'', + url:'' + }, + { + assetname:"信号机模型", + id:'', + packageName:'', + type:'', + url:'' + }, + { + assetname:"道岔模型", + id:'', + packageName:'', + type:'', + url:'' + }, + { + assetname:"内侧车站", + id:'', + packageName:'', + type:'', + url:'' + }, + { + assetname:"外侧车站", + id:'', + packageName:'', + type:'', + url:'' + }, + { + assetname:"三站台", + id:'', + packageName:'', + type:'', + url:'' + }, + { + assetname:"隧道背景", + id:'', + packageName:'', + type:'', + url:'' + } +]; +export let deviceListConfig = [ + { + assetname:"信号机模型", + id:'', + packageName:'', + type:'', + url:'' + }, + { + assetname:"道岔模型", + id:'', + name:'', + type:'', + url:'' + }, + { + assetname:"屏蔽门", + id:'', + packageName:'', + type:'', + url:'' + }, + { + assetname:"区段铁轨", + id:'', + packageName:'', + type:'', + url:'' + }, +]; + +export let maintainerListConfig = [ + { + assetname:"信号机模型", + id:'', + packageName:'', + type:'', + url:'' + }, + { + assetname:"道岔模型", + id:'', + packageName:'', + type:'', + url:'' + }, + { + assetname:"屏蔽门", + id:'', + packageName:'', + type:'', + url:'' + }, + { + assetname:"区段铁轨", + id:'', + packageName:'', + type:'', + url:'' + }, + { + assetname:"设备间", + id:'', + packageName:'', + type:'', + url:'' + }, +]; + +export let cctvListConfig = [ + { + assetname:"人物1", + id:'', + packageName:'', + type:'', + url:'' + }, + { + assetname:"人物2", + id:'', + packageName:'', + url:'' + }, + { + assetname:"cctv车站", + id:'', + packageName:'', + url:'' + }, + { + assetname:"进站闸机", + id:'', + packageName:'', + url:'' + }, + { + assetname:"出站闸机", + id:'', + packageName:'', + type:'', + url:'' + }, + { + assetname:"监控设备", + id:'', + packageName:'', + type:'', + url:'' + }, + { + assetname:"列车", + id:'', + packageName:'', + type:'', + url:'' + }, + { + assetname:"站台轨", + id:'', + packageName:'', + type:'', + url:'' + } +]; + +export let stationTextureListConfig = [ + { + assetname:"车站站台贴图包", + id:'', + packageName:'', + type:'', + name:[], + urls:[], + } +]; + +export let deviceTextureListConfig = [ + { + assetname:"设备贴图列表包", + id:'', + packageName:'', + type:'', + name:[], + urls:[], + } +]; + +export let signalTextureListConfig = [ + { + assetname:"信号机灯光贴图包", + id:'', + packageName:'', + type:'', + name:[], + urls:[], + } +]; diff --git a/src/jlmap3d/jl3dpassflow/connect/passflowconnect.js b/src/jlmap3d/jl3dpassflow/connect/passflowconnect.js index 6569360c9..9af6dc8ca 100644 --- a/src/jlmap3d/jl3dpassflow/connect/passflowconnect.js +++ b/src/jlmap3d/jl3dpassflow/connect/passflowconnect.js @@ -1,6 +1,7 @@ import StompClient from '@/utils/sock'; import { getBaseUrl } from '@/utils/baseUrl' import { getToken } from '@/utils/auth'; +import { logout } from '@/api/login'; // 定于仿真socket接口 export function PassflowConnect(jl3dpass,deviceaction,toptrain,downtrain,routegroup) { @@ -9,7 +10,7 @@ export function PassflowConnect(jl3dpass,deviceaction,toptrain,downtrain,routegr let topic = '/user/queue/simulation/jl3d/'+routegroup; let header = {'X-Token': getToken() }; - + socketon(topic); function socketon(topic) { @@ -28,6 +29,7 @@ export function PassflowConnect(jl3dpass,deviceaction,toptrain,downtrain,routegr // 仿真socket接口回调函数 function callback(Response) { const data = JSON.parse(Response.body); + if(data.type == "DeviceCtrl_3D"){ if(data.body.type == "PSD"){ if(data.body.code == jl3dpass.nowstation.toppsd){ @@ -120,7 +122,13 @@ export function PassflowConnect(jl3dpass,deviceaction,toptrain,downtrain,routegr } } } - // console.log(data); + if(data.type == 'Simulation_Over'){ + logout(getToken()).then(() => { + window.location.reload(); + }).catch(error => { + + });; + } } let actions; diff --git a/src/views/jlmap3d/edit/component/action.vue b/src/views/jlmap3d/edit/component/action.vue index fac0faa6e..b4f5fb924 100644 --- a/src/views/jlmap3d/edit/component/action.vue +++ b/src/views/jlmap3d/edit/component/action.vue @@ -1,8 +1,7 @@ @@ -200,22 +245,32 @@ export default { .modellist { float:left; position: relative; - width:120px; - height:120px; + width:100px; + height:100px; text-align:center; + border-radius:5px; + border:solid 2px #000; } .modelpic{ - left:0; + left:20%; position: absolute; + top:0; width:60%; height:60%; text-align:center; background-image: url('/static/texture/modelfile.png'); background-size: 100% 100%; } - .modelp{ + .modelid{ position: absolute; - bottom:0; + top:60%; + height:20%; + z-index:0; + } + .modelname{ + position: absolute; + top:80%; + height:20%; z-index:0; } .map-draft { diff --git a/src/views/jlmap3d/edit/jlmap3dedit.vue b/src/views/jlmap3d/edit/jlmap3dedit.vue index f0c4dc4a6..d94120358 100644 --- a/src/views/jlmap3d/edit/jlmap3dedit.vue +++ b/src/views/jlmap3d/edit/jlmap3dedit.vue @@ -134,7 +134,7 @@ this.jlmap3dedit.editmode = editmode; this.jlmap3dedit.actionmode = editmode; //this.jlmap3dedit.actionmode(); - this.$refs.assets.togglelist(editmode); + this.$refs.assets.toggleList(editmode); }, actionevent(eventname) { //console.log(eventname);