This commit is contained in:
fan 2022-09-20 17:21:01 +08:00
parent 91c04e97b1
commit 198c8fb170
2 changed files with 63 additions and 15 deletions

View File

@ -202,6 +202,9 @@ const training = {
memberList.forEach(item => {
state.memberData[item.id] = deepAssign({userId: ''}, item);
state.memberData[item.id].disabled = userId == item.userId;
if (userId == item.userId) {
state.roles = item.type;
}
});
}
},

View File

@ -20,15 +20,23 @@ export default {
return {
terminalList:[],
active:0,
commonTerminal: [
{
name: '现地工作站',
code: 'localWork',
roleList: ['STATION_SUPERVISOR', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER', 'STATION_PASSENGER',
'STATION_SWITCH_MAN', 'STATION_FACILITATOR', 'STATION_WORKER', 'DEVICE_MANAGER', 'TRAIN_MASTER'],
click: this.noEvent
},
{
name: '行调工作站',
code: 'dispatchWork',
roleList: ['DISPATCHER'],
click: this.noEvent
}
],
terminalMap:{
'datie': [
{
name: '现地工作站',
code: 'localWork',
roleList: ['STATION_SUPERVISOR', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER', 'STATION_PASSENGER',
'STATION_SWITCH_MAN', 'STATION_FACILITATOR', 'STATION_WORKER', 'DEVICE_MANAGER', 'TRAIN_MASTER'],
click: this.noEvent
},
{
name: '车务终端',
code: 'trafficTerminal',
@ -41,12 +49,7 @@ export default {
roleList: ['STATION_SUPERVISOR'],
click: this.noEvent
},
{
name: '行调工作站',
code: 'dispatchWork',
roleList: ['DISPATCHER'],
click: this.noEvent
},
{
name: '调度计划',
code: 'schedulingPlan',
@ -73,6 +76,48 @@ export default {
code: 'dispatchWork',
roleList: ['DISPATCHER'],
click: this.noEvent
},
{
name: 'cctv视图',
code: 'cctvView',
roleList: ['STATION_SUPERVISOR'],
click: this.noEvent
},
{
name: '设备视图',
code: 'jl3dModle',
roleList: ['STATION_SUPERVISOR'],
click: this.noEvent
},
{
name: '故障设备',
code: 'jlmap3dFault',
roleList: ['STATION_SUPERVISOR'],
click: this.noEvent
},
{
name: '司机视角',
code: 'drivingPlan',
roleList: ['DRIVER'],
click: this.noEvent
},
{
name: 'IBP盘',
code: 'ibp',
roleList: ['STATION_SUPERVISOR'],
click: this.noEvent
},
{
name: '数字沙盘',
code: 'digitalStand',
roleList: ['STATION_SUPERVISOR'],
click: this.noEvent
},
{ // {label:'', name:'messageBoard', click:this.messageBoard, isShow:false},
name: '留言板',
code: 'messageBoard',
roleList: [''],
click: this.noEvent
}
]
}
@ -99,7 +144,7 @@ export default {
}
},
watch: {
'store.state.training.roles': function (val) {
'$store.state.training.roles': function (val) {
this.initTerminalList();
}
},
@ -114,7 +159,7 @@ export default {
} else {
currentType = 'subway';
}
console.log(this.roles, '------init');
console.log(this.roles, this.$store.state.training.roles, '------init');
this.terminalMap[currentType].forEach(item => {
if (item.roleList.includes(this.roles)) {
this.terminalList.push(item);