diff --git a/src/jlmap3d/lesson3d/lesson3dplayer.js b/src/jlmap3d/lesson3d/lesson3dplayer.js index c35163642..eddd781e5 100644 --- a/src/jlmap3d/lesson3d/lesson3dplayer.js +++ b/src/jlmap3d/lesson3d/lesson3dplayer.js @@ -81,8 +81,6 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) { //console.log(error); }); - - this.actionModelControl = function(actionType,actionModel){ if(actionType == "remove"){ @@ -94,6 +92,10 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) { actionModel.visible = true; assetModelManager.otherModel.add(actionModel); audionext.play(); + }else if(actionType == "showaccident"){ + accidentManager.addAccident(actionModel,scope.nowSceneType); + }else if(actionType == "removeaccident"){ + accidentManager.removeAccident(actionModel,scope.nowSceneType); } } diff --git a/src/jlmap3d/lesson3d/manager/controlmanager.js b/src/jlmap3d/lesson3d/manager/controlmanager.js index 389f7a311..1cc630ce5 100644 --- a/src/jlmap3d/lesson3d/manager/controlmanager.js +++ b/src/jlmap3d/lesson3d/manager/controlmanager.js @@ -610,6 +610,8 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) { attachBox.position.x = lessonData.lessonProgress[nowLessonIndex].cameraPosition.x; attachBox.position.y = lessonData.lessonProgress[nowLessonIndex].cameraPosition.y ; attachBox.position.z = lessonData.lessonProgress[nowLessonIndex].cameraPosition.z; + console.log(lessonData.lessonProgress[nowLessonIndex]); + fpsCamera.lookAt(lessonData.lessonProgress[nowLessonIndex].cameraTarget.x,lessonData.lessonProgress[nowLessonIndex].cameraTarget.y,lessonData.lessonProgress[nowLessonIndex].cameraTarget.z); } } @@ -645,7 +647,6 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) { for(let i=0;i0){ - accidentManager.createNewAccident(accidentData,intersects[0].point,scope.nowSceneType); + accidentManager.createAddAccident(accidentData,intersects[0].point,scope.nowSceneType); } } diff --git a/src/jlmap3d/lesson3dedit/manager/accidentmanager.js b/src/jlmap3d/lesson3dedit/manager/accidentmanager.js index 8f7ec6caa..ecf54e4c3 100644 --- a/src/jlmap3d/lesson3dedit/manager/accidentmanager.js +++ b/src/jlmap3d/lesson3dedit/manager/accidentmanager.js @@ -72,11 +72,27 @@ export function AccidentManager(scene) { } return saveList; } + this.addAccident = function(addLable,nowSceneType){ + for(let i=0;i0){ scope.accidentGroup.remove(scope.accidentGroup.children[0]); } + scope.accidentGroup.add(groupList[nowSceneType]); if(scope.accidentMode == 'player'){ @@ -86,7 +102,7 @@ export function AccidentManager(scene) { updateSceneType = nowSceneType; } - this.createNewAccident = function(type,pos,nowSceneType){ + this.createAddAccident = function(type,pos,nowSceneType){ var rand = Math.floor(Math.random () * 900) + 100; @@ -102,7 +118,7 @@ export function AccidentManager(scene) { }; if(type == "fire"){ newAccident.object = new Fire(); - newAccident.object.createNew(groupList[nowSceneType],pos); + newAccident.object.createAdd(groupList[nowSceneType],pos); } scope.accidentList[nowSceneType].push(newAccident); if(scope.accidentMode == 'player'){ @@ -118,11 +134,9 @@ export function AccidentManager(scene) { for(let i=0;i - + + + + + + + + - - - - + + + + - - - - - + + + + + + + @@ -269,7 +282,7 @@ export default { name: 'ProPerty', - props:['lessonData','lessonEditIndex','triggerList'], + props:['lessonData','lessonEditIndex','triggerList','accidentList'], components: { }, @@ -279,6 +292,7 @@ activeName: 'cameraproperty', selectLesson3dControl:"", selected:"", + modelType:"", editSelectTool:"", editSelectModel:"", selectedAction:{ @@ -406,6 +420,12 @@ selectScene(val){ editAction("changeScene",val); }, + selectActionModel(){ + this.modelType = 'model'; + }, + selectActionAccident(){ + this.modelType = 'accident'; + }, updateData(){ // this.lessonData.lessonData.lessonProgress[this.lessonEditIndex].stepTipsData; }, diff --git a/src/views/jlmap3d/lesson3dedit/lesson3dedit.vue b/src/views/jlmap3d/lesson3dedit/lesson3dedit.vue index 920527ffd..598af7c59 100644 --- a/src/views/jlmap3d/lesson3dedit/lesson3dedit.vue +++ b/src/views/jlmap3d/lesson3dedit/lesson3dedit.vue @@ -118,6 +118,7 @@ :lessonData='lessonData' :lessonEditIndex='lessonEditIndex' :triggerList='triggerList' + :accidentList='accidentlist' > diff --git a/src/views/jlmap3d/otherproject/xzexam/xzexam.vue b/src/views/jlmap3d/otherproject/xzexam/xzexam.vue index 1eb1ea0ea..5f7430a87 100644 --- a/src/views/jlmap3d/otherproject/xzexam/xzexam.vue +++ b/src/views/jlmap3d/otherproject/xzexam/xzexam.vue @@ -222,6 +222,56 @@ export default { id: "15", name: "车站大客流test", pic: '/other/15.png', + }, + { + id: "27", + name: "降级运营-疫情爆发应急处置", + pic: '/other/27.jpg', + }, + { + id: "28", + name: "垂直电梯困人", + pic: '/other/28.jpg', + }, + { + id: "29", + name: "屏蔽门夹人夹物", + pic: '/other/29.jpg', + }, + { + id: "30", + name: "车站客伤处置", + pic: '/other/30.jpg', + }, + { + id: "31", + name: "车站公共区火灾", + pic: '/other/31.jpg', + }, + { + id: "32", + name: "设备区火灾", + pic: '/other/32.jpg', + }, + { + id: "33", + name: "站台火灾", + pic: '/other/33.jpg', + }, + { + id: "34", + name: "列车区间火灾(不能维持进站)", + pic: '/other/34.jpg', + }, + { + id: "35", + name: "列车区间火灾(能维持进站)", + pic: '/other/35.jpg', + }, + { + id: "36", + name: "道岔故障演练", + pic: '/other/36.jpg', } ], @@ -236,7 +286,7 @@ export default { }, mounted() { getSelectLesson3dList().then(response => { - // console.log(response); + console.log(response); // this.lessonData = response.data; }).catch(() => {}); }, diff --git a/static/other/27.jpg b/static/other/27.jpg new file mode 100644 index 000000000..2d75b9ca5 Binary files /dev/null and b/static/other/27.jpg differ diff --git a/static/other/28.jpg b/static/other/28.jpg new file mode 100644 index 000000000..19f8ffcee Binary files /dev/null and b/static/other/28.jpg differ diff --git a/static/other/29.jpg b/static/other/29.jpg new file mode 100644 index 000000000..4163974df Binary files /dev/null and b/static/other/29.jpg differ diff --git a/static/other/30.jpg b/static/other/30.jpg new file mode 100644 index 000000000..cdbf86861 Binary files /dev/null and b/static/other/30.jpg differ diff --git a/static/other/31.jpg b/static/other/31.jpg new file mode 100644 index 000000000..2cf1abc71 Binary files /dev/null and b/static/other/31.jpg differ diff --git a/static/other/32.jpg b/static/other/32.jpg new file mode 100644 index 000000000..b06edc298 Binary files /dev/null and b/static/other/32.jpg differ diff --git a/static/other/33.jpg b/static/other/33.jpg new file mode 100644 index 000000000..89cb063a3 Binary files /dev/null and b/static/other/33.jpg differ diff --git a/static/other/34.jpg b/static/other/34.jpg new file mode 100644 index 000000000..44477b755 Binary files /dev/null and b/static/other/34.jpg differ diff --git a/static/other/35.jpg b/static/other/35.jpg new file mode 100644 index 000000000..5f5c44646 Binary files /dev/null and b/static/other/35.jpg differ diff --git a/static/other/36.jpg b/static/other/36.jpg new file mode 100644 index 000000000..79913f3f4 Binary files /dev/null and b/static/other/36.jpg differ