修改三维课程编辑器逻辑
This commit is contained in:
parent
dcbe6f6315
commit
e0bb2d8532
@ -823,7 +823,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
|
||||
// console.log(trainmodel.openleft);
|
||||
// console.log(trainmodel.openright);
|
||||
if(trainmodel.code == data.code){
|
||||
|
||||
console.log(data);
|
||||
if(trainmodel.right == "0"){
|
||||
if(data.doorCode == "2"){
|
||||
|
||||
@ -834,6 +834,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
|
||||
actions["traindoor"].top[an].time = actions["traindoor"].top[an]._clip.duration;
|
||||
actions["traindoor"].top[an].timeScale = -1;
|
||||
actions["traindoor"].top[an].play();
|
||||
|
||||
}
|
||||
}else if(trainmodel.openleft != data.open && data.open == "1"){
|
||||
trainmodel.openleft = "1";
|
||||
|
@ -73,15 +73,19 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) {
|
||||
|
||||
|
||||
this.actionModelControl = function(actionType,actionModel){
|
||||
console.log(actionType);
|
||||
console.log(actionModel);
|
||||
// console.log(actionType);
|
||||
// console.log(actionModel);
|
||||
if(actionType == "remove"){
|
||||
|
||||
assetModelManager.otherModel.remove(actionModel);
|
||||
}else if(actionType == "show"){
|
||||
actionModel.visible = true;
|
||||
assetModelManager.otherModel.add(actionModel);
|
||||
}else if(actionType == "changeIndex"){
|
||||
actionModel.visible = true;
|
||||
assetModelManager.otherModel.add(actionModel);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
this.actionRemove = function(actionModel){
|
||||
@ -91,15 +95,16 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) {
|
||||
this.changeIndex = function(nowIndex){
|
||||
if(nowIndex!=0){
|
||||
oldIndex = lessonIndex;
|
||||
if(lessonData.lessonProgress[oldIndex].roleName == nowRole){
|
||||
updateExam(lessonData.lessonProgress[oldIndex],oldIndex);
|
||||
}
|
||||
}
|
||||
if(lessonData.lessonProgress[oldIndex].roleName == nowRole){
|
||||
updateExam(lessonData.lessonProgress[oldIndex],oldIndex);
|
||||
}
|
||||
|
||||
|
||||
|
||||
lessonIndex = nowIndex;
|
||||
|
||||
console.log(nowIndex);
|
||||
// console.log(nowIndex);
|
||||
scope.nowSceneType = lessonData.lessonProgress[nowIndex].progressScene;
|
||||
// console.log(nowRole);
|
||||
// console.log(lessonData.lessonProgress[lessonIndex].roleName);
|
||||
@ -118,7 +123,10 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) {
|
||||
controlManager.changeIndexEvent(lessonData.lessonProgress[lessonIndex].action,false,assetModelManager.lessonTriggerList[scope.nowSceneType]);
|
||||
}
|
||||
|
||||
if(nowIndex == lessonData.lessonProgress.length-1){
|
||||
|
||||
if(nowIndex == (lessonData.lessonProgress.length-1)){
|
||||
console.log(nowIndex);
|
||||
console.log(lessonData.lessonProgress.length);
|
||||
lessonEnd();
|
||||
}
|
||||
}
|
||||
@ -137,6 +145,7 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) {
|
||||
}
|
||||
controlManager.initRoleMode(roleMode);
|
||||
for(let i=0;i<lessonData.lessonProgress.length;i++){
|
||||
|
||||
if(nowRole == lessonData.lessonProgress[i].roleName){
|
||||
examList.push(
|
||||
{
|
||||
@ -157,7 +166,7 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) {
|
||||
time:0,
|
||||
};
|
||||
controlManager.initExam(examList,examData);
|
||||
updataExamStatus(examData);
|
||||
// updataExamStatus(examData);
|
||||
// if(lessonData.lessonProgress[lessonIndex].action.length>0){
|
||||
controlManager.changeIndexEvent(lessonData.lessonProgress[lessonIndex].action,roleMode,assetModelManager.lessonTriggerList[scope.nowSceneType]);
|
||||
|
||||
|
@ -29,9 +29,9 @@ export function AssetModelManager(editor,scene) {
|
||||
scope.staticAsset['station'] = {
|
||||
modelId:'station',
|
||||
packageName:"车站",
|
||||
url:JL3D_LOCAL_STATIC+"/lesson3d/station.FBX",
|
||||
url:"/MODEL/2021-09-08/211-9861.FBX",
|
||||
mesh:"",
|
||||
assetType:'static',
|
||||
assetType:'onlineasset',
|
||||
isUse:true,
|
||||
resourceType:"三维课程",
|
||||
sceneType:"standstation",
|
||||
@ -219,7 +219,12 @@ export function AssetModelManager(editor,scene) {
|
||||
scope.staticAsset['station'].mesh.getObjectByName("spbmkg").actionName = "PBMDH";
|
||||
scope.lessonTriggerList["standstation"].push(scope.staticAsset['station'].mesh.getObjectByName("spbmkg"));
|
||||
|
||||
// console.log(scope.loadAsset['default1'].mesh.getObjectByName("FTKG"));
|
||||
scope.staticAsset['station'].mesh.getObjectByName("DMH").showType = "default";
|
||||
scope.staticAsset['station'].mesh.getObjectByName("DMH").label = "隔离门";
|
||||
scope.staticAsset['station'].mesh.getObjectByName("DMH").actionName = "PBMDH";
|
||||
scope.lessonTriggerList["standstation"].push(scope.staticAsset['station'].mesh.getObjectByName("DMH"));
|
||||
|
||||
scope.staticAsset['station'].mesh.getObjectByName("DMH").rotation.z = Math.PI/2;
|
||||
}
|
||||
|
||||
//动态加载资源
|
||||
|
@ -564,70 +564,110 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
|
||||
// console.log(eventTrigger);
|
||||
// console.log("----------------------------");
|
||||
|
||||
|
||||
if(actions.length>0 && roleMode){
|
||||
console.log(roleMode);
|
||||
if(actions.length>0 ){
|
||||
scope.eventHitMode = true;
|
||||
for(let i=0;i<actions.length;i++){
|
||||
|
||||
if(actions[i].actionType == "auto"){
|
||||
|
||||
console.log(actions[i]);
|
||||
if(actions[i].actionMode == "play"){
|
||||
for(let j=0;j<eventTrigger.length;j++){
|
||||
if(eventTrigger[j].label == actions[i].actionModel){
|
||||
|
||||
if(actionList[eventTrigger[j].actionName].status == "01"){
|
||||
actionList[eventTrigger[j].actionName].status = "02";
|
||||
|
||||
actionList[eventTrigger[j].actionName].action.reset();
|
||||
actionList[eventTrigger[j].actionName].action.timeScale = 1;
|
||||
actionList[eventTrigger[j].actionName].action.clampWhenFinished = true;
|
||||
actionList[eventTrigger[j].actionName].action.setLoop(THREE.LoopOnce);
|
||||
actionList[eventTrigger[j].actionName].action.play();
|
||||
|
||||
}else{
|
||||
actionList[eventTrigger[j].actionName].status = "01";
|
||||
|
||||
actionList[eventTrigger[j].actionName].action.reset();
|
||||
actionList[eventTrigger[j].actionName].action.timeScale = -1;
|
||||
actionList[eventTrigger[j].actionName].action.clampWhenFinished = true;
|
||||
actionList[eventTrigger[j].actionName].action.setLoop(THREE.LoopOnce);
|
||||
actionList[eventTrigger[j].actionName].action.play();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(actions[i].actionMode == "show"){
|
||||
for(let j=0;j<eventTrigger.length;j++){
|
||||
if(eventTrigger[j].label == actions[i].actionModel){
|
||||
actionEvent("show",actions[i],eventTrigger[j]);
|
||||
j = eventTrigger.length;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(actions[i].actionMode == "remove"){
|
||||
for(let j=0;j<eventTrigger.length;j++){
|
||||
if(eventTrigger[j].label == actions[i].actionModel){
|
||||
actionEvent("remove",actions[i],eventTrigger[j]);
|
||||
j = eventTrigger.length;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
console.log(eventTrigger);
|
||||
if(actions[i].actionType == "contact"){
|
||||
for(let j=0;j<eventTrigger.length;j++){
|
||||
if(eventTrigger[j].label == actions[i].actionModel){
|
||||
let eventTestBox = new THREE.Box3(new THREE.Vector3(), new THREE.Vector3());
|
||||
eventTestBox.setFromObject(eventTrigger[j]);
|
||||
eventTestBox.mesh = eventTrigger[j];
|
||||
eventTestBox.action = actions[i];
|
||||
eventBoxs.push(eventTestBox);
|
||||
actionEvent("changeIndex",eventBoxs[i].action,eventTestBox.mesh);
|
||||
if(roleMode){
|
||||
if(actions[i].actionType == "contact"){
|
||||
if(eventTrigger){
|
||||
|
||||
for(let j=0;j<eventTrigger.length;j++){
|
||||
if(eventTrigger[j].label == actions[i].actionModel){
|
||||
let eventTestBox = new THREE.Box3(new THREE.Vector3(), new THREE.Vector3());
|
||||
eventTestBox.setFromObject(eventTrigger[j]);
|
||||
eventTestBox.mesh = eventTrigger[j];
|
||||
eventTestBox.action = actions[i];
|
||||
eventBoxs.push(eventTestBox);
|
||||
actionEvent("changeIndex",eventBoxs[i].action,eventTestBox.mesh);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(actions[i].actionType == "switch"){
|
||||
for(let j=0;j<eventTrigger.length;j++){
|
||||
if(eventTrigger[j].label == actions[i].actionModel){
|
||||
|
||||
let eventRaycaster = {
|
||||
mesh:eventTrigger[j],
|
||||
action:actionList[eventTrigger[j].actionName],
|
||||
type:actions[i].actionType,
|
||||
actionMode:actions[i].actionMode,
|
||||
jumpNode:actions[i].jumpNode,
|
||||
};
|
||||
raycasterBoxs.push(eventRaycaster);
|
||||
|
||||
actionEvent("changeIndex",actions[i],eventTrigger[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(actions[i].actionType == "urgeSwitch"){
|
||||
for(let j=0;j<eventTrigger.length;j++){
|
||||
if(eventTrigger[j].label == actions[i].actionModel){
|
||||
let eventRaycaster = {
|
||||
mesh:eventTrigger[j],
|
||||
action:actionList[eventTrigger[j].actionName],
|
||||
type:actions[i].actionType,
|
||||
};
|
||||
raycasterBoxs.push(eventRaycaster);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(actions[i].actionType == "switch"){
|
||||
for(let j=0;j<eventTrigger.length;j++){
|
||||
if(eventTrigger[j].label == actions[i].actionModel){
|
||||
|
||||
let eventRaycaster = {
|
||||
mesh:eventTrigger[j],
|
||||
action:actionList[eventTrigger[j].actionName],
|
||||
type:actions[i].actionType,
|
||||
actionMode:actions[i].actionMode,
|
||||
jumpNode:actions[i].jumpNode,
|
||||
};
|
||||
raycasterBoxs.push(eventRaycaster);
|
||||
|
||||
actionEvent("changeIndex",actions[i],eventTrigger[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(actions[i].actionType == "urgeSwitch"){
|
||||
for(let j=0;j<eventTrigger.length;j++){
|
||||
if(eventTrigger[j].label == actions[i].actionModel){
|
||||
let eventRaycaster = {
|
||||
mesh:eventTrigger[j],
|
||||
action:actionList[eventTrigger[j].actionName],
|
||||
type:actions[i].actionType,
|
||||
};
|
||||
raycasterBoxs.push(eventRaycaster);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}else if(actions.length>0){
|
||||
console.log(actions);
|
||||
// console.log(actions);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -49,9 +49,9 @@ export function AssetModelManager(editor,scene) {
|
||||
scope.staticAsset['station'] = {
|
||||
modelId:'station',
|
||||
packageName:"车站",
|
||||
url:JL3D_LOCAL_STATIC+"/lesson3d/station.FBX",
|
||||
url:"/MODEL/2021-09-08/211-9861.FBX",
|
||||
mesh:"",
|
||||
assetType:'static',
|
||||
assetType:'onlineasset',
|
||||
isUse:true,
|
||||
resourceType:"三维课程",
|
||||
sceneType:"standstation",
|
||||
@ -282,6 +282,9 @@ export function AssetModelManager(editor,scene) {
|
||||
scope.staticAsset['station'].mesh.getObjectByName("spbmkg").label = "屏蔽门开关";
|
||||
scope.lessonTriggerList["standstation"].push(scope.staticAsset['station'].mesh.getObjectByName("spbmkg"));
|
||||
|
||||
scope.staticAsset['station'].mesh.getObjectByName("DMH").showType = "default";
|
||||
scope.staticAsset['station'].mesh.getObjectByName("DMH").label = "隔离门";
|
||||
scope.lessonTriggerList["standstation"].push(scope.staticAsset['station'].mesh.getObjectByName("DMH"));
|
||||
|
||||
|
||||
// console.log(scope.loadAsset['default1'].mesh.getObjectByName("FTKG"));
|
||||
|
@ -15,6 +15,8 @@ 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 Jlmap3dLesson3dSelect = () => import('@/views/jlmap3d/lesson3dplayer/lesson3dselect');
|
||||
|
||||
|
||||
const Jlmap3d = () => import('@/views/jlmap3d/drive/jl3ddrive');
|
||||
const Jlmap3dSandbox = () => import('@/views/jlmap3d/simulation/jl3dsimulation');
|
||||
@ -289,6 +291,12 @@ export const constantRoutes = [
|
||||
component: Jlmap3dLesson3dPlayer,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/jlmap3d/lesson3dselect',
|
||||
component: Jlmap3dLesson3dSelect,
|
||||
hidden: true
|
||||
},
|
||||
|
||||
{
|
||||
path: '/data2json',
|
||||
component: () => import('@/views/planMonitor/data2json/page.vue'),
|
||||
@ -346,6 +354,7 @@ export const constantRoutes = [
|
||||
component: Jl3dRailwayDrive,
|
||||
hidden: true
|
||||
},
|
||||
|
||||
{
|
||||
path: '/jlmap3d/devicemodel',
|
||||
component: Jlmap3dModel,
|
||||
|
@ -448,6 +448,17 @@ export const loginInfo = {
|
||||
navigationMarginLeft: '50px',
|
||||
systemType: '022'
|
||||
},
|
||||
richorlesson3d:{
|
||||
title: '中航锐创城市轨道交通实训平台',
|
||||
loginPath: '/login?project=richorlesson3d',
|
||||
loginParam: 'RICHOR',
|
||||
bottomColumn: '中航锐创(北京)科技发展有限公司 联系电话:4000500081',
|
||||
linkIcon: FaviconRichor,
|
||||
titleIcon: FaviconRichor,
|
||||
navigationLogoWidth: '40px',
|
||||
navigationMarginLeft: '50px',
|
||||
systemType: '022'
|
||||
},
|
||||
designrichorjoint: {
|
||||
title: '中航锐创城市轨道交通设计平台',
|
||||
loginPath: '/design/login?project=richorjoint',
|
||||
@ -513,6 +524,7 @@ export const ProjectIcon = {
|
||||
cgy: FaviconCgy,
|
||||
designcgy: FaviconCgy,
|
||||
richor:FaviconRichor,
|
||||
richorlesson3d:FaviconRichor,
|
||||
richorjoint: FaviconRichor,
|
||||
designrichorjoint: FaviconRichor
|
||||
};
|
||||
@ -546,14 +558,15 @@ export const ProjectCode = {
|
||||
cgy: 'CGY',
|
||||
designcgy: 'CGY',
|
||||
richor:'RICHOR',
|
||||
richorlesson3d:'RICHOR',
|
||||
richorjoint: 'RICHOR_JOINT',
|
||||
designrichorjoint: 'RICHOR_JOINT'
|
||||
};
|
||||
export const BottomColumnOnlyConInfo = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd', 'cgy', 'designcgy', 'richor', 'richorjoint', 'designrichorjoint']; // 底部栏仅展示公司信息不展示备案号
|
||||
export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'heb', 'designheb', 'designdrts', 'drts', 'wjls', 'nty', 'designnty', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl', 'designbjd', 'cgy', 'designcgy', 'zzww', 'zzwwtest', 'richor', 'richorjoint', 'designrichorjoint']; // 实训设计平台通过项目code获取地图列表的项目
|
||||
export const BottomColumnOnlyConInfo = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd', 'cgy', 'designcgy', 'richor', 'richorlesson3d', 'richorjoint', 'designrichorjoint']; // 底部栏仅展示公司信息不展示备案号
|
||||
export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'heb', 'designheb', 'designdrts', 'drts', 'wjls', 'nty', 'designnty', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl', 'designbjd', 'cgy', 'designcgy', 'zzww', 'zzwwtest', 'richor','richorlesson3d', 'richorjoint', 'designrichorjoint']; // 实训设计平台通过项目code获取地图列表的项目
|
||||
export const CaseHideProjectList = ['heb', 'designheb', 'cgy', 'designcgy']; // 案例展示隐藏的项目
|
||||
export const VersionBaseNoShow = ['heb', 'designheb', 'hls', 'designhls', 'drts', 'wjls', 'hyd', 'designhyd', 'cgy', 'designcgy', 'xadt', 'designxadt']; // 登录页右下角版本开发基于不展示
|
||||
export const MainBodyNoShow = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd', 'cgy', 'designcgy', 'xadt', 'designxadt']; // 登录页右下角主体不展示
|
||||
export const MainBodyNoShow = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd', 'cgy', 'designcgy', 'xadt', 'designxadt','richor','richorlesson3d', 'richorjoint']; // 登录页右下角主体不展示
|
||||
export const ProjectLoginStyleList = ['gzb', 'designgzb', 'xty', 'designxty', 'xadt', 'designxadt', 'tky', 'designtky', 'jyd', 'designjyd', 'bxkc', 'designbxkc',
|
||||
'crsc', 'designcrsc', 'hls', 'designhls', 'drts', 'wjls', 'hyd', 'designhyd', 'nty', 'designnty', 'bjd', 'designbjd', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl', 'cgy', 'designcgy', 'zzww', 'zzwwtest']; // 登录页样式
|
||||
export const NoQrcodeList = ['heb', 'designheb', 'cgy', 'designcgy', 'ntyl', 'designntyl'];
|
||||
@ -614,6 +627,7 @@ export const ProjectList = [
|
||||
{value: 'zzww', label: '郑州共赢'},
|
||||
{value: 'zzwwtest', label: '郑州共赢考试'},
|
||||
{value: 'richor', label: '中航锐创'},
|
||||
{value: 'richorlesson3d', label: '中航锐创(三维课程)'},
|
||||
{value: 'richor_joint', label: '中航锐创(实训室)'}
|
||||
];
|
||||
export const localPackageProject = {
|
||||
|
@ -2,9 +2,9 @@ export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// BASE_API = 'https://joylink.club/jlcloud';
|
||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://192.168.8.107:9000'; // 袁琪
|
||||
BASE_API = 'http://192.168.8.176:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.8.176:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.2.183:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.8.140:9000'; // 杜康
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
|
@ -4,7 +4,7 @@
|
||||
<el-tabs v-model="activeName" class="activediv" type="card" @tab-click="handleClick">
|
||||
<el-tab-pane label="课程场景" name="progresslist" >
|
||||
<draggable v-model="lessonData.lessonData.lessonProgress" group="people" @start="drag=true" @end="drag=false" >
|
||||
<div class="progressdiv" v-for="(element,index) in lessonData.lessonData.lessonProgress">
|
||||
<div class="progressdiv" :class="{active:index==isActive}" v-for="(element,index) in lessonData.lessonData.lessonProgress">
|
||||
<div class="changeprogressdiv" @click="changeProgressView(index)">{{element.progressName}}</div>
|
||||
<div class="progressdivimg"
|
||||
:style="{'background-image': 'url('+localstatic+'/lesson3d/sc.png)'}"/>
|
||||
@ -62,6 +62,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isActive:-1,
|
||||
localstatic:JL3D_LOCAL_STATIC,
|
||||
activeName: 'progresslist',
|
||||
progressList:[
|
||||
@ -96,6 +97,7 @@
|
||||
this.$emit('addProgress');
|
||||
},
|
||||
changeProgressView(viewIndex){
|
||||
this.isActive=viewIndex;
|
||||
this.$emit('changeProgressView',viewIndex);
|
||||
console.log(viewIndex);
|
||||
},
|
||||
@ -122,7 +124,9 @@
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
.active{
|
||||
background-color:#409EFF;
|
||||
}
|
||||
.lessonprogressdiv {
|
||||
position: absolute;
|
||||
width: 70%;
|
||||
|
@ -264,7 +264,7 @@
|
||||
saveData.modelList = assetModelData.modelList;
|
||||
|
||||
let accidentData = this.jl3d.saveAccidentModel();
|
||||
|
||||
|
||||
saveData.accidentList = accidentData;
|
||||
|
||||
saveData.setup.examMode = this.examMode;
|
||||
|
@ -267,14 +267,17 @@
|
||||
userJob:"",
|
||||
};
|
||||
loadData = JSON.parse(data.data.data);
|
||||
this.examMode = loadData.setup.examMode;
|
||||
if(this.$route.query.examMode == 1){
|
||||
this.examMode = true;
|
||||
}else{
|
||||
this.examMode = loadData.setup.examMode;
|
||||
}
|
||||
if(loadData.setup.checkedRole.length == 0){
|
||||
this.showSelectJob = false;
|
||||
}
|
||||
this.selectJobList = loadData.setup.checkedRole;
|
||||
this.jobPaneData.dataList = loadData.toolJobPane;
|
||||
this.$refs.jobpane.initJobList(this.jobPaneData.dataList);
|
||||
console.log(loadData.lessonTools);
|
||||
this.lessonTools = loadData.lessonTools;
|
||||
this.lessonData.loadLessonProgress(loadData.lessonProgress);
|
||||
|
||||
@ -295,13 +298,12 @@
|
||||
this.examStatus = newExamStatus;
|
||||
},
|
||||
lessonEnd(){
|
||||
|
||||
if(this.examMode == true){
|
||||
this.endExam = true;
|
||||
this.showResult();
|
||||
this.examStatus.time = this.lastPlayTime;
|
||||
this.stopTime();
|
||||
}
|
||||
this.stopTime();
|
||||
},
|
||||
showResult(){
|
||||
this.$refs.rtui.showdiv();
|
||||
@ -311,7 +313,7 @@
|
||||
for(let i=0;i<this.jobPaneData.dataList.length;i++){
|
||||
if(job == this.jobPaneData.dataList[i].name){
|
||||
this.nowRole = this.jobPaneData.dataList[i].value;
|
||||
console.log(this.nowRole);
|
||||
|
||||
this.lessonMsg.userJob = job;
|
||||
this.jl3d.initNowRole(this.nowRole);
|
||||
this.timeStart();
|
||||
|
126
src/views/jlmap3d/lesson3dplayer/lesson3dselect.vue
Normal file
126
src/views/jlmap3d/lesson3dplayer/lesson3dselect.vue
Normal file
@ -0,0 +1,126 @@
|
||||
<template>
|
||||
|
||||
<div class="jl3dmap3dMaintainer">
|
||||
<div class="jl3dmap3dMaintainerSelect" :style="{'background-image': 'url('+localStatic+'/texture/bg.jpg)'}">
|
||||
|
||||
<div style="position:absolute;left:40%;top:20%;font-size:30px">
|
||||
<el-row>
|
||||
考试模式:
|
||||
<el-switch
|
||||
v-model="examMode"
|
||||
active-text="开启考试模式"
|
||||
inactive-text="关闭考试模式">
|
||||
</el-switch>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<div class="lesson3dSelectButton"
|
||||
:style="{'background-image': 'url('+localStatic+'/texture/scene.png)'}"
|
||||
style="left:20%;top:40%;" @click="enterPlayer">单对屏蔽门无法开启</div>
|
||||
|
||||
<div class="lesson3dSelectButton"
|
||||
:style="{'background-image': 'url('+localStatic+'/texture/scene.png)'}"
|
||||
style="left:60%;top:40%;" >单对屏蔽门无法关闭</div>
|
||||
|
||||
<div class="lesson3dSelectButton"
|
||||
:style="{'background-image': 'url('+localStatic+'/texture/scene.png)'}"
|
||||
style="left:20%;top:70%;" >整列屏蔽门无法开启</div>
|
||||
|
||||
<div class="lesson3dSelectButton"
|
||||
:style="{'background-image': 'url('+localStatic+'/texture/scene.png)'}"
|
||||
style="left:60%;top:70%;" >整列屏蔽门无法关闭</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { ProjectIcon } from '@/scripts/ProjectConfig';
|
||||
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
|
||||
import bgPsdImg from '@/assets/bg_psd.png';
|
||||
// import Jlmap3dMsg from '@/views/jlmap3d/show/msg';
|
||||
|
||||
var train;
|
||||
export default {
|
||||
name: 'LessondSelect',
|
||||
components: {
|
||||
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
localStatic:JL3D_LOCAL_STATIC,
|
||||
normalShow:false,
|
||||
vrShow:false,
|
||||
trainRescueShow:false,
|
||||
examMode:false
|
||||
};
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
||||
},
|
||||
created() {
|
||||
// document.querySelector("link[rel*='icon']").href = loginInfo[this.$route.query.project].linkIcon || ProjectIcon[this.$route.query.project];
|
||||
},
|
||||
mounted() {
|
||||
|
||||
// console.log("");
|
||||
},
|
||||
methods: {
|
||||
|
||||
enterPlayer:function ( ) {
|
||||
let examcode = 0;
|
||||
if(this.examMode == true){
|
||||
examcode = 1;
|
||||
}
|
||||
this.$router.push({ path: '/design/jlmap3d/lesson3dplayer', query: {lessonId:'34',examMode:examcode} });
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
|
||||
.jl3dmap3dMaintainer {
|
||||
position:absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 35;
|
||||
}
|
||||
|
||||
.jl3dmap3dMaintainerSelect{
|
||||
position:absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 350;
|
||||
top:0;
|
||||
left:0;
|
||||
// background-repeat:no-repeat;
|
||||
z-index: 350;
|
||||
background-size:100%;
|
||||
}
|
||||
|
||||
.lesson3dSelectButton{
|
||||
position:absolute;
|
||||
width: 20%;
|
||||
height: 20%;
|
||||
position:absolute;
|
||||
text-align: center;
|
||||
font-size: 25px;
|
||||
line-height:100px;
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
color:#FFF;
|
||||
cursor:pointer;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</style>
|
@ -54,7 +54,7 @@
|
||||
handler: function (newVal, oldVal) {
|
||||
|
||||
if (newVal != oldVal) {
|
||||
console.log(this.lessonData.lessonData.lessonProgress[oldVal]);
|
||||
// console.log(this.lessonData.lessonData.lessonProgress[oldVal]);
|
||||
this.logTexts.push(this.lessonData.lessonData.lessonProgress[oldVal].explainPane);
|
||||
this.processTexts.push(this.lessonData.lessonData.lessonProgress[oldVal].explainPane);
|
||||
this.nowProcessText = this.lessonData.lessonData.lessonProgress[newVal].explainPane.text;
|
||||
|
@ -6,7 +6,7 @@
|
||||
<div class="resultMsgDiv">
|
||||
<div v-for="(examItem,index) in examStatus.trueStep" style="width:100%;height:10%">
|
||||
<div>
|
||||
{{examItem.explainPane.tittle}}
|
||||
{{examItem.explainPane.text}}
|
||||
</div>
|
||||
<div>
|
||||
得分:10分
|
||||
@ -56,6 +56,7 @@
|
||||
methods: {
|
||||
showdiv(){
|
||||
this.divshow = true;
|
||||
console.log(this.divshow);
|
||||
},
|
||||
closediv(){
|
||||
this.divshow = false;
|
||||
@ -79,7 +80,7 @@
|
||||
border-radius:10px;
|
||||
border:solid 2px #000;
|
||||
background-color: #fff;
|
||||
z-index:1;
|
||||
z-index:10;
|
||||
}
|
||||
|
||||
|
||||
|
@ -569,7 +569,10 @@ export default {
|
||||
});
|
||||
}else if(this.project === 'zzwwtest'){
|
||||
this.$router.push({ path: '/design/jlmap3d/lesson3dplayer', query: {lessonId:'31'} });
|
||||
} else {
|
||||
}
|
||||
else if(this.project === 'richorlesson3d'){
|
||||
this.$router.push({ path: '/jlmap3d/lesson3dselect', query: {} });
|
||||
}else {
|
||||
if (this.teacherLogin) {
|
||||
this.$router.push({ path: '/info/organization/classManage?enter=teacher' });
|
||||
} else {
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user