哈尔滨一号线 教研机 切换 通号 层级调整
This commit is contained in:
parent
75c594219e
commit
da39b8a1b4
@ -152,6 +152,7 @@ export default {
|
||||
// this.faultlistshow = true;
|
||||
const mapdata = this.$store.getters['map/map'];
|
||||
const dom = document.getElementById('app');
|
||||
document.querySelector('.schema').style.zIndex = 34;
|
||||
const project = this.$route.query.project;
|
||||
// console.log(project);
|
||||
|
||||
@ -165,7 +166,6 @@ export default {
|
||||
this.jlmap3d.eventon();
|
||||
},
|
||||
initVR:function (skinCode, group) {
|
||||
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/jlmap3d/maintainervr',
|
||||
query:{
|
||||
|
@ -70,7 +70,7 @@ export default {
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
z-index: 36;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
width: 100%;
|
||||
|
@ -15,13 +15,15 @@
|
||||
@setScriptTip="setScriptTip"
|
||||
@resetCoversition="resetCoversition"
|
||||
/>
|
||||
<!-- :simulation-users="simulationUsers" -->
|
||||
</template>
|
||||
<script>
|
||||
import ChatBox from '../chatView/chatBox.vue';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import Cookies from 'js-cookie';
|
||||
import { getSimulationMemberList} from '@/api/simulation';
|
||||
import { getSimulationMemberList, getAllSimulationUser} from '@/api/simulation';
|
||||
import {getAllConversition} from '@/api/chat';
|
||||
export default {
|
||||
name:'DemonChat',
|
||||
components:{
|
||||
@ -46,13 +48,15 @@ export default {
|
||||
currentMemberList:[],
|
||||
memberData:{},
|
||||
chatContentList:[],
|
||||
activeTrainList:[],
|
||||
isStartRecord:false,
|
||||
inviteUserName:'',
|
||||
createCoversition:true,
|
||||
inviteUser:{},
|
||||
isQuitShow:false,
|
||||
treeData:[],
|
||||
driverList:[]
|
||||
driverList:[],
|
||||
simulationUsers:{}
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
@ -107,7 +111,13 @@ export default {
|
||||
member.memberName = member.type + device.groupNumber + name;
|
||||
lastMemberList.push(member);
|
||||
member.label = member.memberName;
|
||||
if (this.activeTrainList.length > 0) {
|
||||
if (this.activeTrainList.includes(member.deviceCode)) {
|
||||
this.driverList.push(member);
|
||||
}
|
||||
} else {
|
||||
this.driverList.push(member);
|
||||
}
|
||||
} else {
|
||||
member.memberName = member.type + device.name + name;
|
||||
lastMemberList.push(member);
|
||||
@ -146,7 +156,7 @@ export default {
|
||||
label: '司机',
|
||||
id: 'driver',
|
||||
type: 'role',
|
||||
children: []
|
||||
children: this.driverList
|
||||
}, {
|
||||
label: '通号',
|
||||
id: 'maintainer',
|
||||
@ -154,6 +164,7 @@ export default {
|
||||
children: maintainerList
|
||||
}];
|
||||
this.memberData = lastMemberList;
|
||||
this.getSimulationUser();
|
||||
}).catch(() => {
|
||||
this.$messageBox('获取仿真成员列表失败!');
|
||||
});
|
||||
@ -257,6 +268,7 @@ export default {
|
||||
// 按计划行车的列车列表更新(更新司机列表)
|
||||
'$store.state.map.activeTrainListChange': function (val) {
|
||||
const activeTrainList = this.$store.state.map.activeTrainList;
|
||||
if (this.driverList.length > 0) {
|
||||
const driverList = [];
|
||||
if (activeTrainList && activeTrainList.length) {
|
||||
activeTrainList.forEach(groupNumber => {
|
||||
@ -269,6 +281,9 @@ export default {
|
||||
});
|
||||
}
|
||||
this.treeData[2].children = driverList;
|
||||
} else {
|
||||
this.activeTrainList = activeTrainList;
|
||||
}
|
||||
},
|
||||
// 剧本执行完成消息
|
||||
'$store.state.socket.scriptFinish':function(val, old) {
|
||||
@ -332,7 +347,60 @@ export default {
|
||||
this.createCoversition = true;
|
||||
this.inviteUser = {};
|
||||
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>
|
||||
|
@ -130,6 +130,8 @@ export default {
|
||||
return 'STATION_SUPERVISOR';
|
||||
} else if (this.$route.query.prdType == '04') {
|
||||
return 'DRIVER';
|
||||
} else if (this.$route.query.prdType == '05') {
|
||||
return 'DEPOT_DISPATCHER';
|
||||
} else {
|
||||
return 'AUDIENCE';
|
||||
}
|
||||
@ -411,7 +413,7 @@ export default {
|
||||
height: 32px;
|
||||
overflow: hidden;
|
||||
padding-left: 44px;
|
||||
z-index: 360;
|
||||
z-index: 35;
|
||||
.btn_hover{
|
||||
position: absolute;
|
||||
left: 0;
|
||||
|
@ -252,6 +252,7 @@ export default {
|
||||
const self = this;
|
||||
assignUsersPlayRoles(data, this.$route.query.group).then(resp => {
|
||||
this.$message.success('调整角色成员成功!');
|
||||
document.querySelector('.schema').style.zIndex = 35;
|
||||
}).catch(() => {
|
||||
self.memberData[nodeData.id].userId = '';
|
||||
this.$message.error('调整角色成员失败!');
|
||||
|
@ -533,7 +533,7 @@ export default {
|
||||
height: 32px;
|
||||
overflow: hidden;
|
||||
padding-left: 44px;
|
||||
z-index: 360;
|
||||
z-index: 35;
|
||||
.btn_hover{
|
||||
position: absolute;
|
||||
left: 0;
|
||||
|
@ -436,9 +436,9 @@ export default {
|
||||
case 'Axle':
|
||||
idPrefix = 'axle';
|
||||
break;
|
||||
case 'SwitchFault':
|
||||
idPrefix = 'switchFault';
|
||||
break;
|
||||
// case 'SwitchFault':
|
||||
// idPrefix = '';
|
||||
// break;
|
||||
}
|
||||
return idPrefix;
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user