This commit is contained in:
joylink_fanyuhong 2022-01-10 14:35:55 +08:00
commit a6a9522cd4
26 changed files with 339 additions and 95 deletions

View File

@ -16,7 +16,8 @@ import { ControlManager } from '@/jlmap3d/lesson3d/manager/controlmanager.js';
import { AnimateManager } from '@/jlmap3d/lesson3d/manager/animatemanager.js'; import { AnimateManager } from '@/jlmap3d/lesson3d/manager/animatemanager.js';
import { Fire } from '@/jlmap3d/lesson3d/utils/fire.js';
import { AccidentManager } from '@/jlmap3d/lesson3dedit/manager/accidentmanager.js';
import { Loading } from 'element-ui'; import { Loading } from 'element-ui';
@ -50,18 +51,18 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) {
light.position.set( 0, 4000, 0 ); light.position.set( 0, 4000, 0 );
scene.add( light ); scene.add( light );
// let fire = new Fire();
// fire.init(scene);
var audionext = JL3D_LOCAL_STATIC+'/lesson3d/audio/next.wav'; var audionext = JL3D_LOCAL_STATIC+'/lesson3d/audio/next.wav';
audionext = new Audio(audionext); audionext = new Audio(audionext);
let animateManager = new AnimateManager(); let animateManager = new AnimateManager();
let controlManager = new ControlManager( dom,scene,lessonData,lessonIndex); let controlManager = new ControlManager( dom,scene,lessonData,lessonIndex);
let accidentManager = new AccidentManager(scene);
accidentManager.initAccident('player');
if(lessonData.accidentList){
accidentManager.loadAccidentList(lessonData.accidentList)
}
let loadingInstance = Loading.service({ fullscreen: true }); let loadingInstance = Loading.service({ fullscreen: true });
let assetModelManager = new AssetModelManager(scope,scene,controlManager); let assetModelManager = new AssetModelManager(scope,scene,controlManager);
@ -119,6 +120,7 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) {
// console.log(lessonData.lessonProgress[lessonIndex].roleName); // console.log(lessonData.lessonProgress[lessonIndex].roleName);
if(lessonData.lessonProgress[lessonIndex].roleName == nowRole){ if(lessonData.lessonProgress[lessonIndex].roleName == nowRole){
assetModelManager.changeSceneGroup(scope.nowSceneType); assetModelManager.changeSceneGroup(scope.nowSceneType);
accidentManager.changeSceneGroup(scope.nowSceneType);
controlManager.initRoleMode(true,nowRole); controlManager.initRoleMode(true,nowRole);
controlManager.initControlMode(lessonIndex); controlManager.initControlMode(lessonIndex);
controlManager.changeIndexEvent(lessonData.lessonProgress[lessonIndex].action,true,assetModelManager.lessonTriggerList[scope.nowSceneType]); controlManager.changeIndexEvent(lessonData.lessonProgress[lessonIndex].action,true,assetModelManager.lessonTriggerList[scope.nowSceneType]);
@ -126,6 +128,7 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) {
} else{ } else{
if(lessonData.lessonProgress[lessonIndex].roleName == 'kong'){ if(lessonData.lessonProgress[lessonIndex].roleName == 'kong'){
assetModelManager.changeSceneGroup(scope.nowSceneType); assetModelManager.changeSceneGroup(scope.nowSceneType);
accidentManager.changeSceneGroup(scope.nowSceneType);
controlManager.initRoleMode(false,nowRole); controlManager.initRoleMode(false,nowRole);
} }
controlManager.initRoleMode(false,nowRole); controlManager.initRoleMode(false,nowRole);
@ -209,7 +212,7 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) {
if(controlManager.controlMode == "non"){ if(controlManager.controlMode == "non"){
controlManager.updateOrbitControl(); controlManager.updateOrbitControl();
} }
// fire.update(); accidentManager.update();
animateManager.updateAnimation(); animateManager.updateAnimation();
requestAnimationFrame(animate); requestAnimationFrame(animate);

View File

@ -6,6 +6,7 @@ export function AccidentManager(scene) {
this.accidentList = []; this.accidentList = [];
this.accidentMode = '';
this.accidentGroup = new THREE.Group(); this.accidentGroup = new THREE.Group();
//场景中可触发事件模型 //场景中可触发事件模型
@ -32,7 +33,7 @@ export function AccidentManager(scene) {
scene.add(scope.accidentGroup); scene.add(scope.accidentGroup);
this.initAccident = function(nowSceneType){ this.initAccident = function(type){
let accidentData = [ let accidentData = [
{ {
id:'1', id:'1',
@ -40,7 +41,12 @@ export function AccidentManager(scene) {
type:"fire" type:"fire"
} }
]; ];
jl3dUpdateAccidentData(accidentData); scope.accidentMode = type;
if(scope.accidentMode == 'player'){
}else{
jl3dUpdateAccidentData(accidentData);
}
} }
this.saveDataList = function(){ this.saveDataList = function(){
@ -72,7 +78,11 @@ export function AccidentManager(scene) {
scope.accidentGroup.remove(scope.accidentGroup.children[0]); scope.accidentGroup.remove(scope.accidentGroup.children[0]);
} }
scope.accidentGroup.add(groupList[nowSceneType]); scope.accidentGroup.add(groupList[nowSceneType]);
jl3dUpdateAccidentlist(scope.accidentList[nowSceneType]); if(scope.accidentMode == 'player'){
}else{
jl3dUpdateAccidentlist(scope.accidentList[nowSceneType]);
}
updateSceneType = nowSceneType; updateSceneType = nowSceneType;
} }
@ -95,7 +105,11 @@ export function AccidentManager(scene) {
newAccident.object.createNew(groupList[nowSceneType],pos); newAccident.object.createNew(groupList[nowSceneType],pos);
} }
scope.accidentList[nowSceneType].push(newAccident); scope.accidentList[nowSceneType].push(newAccident);
jl3dUpdateAccidentlist(scope.accidentList[nowSceneType]); if(scope.accidentMode == 'player'){
}else{
jl3dUpdateAccidentlist(scope.accidentList[nowSceneType]);
}
} }
this.deleteAccident = function(selectAccident,nowSceneType){ this.deleteAccident = function(selectAccident,nowSceneType){
@ -104,7 +118,11 @@ export function AccidentManager(scene) {
for(let i=0;i<scope.accidentList[nowSceneType].length;i++){ for(let i=0;i<scope.accidentList[nowSceneType].length;i++){
if(scope.accidentList[nowSceneType][i].id == selectAccident.id){ if(scope.accidentList[nowSceneType][i].id == selectAccident.id){
scope.accidentList[nowSceneType].splice(i,1); scope.accidentList[nowSceneType].splice(i,1);
jl3dUpdateAccidentlist(scope.accidentList[nowSceneType]); if(scope.accidentMode == 'player'){
}else{
jl3dUpdateAccidentlist(scope.accidentList[nowSceneType]);
}
break; break;
} }
} }
@ -112,7 +130,6 @@ export function AccidentManager(scene) {
this.loadAccidentList = function(accidentList){ this.loadAccidentList = function(accidentList){
console.log(accidentList);
for(let i=0;i<accidentList.length;i++){ for(let i=0;i<accidentList.length;i++){
let newAccident = { let newAccident = {
id:accidentList[i].id, id:accidentList[i].id,
@ -129,7 +146,6 @@ export function AccidentManager(scene) {
newAccident.object.createNew(groupList[accidentList[i].sceneType],accidentList[i].pos); newAccident.object.createNew(groupList[accidentList[i].sceneType],accidentList[i].pos);
} }
scope.accidentList[accidentList[i].sceneType].push(newAccident); scope.accidentList[accidentList[i].sceneType].push(newAccident);
// jl3dUpdateAccidentlist(scope.accidentList[accidentList[i].sceneType]);
} }
} }

View File

@ -372,6 +372,75 @@ export function JobPaneData() {
}, },
], ],
}, },
{
name:"电力调度",
value:"dldd",
text:"负责供电系统的正常运行。",
picurl:"",
controlList:[
//联控
{
name:"联控",
data:[],
},
//动作
{
name:"动作",
data:[],
},
//口呼
{
name:"口呼",
data:[],
},
],
},
{
name:"环控调度",
value:"hkdd",
text:"负责监控地铁环控系统运行。",
picurl:"",
controlList:[
//联控
{
name:"联控",
data:[],
},
//动作
{
name:"动作",
data:[],
},
//口呼
{
name:"口呼",
data:[],
},
],
},
{
name:"信息调度",
value:"xxdd",
text:"负责故障发生时通报信息。",
picurl:"",
controlList:[
//联控
{
name:"联控",
data:[],
},
//动作
{
name:"动作",
data:[],
},
//口呼
{
name:"口呼",
data:[],
},
],
},
{ {
name:"报警中心", name:"报警中心",
value:"bjzx", value:"bjzx",

View File

@ -1,22 +1,36 @@
<template> <template>
<div class="jl3dmap3dMaintainer">
<div class="jl3dmap3dMaintainerSelect" :style="{'background-color': '#e4eaea'}">
<div style="position:absolute;width:90%;left:5%;top:10%;text-align:center;font-size:60px;">
<el-row>
城市轨道交通标准化培训软件
</el-row>
<el-row v-show="activeName != 'introduce' "style="font-size:30px;">
课程模式选择:
<el-switch v-model="examMode" active-text="考试模式" inactive-text="教学模式">
</el-switch>
</el-row>
</div>
<div class="jl3dmap3dMaintainer"> <div style="width:80%;height:70%;position:absolute;left:10%;top:25%;font-size:30px">
<div class="jl3dmap3dMaintainerSelect" :style="{'background-color': '#e4eaea'}"> <el-tabs v-model="activeName" type="border-card">
<div style="position:absolute;width:50%;left:25%;top:10%;text-align:center;font-size:80px;">
<el-row> <el-tab-pane label="岗位介绍" name="introduce">
城市轨道交通标准化培训软件 <div class="lesson3dSelectButton" v-for="(item1,introduceIndex) in introduce" :style="{'background-image': 'url('+localStatic+ item1.pic +')'}" @click="goDetail(item1.id)"></div>
</el-row> </el-tab-pane>
<el-row style="font-size:40px;">
课程模式选择: <el-tab-pane label="运营情况处理" name="stationoperation">
<el-switch <div class="lesson3dSelectButton" v-for="(item2,stationoperationIndex) in stationoperation" :style="{'background-image': 'url('+localStatic+ item2.pic +')'}" @click="goDetail(item2.id)"></div>
v-model="examMode" </el-tab-pane>
active-text="考试模式"
inactive-text="教学模式"> <el-tab-pane label="列车运行" name="treainoperation">
</el-switch> <div class="lesson3dSelectButton" v-for="(item3,treainoperationIndex) in treainoperation" :style="{'background-image': 'url('+localStatic+ item3.pic +')'}" @click="goDetail(item3.id)"></div>
</el-row> </el-tab-pane>
</div>
<div style="width:40%;height:70%;position:absolute;left:30%;top:25%;font-size:30px"> </el-tabs>
<el-table
<!-- <el-table
:data="lessonData" :data="lessonData"
style="width: 100%;" style="width: 100%;"
highlight-current-row highlight-current-row
@ -35,106 +49,248 @@
@click="goDetail(scope.row)">进入课程</el-button> @click="goDetail(scope.row)">进入课程</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table> -->
</div> </div>
<div class="display-draft"> <div class="display-draft">
<el-button-group> <el-button-group>
<el-button style="width:200px"type="primary" @click="quit">退出</el-button> <el-button style="width:200px" type="primary" @click="quit">退出</el-button>
</el-button-group> </el-button-group>
</div> </div>
</div> </div>
</div>
</div>
</template> </template>
<script> <script>
import {
import { getSelectLesson3dList } from '@/api/jmap/lesson3d'; getSelectLesson3dList
import { ProjectIcon } from '@/scripts/ProjectConfig'; } from '@/api/jmap/lesson3d';
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js'; import {
ProjectIcon
} from '@/scripts/ProjectConfig';
import {
JL3D_LOCAL_STATIC
} from '@/api/jlmap3d/assets3d.js';
import bgPsdImg from '@/assets/bg_psd.png'; import bgPsdImg from '@/assets/bg_psd.png';
// import Jlmap3dMsg from '@/views/jlmap3d/show/msg'; // import Jlmap3dMsg from '@/views/jlmap3d/show/msg';
var train; var train;
export default { export default {
name: 'XzExam', name: 'XzExam',
components: { components: {
}, },
data() { data() {
return { return {
localStatic:JL3D_LOCAL_STATIC, localStatic: JL3D_LOCAL_STATIC,
examMode:false, activeName: 'introduce',
lessonType:'publish', examMode: false,
lessonData:[], lessonType: 'publish',
search: '', lessonData: [],
search: '',
introduce: [{
id: "17",
name: "售票员职责介绍",
pic: '/other/17.png',
},
{
id: "18",
name: "客运值班员职责介绍",
pic: '/other/18.png',
},
{
id: "19",
name: "行车值班员职责介绍",
pic: '/other/19.png',
},
{
id: "20",
name: "值班站长职责介绍",
pic: '/other/20.png',
},
{
id: "21",
name: "站长职责介绍",
pic: '/other/21.png',
},
{
id: "22",
name: "行车调度职责介",
pic: '/other/22.png',
},
{
id: "23",
name: "电力调度职责介绍",
pic: '/other/23.png',
},
{
id: "24",
name: "信息调度职责介绍",
pic: '/other/24.png',
},
{
id: "25",
name: "环控调度职责介绍",
pic: '/other/25.png',
}
],
stationoperation: [
{
id: "8",
name: "降级运营-电话闭塞测试",
pic: '/other/8.png',
},
{
id: "9",
name: "屏蔽门",
type: "2",
pic: '/other/9.png',
},
{
id: "10",
name: "整侧屏蔽门无法开启",
pic: '/other/10.png',
},
{
id: "11",
name: "整侧屏蔽门无法关闭",
pic: '/other/11.png',
},
{
id: "12",
name: "单侧屏蔽门无法开启",
pic: '/other/12.png',
},
{
id: "13",
name: "单个屏蔽门无法关闭",
pic: '/other/13.png',
},
{
id: "14",
name: "地铁列车救援",
type: "1",
pic: '/other/14.png',
},
{
id: "15",
name: "车站大客流test",
pic: '/other/15.png',
}
],
treainoperation: [
{
id: "2",
name: "列车折返",
type: "1",
pic: '/other/2.png',
},
{
id: "4",
name: "列车出库",
type: "1",
pic: '/other/4.png',
},
{
id: "5",
name: "列车出段",
type: "1",
pic: '/other/5.png',
},
{
id: "6",
name: "列车回段",
type: "1",
pic: '/other/6.png',
},
{
id: "7",
name: "列车回库",
type: "1",
pic: '/other/7.png',
}
],
};
}; },
beforeDestroy() {
}, },
beforeDestroy() { created() {
// document.querySelector("link[rel*='icon']").href = loginInfo[this.$route.query.project].linkIcon || ProjectIcon[this.$route.query.project];
}, },
created() { mounted() {
// document.querySelector("link[rel*='icon']").href = loginInfo[this.$route.query.project].linkIcon || ProjectIcon[this.$route.query.project]; getSelectLesson3dList().then(response => {
}, console.log(response);
mounted() { // this.lessonData = response.data;
getSelectLesson3dList().then(response => { }).catch(() => {});
console.log(response); },
this.lessonData = response.data; methods: {
}).catch(() => { goDetail(id) {
}); this.$router.push({
// console.log(""); path: '/design/jlmap3d/lesson3dplayer',
}, query: {
methods: { lessonId: id,
goDetail( row) { lineCode: this.$route.query.lineCode,
this.$router.push({ path: '/design/jlmap3d/lesson3dplayer', query: {lessonId: row.id,lineCode: this.$route.query.lineCode,examMode:this.examMode,lessonType:this.lessonType} }); examMode: this.examMode,
}, lessonType: this.lessonType
quit() { }
history.go(-1); });
}, },
} quit() {
history.go(-1);
},
}
}; };
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss"; @import "src/styles/mixin.scss";
.jl3dmap3dMaintainer {
.jl3dmap3dMaintainer { position: absolute;
position:absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
z-index: 35; z-index: 35;
text-align: center; text-align: center;
// color:#FFF; // color:#FFF;
} }
.jl3dmap3dMaintainerSelect{ .jl3dmap3dMaintainerSelect {
position:absolute; position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
z-index: 350; z-index: 350;
top:0; top: 0;
left:0; left: 0;
// background-repeat:no-repeat; // background-repeat:no-repeat;
z-index: 350; z-index: 350;
background-size:100%; background-size: 100%;
} }
.display-draft {
.display-draft {
/* z-index: 1000; */ /* z-index: 1000; */
position: absolute; position: absolute;
width:100%; width: 100%;
text-align: center; text-align: center;
bottom: 50px; bottom: 50px;
} }
.lesson3dSelectButton{
position:relative;
width: 300px;
height: 220px;
margin: 20px;
float: left;
font-size: 50px;
line-height:150px;
background-size: 100%;
background-repeat: no-repeat;
color:#FFF;
cursor:pointer;
}
</style> </style>

BIN
static/other/10.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

BIN
static/other/11.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

BIN
static/other/12.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

BIN
static/other/13.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

View File

Before

Width:  |  Height:  |  Size: 119 KiB

After

Width:  |  Height:  |  Size: 119 KiB

BIN
static/other/15.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

BIN
static/other/17.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

BIN
static/other/18.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB

BIN
static/other/19.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

View File

Before

Width:  |  Height:  |  Size: 107 KiB

After

Width:  |  Height:  |  Size: 107 KiB

BIN
static/other/20.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

BIN
static/other/21.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

BIN
static/other/22.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

BIN
static/other/23.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

BIN
static/other/24.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

BIN
static/other/25.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

View File

Before

Width:  |  Height:  |  Size: 131 KiB

After

Width:  |  Height:  |  Size: 131 KiB

BIN
static/other/5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

BIN
static/other/6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

View File

Before

Width:  |  Height:  |  Size: 130 KiB

After

Width:  |  Height:  |  Size: 130 KiB

BIN
static/other/8.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

BIN
static/other/9.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB