Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
3ba4ebe807
@ -14,6 +14,8 @@ import { getPublish3dMapDetail} from '@/api/jlmap3d/load3ddata';
|
||||
|
||||
import StompClient from '@/utils/sock';
|
||||
|
||||
import { logout } from '@/api/login';
|
||||
|
||||
var clock = new THREE.Clock();
|
||||
export function Jl3ddeviceNew(dom,group,token,skinCode) {
|
||||
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,22 +151,29 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
|
||||
this.anime = null;
|
||||
|
||||
this.modelmanager = new ModelManager();
|
||||
console.log(skinCode);
|
||||
getPublish3dMapDetail(skinCode).then(netdata => {
|
||||
setpsdstationmap(JSON.parse(netdata.data.stands));
|
||||
Standtextureload(scope,JSON.parse(netdata.data.assets));
|
||||
scope.modelmanager.loadpromise(Staticmodel, scope.mixers).then(function (data) {
|
||||
moveanima.initlistnew(scope.modelmanager.switchmodel.mesh);
|
||||
daochamodel = scope.modelmanager.switchmodel.mesh.getObjectByName("DAOCHA");
|
||||
if(scope.stationtexture["stationlist"]){
|
||||
scope.modelmanager.standmodel.mesh.getObjectByName("zhantailiebiao").material.map =scope.stationtexture["stationlist"];
|
||||
scope.modelmanager.standmodel.mesh.getObjectByName("zhantailiebiao").material.map.needsUpdate = true;
|
||||
}
|
||||
if(scope.stationtexture["pingbimen"]){
|
||||
scope.modelmanager.standmodel.mesh.getObjectByName("pingbimen1").material.map =scope.stationtexture["pingbimen"];
|
||||
scope.modelmanager.standmodel.mesh.getObjectByName("pingbimen1").material.map.needsUpdate = true;
|
||||
}
|
||||
animate();
|
||||
})
|
||||
console.log(netdata);
|
||||
if(netdata.data){
|
||||
setpsdstationmap(JSON.parse(netdata.data.stands));
|
||||
Standtextureload(scope,JSON.parse(netdata.data.assets));
|
||||
scope.modelmanager.loadpromise(Staticmodel, scope.mixers).then(function (data) {
|
||||
moveanima.initlistnew(scope.modelmanager.switchmodel.mesh);
|
||||
daochamodel = scope.modelmanager.switchmodel.mesh.getObjectByName("DAOCHA");
|
||||
if(scope.stationtexture["stationlist"]){
|
||||
scope.modelmanager.standmodel.mesh.getObjectByName("zhantailiebiao").material.map =scope.stationtexture["stationlist"];
|
||||
scope.modelmanager.standmodel.mesh.getObjectByName("zhantailiebiao").material.map.needsUpdate = true;
|
||||
}
|
||||
if(scope.stationtexture["pingbimen"]){
|
||||
scope.modelmanager.standmodel.mesh.getObjectByName("pingbimen1").material.map =scope.stationtexture["pingbimen"];
|
||||
scope.modelmanager.standmodel.mesh.getObjectByName("pingbimen1").material.map.needsUpdate = true;
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
animate();
|
||||
});
|
||||
|
||||
function setpsdstationmap(stationlist){
|
||||
|
@ -10,7 +10,7 @@ export function PassflowConnect(jl3dpass,deviceaction,toptrain,downtrain,routegr
|
||||
|
||||
let topic = '/user/queue/simulation/jl3d/'+routegroup;
|
||||
let header = {'X-Token': getToken() };
|
||||
|
||||
|
||||
socketon(topic);
|
||||
|
||||
function socketon(topic) {
|
||||
@ -127,7 +127,7 @@ export function PassflowConnect(jl3dpass,deviceaction,toptrain,downtrain,routegr
|
||||
window.location.reload();
|
||||
}).catch(error => {
|
||||
|
||||
});;
|
||||
});
|
||||
}
|
||||
}
|
||||
let actions;
|
||||
|
@ -13,8 +13,8 @@
|
||||
<el-button type="primary" @click="switchhide">{{switchshow}}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<div id="jl3dwindow" class="windowbutton" @click="windowchange"></div>
|
||||
<div id="jl3dclose" class="backbutton" @click="close3ddeviceview"></div>
|
||||
<div id="jl3dwindow" v-show="isPsd" class="windowbutton" @click="windowchange"></div>
|
||||
<div id="jl3dclose" v-show="isPsd" class="backbutton" @click="close3ddeviceview"></div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@ -42,6 +42,7 @@
|
||||
disperreset:"整体拆解",
|
||||
switchshow:"隐藏轨道",
|
||||
switchstatus:true,
|
||||
isPsd:true,
|
||||
isswitch:false,
|
||||
}
|
||||
},
|
||||
@ -116,6 +117,16 @@
|
||||
// console.log(this.$store.state.menuOperation);
|
||||
// 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){
|
||||
this.datastatus = "old";
|
||||
this.initolddata(group,header);
|
||||
@ -123,6 +134,9 @@
|
||||
this.datastatus = "new";
|
||||
this.initnewdata(group,header);
|
||||
}
|
||||
if(this.$route.query.type == "VR_PSD"){
|
||||
this.jl3d.updatewindowstatus('1');
|
||||
}
|
||||
// const mapdata = this.$store.getters['map/map'];
|
||||
// console.log(mapdata);
|
||||
// if (group) {
|
||||
|
@ -55,7 +55,7 @@ export default {
|
||||
computed: {
|
||||
code() {
|
||||
return this.$route.query.code;
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
|
||||
@ -66,6 +66,7 @@ export default {
|
||||
mounted() {
|
||||
this.init();
|
||||
window.updatestationlist = this.updatestationlist;
|
||||
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
|
Loading…
Reference in New Issue
Block a user