This commit is contained in:
joylink_cuiweidong 2020-07-09 16:54:51 +08:00
commit 5532bc5eba
7 changed files with 40 additions and 16 deletions

View File

@ -1,6 +1,6 @@
# just a flag
NODE_ENV = 'development'
# VUE_APP_PRO = 'local'
VUE_APP_PRO = 'local'
# base api
# VUE_APP_BASE_API = 'https://joylink.club/jlcloud'

View File

@ -18,6 +18,7 @@ export function Jlmap3ddata(mapid,scope){
let editmapid = mapid;
let scene = scope.scene;
let jlmap3ddata = scope.mapdata;
let jlmap3dasset = scope.assetManager;
let assetloader = scope.assetloader;
let loadingInstance = Loading.service({ fullscreen: true });
get3dMapData(editmapid).then(data => {
@ -120,7 +121,8 @@ export function Jlmap3ddata(mapid,scope){
let switchdata = JSON.parse(netdata.switchs);
let signaldata = JSON.parse(netdata.signals);
let standsdata = JSON.parse(netdata.stands);
// console.log(mapdata);
jlmap3dasset = JSON.parse(netdata.assets);
console.log(jlmap3dasset);
assetloader.setmodellistnew(netdata.assets,5);
assetloader.assetpromise(scene)
.then(function(data){

View File

@ -95,7 +95,7 @@ export function JLmap3dEdit(dom, data, mapid) {
raillist:null,
path:[]
};
this.assetManager = null;
Jlmap3ddata(mapid,scope);
let scalControls = new THREE.ScalControls(scope.scene,scope.camera, scope.renderer.domElement );

View File

@ -14,6 +14,7 @@ import { getPublish3dMapDetail} from '@/api/jlmap3d/load3ddata';
import StompClient from '@/utils/sock';
import { getToken } from '@/utils/auth';
import { logout } from '@/api/login';
var clock = new THREE.Clock();

View File

@ -47,10 +47,7 @@
</template>
<script>
//
// import { sendSimulationCommand,getSimulationTrainlist,getSimulationTrainlistNew,getSimulationMember, getSimulationMemberNew,bindSimulationTrain,trainSimulationEb,trainSimulationForce,trainSimulationGear} from '@/api/simulation.js';
// import { creatSubscribe, clearSubscribe, SocketStatusMap } from '@/utils/subscribe.js';
// import { hideLoading } from '@/utils/loading.js';
import CentercPane from '@/views/jlmap3d/drive/drivecontrol/centerpane';
import LeftPane from '@/views/jlmap3d/drive/drivecontrol/leftpane';
import RightPane from '@/views/jlmap3d/drive/drivecontrol/rightpane';

View File

@ -59,6 +59,9 @@ import { JLmapDriving } from '@/jlmap3d/jl3ddrive/jl3ddrive';
import DriveMmi from '@/views/jlmap3d/drive/sceneview/mmiview';
import DriveTms from '@/views/jlmap3d/drive/sceneview/tmsview';
import DriveControl from '@/views/jlmap3d/drive/drivecontrol/drivecontrol';
import { getToken } from '@/utils/auth';
import { logout } from '@/api/login';
var train;
export default {
name: 'Jl3dDrive',
@ -239,10 +242,21 @@ export default {
},
back() {
this.$emit('showdriving');
this.jlmap3d.eventoff();
this.jlmap3d.animateoff();
// this.jlmap3d = null;
if(this.$route.query.type == "DRIVE"){
logout(getToken()).then(() => {
window.location.reload();
}).catch(error => {
});
}else{
this.$emit('showdriving');
this.jlmap3d.eventoff();
this.jlmap3d.animateoff();
// this.jlmap3d = null;
}
},
showplane() {
if (this.mmishow == true) {

View File

@ -227,8 +227,8 @@ export default {
driverAssetList:driverListConfig,
sceneAssetList:sceneListConfig,
deviceAssetList:deviceListConfig,
cctvAssetList:maintainerListConfig,
maintainerAssetList:cctvListConfig,
cctvAssetList:cctvListConfig,
maintainerAssetList:maintainerListConfig,
stationTextureList:stationTextureListConfig,
deviceTextureList:deviceTextureListConfig,
@ -241,7 +241,7 @@ export default {
},
mounted() {
window.updateSelectAsset = this.updateSelectAsset;
// assetListAll. = ;
},
methods: {
@ -287,7 +287,6 @@ export default {
//
assetSelect(assetData,index){
this.isActive=index;
console.log(index);
this.nowSelect = index;
},
//
@ -349,12 +348,23 @@ export default {
this.deviceTextureList[this.nowSelect].id = selectData.id;
this.deviceTextureList[this.nowSelect].packageName = selectData.packageName;
this.deviceTextureList[this.nowSelect].type = selectData.deviceType;
this.$emit('changeAsset',this.modelList[index]);
console.log(this.deviceTextureList);
}
}
}
this.assetListAll ={
driverAssetList:this.driverAssetList,
sceneAssetList:this.sceneAssetList,
deviceAssetList:this.deviceAssetList,
cctvAssetList:this.cctvAssetList,
maintainerAssetList:this.maintainerAssetList,
stationTextureList:this.stationTextureList,
deviceTextureList:this.deviceTextureList,
signalTextureAssetList:this.signalTextureAssetList
};
console.log(this.assetListAll);
},
actionevent(event){
console.log(event.currentTarget.id);