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 # just a flag
NODE_ENV = 'development' NODE_ENV = 'development'
# VUE_APP_PRO = 'local' VUE_APP_PRO = 'local'
# base api # base api
# VUE_APP_BASE_API = 'https://joylink.club/jlcloud' # VUE_APP_BASE_API = 'https://joylink.club/jlcloud'

View File

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

View File

@ -95,7 +95,7 @@ export function JLmap3dEdit(dom, data, mapid) {
raillist:null, raillist:null,
path:[] path:[]
}; };
this.assetManager = null;
Jlmap3ddata(mapid,scope); Jlmap3ddata(mapid,scope);
let scalControls = new THREE.ScalControls(scope.scene,scope.camera, scope.renderer.domElement ); 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 StompClient from '@/utils/sock';
import { getToken } from '@/utils/auth';
import { logout } from '@/api/login'; import { logout } from '@/api/login';
var clock = new THREE.Clock(); var clock = new THREE.Clock();

View File

@ -47,10 +47,7 @@
</template> </template>
<script> <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 CentercPane from '@/views/jlmap3d/drive/drivecontrol/centerpane';
import LeftPane from '@/views/jlmap3d/drive/drivecontrol/leftpane'; import LeftPane from '@/views/jlmap3d/drive/drivecontrol/leftpane';
import RightPane from '@/views/jlmap3d/drive/drivecontrol/rightpane'; 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 DriveMmi from '@/views/jlmap3d/drive/sceneview/mmiview';
import DriveTms from '@/views/jlmap3d/drive/sceneview/tmsview'; import DriveTms from '@/views/jlmap3d/drive/sceneview/tmsview';
import DriveControl from '@/views/jlmap3d/drive/drivecontrol/drivecontrol'; import DriveControl from '@/views/jlmap3d/drive/drivecontrol/drivecontrol';
import { getToken } from '@/utils/auth';
import { logout } from '@/api/login';
var train; var train;
export default { export default {
name: 'Jl3dDrive', name: 'Jl3dDrive',
@ -239,10 +242,21 @@ export default {
}, },
back() { back() {
if(this.$route.query.type == "DRIVE"){
logout(getToken()).then(() => {
window.location.reload();
}).catch(error => {
});
}else{
this.$emit('showdriving'); this.$emit('showdriving');
this.jlmap3d.eventoff(); this.jlmap3d.eventoff();
this.jlmap3d.animateoff(); this.jlmap3d.animateoff();
// this.jlmap3d = null; // this.jlmap3d = null;
}
}, },
showplane() { showplane() {
if (this.mmishow == true) { if (this.mmishow == true) {

View File

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