哈尔滨一号线 教研机 切换 通号 层级调整

This commit is contained in:
joylink_cuiweidong 2020-08-03 19:21:56 +08:00
parent 75c594219e
commit da39b8a1b4
7 changed files with 92 additions and 21 deletions

View File

@ -152,6 +152,7 @@ export default {
// this.faultlistshow = true; // this.faultlistshow = true;
const mapdata = this.$store.getters['map/map']; const mapdata = this.$store.getters['map/map'];
const dom = document.getElementById('app'); const dom = document.getElementById('app');
document.querySelector('.schema').style.zIndex = 34;
const project = this.$route.query.project; const project = this.$route.query.project;
// console.log(project); // console.log(project);
@ -165,7 +166,6 @@ export default {
this.jlmap3d.eventon(); this.jlmap3d.eventon();
}, },
initVR:function (skinCode, group) { initVR:function (skinCode, group) {
const routeData = this.$router.resolve({ const routeData = this.$router.resolve({
path:'/jlmap3d/maintainervr', path:'/jlmap3d/maintainervr',
query:{ query:{

View File

@ -70,7 +70,7 @@ export default {
-ms-user-select: none; -ms-user-select: none;
user-select: none; user-select: none;
position: absolute; position: absolute;
z-index: 10; z-index: 36;
top: 0px; top: 0px;
left: 0px; left: 0px;
width: 100%; width: 100%;

View File

@ -15,13 +15,15 @@
@setScriptTip="setScriptTip" @setScriptTip="setScriptTip"
@resetCoversition="resetCoversition" @resetCoversition="resetCoversition"
/> />
<!-- :simulation-users="simulationUsers" -->
</template> </template>
<script> <script>
import ChatBox from '../chatView/chatBox.vue'; import ChatBox from '../chatView/chatBox.vue';
import ConstConfig from '@/scripts/ConstConfig'; import ConstConfig from '@/scripts/ConstConfig';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import { getSimulationMemberList} from '@/api/simulation'; import { getSimulationMemberList, getAllSimulationUser} from '@/api/simulation';
import {getAllConversition} from '@/api/chat';
export default { export default {
name:'DemonChat', name:'DemonChat',
components:{ components:{
@ -46,13 +48,15 @@ export default {
currentMemberList:[], currentMemberList:[],
memberData:{}, memberData:{},
chatContentList:[], chatContentList:[],
activeTrainList:[],
isStartRecord:false, isStartRecord:false,
inviteUserName:'', inviteUserName:'',
createCoversition:true, createCoversition:true,
inviteUser:{}, inviteUser:{},
isQuitShow:false, isQuitShow:false,
treeData:[], treeData:[],
driverList:[] driverList:[],
simulationUsers:{}
}; };
}, },
computed:{ computed:{
@ -107,7 +111,13 @@ export default {
member.memberName = member.type + device.groupNumber + name; member.memberName = member.type + device.groupNumber + name;
lastMemberList.push(member); lastMemberList.push(member);
member.label = member.memberName; member.label = member.memberName;
this.driverList.push(member); if (this.activeTrainList.length > 0) {
if (this.activeTrainList.includes(member.deviceCode)) {
this.driverList.push(member);
}
} else {
this.driverList.push(member);
}
} else { } else {
member.memberName = member.type + device.name + name; member.memberName = member.type + device.name + name;
lastMemberList.push(member); lastMemberList.push(member);
@ -146,7 +156,7 @@ export default {
label: '司机', label: '司机',
id: 'driver', id: 'driver',
type: 'role', type: 'role',
children: [] children: this.driverList
}, { }, {
label: '通号', label: '通号',
id: 'maintainer', id: 'maintainer',
@ -154,6 +164,7 @@ export default {
children: maintainerList children: maintainerList
}]; }];
this.memberData = lastMemberList; this.memberData = lastMemberList;
this.getSimulationUser();
}).catch(() => { }).catch(() => {
this.$messageBox('获取仿真成员列表失败!'); this.$messageBox('获取仿真成员列表失败!');
}); });
@ -257,18 +268,22 @@ export default {
// () // ()
'$store.state.map.activeTrainListChange': function (val) { '$store.state.map.activeTrainListChange': function (val) {
const activeTrainList = this.$store.state.map.activeTrainList; const activeTrainList = this.$store.state.map.activeTrainList;
const driverList = []; if (this.driverList.length > 0) {
if (activeTrainList && activeTrainList.length) { const driverList = [];
activeTrainList.forEach(groupNumber => { if (activeTrainList && activeTrainList.length) {
const drivers = this.driverList.find(driver=>{ activeTrainList.forEach(groupNumber => {
return driver.deviceCode == groupNumber; const drivers = this.driverList.find(driver=>{
return driver.deviceCode == groupNumber;
});
if (drivers) {
driverList.push(drivers);
}
}); });
if (drivers) { }
driverList.push(drivers); this.treeData[2].children = driverList;
} } else {
}); this.activeTrainList = activeTrainList;
} }
this.treeData[2].children = driverList;
}, },
// //
'$store.state.socket.scriptFinish':function(val, old) { '$store.state.socket.scriptFinish':function(val, old) {
@ -332,7 +347,60 @@ export default {
this.createCoversition = true; this.createCoversition = true;
this.inviteUser = {}; this.inviteUser = {};
this.isQuitShow = false; this.isQuitShow = false;
},
getSimulationUser() {
getAllSimulationUser(this.$route.query.group).then(resp => {
this.simulationUsers = {};
if (resp.data && resp.data.length) {
resp.data.forEach(user => {
this.simulationUsers[user.userId] = user;
});
}
}).catch(() => {
this.$messageBox('获取所有仿真用户失败!');
});
} }
// isAudienceInitData() {
// getAllConversition(this.group).then(resp => {
// const messages = [];
// if (resp.data && resp.data.length) {
// debugger;
// resp.data.forEach(conversation => {
// (conversation.messageList || []).forEach(message => {
// const member = this.memberData[message.memberId];
// message.src = `/audio/${message.audioPath}`;
// message.members = conversation.memberList;
// if (member) {
// message.self = this.$store.state.userId == member.userId;
// }
// messages.push(message);
// });
// if (this.userRole !== 'AUDIENCE') {
// const user = this.simulationUsers[this.$store.state.user.id];
// this.isConversitionCreator = conversation.creatorId == user.memberId;
// !conversation.over && conversation.memberList.forEach(member =>{
// if (member.memberId == user.memberId && member.connect) {
// this.conversitionMemberList = conversation.memberList;
// this.conversitionId = conversation.id;
// this.messageList = [];
// conversation.messageList.forEach(message => {
// const member = this.memberData[message.memberId];
// message.src = `/audio/${message.audioPath}`;
// if (member) {
// message.self = this.$store.state.userId == member.userId;
// }
// this.privateMessageList.push(message);
// this.messageList.push(message);
// });
// }
// });
// }
// });
// }
// this.commonMessageList = messages.sort(this.sortByMessageTime);
// // this.initCommonMemberList();
// });
// }
} }
}; };
</script> </script>

View File

@ -130,6 +130,8 @@ export default {
return 'STATION_SUPERVISOR'; return 'STATION_SUPERVISOR';
} else if (this.$route.query.prdType == '04') { } else if (this.$route.query.prdType == '04') {
return 'DRIVER'; return 'DRIVER';
} else if (this.$route.query.prdType == '05') {
return 'DEPOT_DISPATCHER';
} else { } else {
return 'AUDIENCE'; return 'AUDIENCE';
} }
@ -411,7 +413,7 @@ export default {
height: 32px; height: 32px;
overflow: hidden; overflow: hidden;
padding-left: 44px; padding-left: 44px;
z-index: 360; z-index: 35;
.btn_hover{ .btn_hover{
position: absolute; position: absolute;
left: 0; left: 0;

View File

@ -252,6 +252,7 @@ export default {
const self = this; const self = this;
assignUsersPlayRoles(data, this.$route.query.group).then(resp => { assignUsersPlayRoles(data, this.$route.query.group).then(resp => {
this.$message.success('调整角色成员成功!'); this.$message.success('调整角色成员成功!');
document.querySelector('.schema').style.zIndex = 35;
}).catch(() => { }).catch(() => {
self.memberData[nodeData.id].userId = ''; self.memberData[nodeData.id].userId = '';
this.$message.error('调整角色成员失败!'); this.$message.error('调整角色成员失败!');

View File

@ -533,7 +533,7 @@ export default {
height: 32px; height: 32px;
overflow: hidden; overflow: hidden;
padding-left: 44px; padding-left: 44px;
z-index: 360; z-index: 35;
.btn_hover{ .btn_hover{
position: absolute; position: absolute;
left: 0; left: 0;

View File

@ -436,9 +436,9 @@ export default {
case 'Axle': case 'Axle':
idPrefix = 'axle'; idPrefix = 'axle';
break; break;
case 'SwitchFault': // case 'SwitchFault':
idPrefix = 'switchFault'; // idPrefix = '';
break; // break;
} }
return idPrefix; return idPrefix;
}, },