This commit is contained in:
fan 2020-07-08 13:49:23 +08:00
commit 3ba4ebe807
4 changed files with 51 additions and 20 deletions

View File

@ -14,6 +14,8 @@ import { getPublish3dMapDetail} from '@/api/jlmap3d/load3ddata';
import StompClient from '@/utils/sock'; import StompClient from '@/utils/sock';
import { logout } from '@/api/login';
var clock = new THREE.Clock(); var clock = new THREE.Clock();
export function Jl3ddeviceNew(dom,group,token,skinCode) { export function Jl3ddeviceNew(dom,group,token,skinCode) {
var scope = this; var scope = this;
@ -125,6 +127,13 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
} }
} }
if(data.type == 'Simulation_Over'){
logout(getToken()).then(() => {
window.location.reload();
}).catch(error => {
});
}
// } // }
@ -142,7 +151,10 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
this.anime = null; this.anime = null;
this.modelmanager = new ModelManager(); this.modelmanager = new ModelManager();
console.log(skinCode);
getPublish3dMapDetail(skinCode).then(netdata => { getPublish3dMapDetail(skinCode).then(netdata => {
console.log(netdata);
if(netdata.data){
setpsdstationmap(JSON.parse(netdata.data.stands)); setpsdstationmap(JSON.parse(netdata.data.stands));
Standtextureload(scope,JSON.parse(netdata.data.assets)); Standtextureload(scope,JSON.parse(netdata.data.assets));
scope.modelmanager.loadpromise(Staticmodel, scope.mixers).then(function (data) { scope.modelmanager.loadpromise(Staticmodel, scope.mixers).then(function (data) {
@ -156,8 +168,12 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
scope.modelmanager.standmodel.mesh.getObjectByName("pingbimen1").material.map =scope.stationtexture["pingbimen"]; scope.modelmanager.standmodel.mesh.getObjectByName("pingbimen1").material.map =scope.stationtexture["pingbimen"];
scope.modelmanager.standmodel.mesh.getObjectByName("pingbimen1").material.map.needsUpdate = true; scope.modelmanager.standmodel.mesh.getObjectByName("pingbimen1").material.map.needsUpdate = true;
} }
animate();
}) })
}
animate();
}); });
function setpsdstationmap(stationlist){ function setpsdstationmap(stationlist){

View File

@ -127,7 +127,7 @@ export function PassflowConnect(jl3dpass,deviceaction,toptrain,downtrain,routegr
window.location.reload(); window.location.reload();
}).catch(error => { }).catch(error => {
});; });
} }
} }
let actions; let actions;

View File

@ -13,8 +13,8 @@
<el-button type="primary" @click="switchhide">{{switchshow}}</el-button> <el-button type="primary" @click="switchhide">{{switchshow}}</el-button>
</el-button-group> </el-button-group>
</div> </div>
<div id="jl3dwindow" class="windowbutton" @click="windowchange"></div> <div id="jl3dwindow" v-show="isPsd" class="windowbutton" @click="windowchange"></div>
<div id="jl3dclose" class="backbutton" @click="close3ddeviceview"></div> <div id="jl3dclose" v-show="isPsd" class="backbutton" @click="close3ddeviceview"></div>
</div> </div>
</template> </template>
<script> <script>
@ -42,6 +42,7 @@
disperreset:"整体拆解", disperreset:"整体拆解",
switchshow:"隐藏轨道", switchshow:"隐藏轨道",
switchstatus:true, switchstatus:true,
isPsd:true,
isswitch:false, isswitch:false,
} }
}, },
@ -116,6 +117,16 @@
// console.log(this.$store.state.menuOperation); // console.log(this.$store.state.menuOperation);
// console.log(this.$store.state.map.map.linkList); // console.log(this.$store.state.map.map.linkList);
// console.log(this.$store.state.map.map.linkList); // console.log(this.$store.state.map.map.linkList);
if(this.$route.query.type == "VR_PSD"){
this.isPsd = false;
let changeelement = document.getElementById('jl3d');
changeelement.style.width = '100%';
changeelement.style.height = '100%';
changeelement.style.top = '0';
this.windowstatus = true;
// this.jl3d.updatewindowstatus('1');
}
if(this.$store.state.map.map.linkList){ if(this.$store.state.map.map.linkList){
this.datastatus = "old"; this.datastatus = "old";
this.initolddata(group,header); this.initolddata(group,header);
@ -123,6 +134,9 @@
this.datastatus = "new"; this.datastatus = "new";
this.initnewdata(group,header); this.initnewdata(group,header);
} }
if(this.$route.query.type == "VR_PSD"){
this.jl3d.updatewindowstatus('1');
}
// const mapdata = this.$store.getters['map/map']; // const mapdata = this.$store.getters['map/map'];
// console.log(mapdata); // console.log(mapdata);
// if (group) { // if (group) {

View File

@ -55,7 +55,7 @@ export default {
computed: { computed: {
code() { code() {
return this.$route.query.code; return this.$route.query.code;
} },
}, },
watch: { watch: {
@ -66,6 +66,7 @@ export default {
mounted() { mounted() {
this.init(); this.init();
window.updatestationlist = this.updatestationlist; window.updatestationlist = this.updatestationlist;
}, },
beforeDestroy() { beforeDestroy() {