修改三维驾驶录制获取驾驶员托管状态接口

This commit is contained in:
sunzhenyu 2020-07-10 14:47:52 +08:00
parent 9ff6b5f574
commit 8b3b151b95
2 changed files with 27 additions and 18 deletions

View File

@ -8,14 +8,6 @@ export function getSimulationMembersNew(group) {
}); });
} }
// 获取仿真成员(新版地图)
export function getSimulationMemberNew(group) {
return request({
url: `/simulation/${group}/member`,
method: 'get'
});
}
// 获取仿真会话消息列表(新版地图) // 获取仿真会话消息列表(新版地图)
export function getSimulationContextListNew(group, conversationId) { export function getSimulationContextListNew(group, conversationId) {
return request({ return request({

View File

@ -56,7 +56,7 @@
import StompClient from '@/utils/sock'; import StompClient from '@/utils/sock';
import { creatSubscribe, clearSubscribe, displayTopic, screenTopic } from '@/utils/stomp'; import { creatSubscribe, clearSubscribe, displayTopic, screenTopic } from '@/utils/stomp';
import { bindSimulationTrain,getSimulationTrainlistNew,getSimulationMemberNew,trainSimulationEb,trainSimulationForce,trainSimulationGear} from '@/jlmap3d/jl3ddrive/drivecontrol/simulation.js'; import { bindSimulationTrain,getSimulationTrainlistNew,getSimulationMembersNew,trainSimulationEb,trainSimulationForce,trainSimulationGear} from '@/jlmap3d/jl3ddrive/drivecontrol/simulation.js';
import { getSimulationInfoNew } from '@/api/simulation'; import { getSimulationInfoNew } from '@/api/simulation';
import { tuoguan3ddrive } from '@/api/jlmap3d/load3ddata'; import { tuoguan3ddrive } from '@/api/jlmap3d/load3ddata';
@ -226,16 +226,33 @@ import axios from 'axios';
}); });
// //
if(this.tuoguanbutton == true){ if(this.tuoguanbutton == true){
getSimulationMemberNew(this.group).then(netdata => { getSimulationMembersNew(this.group).then(netdata => {
this.userrole = netdata.data.role;
if(netdata.data.trust){ for(let i=0,leni=netdata.data.length;i<leni;i++){
this.tuoguanstatus = netdata.data.trust; if(netdata.data[i].userId){
if(this.tuoguanstatus){ if(netdata.data[i].userId == this.userId){
this.tuoguanbuttonmsg = "取消托管"; this.userrole = netdata.data[i].role;
}else{ if(netdata.data[i].trust){
this.tuoguanbuttonmsg = "托管"; this.tuoguanstatus = netdata.data[i].trust;
} if(this.tuoguanstatus){
this.tuoguanbuttonmsg = "取消托管";
}else{
this.tuoguanbuttonmsg = "托管";
}
}
i=leni;
}
}
} }
// this.userrole = netdata.data.role;
// if(netdata.data.trust){
// this.tuoguanstatus = netdata.data.trust;
// if(this.tuoguanstatus){
// this.tuoguanbuttonmsg = "";
// }else{
// this.tuoguanbuttonmsg = "";
// }
// }
}); });
} }
} }