From 72d0bb084fa7cca1d0e87fb6d545b121bcbf5721 Mon Sep 17 00:00:00 2001 From: sunzhenyu Date: Fri, 16 Apr 2021 13:18:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=89=E7=BB=B4=E5=8D=95?= =?UTF-8?q?=E4=BD=93=E8=AE=BE=E5=A4=87=E4=BF=A1=E5=8F=B7=E6=9C=BA=E4=BA=AE?= =?UTF-8?q?=E7=81=AF=E9=80=BB=E8=BE=91=EF=BC=8C=E4=BF=AE=E6=94=B9=E4=B8=89?= =?UTF-8?q?=E7=BB=B4=E8=AF=BE=E7=A8=8B=E7=BC=96=E8=BE=91=E6=92=AD=E6=94=BE?= =?UTF-8?q?=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jlmap3d/jl3ddevice/jl3ddeviceNew.js | 78 +++--- src/router/index.js | 7 + src/views/jlmap3d/lesson3d/lesson3dshow.vue | 75 ------ .../lesson3dedit/component/property.vue | 10 +- .../jlmap3d/lesson3dedit/lesson3dedit.vue | 6 +- .../jlmap3d/lesson3dplayer/lesson3dplayer.vue | 241 ++++++++++++++++++ .../lesson3dplayer/tools/actiontips.vue | 71 ++++++ .../lesson3dplayer/tools/errortips.vue | 71 ++++++ .../lesson3dplayer/tools/explainpane.vue | 84 ++++++ .../jlmap3d/lesson3dplayer/tools/jobpane.vue | 206 +++++++++++++++ .../lesson3dplayer/tools/processlog.vue | 82 ++++++ .../lesson3dplayer/tools/stepstips.vue | 75 ++++++ .../jlmap3d/lesson3dplayer/tools/toolbar.vue | 201 +++++++++++++++ 13 files changed, 1092 insertions(+), 115 deletions(-) delete mode 100644 src/views/jlmap3d/lesson3d/lesson3dshow.vue create mode 100644 src/views/jlmap3d/lesson3dplayer/lesson3dplayer.vue create mode 100644 src/views/jlmap3d/lesson3dplayer/tools/actiontips.vue create mode 100644 src/views/jlmap3d/lesson3dplayer/tools/errortips.vue create mode 100644 src/views/jlmap3d/lesson3dplayer/tools/explainpane.vue create mode 100644 src/views/jlmap3d/lesson3dplayer/tools/jobpane.vue create mode 100644 src/views/jlmap3d/lesson3dplayer/tools/processlog.vue create mode 100644 src/views/jlmap3d/lesson3dplayer/tools/stepstips.vue create mode 100644 src/views/jlmap3d/lesson3dplayer/tools/toolbar.vue diff --git a/src/jlmap3d/jl3ddevice/jl3ddeviceNew.js b/src/jlmap3d/jl3ddevice/jl3ddeviceNew.js index 5ed51299c..c535b5fef 100644 --- a/src/jlmap3d/jl3ddevice/jl3ddeviceNew.js +++ b/src/jlmap3d/jl3ddevice/jl3ddeviceNew.js @@ -509,26 +509,28 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) { } if (data.type == "SIGNAL") {//从上往下红绿黄 + if(data.red == 1){ - scope.modelmanager.signalmodel.mesh.children[0].material.map = scope.signallights["red"]; - scope.modelmanager.signalmodel.mesh.children[0].material.map.needsUpdate = true; + scope.modelmanager.signalmodel.mesh.getObjectByName("d3d001").material.map = scope.signallights["red"]; + scope.modelmanager.signalmodel.mesh.getObjectByName("d3d001").material.map.needsUpdate = true; }else{ - scope.modelmanager.signalmodel.mesh.children[0].material.map = scope.signallights["black"]; - scope.modelmanager.signalmodel.mesh.children[0].material.map.needsUpdate = true; + scope.modelmanager.signalmodel.mesh.getObjectByName("d3d001").material.map = scope.signallights["black"]; + scope.modelmanager.signalmodel.mesh.getObjectByName("d3d001").material.map.needsUpdate = true; } if(data.yellow == 1){ - scope.modelmanager.signalmodel.mesh.children[2].material.map = scope.signallights["yellow"]; - scope.modelmanager.signalmodel.mesh.children[2].material.map.needsUpdate = true; + scope.modelmanager.signalmodel.mesh.getObjectByName("d3d002").material.map = scope.signallights["yellow"]; + scope.modelmanager.signalmodel.mesh.getObjectByName("d3d002").material.map.needsUpdate = true; }else{ - scope.modelmanager.signalmodel.mesh.children[2].material.map = scope.signallights["black"]; - scope.modelmanager.signalmodel.mesh.children[2].material.map.needsUpdate = true; + scope.modelmanager.signalmodel.mesh.getObjectByName("d3d003").material.map = scope.signallights["black"]; + scope.modelmanager.signalmodel.mesh.getObjectByName("d3d003").material.map.needsUpdate = true; } if(data.green == 1){ - scope.modelmanager.signalmodel.mesh.children[1].material.map = scope.signallights["green"]; - scope.modelmanager.signalmodel.mesh.children[1].material.map.needsUpdate = true; + + scope.modelmanager.signalmodel.mesh.getObjectByName("d3d003").material.map = scope.signallights["green"]; + scope.modelmanager.signalmodel.mesh.getObjectByName("d3d003").material.map.needsUpdate = true; }else{ - scope.modelmanager.signalmodel.mesh.children[1].material.map = scope.signallights["black"]; - scope.modelmanager.signalmodel.mesh.children[1].material.map.needsUpdate = true; + scope.modelmanager.signalmodel.mesh.getObjectByName("d3d003").material.map = scope.signallights["black"]; + scope.modelmanager.signalmodel.mesh.getObjectByName("d3d003").material.map.needsUpdate = true; } } @@ -541,7 +543,7 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) { scope.modelmanager.standmodel.action.time = 0; scope.modelmanager.standmodel.action.timeScale = 1; scope.modelmanager.standmodel.action.play(); - console.log(data); + localVoicePlay("开往"+psdVoiceStationList[data.code].finlStationName+"方向的列车进站了!"); } @@ -562,12 +564,12 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) { this.deviceFaultSet = function (data) { if (data.type == "SIGNAL") {//从上往下红绿黄 - scope.modelmanager.signalmodel.mesh.children[0].material.map = scope.signallights["black"]; - scope.modelmanager.signalmodel.mesh.children[0].material.map.needsUpdate = true; - scope.modelmanager.signalmodel.mesh.children[2].material.map = scope.signallights["black"]; - scope.modelmanager.signalmodel.mesh.children[2].material.map.needsUpdate = true; - scope.modelmanager.signalmodel.mesh.children[1].material.map = scope.signallights["black"]; - scope.modelmanager.signalmodel.mesh.children[1].material.map.needsUpdate = true; + scope.modelmanager.signalmodel.mesh.getObjectByName("d3d001").material.map = scope.signallights["black"]; + scope.modelmanager.signalmodel.mesh.getObjectByName("d3d001").material.map.needsUpdate = true; + scope.modelmanager.signalmodel.mesh.getObjectByName("d3d002").material.map = scope.signallights["black"]; + scope.modelmanager.signalmodel.mesh.getObjectByName("d3d002").material.map.needsUpdate = true; + scope.modelmanager.signalmodel.mesh.getObjectByName("d3d003").material.map = scope.signallights["black"]; + scope.modelmanager.signalmodel.mesh.getObjectByName("d3d003").material.map.needsUpdate = true; } if (data.type == "PSD" || data.type == "STAND") { scope.modelmanager.standmodel.screenDoorOpenStatus = "0"; @@ -653,35 +655,37 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) { } if (data._type == "Signal") { + if(data.logicLight == 0){ if(data.redOpen == 1){ - scope.modelmanager.signalmodel.mesh.children[0].material.map = scope.signallights["red"]; - scope.modelmanager.signalmodel.mesh.children[0].material.map.needsUpdate = true; + + scope.modelmanager.signalmodel.mesh.getObjectByName("d3d001").material.map = scope.signallights["red"]; + scope.modelmanager.signalmodel.mesh.getObjectByName("d3d001").material.map.needsUpdate = true; }else{ - scope.modelmanager.signalmodel.mesh.children[0].material.map = scope.signallights["black"]; - scope.modelmanager.signalmodel.mesh.children[0].material.map.needsUpdate = true; + scope.modelmanager.signalmodel.mesh.getObjectByName("d3d001").material.map = scope.signallights["black"]; + scope.modelmanager.signalmodel.mesh.getObjectByName("d3d001").material.map.needsUpdate = true; } if(data.yellowOpen == 1){ - scope.modelmanager.signalmodel.mesh.children[2].material.map = scope.signallights["yellow"]; - scope.modelmanager.signalmodel.mesh.children[2].material.map.needsUpdate = true; + scope.modelmanager.signalmodel.mesh.getObjectByName("d3d002").material.map = scope.signallights["yellow"]; + scope.modelmanager.signalmodel.mesh.getObjectByName("d3d002").material.map.needsUpdate = true; }else{ - scope.modelmanager.signalmodel.mesh.children[2].material.map = scope.signallights["black"]; - scope.modelmanager.signalmodel.mesh.children[2].material.map.needsUpdate = true; + scope.modelmanager.signalmodel.mesh.getObjectByName("d3d002").material.map = scope.signallights["black"]; + scope.modelmanager.signalmodel.mesh.getObjectByName("d3d002").material.map.needsUpdate = true; } if(data.greenOpen == 1){ - scope.modelmanager.signalmodel.mesh.children[1].material.map = scope.signallights["green"]; - scope.modelmanager.signalmodel.mesh.children[1].material.map.needsUpdate = true; + scope.modelmanager.signalmodel.mesh.getObjectByName("d3d003").material.map = scope.signallights["green"]; + scope.modelmanager.signalmodel.mesh.getObjectByName("d3d003").material.map.needsUpdate = true; }else{ - scope.modelmanager.signalmodel.mesh.children[1].material.map = scope.signallights["black"]; - scope.modelmanager.signalmodel.mesh.children[1].material.map.needsUpdate = true; + scope.modelmanager.signalmodel.mesh.getObjectByName("d3d003").material.map = scope.signallights["black"]; + scope.modelmanager.signalmodel.mesh.getObjectByName("d3d003").material.map.needsUpdate = true; } }else{ - scope.modelmanager.signalmodel.mesh.children[0].material.map = scope.signallights["black"]; - scope.modelmanager.signalmodel.mesh.children[0].material.map.needsUpdate = true; - scope.modelmanager.signalmodel.mesh.children[1].material.map = scope.signallights["black"]; - scope.modelmanager.signalmodel.mesh.children[1].material.map.needsUpdate = true; - scope.modelmanager.signalmodel.mesh.children[2].material.map = scope.signallights["black"]; - scope.modelmanager.signalmodel.mesh.children[2].material.map.needsUpdate = true; + scope.modelmanager.signalmodel.mesh.getObjectByName("d3d001").material.map = scope.signallights["black"]; + scope.modelmanager.signalmodel.mesh.getObjectByName("d3d001").material.map.needsUpdate = true; + scope.modelmanager.signalmodel.mesh.getObjectByName("d3d002").material.map = scope.signallights["black"]; + scope.modelmanager.signalmodel.mesh.getObjectByName("d3d002").material.map.needsUpdate = true; + scope.modelmanager.signalmodel.mesh.getObjectByName("d3d003").material.map = scope.signallights["black"]; + scope.modelmanager.signalmodel.mesh.getObjectByName("d3d003").material.map.needsUpdate = true; } } diff --git a/src/router/index.js b/src/router/index.js index 6ecd3baea..e506b6077 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -14,6 +14,8 @@ const AuthorList = () => import('@/views/authorization/list'); const Jlmap3dedit = () => import('@/views/jlmap3d/edit/jlmap3dedit'); const Jlmap3dAssetManager = () => import('@/views/jlmap3d/jl3dassetmanager/assetmanager'); const Jlmap3dLesson3dEdit = () => import('@/views/jlmap3d/lesson3dedit/lesson3dedit'); +const Jlmap3dLesson3dPlayer = () => import('@/views/jlmap3d/lesson3dplayer/lesson3dplayer'); + const Jlmap3d = () => import('@/views/jlmap3d/drive/jl3ddrive'); const Jlmap3dSandbox = () => import('@/views/jlmap3d/simulation/jl3dsimulation'); const Jlmap3dPassFlow = () => import('@/views/jlmap3d/passflow/jl3dpassflow'); @@ -259,6 +261,11 @@ export const constantRoutes = [ component: Jlmap3dLesson3dEdit, hidden: true }, + { + path: '/design/jlmap3d/lesson3dplayer', + component: Jlmap3dLesson3dPlayer, + hidden: true + }, { path: '/data2json', component: () => import('@/views/planMonitor/data2json/page.vue'), diff --git a/src/views/jlmap3d/lesson3d/lesson3dshow.vue b/src/views/jlmap3d/lesson3d/lesson3dshow.vue deleted file mode 100644 index c9eaaf43e..000000000 --- a/src/views/jlmap3d/lesson3d/lesson3dshow.vue +++ /dev/null @@ -1,75 +0,0 @@ - - - - - diff --git a/src/views/jlmap3d/lesson3dedit/component/property.vue b/src/views/jlmap3d/lesson3dedit/component/property.vue index c359a5446..241450d19 100644 --- a/src/views/jlmap3d/lesson3dedit/component/property.vue +++ b/src/views/jlmap3d/lesson3dedit/component/property.vue @@ -49,8 +49,8 @@ - 重置镜头位置 - 记录初始镜头位置 + 重置镜头位置 + 记录初始镜头位置 @@ -273,6 +273,12 @@ }, updateData(){ // this.lessonData.lessonData.lessonProgress[this.lessonEditIndex].stepTipsData; + }, + resetCamera(){ + + }, + recordCamera(){ + }, lesson3dUpdatePicurl(picAsset){ if(this.selectType == "explainpane"){ diff --git a/src/views/jlmap3d/lesson3dedit/lesson3dedit.vue b/src/views/jlmap3d/lesson3dedit/lesson3dedit.vue index ba515d481..9f3c14906 100644 --- a/src/views/jlmap3d/lesson3dedit/lesson3dedit.vue +++ b/src/views/jlmap3d/lesson3dedit/lesson3dedit.vue @@ -58,7 +58,7 @@ 课程设置 - 预览课程 + 预览课程 保存当前课程 @@ -252,6 +252,10 @@ this.triggerList = newTriggerList; console.log(this.triggerList); }, + jumpPlayer(){ + this.$router.push({ path: '/design/jlmap3d/lesson3dplayer', query: {lessonId: this.$route.query.lessonId} }); + + }, }, } diff --git a/src/views/jlmap3d/lesson3dplayer/lesson3dplayer.vue b/src/views/jlmap3d/lesson3dplayer/lesson3dplayer.vue new file mode 100644 index 000000000..8d60af054 --- /dev/null +++ b/src/views/jlmap3d/lesson3dplayer/lesson3dplayer.vue @@ -0,0 +1,241 @@ + + + + + diff --git a/src/views/jlmap3d/lesson3dplayer/tools/actiontips.vue b/src/views/jlmap3d/lesson3dplayer/tools/actiontips.vue new file mode 100644 index 000000000..781be9fb7 --- /dev/null +++ b/src/views/jlmap3d/lesson3dplayer/tools/actiontips.vue @@ -0,0 +1,71 @@ + + + + + diff --git a/src/views/jlmap3d/lesson3dplayer/tools/errortips.vue b/src/views/jlmap3d/lesson3dplayer/tools/errortips.vue new file mode 100644 index 000000000..adfb3b9ab --- /dev/null +++ b/src/views/jlmap3d/lesson3dplayer/tools/errortips.vue @@ -0,0 +1,71 @@ + + + + + diff --git a/src/views/jlmap3d/lesson3dplayer/tools/explainpane.vue b/src/views/jlmap3d/lesson3dplayer/tools/explainpane.vue new file mode 100644 index 000000000..e24bb0413 --- /dev/null +++ b/src/views/jlmap3d/lesson3dplayer/tools/explainpane.vue @@ -0,0 +1,84 @@ + + + + + diff --git a/src/views/jlmap3d/lesson3dplayer/tools/jobpane.vue b/src/views/jlmap3d/lesson3dplayer/tools/jobpane.vue new file mode 100644 index 000000000..11c0375e3 --- /dev/null +++ b/src/views/jlmap3d/lesson3dplayer/tools/jobpane.vue @@ -0,0 +1,206 @@ + + + + + diff --git a/src/views/jlmap3d/lesson3dplayer/tools/processlog.vue b/src/views/jlmap3d/lesson3dplayer/tools/processlog.vue new file mode 100644 index 000000000..9398a7b21 --- /dev/null +++ b/src/views/jlmap3d/lesson3dplayer/tools/processlog.vue @@ -0,0 +1,82 @@ + + + + + diff --git a/src/views/jlmap3d/lesson3dplayer/tools/stepstips.vue b/src/views/jlmap3d/lesson3dplayer/tools/stepstips.vue new file mode 100644 index 000000000..cbdf43c93 --- /dev/null +++ b/src/views/jlmap3d/lesson3dplayer/tools/stepstips.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/src/views/jlmap3d/lesson3dplayer/tools/toolbar.vue b/src/views/jlmap3d/lesson3dplayer/tools/toolbar.vue new file mode 100644 index 000000000..0ca06a3d0 --- /dev/null +++ b/src/views/jlmap3d/lesson3dplayer/tools/toolbar.vue @@ -0,0 +1,201 @@ + + + + +