Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
7c8d1319f3
@ -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;
|
||||
|
@ -432,18 +432,20 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
|
||||
|
||||
|
||||
getPublish3dMapDetail(skinCode).then(netdata3d => {
|
||||
if(netdata3d.data){
|
||||
Materialload(scope,JSON.parse(netdata3d.data.assets));
|
||||
|
||||
Materialload(scope,JSON.parse(netdata3d.data.assets));
|
||||
}
|
||||
getPublishMapDetail(skinCode).then(netdata => {
|
||||
scope.switchviews(4);
|
||||
inithumans();
|
||||
initstationlist(netdata.data.stationList,netdata.data.stationStandList,netdata.data.psdList);
|
||||
socktest = new PassflowConnect(scope,deviceaction,toptrain,downtrain,routegroup);
|
||||
loadingInstance.close();
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
loadingInstance.close();
|
||||
animate();
|
||||
})
|
||||
|
||||
@ -479,8 +481,10 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
|
||||
if(stationlist[i].name == stationname){
|
||||
scope.nowstation = stationlist[i];
|
||||
scope.resetscene();
|
||||
scope.modelmanager.station.mesh.getObjectByName("zhantaiming").material.map = scope.stationtexture[scope.nowstation.code];
|
||||
scope.modelmanager.station.mesh.getObjectByName("zhantaiming").material.map.needsUpdate = true;
|
||||
if(scope.stationtexture["stationlist"]){
|
||||
scope.modelmanager.station.mesh.getObjectByName("zhantaiming").material.map = scope.stationtexture[scope.nowstation.code];
|
||||
scope.modelmanager.station.mesh.getObjectByName("zhantaiming").material.map.needsUpdate = true;
|
||||
}
|
||||
i=leni;
|
||||
}
|
||||
}
|
||||
@ -1035,7 +1039,7 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
|
||||
// console.log(humanlist.children.length);
|
||||
}
|
||||
function initstationlist(stationdata,standdata,psddata){
|
||||
|
||||
|
||||
let list = [];
|
||||
if(psddata){
|
||||
for(let i=0,leni = standdata.length;i<leni;i++){
|
||||
@ -1082,14 +1086,17 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
|
||||
}
|
||||
|
||||
scope.nowstation = stationlist[0];
|
||||
scope.modelmanager.station.mesh.getObjectByName("zhantailiebiao").material.map =scope.stationtexture["stationlist"];
|
||||
scope.modelmanager.station.mesh.getObjectByName("zhantailiebiao").material.map.needsUpdate = true;
|
||||
if(scope.modelmanager.station.mesh.getObjectByName("menkuangyanse")){
|
||||
scope.modelmanager.station.mesh.getObjectByName("menkuangyanse").material.map =scope.stationtexture["pingbimen"];
|
||||
scope.modelmanager.station.mesh.getObjectByName("menkuangyanse").material.map.needsUpdate = true;
|
||||
if(scope.stationtexture["stationlist"]){
|
||||
scope.modelmanager.station.mesh.getObjectByName("zhantailiebiao").material.map =scope.stationtexture["stationlist"];
|
||||
scope.modelmanager.station.mesh.getObjectByName("zhantailiebiao").material.map.needsUpdate = true;
|
||||
if(scope.modelmanager.station.mesh.getObjectByName("menkuangyanse")){
|
||||
scope.modelmanager.station.mesh.getObjectByName("menkuangyanse").material.map =scope.stationtexture["pingbimen"];
|
||||
scope.modelmanager.station.mesh.getObjectByName("menkuangyanse").material.map.needsUpdate = true;
|
||||
}
|
||||
scope.modelmanager.station.mesh.getObjectByName("zhantaiming").material.map = scope.stationtexture[scope.nowstation.code];
|
||||
scope.modelmanager.station.mesh.getObjectByName("zhantaiming").material.map.needsUpdate = true;
|
||||
|
||||
}
|
||||
scope.modelmanager.station.mesh.getObjectByName("zhantaiming").material.map = scope.stationtexture[scope.nowstation.code];
|
||||
scope.modelmanager.station.mesh.getObjectByName("zhantaiming").material.map.needsUpdate = true;
|
||||
|
||||
updatestationlist(stationlist);
|
||||
}else{
|
||||
|
@ -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) {
|
||||
|
@ -27,7 +27,7 @@
|
||||
</div>
|
||||
<div class="menudown">
|
||||
<el-button-group>
|
||||
<el-button type="primary" @click="back">退出</el-button>
|
||||
<el-button v-show="isCctv" type="primary" @click="back">退出</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
</div>
|
||||
@ -50,12 +50,13 @@ export default {
|
||||
renderswitch:false,
|
||||
stationlist:[],
|
||||
value:"",
|
||||
isCctv:true,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
code() {
|
||||
return this.$route.query.code;
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
|
||||
@ -66,6 +67,9 @@ export default {
|
||||
mounted() {
|
||||
this.init();
|
||||
window.updatestationlist = this.updatestationlist;
|
||||
if(this.$route.query.type == "CCTV"){
|
||||
this.isCctv = false;
|
||||
}
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
|
@ -423,7 +423,9 @@ export default {
|
||||
this.$router.push({ path: `/jlmap3d/passengerflow`, query:{
|
||||
mapid:resp.data.map.id,
|
||||
group:res.data.group,
|
||||
project: getSessionStorage('project')
|
||||
project: getSessionStorage('project'),
|
||||
projectDevice: this.$route.query.projectDevice,
|
||||
type: this.$route.query.type
|
||||
} });
|
||||
} else {
|
||||
this.$router.push({ path: `/jointTrainingNew`, query: query });
|
||||
|
@ -405,7 +405,7 @@ export default {
|
||||
async getUserRole() {
|
||||
const res = await getSimulationUserInfo(this.group);
|
||||
const data = res.data || {};
|
||||
this.userRole = data.role || 'AUDIENCE';
|
||||
this.userRole = data.type || 'AUDIENCE';
|
||||
this.deviceCode = data.deviceCode;
|
||||
this.isAdmin = data.admin;
|
||||
|
||||
@ -429,7 +429,7 @@ export default {
|
||||
let resp = {data: {}};
|
||||
if (this.project == 'jsxt' ) {
|
||||
resp = await getRaceUserById(this.$route.query.raceId);
|
||||
resp.data.userRole = resp.data.role;
|
||||
resp.data.userRole = resp.data.type;
|
||||
const paperResp = await getTestPaperDatail(this.$route.query.raceId);
|
||||
if (paperResp.data && paperResp.data.practicalQuestions) {
|
||||
this.questionList = [];
|
||||
@ -455,7 +455,7 @@ export default {
|
||||
resp = await this.getUserRole();
|
||||
}
|
||||
if (resp && resp.code == 200) {
|
||||
this.userRole = resp.data.role || 'AUDIENCE';
|
||||
this.userRole = resp.data.type || 'AUDIENCE';
|
||||
this.setSimulationPrdType();
|
||||
}
|
||||
await this.getTrainDetail();
|
||||
@ -664,7 +664,7 @@ export default {
|
||||
this.$messageBox('您已经被请离房间!');
|
||||
this.$refs.demonMenu.back();
|
||||
} else if (item.messageType === 'PLAY_CHANGE' && item.userId == this.userId) {
|
||||
this.userRole = item.role || 'AUDIENCE';
|
||||
this.userRole = item.type || 'AUDIENCE';
|
||||
this.setSimulationPrdType();
|
||||
}
|
||||
});
|
||||
|
@ -9,8 +9,8 @@
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" :model="formModel" label-width="120px" :rules="rules">
|
||||
<el-form-item label="添加仿真成员:" prop="role">
|
||||
<el-select v-model="formModel.role" placeholder="请选择" size="small">
|
||||
<el-form-item label="添加仿真成员:" prop="type">
|
||||
<el-select v-model="formModel.type" placeholder="请选择" size="small">
|
||||
<el-option
|
||||
v-for="item in typeList"
|
||||
:key="item.value"
|
||||
@ -35,10 +35,10 @@ export default {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
formModel: {
|
||||
role: ''
|
||||
type: ''
|
||||
},
|
||||
rules: {
|
||||
role: [
|
||||
type: [
|
||||
{ required: true, message: '请选择显示位置', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
@ -71,7 +71,7 @@ export default {
|
||||
handleClose() {
|
||||
this.dialogVisible = false;
|
||||
this.formModel = {
|
||||
role: ''
|
||||
type: ''
|
||||
};
|
||||
this.$refs.form.resetFields();
|
||||
}
|
||||
|
@ -32,7 +32,7 @@
|
||||
>
|
||||
<span :id="data.id" slot-scope="{ node, data }" class="custom-tree-node">
|
||||
<span>{{ data.label }}</span>
|
||||
<span v-if="data.role">
|
||||
<span v-if="data.type">
|
||||
<el-select :key="data.id" v-model="data.userId" placeholder="请选择" clearable size="mini" @change="nodeMemberChange($event, data)">
|
||||
<el-option
|
||||
v-for="item in simulationUserList"
|
||||
@ -104,15 +104,15 @@ export default {
|
||||
memberData: {},
|
||||
treeData: [{
|
||||
label: '行调',
|
||||
type: 'role',
|
||||
// type: 'role',
|
||||
children: []
|
||||
}, {
|
||||
label: '车站值班员',
|
||||
type: 'role',
|
||||
// type: 'role',
|
||||
children: []
|
||||
}, {
|
||||
label: '司机',
|
||||
type: 'role',
|
||||
// type: 'role',
|
||||
children: []
|
||||
}, {
|
||||
label: '通号',
|
||||
@ -163,7 +163,7 @@ export default {
|
||||
const maintainerList = [];
|
||||
val.forEach(item => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
|
||||
switch (item.role) {
|
||||
switch (item.type) {
|
||||
case 'DISPATCHER':
|
||||
this.memberData[item.id].label = '行调' + (dispatcherList.length + 1);
|
||||
dispatcherList.push(this.memberData[item.id]);
|
||||
@ -274,7 +274,7 @@ export default {
|
||||
flag = this.memberData[data.id].nickName.indexOf(value) !== -1;
|
||||
}
|
||||
let driverNoShow = true;
|
||||
if (data.role && data.role === 'DRIVER' && !this.activeTrains.includes(data.deviceCode)) {
|
||||
if (data.role && data.type === 'DRIVER' && !this.activeTrains.includes(data.deviceCode)) {
|
||||
driverNoShow = false;
|
||||
}
|
||||
return (data.label.indexOf(value) !== -1 || flag) && driverNoShow;
|
||||
|
@ -218,7 +218,7 @@ export default {
|
||||
const maintainerList = [];
|
||||
val.forEach(item => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
|
||||
switch (item.role) {
|
||||
switch (item.type) {
|
||||
case 'DISPATCHER':
|
||||
this.memberData[item.id].label = '行调' + (dispatcherList.length + 1);
|
||||
dispatcherList.push(this.memberData[item.id]);
|
||||
|
Loading…
Reference in New Issue
Block a user