综合演练调整
This commit is contained in:
parent
b94c2b47de
commit
71d328296f
@ -316,7 +316,7 @@ export default {
|
||||
// 01 现地 02 行调 '' 观众
|
||||
const resp = await this.getUserRole();
|
||||
if (resp && resp.code == 200) {
|
||||
// Admin 管理员 Instructor 教员 Dispatcher 行调 Attendant 车站 Audience 观众 Driver 司机 Repair 通号 IBP:IBP盘
|
||||
// Admin 管理员 Instructor 教员 Dispatcher 行调 STATION_SUPERVISOR 车站 Audience 观众 Driver 司机 MAINTAINER 通号 IBP:IBP盘
|
||||
this.userRole = resp.data.userRole;
|
||||
switch (this.userRole) {
|
||||
case 'ADMIN': this.$store.dispatch('training/setPrdType', '02'); this.$store.dispatch('training/setRoles', 'ADMIN'); this.hideIbp(); break;
|
||||
@ -325,7 +325,7 @@ export default {
|
||||
case 'STATION_SUPERVISOR': this.$store.dispatch('training/setPrdType', '01'); this.$store.dispatch('training/setRoles', 'STATION_SUPERVISOR'); this.hideIbp(); break;
|
||||
case 'AUDIENCE': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'AUDIENCE'); this.hideIbp(); break;
|
||||
case 'DRIVER': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'DRIVER'); this.hideIbp(); break;
|
||||
case 'REPAIR': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'REPAIR'); this.hideIbp(); break;
|
||||
case 'MAINTAINER': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'MAINTAINER'); this.hideIbp(); break;
|
||||
case 'IBP': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'IBP'); this.showIbp(resp.data.deviceCode); break;
|
||||
case 'BIGSCREEN': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'BIGSCREEN'); this.hideIbp(); break;
|
||||
}
|
||||
|
@ -218,7 +218,7 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置用户角色 Admin 管理员 Instructor 教员 Dispatcher 行调 Attendant 车站 Audience 观众 Driver 司机 Repair 通号
|
||||
// 设置用户角色 Admin 管理员 Instructor 教员 Dispatcher 行调 Attendant 车站 Audience 观众 Driver 司机 MAINTAINER 通号
|
||||
addrolesList(list) {
|
||||
list.forEach(item => {
|
||||
if (this.userId == item.id) {
|
||||
@ -243,8 +243,8 @@ export default {
|
||||
this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'DRIVER');
|
||||
this.$emit('getUserRole');
|
||||
break;
|
||||
case 'REPAIR':
|
||||
this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'REPAIR');
|
||||
case 'MAINTAINER':
|
||||
this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'MAINTAINER');
|
||||
this.$emit('getUserRole');
|
||||
break;
|
||||
case 'IBP':
|
||||
|
@ -208,7 +208,7 @@ export default {
|
||||
return this.members.filter(elem => { return [elem.userRole.toUpperCase()].includes('INSTRUCTOR'); });
|
||||
},
|
||||
repairList() {
|
||||
return this.members.filter(elem => { return [elem.userRole.toUpperCase()].includes('REPAIR'); });
|
||||
return this.members.filter(elem => { return [elem.userRole.toUpperCase()].includes('REPAIR') || [elem.userRole.toUpperCase()].includes('MAINTAINER'); });
|
||||
},
|
||||
driverList() {
|
||||
return this.members.filter(elem => { return [elem.userRole.toUpperCase()].includes('DRIVER'); });
|
||||
@ -305,6 +305,8 @@ export default {
|
||||
params[0].userRole = roleType.toUpperCase();
|
||||
if (roleType === 'Attendant') {
|
||||
params[0].userRole = 'STATION_SUPERVISOR';
|
||||
} else if (roleType === 'Repair') {
|
||||
params[0].userRole = 'MAINTAINER';
|
||||
}
|
||||
await putUserRolesNew(params, this.group);
|
||||
} else {
|
||||
@ -327,6 +329,8 @@ export default {
|
||||
if (this.drawWay) {
|
||||
if (roleType === 'Attendant') {
|
||||
list = userList.map(elem => { return { id: elem.id, nickName: elem.nickName, userRole: 'STATION_SUPERVISOR' }; });
|
||||
} else if (roleType === 'Repair') {
|
||||
list = userList.map(elem => { return { id: elem.id, nickName: elem.nickName, userRole: 'MAINTAINER'}; });
|
||||
} else {
|
||||
list = userList.map(elem => { return { id: elem.id, nickName: elem.nickName, userRole: roleType.toUpperCase() }; });
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user