This commit is contained in:
joylink_cuiweidong 2020-08-04 14:02:54 +08:00
commit 01701479fd
12 changed files with 792 additions and 760 deletions

View File

@ -103,7 +103,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
return;
}
if(data.type == "Train_Hmi_3D"){
// console.log(data.body);
console.log(data.body);
updatestatus(data.body);
// if(data.body.trust){

File diff suppressed because it is too large Load Diff

View File

@ -108,7 +108,6 @@ export function JLmap3d(dom, data,skinCode,storemod,routegroup,project) {
getPublishMapDetail(skinCode).then(data => {
let mapnetdata = data.data;
getPublish3dMapDetail(skinCode).then(netdata => {
console.log(netdata);
let assetsdata = JSON.parse(netdata.data.sections);
if(assetsdata.link){
scope.datatype = "old";

View File

@ -143,6 +143,13 @@ export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,sce
});
})
.then(function(data){
camera.position.x = stationstandlist.group.children[0].position.x;
camera.position.y = stationstandlist.group.children[0].position.y+500;
camera.position.z = stationstandlist.group.children[0].position.z+800;
//更新相机方向
controls.target = new THREE.Vector3(stationstandlist.group.children[0].position.x,stationstandlist.group.children[0].position.y,stationstandlist.group.children[0].position.z);
controls.upmodeldirect(stationstandlist,trainlisttest);
controls.update();
backdata.loaderdata(sectionlist,linklist,signallist,stationstandlist,trainlisttest,realsectionlist,rails);
scope.Subscribe.updatamap(sectionlist,linklist,signallist,stationstandlist,trainlisttest,realsectionlist,rails,scope.materiallist,scope.actions,scope.sceneload);

View File

@ -117,6 +117,7 @@ const training = {
},
over: (state) => {
state.started = false;
state.switchcount += 1;
},
updateMapState: (state, deviceStatus) => {
Vue.prototype.$jlmap && Vue.prototype.$jlmap.update(deviceStatus);

View File

@ -2,9 +2,9 @@ export function getBaseUrl() {
let BASE_API;
if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud';
// BASE_API = 'https://test.joylink.club/jlcloud';
BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
// BASE_API = 'http://b29z135112.zicp.vip';

View File

@ -80,6 +80,11 @@ export default {
token:null
};
},
watch: {
'$store.state.socket.simulationOver':function(val) {
this.back();
}
},
beforeDestroy() {
// console.log("destroy");
if (this.jlmap3d) {
@ -183,7 +188,15 @@ export default {
},
back() {
window.close();
if (this.$route.query.projectDevice) {
this.$store.dispatch('training/over').then(() => {
this.$store.dispatch('LogOut').then(() => {
location.reload();
});
});
} else {
window.close();
}
// this.$emit('showpanel');
// this.jlmap3d.eventoff();
// this.jlmap3d.animateoff();

View File

@ -144,6 +144,7 @@ export default {
width:80%;
height:30px;
margin:0px 0px 50px 0px;
cursor:pointer;
}
.modelpic{
left:0;

View File

@ -7,7 +7,6 @@
:element-loading-text="loadingText"
element-loading-background="rgba(0, 0, 0, 0)"
>
<el-button v-if="syncLogin && loadingCode" type="text" style="font-size: 24px;font-weight: bold;" @click="loginRefresh">关联设备未登录,点击重新检测</el-button>
<div v-if="loginTitle && !syncLogin" :class="project.endsWith('heb')?'text-box':'left-logo-box'">
<img class="logo" :src="logoImg" :style="{width: logoWidth}">
<span>{{ loginTitle==='空串'?'':loginTitle }}</span>
@ -309,7 +308,8 @@ export default {
}
},
loginRefresh() {
this.loadingCode = true;
// this.loadingCode = true;
const self = this;
const params = LoginParams[this.loginClient];
params.project = loginInfo[this.project].loginParam;
if (this.$route.query.projectDevice) {
@ -321,8 +321,14 @@ export default {
this.loadingCode = false;
this.checkLoginStatus();
}).catch(() => {
this.loadingCode = false;
this.$messageBox(this.$t('login.getLoginQrCode'));
if (this.syncLogin) {
setTimeout(() =>{
self.loginRefresh();
}, 3000);
} else {
this.loadingCode = false;
this.$messageBox(this.$t('login.getLoginQrCode'));
}
});
},
checkLoginStatus() {
@ -344,8 +350,12 @@ export default {
});
}).catch(error => {
if ((error.data && error.data.status === 'EXPIRE') || error.code != 200) {
this.loadingCode = true;
this.loginUrl = '';
if (this.syncLogin) {
self.loginRefresh();
} else {
this.loadingCode = true;
this.loginUrl = '';
}
} else {
self.checkLoginStatus();
}
@ -475,7 +485,9 @@ export default {
mapid: query.mapId,
group: query.group,
project: getSessionStorage('project'),
token: getToken()
token: getToken(),
projectDevice: this.$route.query.projectDevice,
type: this.$route.query.type
};
this.$router.push({ path: `/jlmap3d/sandbox`, query: sandboxQuery });
} else {

View File

@ -74,10 +74,11 @@ export default {
});
this.editModel.logicSectionCodeList.forEach(logicCode => {
const section = this.$store.getters['map/getDeviceByCode'](logicCode);
models.push(deepAssign(section, {_dispose: true}));
const trainWindowModel = this.$store.getters['map/getDeviceByCode'](section.trainWindowCode);
models.push(deepAssign(trainWindowModel, {_dispose: true}));
if (section) {
models.push(deepAssign(section, {_dispose: true}));
const trainWindowModel = this.$store.getters['map/getDeviceByCode'](section.trainWindowCode);
trainWindowModel && models.push(deepAssign(trainWindowModel, {_dispose: true}));
}
});
if (this.logicNum === 0) {
logicSectionCodeList = [];

View File

@ -175,8 +175,8 @@ export default {
width: data.width,
height: data.height
};
data.offsetList.length = data.bigScreenSplitConfig.length + 1;
}
data.offsetList.length = data.bigScreenSplitConfig.length + 1;
if (data.offsetList && data.offsetList.length) {
this.list = [];
data.offsetList.forEach(item => {

View File

@ -721,6 +721,10 @@ function timedCount() {
postMessage(data);
return;
}
if (data.type == 'Simulation_Over') {
postMessage(data);
return;
}
if ( data.body.length > 300) {
// console.log(data);
postMessage(data);