Merge remote-tracking branch 'origin/test'

This commit is contained in:
thesai 2021-08-12 21:02:06 +08:00
commit 2fb616f694
33 changed files with 1918 additions and 60 deletions

View File

@ -386,7 +386,7 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
realsectionlist = loadrealsectionlist;
rails = loadrails;
console.log(trainlisttest.group.children[0]);
// console.log(trainlisttest.group.children[0]);
trainlisttest.group.children[0].getObjectByName("C3").add(cameracctv);
}

View File

@ -107,6 +107,18 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
DeviceDestroy(data.body);
return;
}
if(data.type == "Simulation_Reset"){
if(data.body == true ){
restartTrain();
}
}
}
function restartTrain(){
for(let i=0;i<trainlisttest.otherTrainmodels.length;i++){
trainlisttest.otherTrainmodels[i].position.x = -99999;
}
}
//切换车辆修改列车属性
function changeNowTrain(data){
@ -314,6 +326,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
}
}
function tdtUpdate(data){
tdt.updateTdt(data.body);

View File

@ -79,7 +79,16 @@ export function AssetModelManager(editor,scene) {
resourceType:"三维课程",
sceneType:"standstation",
};
scope.staticAsset['wxc'] = {
modelId:'wxc',
packageName:"维修厂",
url:"/MODEL/2021-08-12/200-34275.FBX",
mesh:"",
assetType:'onlineasset',
isUse:true,
resourceType:"三维课程",
sceneType:"stopstation",
};
//场景中可触发事件模型
this.lessonTriggerList = [];
@ -251,6 +260,16 @@ export function AssetModelManager(editor,scene) {
asset.mesh = object;
groupList[asset.sceneType].add(object);
// scene.add(object);
resolve();
} );
}else if(asset.assetType == "onlineasset"){
loader.load( BASE_ASSET_API+asset.url, function ( object ) {
if(asset.sceneType){
object.sceneType = asset.sceneType;
}
asset.mesh = object;
groupList[asset.sceneType].add(object);
resolve();
} );
}else{

View File

@ -84,26 +84,30 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
let loaderObj = new THREE.OBJLoader();
let pengzhuang;
let standstationPZ,stopstationPZ;
// load a resource
loaderObj.load(
// resource URL
JL3D_LOCAL_STATIC+'/lesson3d/PZ427.obj',
// called when resource is loaded
JL3D_LOCAL_STATIC+'/lesson3d/standstationPZ.obj',
function ( object ) {
pengzhuang = object;
standstationPZ = object;
},
function ( xhr ) {
console.log( ( xhr.loaded / xhr.total * 100 ) + '% loaded' );
},
function ( error ) {
console.log( 'An error happened' );
}
);
loaderObj.load(
JL3D_LOCAL_STATIC+'/lesson3d/stopstationPZ.obj',
function ( object ) {
stopstationPZ = object;
},
// called when loading is in progresses
function ( xhr ) {
console.log( ( xhr.loaded / xhr.total * 100 ) + '% loaded' );
},
// called when loading has errors
function ( error ) {
console.log( 'An error happened' );
}
);
this.initRoleMode = function(rMode,role){
@ -211,7 +215,7 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
this.init = function(actions){
worldOctree.fromGraphNode( pengzhuang );
worldOctree.fromGraphNode( standstationPZ );
actionList = actions;
}
@ -463,6 +467,11 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
}
if ( keyStates[ 'Space' ] ) {
playerVelocity.y = 10;
}
}
@ -476,6 +485,13 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
}
this.initControlMode = function(nowLessonIndex){
console.log(lessonData.lessonProgress[nowLessonIndex].progressScene);
if(lessonData.lessonProgress[nowLessonIndex].progressScene == "standstation"){
worldOctree.fromGraphNode( standstationPZ );
}else if(lessonData.lessonProgress[nowLessonIndex].progressScene == "stopstation"){
worldOctree.fromGraphNode( stopstationPZ );
}
scope.controlMode = lessonData.lessonProgress[nowLessonIndex].controlMode;
if(lessonData.lessonProgress[nowLessonIndex].changeCamera == true){
@ -526,6 +542,8 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) {
console.log(roleMode);
console.log(eventTrigger);
console.log("----------------------------");
if(actions.length>0 && roleMode){
scope.eventHitMode = true;
for(let i=0;i<actions.length;i++){

View File

@ -80,6 +80,16 @@ export function AssetModelManager(editor,scene) {
resourceType:"三维课程",
sceneType:"standstation",
};
scope.staticAsset['wxc'] = {
modelId:'wxc',
packageName:"维修厂",
url:"/MODEL/2021-08-12/196-43574.FBX",
mesh:"",
assetType:'onlineasset',
isUse:true,
resourceType:"三维课程",
sceneType:"stopstation",
};
//场景中可触发事件模型
@ -319,6 +329,16 @@ export function AssetModelManager(editor,scene) {
asset.mesh = object;
groupList[asset.sceneType].add(object);
// scope.otherModel.add(object);
resolve();
} );
}else if(asset.assetType == "onlineasset"){
loader.load( BASE_ASSET_API+asset.url, function ( object ) {
if(asset.sceneType){
object.sceneType = asset.sceneType;
}
asset.mesh = object;
groupList[asset.sceneType].add(object);
resolve();
} );
}else{

View File

@ -162,7 +162,7 @@ class SkinCode extends defaultStyle {
whiteColor: '#FFFFFF', // 信号灯白色
blueColor: '#0070C0', // 信号灯蓝色
faultType: 'flash', // 信号机故障类型flash太阳
overlapColor: '#0000ff' // 信号机延续保护颜色
overlapColor: '#22DFDF' // 信号机延续保护颜色
},
route: {
direction: false, // 自动进路方向

View File

@ -258,6 +258,10 @@ export default {
label: '驾驶至',
handler: this.handleDriveTo
},
{
label: '回库',
handler: this.setInbound
},
{
label: '切换驾驶模式',
children: [
@ -428,6 +432,20 @@ export default {
handleSpeedLimit() { //
this.$refs.speedLimit.doShow(this.selected);
},
//
setInbound() {
const group = this.$route.query.group;
const param = {
commandType: 'Inbound',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate}) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
handleDriveTo() {
commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{

View File

@ -171,6 +171,10 @@ export default {
label: '驾驶至',
handler: this.handleDriveTo
},
{
label: '回库',
handler: this.setInbound
},
{
label: '切换驾驶模式',
children: [
@ -346,6 +350,20 @@ export default {
}
});
},
//
setInbound() {
const group = this.$route.query.group;
const param = {
commandType: 'Inbound',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate}) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
handleTurnDirection() {
const group = this.$route.query.group;

View File

@ -154,6 +154,10 @@ export default {
label: '驾驶至',
handler: this.handleDriveTo
},
{
label: '回库',
handler: this.setInbound
},
{
label: '切换驾驶模式',
children: [
@ -317,6 +321,20 @@ export default {
}
});
},
//
setInbound() {
const group = this.$route.query.group;
const param = {
commandType: 'Inbound',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate}) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
handleTurnDirection() {
const group = this.$route.query.group;

View File

@ -194,6 +194,21 @@ export default {
// return fault.value != 'NORMAL_SPLIT' && fault.value != 'REVERSE_SPLIT';
// });
// }
if (selected._type === 'Section' && this.popClass === 'haerbin-01__systerm') {
this.faultList = [
{label: '计轴故障', value: 'FAULT'},
{label: '通信车占用', value: 'CBTC_OCCUPIED_FAULT'}
];
} else if (selected._type === 'Switch' && this.popClass === 'haerbin-01__systerm') {
this.faultList = [
{label: '失表', value: 'SPLIT'},
{label: '定位失表', value: 'NORMAL_SPLIT'},
{label: '反位失表', value: 'REVERSE_SPLIT'},
{label: '挤岔', value: 'SQUEEZE'},
{label: '通信车占用', value: 'CBTC_OCCUPIED_FAULT'},
{label: '计轴故障', value: 'AXLE_FAULT'}
];
}
if (this.faultList && this.faultList.length) {
this.form.faultType = this.faultList[0].value;
}

View File

@ -162,6 +162,10 @@ export default {
label: '驾驶至',
handler: this.handleDriveTo
},
{
label: '回库',
handler: this.setInbound
},
{
label: '切换驾驶模式',
children: [
@ -330,6 +334,20 @@ export default {
}
});
},
//
setInbound() {
const group = this.$route.query.group;
const param = {
commandType: 'Inbound',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate}) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
handleTurnDirection() {
const group = this.$route.query.group;

View File

@ -131,6 +131,10 @@ export default {
label: '驾驶至',
handler: this.handleDriveTo
},
{
label: '回库',
handler: this.setInbound
},
{
label: '切换驾驶模式',
children: [
@ -308,6 +312,20 @@ export default {
}
});
},
//
setInbound() {
const group = this.$route.query.group;
const param = {
commandType: 'Inbound',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate}) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
handleTurnDirection() {
const group = this.$route.query.group;

View File

@ -103,6 +103,10 @@ export default {
label: '驾驶至',
handler: this.handleDriveTo
},
{
label: '回库',
handler: this.setInbound
},
{
label: '切换驾驶模式',
children: [
@ -295,6 +299,20 @@ export default {
}
});
},
//
setInbound() {
const group = this.$route.query.group;
const param = {
commandType: 'Inbound',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate}) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
handleTurnDirection() {
const group = this.$route.query.group;

View File

@ -282,7 +282,7 @@
import { mapGetters } from 'vuex';
import { deepAssign } from '@/utils/index';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { TrainingMode, MouseEvent } from '@/scripts/ConstDic';
import { TrainingMode, MouseEvent, OperateMode } from '@/scripts/ConstDic';
import { EventBus } from '@/scripts/event-bus';
import * as adapter from '@/jmapNew/utils/adapter';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
@ -328,6 +328,7 @@ export default {
param: {},
stationObj: null,
selectedObj: null,
currentSelected: null,
oldClickObj: null, //
route: null, //
overlap: null, //
@ -380,7 +381,8 @@ export default {
},
computed: {
...mapGetters('training', [
'mode'
'mode',
'operatemode'
]),
...mapGetters('map', [
'routeList',
@ -416,7 +418,7 @@ export default {
return OperationEvent.Command.commandHaerbin.confrimCr2.domId;
},
stationContorl() {
return this.getStationControl(this.selectedObj || {}) || this.getStationControl({_type: 'Station', code: this.$store.state.map.showCentralizedStationCode}) || {};
return this.getStationControl(this.currentSelected || {}) || this.getStationControl({_type: 'Station', code: this.$store.state.map.showCentralizedStationCode}) || {};
},
isLocal() {
return this.$store.state.training.prdType == '01';
@ -462,6 +464,7 @@ export default {
EventBus.$emit('sendMsg', {}); //
this.initMenus();//
this.selectedObj = this.actualSelected;
this.currentSelected = val;
this.rightClickDialogVisible = false;
if (this.selectedObj._type && (val._event == MouseEvent.Left || (val._event == MouseEvent.Right && this.$store.state.training.prdType === '01'))) {
const type = this.State2SimulationMap[this.$store.state.training.prdType];
@ -476,7 +479,6 @@ export default {
code: this.selectedObj.code,
subType:this.$store.state.menuOperation.subType
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) { this.handleDeviceMenu(); }
}).catch((error) => {
@ -811,7 +813,7 @@ export default {
},
handleRouteMenu() { //
this.initCentralizedStationList(this.routeParamList);
if (this.selectedObj._event === MouseEvent.Right) {
if (this.selectedObj._event === MouseEvent.Right && this.operatemode !== OperateMode.FAULT) {
this.rightClickDialogVisible = true;
}
// this.param = { routeCode: this.route.code };
@ -839,9 +841,7 @@ export default {
});
if (this.selectRouteList.length) {
if (this.selectRouteList.length === 1) {
this.route = this.selectRouteList[0];
}
this.route = this.selectRouteList[0];
this.handleRouteMenu();
this.deviceHighLight(this.selectedObj, true);
this.oldDevice = this.selectedObj;

View File

@ -2,6 +2,7 @@
<div>
<pop-menu ref="popMenu" :menu="menu" pop-menu-class="haerbin-01__systerm" />
<set-fault ref="setFault" pop-class="haerbin-01__systerm" />
<psl ref="psl" pop-class="xian-01__systerm" />
</div>
</template>
@ -13,12 +14,14 @@ import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { mapGetters } from 'vuex';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
import Psl from '@/jmapNew/theme/components/menus/dialog/psl';
export default {
name: 'StationStandMenu',
components: {
PopMenu,
SetFault
SetFault,
Psl
},
props: {
selected: {
@ -87,9 +90,14 @@ export default {
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;
this.menu = [...this.menuForce];
if (this.$store.state.training.prdType === '01') {
this.menu.push({
label: 'PSL',
handler: this.openPsl
});
}
}
},
doShow(point) {
this.clickEvent();
@ -121,6 +129,10 @@ export default {
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
},
// PSL
openPsl() {
this.$refs.psl.doShow(this.selected);
}
}
};

View File

@ -103,6 +103,10 @@ export default {
label: '驾驶至',
handler: this.handleDriveTo
},
{
label: '回库',
handler: this.setInbound
},
{
label: '切换驾驶模式',
children: [
@ -294,6 +298,20 @@ export default {
}
});
},
//
setInbound() {
const group = this.$route.query.group;
const param = {
commandType: 'Inbound',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate}) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
handleTurnDirection() {
const group = this.$route.query.group;

View File

@ -242,6 +242,10 @@ export default {
label: '驾驶至',
handler: this.handleDriveTo
},
{
label: '回库',
handler: this.setInbound
},
{
label: '切换驾驶模式',
children: [
@ -406,6 +410,20 @@ export default {
}
});
},
//
setInbound() {
const group = this.$route.query.group;
const param = {
commandType: 'Inbound',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate}) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
handleTurnDirection() {
const group = this.$route.query.group;

View File

@ -243,6 +243,10 @@ export default {
label: '驾驶至',
handler: this.handleDriveTo
},
{
label: '回库',
handler: this.setInbound
},
{
label: '切换驾驶模式',
children: [
@ -406,6 +410,20 @@ export default {
}
});
},
//
setInbound() {
const group = this.$route.query.group;
const param = {
commandType: 'Inbound',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate}) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
handleTurnDirection() {
const group = this.$route.query.group;

View File

@ -222,6 +222,10 @@ export default {
{
label: '连挂',
handler: this.setLink
},
{
label: '回库',
handler: this.setInbound
}
],
menuDirective: [
@ -376,6 +380,20 @@ export default {
}
});
},
//
setInbound() {
const group = this.$route.query.group;
const param = {
commandType: 'Inbound',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate}) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
nextStation() {
const group = this.$route.query.group;
const param = {

View File

@ -191,7 +191,6 @@ export default {
handler: this.openPsl
}
];
}
},
doShow(point) {

View File

@ -186,6 +186,10 @@ export default {
{
label: '连挂',
handler: this.setLink
},
{
label: '回库',
handler: this.setInbound
}
]
}
@ -459,6 +463,20 @@ export default {
}
});
},
//
setInbound() {
const group = this.$route.query.group;
const param = {
commandType: 'Inbound',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate}) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
handleTurnDirection() {
const group = this.$route.query.group;

View File

@ -265,6 +265,10 @@ export default {
label: '驾驶至',
handler: this.handleDriveTo
},
{
label: '回库',
handler: this.setInbound
},
{
label: '切换驾驶模式',
children: [
@ -489,6 +493,20 @@ export default {
this.$refs.noticeInfo.doShow();
});
},
//
setInbound() {
const group = this.$route.query.group;
const param = {
commandType: 'Inbound',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate}) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handleApplyAmMode() {
const group = this.$route.query.group;
const param = {

View File

@ -45,6 +45,16 @@ export const loginInfo = {
navigationMarginLeft: '140px',
systemType: '011'
},
zzwwtest:{
title: '共赢列车仿真驾驶系统',
loginPath: '/login?project=zzwwtest',
loginParam: 'ZZWWTEST',
loginTitle: '空串',
logoWidth: '140px',
navigationLogoWidth: '120px',
navigationMarginLeft: '140px',
systemType: '011'
},
bjd: {
title: '城市轨道交通列车运行智慧辅助系统',
loginPath: '/login?project=bjd',
@ -442,6 +452,7 @@ export const loginInfo = {
export const ProjectIcon = {
xty: FaviconXty,
zzww: FaviconZzww,
zzwwtest: FaviconZzww,
login: Favicon,
design: Favicon,
designxty: FaviconXty,
@ -487,6 +498,7 @@ export const ProjectCode = {
xty: 'XTY',
designxty: 'XTY',
zzww: 'ZZWW',
zzwwtest: 'ZZWWTEST',
gzb: 'GZB',
designgzb: 'GZB',
heb: 'HEB',
@ -511,12 +523,12 @@ export const ProjectCode = {
richor:'RICHOR'
};
export const BottomColumnOnlyConInfo = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd', 'cgy', 'designcgy', 'richor']; // 底部栏仅展示公司信息不展示备案号
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', 'richor']; // 实训设计平台通过项目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']; // 实训设计平台通过项目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 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']; // 登录页样式
'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 NoSimulationQrCodeList = ['heb', 'bjd'];
export const RegisterCodeList = ['cgy', 'designcgy'];
@ -571,6 +583,7 @@ export const ProjectList = [
{value: 'cgy', label: '成都工业'},
{value: 'wjls', label: '微机联锁'},
{value: 'zzww', label: '郑州共赢'},
{value: 'zzwwtest', label: '郑州共赢考试'},
{value: 'richor', label: '中航锐创'}
];
export const localPackageProject = {

View File

@ -35,9 +35,9 @@ class MenuContextHandler {
return store.state.training.prdType;
}
getDeviceByCode(code) {
return store.state.map.mapDevice[code];
}
getDeviceByCode(code) {
return store.state.map.mapDevice[code];
}
// 判断指令是否隐藏
checkDisabled(data, selected) {
@ -78,7 +78,7 @@ class MenuContextHandler {
// 特殊处理站台的右键操作( 因为小站台不允许有操作 )
if (selected._type == 'StationStand' && selected.small) {
menu = [];
menu = [];
}
if (menu.constructor === Array) {
@ -110,7 +110,7 @@ class MenuContextHandler {
}
// 特殊处理站台的右键操作( 因为小站台不允许有操作 )
if (selected._type == 'StationStand' && selected.small) {
menu = [];
menu = [];
}
if (menu.constructor === Array) {
menu.forEach(elem => {
@ -128,19 +128,19 @@ class MenuContextHandler {
return menu;
}
covertList(list) {
const menu = [...list];
const selected = this.getCurrentStateObject();
covertList(list) {
const menu = [...list];
const selected = this.getCurrentStateObject();
const control = this.getStationControl(selected);
if (control && !store.state.scriptRecord.audioPlay) {
if (this.getPrdType() != '' && this.getPrdType() != null) {
const type = State2SimulationMap[this.getPrdType()];
const status = State2ControlMap[control.controlMode]; // 判断当前模式
// 特殊处理站台的右键操作( 因为小站台不允许有操作 )
if (selected._type == 'StationStand' && selected.small) {
menu = [];
}
// 特殊处理站台的右键操作( 因为小站台不允许有操作 )
if (selected._type == 'StationStand' && selected.small) {
menu = [];
}
if (menu.constructor === Array) {
menu.forEach(elem => {
@ -156,7 +156,7 @@ class MenuContextHandler {
}
}
return menu;
}
}
covertEachCommand(elem, type, selected, status, isSettingCommand = true) {
if (elem.type === 'separator') {
@ -165,17 +165,17 @@ class MenuContextHandler {
}
const data = CommandHandler.getDefinition(elem.cmdType);
const model = this.getDeviceByCode(selected.code);
const model = this.getDeviceByCode(selected.code);
if (data) {
// 判断指令是否显示
if (data.simulationRole.toUpperCase() == type.toUpperCase() && data.controlMode.indexOf(status) > -1) {
elem.show = true;
elem.disabled = this.checkDisabled(data, model);
if (!elem.disabled &&
if (!elem.disabled &&
elem.checkDisabled) {
elem.disabled = !!elem.checkDisabled(model);
}
elem.disabled = !!elem.checkDisabled(model);
}
} else {
elem.show = true;
elem.disabled = true;

View File

@ -339,7 +339,7 @@ export default {
// updateDriveValue(this.trainnum);
// }
updatedoorlight(newdata);
console.log(newdata.v);
// console.log(newdata.v);
updatetmsstatus(newdata);
if(this.$refs.mmiui){

View File

@ -23,10 +23,17 @@
:style="{'background-image': 'url('+lessonbg+')'}">
课程:{{lessonMsg.lessonTittle}}
</div>
<div class="lessontopdivmsg"
:style="{'background-image': 'url('+lessonbg+')'}"
@click="openBack">
退出
</div>
<div class="lessontopdivmsg"
:style="{'background-image': 'url('+lessonbg+')'}">
用户ID:{{lessonMsg.userId}}
</div>
<div class="lessontopdivmsg"
:style="{'background-image': 'url('+lessonbg+')'}"
v-if="lessonMsg.userJob">
@ -90,21 +97,24 @@
<div class="lessondowndivmsg"
:style="{'background-image': 'url('+lessonbg+')'}"
v-show = "endExam"
v-show = "endExam && examMode"
@click="showResult">
考试成绩分析
</div>
<div class="lessondowndivmsg"
:style="{'background-image': 'url('+lessonbg+')'}">
:style="{'background-image': 'url('+lessonbg+')'}"
v-show = "examMode">
考试计时:{{this.lastPlayTime}}
</div>
<div class="lessondowndivmsg"
:style="{'background-image': 'url('+lessonbg+')'}">
:style="{'background-image': 'url('+lessonbg+')'}"
v-show = "examMode">
考核步骤:{{examStatus.nowStep}}/{{examStatus.allStep}}
</div>
<div class="lessondowndivmsg"
:style="{'background-image': 'url('+lessonbg+')'}">
:style="{'background-image': 'url('+lessonbg+')'}"
v-show = "examMode">
考试得分:{{examStatus.lastScore}}/{{examStatus.allScore}}
</div>
</div>
@ -153,6 +163,7 @@
return {
lessonbg:JL3D_LOCAL_STATIC+"/lesson3d/lessonbg.png",
staticImg:JL3D_LOCAL_STATIC,
examMode:false,
examStatus:{
allScore:0,
nowStep:0,
@ -255,7 +266,7 @@
userJob:"",
};
loadData = JSON.parse(data.data.data);
this.examMode = loadData.setup.examMode;
if(loadData.setup.checkedRole.length == 0){
this.showSelectJob = false;
}
@ -283,10 +294,12 @@
this.examStatus = newExamStatus;
},
lessonEnd(){
this.endExam = true;
this.showResult();
this.examStatus.time = this.lastPlayTime;
if(this.examMode == true){
this.endExam = true;
this.showResult();
this.examStatus.time = this.lastPlayTime;
}
this.stopTime();
},
showResult(){
@ -381,6 +394,9 @@
changeCameraPos(pos){
this.jl3d.changeCameraPos(pos);
},
openBack(){
history.go(-1);
},
},
}

View File

@ -18,7 +18,7 @@
<script>
// import { releaseOrCancel } from '@/api/lesson3d';
import { getLesson3dDrftList,createLesson3d,updateLesson3dBasic,delLesson3d } from '@/api/jmap/lesson3d';
import { getLesson3dDrftList,createLesson3d,updateLesson3dBasic,delLesson3d,publishLesson3d } from '@/api/jmap/lesson3d';
// import { delLesson } from '@/api/jmap/lesson3d';

View File

@ -567,6 +567,8 @@ export default {
});
}
});
}else if(this.project === 'zzwwtest'){
this.$router.push({ path: '/design/jlmap3d/lesson3dplayer', query: {lessonId:'31'} });
} else {
if (this.teacherLogin) {
this.$router.push({ path: '/info/organization/classManage?enter=teacher' });
@ -873,4 +875,3 @@ export default {
}
}
</style>

View File

@ -26,6 +26,7 @@ export default {
'SDY_Joylink':'苏电院实训平台',
'SDY_Design':'苏电院设计平台',
'ZZWW_Joylink':'共赢列车仿真驾驶系统(郑州)',
'ZZWWTEST_Joylink':'共赢列车仿真驾驶系统(郑州)',
'NTY_Joylink':'南铁院实训平台(云平台通用版)',
'NTY_Design':'南铁院设计平台(云平台通用版)',
'NTYC_Joylink':'南铁院实训平台(云平台专用版)',

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -687,8 +687,9 @@ function timedCount() {
function callback(Response) {
data = JSON.parse(Response.body);
//
// console.log(data);
// console.log(data.type);
if(data.type == "Train_Position"){
postMessage(data);
return;
@ -731,9 +732,12 @@ function timedCount() {
if(data.type == "Device_Load_Destroy_3D"){
postMessage(data);
}
if(data.type == "Simulation_Reset"){
postMessage(data);
}
}
}