修改三维课程编辑器逻辑

This commit is contained in:
sunzhenyu 2021-09-09 16:09:01 +08:00
parent dcbe6f6315
commit e0bb2d8532
16 changed files with 2417 additions and 2189 deletions

View File

@ -823,7 +823,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
// console.log(trainmodel.openleft); // console.log(trainmodel.openleft);
// console.log(trainmodel.openright); // console.log(trainmodel.openright);
if(trainmodel.code == data.code){ if(trainmodel.code == data.code){
console.log(data);
if(trainmodel.right == "0"){ if(trainmodel.right == "0"){
if(data.doorCode == "2"){ 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].time = actions["traindoor"].top[an]._clip.duration;
actions["traindoor"].top[an].timeScale = -1; actions["traindoor"].top[an].timeScale = -1;
actions["traindoor"].top[an].play(); actions["traindoor"].top[an].play();
} }
}else if(trainmodel.openleft != data.open && data.open == "1"){ }else if(trainmodel.openleft != data.open && data.open == "1"){
trainmodel.openleft = "1"; trainmodel.openleft = "1";

View File

@ -73,15 +73,19 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) {
this.actionModelControl = function(actionType,actionModel){ this.actionModelControl = function(actionType,actionModel){
console.log(actionType); // console.log(actionType);
console.log(actionModel); // console.log(actionModel);
if(actionType == "remove"){ if(actionType == "remove"){
assetModelManager.otherModel.remove(actionModel); assetModelManager.otherModel.remove(actionModel);
}else if(actionType == "show"){
actionModel.visible = true;
assetModelManager.otherModel.add(actionModel);
}else if(actionType == "changeIndex"){ }else if(actionType == "changeIndex"){
actionModel.visible = true; actionModel.visible = true;
assetModelManager.otherModel.add(actionModel); assetModelManager.otherModel.add(actionModel);
} }
} }
this.actionRemove = function(actionModel){ this.actionRemove = function(actionModel){
@ -91,15 +95,16 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) {
this.changeIndex = function(nowIndex){ this.changeIndex = function(nowIndex){
if(nowIndex!=0){ if(nowIndex!=0){
oldIndex = lessonIndex; 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; lessonIndex = nowIndex;
console.log(nowIndex); // console.log(nowIndex);
scope.nowSceneType = lessonData.lessonProgress[nowIndex].progressScene; scope.nowSceneType = lessonData.lessonProgress[nowIndex].progressScene;
// console.log(nowRole); // console.log(nowRole);
// console.log(lessonData.lessonProgress[lessonIndex].roleName); // 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]); 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(); lessonEnd();
} }
} }
@ -137,6 +145,7 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) {
} }
controlManager.initRoleMode(roleMode); controlManager.initRoleMode(roleMode);
for(let i=0;i<lessonData.lessonProgress.length;i++){ for(let i=0;i<lessonData.lessonProgress.length;i++){
if(nowRole == lessonData.lessonProgress[i].roleName){ if(nowRole == lessonData.lessonProgress[i].roleName){
examList.push( examList.push(
{ {
@ -157,7 +166,7 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) {
time:0, time:0,
}; };
controlManager.initExam(examList,examData); controlManager.initExam(examList,examData);
updataExamStatus(examData); // updataExamStatus(examData);
// if(lessonData.lessonProgress[lessonIndex].action.length>0){ // if(lessonData.lessonProgress[lessonIndex].action.length>0){
controlManager.changeIndexEvent(lessonData.lessonProgress[lessonIndex].action,roleMode,assetModelManager.lessonTriggerList[scope.nowSceneType]); controlManager.changeIndexEvent(lessonData.lessonProgress[lessonIndex].action,roleMode,assetModelManager.lessonTriggerList[scope.nowSceneType]);

View File

@ -29,9 +29,9 @@ export function AssetModelManager(editor,scene) {
scope.staticAsset['station'] = { scope.staticAsset['station'] = {
modelId:'station', modelId:'station',
packageName:"车站", packageName:"车站",
url:JL3D_LOCAL_STATIC+"/lesson3d/station.FBX", url:"/MODEL/2021-09-08/211-9861.FBX",
mesh:"", mesh:"",
assetType:'static', assetType:'onlineasset',
isUse:true, isUse:true,
resourceType:"三维课程", resourceType:"三维课程",
sceneType:"standstation", sceneType:"standstation",
@ -219,7 +219,12 @@ export function AssetModelManager(editor,scene) {
scope.staticAsset['station'].mesh.getObjectByName("spbmkg").actionName = "PBMDH"; scope.staticAsset['station'].mesh.getObjectByName("spbmkg").actionName = "PBMDH";
scope.lessonTriggerList["standstation"].push(scope.staticAsset['station'].mesh.getObjectByName("spbmkg")); 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;
} }
//动态加载资源 //动态加载资源

View File

@ -564,70 +564,110 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
// console.log(eventTrigger); // console.log(eventTrigger);
// console.log("----------------------------"); // console.log("----------------------------");
console.log(roleMode);
if(actions.length>0 && roleMode){ if(actions.length>0 ){
scope.eventHitMode = true; scope.eventHitMode = true;
for(let i=0;i<actions.length;i++){ for(let i=0;i<actions.length;i++){
if(actions[i].actionType == "auto"){ if(actions[i].actionType == "auto"){
console.log(actions[i]);
if(actions[i].actionMode == "play"){ if(actions[i].actionMode == "play"){
for(let j=0;j<eventTrigger.length;j++){ for(let j=0;j<eventTrigger.length;j++){
if(eventTrigger[j].label == actions[i].actionModel){ if(eventTrigger[j].label == actions[i].actionModel){
if(actionList[eventTrigger[j].actionName].status == "01"){ if(actionList[eventTrigger[j].actionName].status == "01"){
actionList[eventTrigger[j].actionName].status = "02"; 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(); 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(roleMode){
if(actions[i].actionType == "contact"){ if(actions[i].actionType == "contact"){
for(let j=0;j<eventTrigger.length;j++){ if(eventTrigger){
if(eventTrigger[j].label == actions[i].actionModel){
let eventTestBox = new THREE.Box3(new THREE.Vector3(), new THREE.Vector3()); for(let j=0;j<eventTrigger.length;j++){
eventTestBox.setFromObject(eventTrigger[j]); if(eventTrigger[j].label == actions[i].actionModel){
eventTestBox.mesh = eventTrigger[j]; let eventTestBox = new THREE.Box3(new THREE.Vector3(), new THREE.Vector3());
eventTestBox.action = actions[i]; eventTestBox.setFromObject(eventTrigger[j]);
eventBoxs.push(eventTestBox); eventTestBox.mesh = eventTrigger[j];
actionEvent("changeIndex",eventBoxs[i].action,eventTestBox.mesh); 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){ }else if(actions.length>0){
console.log(actions); // console.log(actions);
} }
}; };

View File

@ -49,9 +49,9 @@ export function AssetModelManager(editor,scene) {
scope.staticAsset['station'] = { scope.staticAsset['station'] = {
modelId:'station', modelId:'station',
packageName:"车站", packageName:"车站",
url:JL3D_LOCAL_STATIC+"/lesson3d/station.FBX", url:"/MODEL/2021-09-08/211-9861.FBX",
mesh:"", mesh:"",
assetType:'static', assetType:'onlineasset',
isUse:true, isUse:true,
resourceType:"三维课程", resourceType:"三维课程",
sceneType:"standstation", sceneType:"standstation",
@ -282,6 +282,9 @@ export function AssetModelManager(editor,scene) {
scope.staticAsset['station'].mesh.getObjectByName("spbmkg").label = "屏蔽门开关"; scope.staticAsset['station'].mesh.getObjectByName("spbmkg").label = "屏蔽门开关";
scope.lessonTriggerList["standstation"].push(scope.staticAsset['station'].mesh.getObjectByName("spbmkg")); 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")); // console.log(scope.loadAsset['default1'].mesh.getObjectByName("FTKG"));

View File

@ -15,6 +15,8 @@ const Jlmap3dedit = () => import('@/views/jlmap3d/edit/jlmap3dedit');
const Jlmap3dAssetManager = () => import('@/views/jlmap3d/jl3dassetmanager/assetmanager'); const Jlmap3dAssetManager = () => import('@/views/jlmap3d/jl3dassetmanager/assetmanager');
const Jlmap3dLesson3dEdit = () => import('@/views/jlmap3d/lesson3dedit/lesson3dedit'); const Jlmap3dLesson3dEdit = () => import('@/views/jlmap3d/lesson3dedit/lesson3dedit');
const Jlmap3dLesson3dPlayer = () => import('@/views/jlmap3d/lesson3dplayer/lesson3dplayer'); const Jlmap3dLesson3dPlayer = () => import('@/views/jlmap3d/lesson3dplayer/lesson3dplayer');
const Jlmap3dLesson3dSelect = () => import('@/views/jlmap3d/lesson3dplayer/lesson3dselect');
const Jlmap3d = () => import('@/views/jlmap3d/drive/jl3ddrive'); const Jlmap3d = () => import('@/views/jlmap3d/drive/jl3ddrive');
const Jlmap3dSandbox = () => import('@/views/jlmap3d/simulation/jl3dsimulation'); const Jlmap3dSandbox = () => import('@/views/jlmap3d/simulation/jl3dsimulation');
@ -289,6 +291,12 @@ export const constantRoutes = [
component: Jlmap3dLesson3dPlayer, component: Jlmap3dLesson3dPlayer,
hidden: true hidden: true
}, },
{
path: '/jlmap3d/lesson3dselect',
component: Jlmap3dLesson3dSelect,
hidden: true
},
{ {
path: '/data2json', path: '/data2json',
component: () => import('@/views/planMonitor/data2json/page.vue'), component: () => import('@/views/planMonitor/data2json/page.vue'),
@ -346,6 +354,7 @@ export const constantRoutes = [
component: Jl3dRailwayDrive, component: Jl3dRailwayDrive,
hidden: true hidden: true
}, },
{ {
path: '/jlmap3d/devicemodel', path: '/jlmap3d/devicemodel',
component: Jlmap3dModel, component: Jlmap3dModel,

View File

@ -448,6 +448,17 @@ export const loginInfo = {
navigationMarginLeft: '50px', navigationMarginLeft: '50px',
systemType: '022' systemType: '022'
}, },
richorlesson3d:{
title: '中航锐创城市轨道交通实训平台',
loginPath: '/login?project=richorlesson3d',
loginParam: 'RICHOR',
bottomColumn: '中航锐创(北京)科技发展有限公司 联系电话:4000500081',
linkIcon: FaviconRichor,
titleIcon: FaviconRichor,
navigationLogoWidth: '40px',
navigationMarginLeft: '50px',
systemType: '022'
},
designrichorjoint: { designrichorjoint: {
title: '中航锐创城市轨道交通设计平台', title: '中航锐创城市轨道交通设计平台',
loginPath: '/design/login?project=richorjoint', loginPath: '/design/login?project=richorjoint',
@ -513,6 +524,7 @@ export const ProjectIcon = {
cgy: FaviconCgy, cgy: FaviconCgy,
designcgy: FaviconCgy, designcgy: FaviconCgy,
richor:FaviconRichor, richor:FaviconRichor,
richorlesson3d:FaviconRichor,
richorjoint: FaviconRichor, richorjoint: FaviconRichor,
designrichorjoint: FaviconRichor designrichorjoint: FaviconRichor
}; };
@ -546,14 +558,15 @@ export const ProjectCode = {
cgy: 'CGY', cgy: 'CGY',
designcgy: 'CGY', designcgy: 'CGY',
richor:'RICHOR', richor:'RICHOR',
richorlesson3d:'RICHOR',
richorjoint: 'RICHOR_JOINT', richorjoint: 'RICHOR_JOINT',
designrichorjoint: '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 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', 'richorjoint', 'designrichorjoint']; // 实训设计平台通过项目code获取地图列表的项目 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 CaseHideProjectList = ['heb', 'designheb', 'cgy', 'designcgy']; // 案例展示隐藏的项目
export const VersionBaseNoShow = ['heb', 'designheb', 'hls', 'designhls', 'drts', 'wjls', 'hyd', 'designhyd', 'cgy', 'designcgy', 'xadt', 'designxadt']; // 登录页右下角版本开发基于不展示 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', 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']; // 登录页样式 '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']; export const NoQrcodeList = ['heb', 'designheb', 'cgy', 'designcgy', 'ntyl', 'designntyl'];
@ -614,6 +627,7 @@ export const ProjectList = [
{value: 'zzww', label: '郑州共赢'}, {value: 'zzww', label: '郑州共赢'},
{value: 'zzwwtest', label: '郑州共赢考试'}, {value: 'zzwwtest', label: '郑州共赢考试'},
{value: 'richor', label: '中航锐创'}, {value: 'richor', label: '中航锐创'},
{value: 'richorlesson3d', label: '中航锐创(三维课程)'},
{value: 'richor_joint', label: '中航锐创(实训室)'} {value: 'richor_joint', label: '中航锐创(实训室)'}
]; ];
export const localPackageProject = { export const localPackageProject = {

View File

@ -2,9 +2,9 @@ export function getBaseUrl() {
let BASE_API; let BASE_API;
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud'; // 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.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.2.183:9000'; // 张赛
// BASE_API = 'http://192.168.8.140:9000'; // 杜康 // BASE_API = 'http://192.168.8.140:9000'; // 杜康
// BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://b29z135112.zicp.vip';

View File

@ -4,7 +4,7 @@
<el-tabs v-model="activeName" class="activediv" type="card" @tab-click="handleClick"> <el-tabs v-model="activeName" class="activediv" type="card" @tab-click="handleClick">
<el-tab-pane label="课程场景" name="progresslist" > <el-tab-pane label="课程场景" name="progresslist" >
<draggable v-model="lessonData.lessonData.lessonProgress" group="people" @start="drag=true" @end="drag=false" > <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="changeprogressdiv" @click="changeProgressView(index)">{{element.progressName}}</div>
<div class="progressdivimg" <div class="progressdivimg"
:style="{'background-image': 'url('+localstatic+'/lesson3d/sc.png)'}"/> :style="{'background-image': 'url('+localstatic+'/lesson3d/sc.png)'}"/>
@ -62,6 +62,7 @@
}, },
data() { data() {
return { return {
isActive:-1,
localstatic:JL3D_LOCAL_STATIC, localstatic:JL3D_LOCAL_STATIC,
activeName: 'progresslist', activeName: 'progresslist',
progressList:[ progressList:[
@ -96,6 +97,7 @@
this.$emit('addProgress'); this.$emit('addProgress');
}, },
changeProgressView(viewIndex){ changeProgressView(viewIndex){
this.isActive=viewIndex;
this.$emit('changeProgressView',viewIndex); this.$emit('changeProgressView',viewIndex);
console.log(viewIndex); console.log(viewIndex);
}, },
@ -122,7 +124,9 @@
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss"; @import "src/styles/mixin.scss";
.active{
background-color:#409EFF;
}
.lessonprogressdiv { .lessonprogressdiv {
position: absolute; position: absolute;
width: 70%; width: 70%;

View File

@ -267,14 +267,17 @@
userJob:"", userJob:"",
}; };
loadData = JSON.parse(data.data.data); 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){ if(loadData.setup.checkedRole.length == 0){
this.showSelectJob = false; this.showSelectJob = false;
} }
this.selectJobList = loadData.setup.checkedRole; this.selectJobList = loadData.setup.checkedRole;
this.jobPaneData.dataList = loadData.toolJobPane; this.jobPaneData.dataList = loadData.toolJobPane;
this.$refs.jobpane.initJobList(this.jobPaneData.dataList); this.$refs.jobpane.initJobList(this.jobPaneData.dataList);
console.log(loadData.lessonTools);
this.lessonTools = loadData.lessonTools; this.lessonTools = loadData.lessonTools;
this.lessonData.loadLessonProgress(loadData.lessonProgress); this.lessonData.loadLessonProgress(loadData.lessonProgress);
@ -295,13 +298,12 @@
this.examStatus = newExamStatus; this.examStatus = newExamStatus;
}, },
lessonEnd(){ lessonEnd(){
if(this.examMode == true){ if(this.examMode == true){
this.endExam = true; this.endExam = true;
this.showResult(); this.showResult();
this.examStatus.time = this.lastPlayTime; this.examStatus.time = this.lastPlayTime;
this.stopTime();
} }
this.stopTime();
}, },
showResult(){ showResult(){
this.$refs.rtui.showdiv(); this.$refs.rtui.showdiv();
@ -311,7 +313,7 @@
for(let i=0;i<this.jobPaneData.dataList.length;i++){ for(let i=0;i<this.jobPaneData.dataList.length;i++){
if(job == this.jobPaneData.dataList[i].name){ if(job == this.jobPaneData.dataList[i].name){
this.nowRole = this.jobPaneData.dataList[i].value; this.nowRole = this.jobPaneData.dataList[i].value;
console.log(this.nowRole);
this.lessonMsg.userJob = job; this.lessonMsg.userJob = job;
this.jl3d.initNowRole(this.nowRole); this.jl3d.initNowRole(this.nowRole);
this.timeStart(); this.timeStart();

View 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>

View File

@ -54,7 +54,7 @@
handler: function (newVal, oldVal) { handler: function (newVal, oldVal) {
if (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.logTexts.push(this.lessonData.lessonData.lessonProgress[oldVal].explainPane);
this.processTexts.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; this.nowProcessText = this.lessonData.lessonData.lessonProgress[newVal].explainPane.text;

View File

@ -6,7 +6,7 @@
<div class="resultMsgDiv"> <div class="resultMsgDiv">
<div v-for="(examItem,index) in examStatus.trueStep" style="width:100%;height:10%"> <div v-for="(examItem,index) in examStatus.trueStep" style="width:100%;height:10%">
<div> <div>
{{examItem.explainPane.tittle}} {{examItem.explainPane.text}}
</div> </div>
<div> <div>
得分:10 得分:10
@ -56,6 +56,7 @@
methods: { methods: {
showdiv(){ showdiv(){
this.divshow = true; this.divshow = true;
console.log(this.divshow);
}, },
closediv(){ closediv(){
this.divshow = false; this.divshow = false;
@ -79,7 +80,7 @@
border-radius:10px; border-radius:10px;
border:solid 2px #000; border:solid 2px #000;
background-color: #fff; background-color: #fff;
z-index:1; z-index:10;
} }

View File

@ -569,7 +569,10 @@ export default {
}); });
}else if(this.project === 'zzwwtest'){ }else if(this.project === 'zzwwtest'){
this.$router.push({ path: '/design/jlmap3d/lesson3dplayer', query: {lessonId:'31'} }); 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) { if (this.teacherLogin) {
this.$router.push({ path: '/info/organization/classManage?enter=teacher' }); this.$router.push({ path: '/info/organization/classManage?enter=teacher' });
} else { } else {

File diff suppressed because it is too large Load Diff