代码调整

This commit is contained in:
joylink_cuiweidong 2022-07-26 10:41:08 +08:00
parent 07d515e9ce
commit 7cd2ecc2dc
6 changed files with 82 additions and 7 deletions

View File

@ -575,7 +575,7 @@ export default {
children: stationWorker children: stationWorker
}, },
{ {
label: '车站工务工', label: '设备管理员',
id: 'deviceManager', id: 'deviceManager',
type: 'role', type: 'role',
children: deviceManager children: deviceManager

View File

@ -15,7 +15,7 @@ export function covertMemberData (activeTrainList, resp) {
lastData = JSON.parse(lastData); lastData = JSON.parse(lastData);
const lastMemberList = []; const lastMemberList = [];
// const electricDispatcherList = []; // const electricDispatcherList = [];
const deviceListData = [[], [], [], [], [], [], [], []]; const deviceListData = [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []];
const driverList = []; const driverList = [];
lastData.forEach((member, index)=>{ lastData.forEach((member, index)=>{
if (member.userId && member.userId == store.state.user.id) { if (member.userId && member.userId == store.state.user.id) {
@ -37,7 +37,7 @@ export function covertMemberData (activeTrainList, resp) {
member.label = member.type + name + userName; member.label = member.type + name + userName;
member.normalName = member.type + name; member.normalName = member.type + name;
} }
const deviceType = ['行调', '通号', '行值', '司机', '车辆段信号楼', '上级部门', '电力调度', '停车场信号楼']; const deviceType = ['行调', '通号', '行值', '司机', '车辆段信号楼', '上级部门', '电力调度', '停车场信号楼', '车站助理', '车站站长', '车站信号员', '车站客运员', '车站扳道员', '车站引导员', '车站工务工', '设备管理员'];
const deviceTypeIndex = deviceType.indexOf(member.type); const deviceTypeIndex = deviceType.indexOf(member.type);
if (deviceTypeIndex >= 0) { if (deviceTypeIndex >= 0) {
if (deviceTypeIndex == 3) { if (deviceTypeIndex == 3) {

View File

@ -193,6 +193,39 @@ export default {
} }
case 'PARKING_LOT_SIGNAL_BUILDING': { case 'PARKING_LOT_SIGNAL_BUILDING': {
member.label = '停车场信号楼' + (member.name ? member.name : ''); member.label = '停车场信号楼' + (member.name ? member.name : '');
break;
}
case 'STATION_ASSISTANT': {
member.label = '车站助理' + (member.name ? member.name : '');
break;
}
case 'STATION_MASTER': {
member.label = '车站站长' + (member.name ? member.name : '');
break;
}
case 'STATION_SIGNALER': {
member.label = '车站信号员' + (member.name ? member.name : '');
break;
}
case 'STATION_PASSENGER': {
member.label = '车站客运员' + (member.name ? member.name : '');
break;
}
case 'STATION_SWITCH_MAN': {
member.label = '车站扳道员' + (member.name ? member.name : '');
break;
}
case 'STATION_FACILITATOR': {
member.label = '车站引导员' + (member.name ? member.name : '');
break;
}
case 'STATION_WORKER': {
member.label = '车站工务工' + (member.name ? member.name : '');
break;
}
case 'DEVICE_MANAGER': {
member.label = '设备管理员' + (member.name ? member.name : '');
break;
} }
} }
}); });

View File

@ -290,7 +290,7 @@ export default {
children: result.deviceListData[12] children: result.deviceListData[12]
}, },
{ {
label: '车站扳道员', label: '车站引导员',
id: 'stationFacilitator', id: 'stationFacilitator',
type: 'role', type: 'role',
children: result.deviceListData[13] children: result.deviceListData[13]

View File

@ -37,7 +37,7 @@ export function covertMemberData (activeTrainList, resp) {
member.label = member.type + name + userName; member.label = member.type + name + userName;
member.normalName = member.type + name; member.normalName = member.type + name;
} }
const deviceType = ['行调', '通号', '行值', '司机', '车辆段信号楼', '上级部门', '电力调度', '停车场信号楼', '车站助理', '车站站长', '车站信号员', '车站客运员', '车站扳道员', '车站引导员', '设备管理员']; const deviceType = ['行调', '通号', '行值', '司机', '车辆段信号楼', '上级部门', '电力调度', '停车场信号楼', '车站助理', '车站站长', '车站信号员', '车站客运员', '车站扳道员', '车站引导员', '车站工务工', '设备管理员'];
/** /**
* 车站助理 * 车站助理

View File

@ -332,7 +332,7 @@ export default {
const covertmember = this.covert(lastData, ConstConfig.ConstSelect.roleTypeNew); const covertmember = this.covert(lastData, ConstConfig.ConstSelect.roleTypeNew);
const newMember = covertmember[0]; const newMember = covertmember[0];
this.memberList.push(newMember); this.memberList.push(newMember);
const deviceTypeList = ['行调', '行值', '司机', '通号', '车辆段信号楼', '上级部门', '电力调度', '停车场信号楼']; const deviceTypeList = ['行调', '行值', '司机', '通号', '车辆段信号楼', '上级部门', '电力调度', '停车场信号楼', '车站助理', '车站站长', '车站信号员', '车站客运员', '车站扳道员', '车站引导员', '车站工务工', '设备管理员'];
const index = deviceTypeList.indexOf(newMember.type); const index = deviceTypeList.indexOf(newMember.type);
if (index >= 0) { if (index >= 0) {
const treeDataIn = this.treeData[index]; const treeDataIn = this.treeData[index];
@ -550,6 +550,39 @@ export default {
prdType = ''; prdType = '';
role.type = 'PARKING_LOT_SIGNAL_BUILDING'; role.type = 'PARKING_LOT_SIGNAL_BUILDING';
this.$store.dispatch('training/setRoles', 'PARKING_LOT_SIGNAL_BUILDING'); this.$store.dispatch('training/setRoles', 'PARKING_LOT_SIGNAL_BUILDING');
} else if (role.type == '车站助理') {
prdType = '';
role.type = 'STATION_ASSISTANT';
this.$store.dispatch('training/setRoles', 'STATION_ASSISTANT');
} else if (role.type == '车站站长') {
prdType = '';
role.type = 'STATION_MASTER';
this.$store.dispatch('training/setRoles', 'STATION_MASTER');
} else if (role.type == '车站信号员') {
prdType = '';
role.type = 'STATION_SIGNALER';
this.$store.dispatch('training/setRoles', 'STATION_SIGNALER');
} else if (role.type == '车站客运员') {
prdType = '';
role.type = 'STATION_PASSENGER';
this.$store.dispatch('training/setRoles', 'STATION_PASSENGER');
} else if (role.type == '车站扳道员') {
prdType = '';
role.type = 'STATION_SWITCH_MAN';
this.$store.dispatch('training/setRoles', 'STATION_SWITCH_MAN');
} else if (role.type == '车站引导员') {
prdType = '';
role.type = 'STATION_FACILITATOR';
this.$store.dispatch('training/setRoles', 'STATION_FACILITATOR');
} else if (role.type == '车站工务工') {
prdType = '';
role.type = 'STATION_WORKER';
this.$store.dispatch('training/setRoles', 'STATION_WORKER');
} else if (role.type == '设备管理员') {
prdType = '';
role.type = 'DEVICE_MANAGER';
this.$store.dispatch('training/setRoles', 'DEVICE_MANAGER');
} else { } else {
prdType = ''; prdType = '';
} }
@ -578,7 +611,16 @@ export default {
'DEPOT_DISPATCHER':'车辆段信号楼', 'DEPOT_DISPATCHER':'车辆段信号楼',
'PARENT_DEPARTMENT':'上级部门', 'PARENT_DEPARTMENT':'上级部门',
'ELECTRIC_DISPATCHER':'电力调度', 'ELECTRIC_DISPATCHER':'电力调度',
'PARKING_LOT_SIGNAL_BUILDING':'停车场信号楼' 'PARKING_LOT_SIGNAL_BUILDING':'停车场信号楼',
'STATION_ASSISTANT':'车站助理',
'STATION_MASTER':'车站站长',
'STATION_SIGNALER':'车站信号员',
'STATION_PASSENGER':'车站客运员',
'STATION_SWITCH_MAN':'车站扳道员',
'STATION_FACILITATOR':'车站引导员',
'STATION_WORKER':'车站工务工',
'DEVICE_MANAGER':'设备管理员'
}; };
newRole.type = roleTypeEnumMap[newRole.type]; newRole.type = roleTypeEnumMap[newRole.type];
this.quickChangeMember.list.push(newRole); this.quickChangeMember.list.push(newRole);