diff --git a/src/scripts/ConstConfig.js b/src/scripts/ConstConfig.js index fd7d47faa..97b050e6e 100644 --- a/src/scripts/ConstConfig.js +++ b/src/scripts/ConstConfig.js @@ -332,28 +332,132 @@ export default { {label: '长兴技校', value: 'RICHOR_CXJS'}, {label: '京津冀联盟', value: 'JJJLM'} ], - clientList: [ - { label: '中心ATS工作站', value: 'dispatchWork' }, - { label: '中心ATS大屏', value: 'bigScreen' }, - { label: '现地ATS工作站', value: 'localWork' }, - { label: 'ISCS', value: 'iscsView' }, - { label: 'IBP', value: 'ibp' }, - { label: 'PSL', value: 'psl' }, - { label: 'PIS', value: 'pis' }, - { label: '列车驾驶', value: 'drivingPlan' }, - { label: 'CCTV', value: 'cctvView' }, - { label: '设备视图', value: 'jl3dModle' }, - { label: '数字沙盘', value: 'digitalStand' }, - { label: '车务终端', value: 'trafficTerminal' }, - { label: '车务管理终端', value: 'trafficManageTerminal' }, - { label: '调度命令', value: 'dispatchingCommand' }, - { label: '调度计划', value: 'schedulingPlan' }, - { label: '大客流策略', value: 'largePassengerStrategy' }, - { label: '大客流视图', value: 'largePassengerView' }, - { label: '行调台', value: 'dispatcherManage' }, - { label: '派班工作站', value: 'scheduleWork' }, - { label: '应急调度', value: 'emergency' }, - { label: '联锁工作站', value: 'interlockWork' } - ] + clientMap:{ + 'RAILWAY':{ + 'DISPATCHER':[ + { label: '中心ATS工作站', value: 'dispatchWork' }, + { label: '行调台', value: 'dispatcherManage' }, + { label: '调度计划', value: 'schedulingPlan' }, + { label: '调度命令', value: 'dispatchingCommand' } + ], + 'STATION_SUPERVISOR':[ + { label: '现地ATS工作站', value: 'localWork' }, + { label: '车务管理终端', value: 'trafficManageTerminal' }, + { label: '车务终端', value: 'trafficTerminal' } + ], + 'DEPOT_DISPATCHER':[ + { label: '现地ATS工作站', value: 'localWork' } + ], + 'STATION_ASSISTANT':[ + { label: '现地ATS工作站', value: 'localWork' } + ], + 'STATION_MASTER':[ + { label: '现地ATS工作站', value: 'localWork' } + ], + 'STATION_SIGNALER':[ + { label: '现地ATS工作站', value: 'localWork' } + ], + 'STATION_PASSENGER':[ + { label: '现地ATS工作站', value: 'localWork' } + ], + 'STATION_SWITCH_MAN':[ + { label: '现地ATS工作站', value: 'localWork' } + ], + 'STATION_FACILITATOR':[ + { label: '现地ATS工作站', value: 'localWork' } + ], + 'STATION_WORKER':[ + { label: '现地ATS工作站', value: 'localWork' } + ], + 'DEVICE_MANAGER':[ + { label: '现地ATS工作站', value: 'localWork' } + ], + 'TRAIN_MASTER':[ + { label: '现地ATS工作站', value: 'localWork' } + ], + 'SIGNAL_BUILDING':[ + { label: '现地ATS工作站', value: 'localWork' } + ] + }, + 'METRO':{ + 'DISPATCHER':[ + { label: '中心ATS工作站', value: 'dispatchWork' }, + { label: 'ISCS', value: 'iscsView' }, + { label: '中心ATS大屏', value: 'bigScreen' }, + { label: 'CCTV', value: 'cctvView' }, + { label: '数字沙盘', value: 'digitalStand' }, + { label: '大客流策略', value: 'largePassengerStrategy' }, + { label: '大客流视图', value: 'largePassengerView' } + ], + 'STATION_SUPERVISOR':[ + { label: '现地ATS工作站', value: 'localWork' }, + { label: 'ISCS', value: 'iscsView' }, + { label: 'IBP', value: 'ibp' }, + { label: '数字沙盘', value: 'digitalStand' }, + { label: 'CCTV', value: 'cctvView' }, + { label: 'PSL', value: 'psl' } + ], + 'DRIVER':[ + { label: '列车驾驶', value: 'drivingPlan' } + ], + 'DEPOT_DISPATCHER':[ + { label: '派班工作站', value: 'scheduleWork' }, + { label: '现地ATS工作站', value: 'localWork' } + ], + 'STATION_ASSISTANT':[ + { label: '现地ATS工作站', value: 'localWork' } + ], + 'STATION_MASTER':[ + { label: '现地ATS工作站', value: 'localWork' } + ], + 'STATION_SIGNALER':[ + { label: '现地ATS工作站', value: 'localWork' } + ], + 'STATION_PASSENGER':[ + { label: '现地ATS工作站', value: 'localWork' } + ], + 'STATION_SWITCH_MAN':[ + { label: '现地ATS工作站', value: 'localWork' } + ], + 'STATION_FACILITATOR':[ + { label: '现地ATS工作站', value: 'localWork' } + ], + 'STATION_WORKER':[ + { label: '现地ATS工作站', value: 'localWork' } + ], + 'DEVICE_MANAGER':[ + { label: '现地ATS工作站', value: 'localWork' } + ], + 'TRAIN_MASTER':[ + { label: '现地ATS工作站', value: 'localWork' } + ], + 'SIGNAL_BUILDING':[ + { label: '现地ATS工作站', value: 'localWork' } + ] + } + } + // clientList: [ + // { label: '中心ATS工作站', value: 'dispatchWork' }, + // { label: '中心ATS大屏', value: 'bigScreen' }, + // { label: '现地ATS工作站', value: 'localWork' }, + // { label: 'ISCS', value: 'iscsView' }, + // { label: 'IBP', value: 'ibp' }, + // { label: 'PSL', value: 'psl' }, + // { label: 'PIS', value: 'pis' },------------ + // { label: '列车驾驶', value: 'drivingPlan' }, + // { label: 'CCTV', value: 'cctvView' }, + // { label: '数字沙盘', value: 'digitalStand' }, + // { label: '车务终端', value: 'trafficTerminal' }, + // { label: '车务管理终端', value: 'trafficManageTerminal' }, + // { label: '调度命令', value: 'dispatchingCommand' }, + // { label: '调度计划', value: 'schedulingPlan' }, + // { label: '行调台', value: 'dispatcherManage' }, + // { label: '大客流策略', value: 'largePassengerStrategy' }, + // { label: '大客流视图', value: 'largePassengerView' }, + + // { label: '设备视图', value: 'jl3dModle' }, + // { label: '应急调度', value: 'emergency' }, ------ + // { label: '联锁工作站', value: 'interlockWork' } ------ + // ] } }; diff --git a/src/views/system/deviceManage/editConfig.vue b/src/views/system/deviceManage/editConfig.vue index 25bbd11c9..8d9dd5b05 100644 --- a/src/views/system/deviceManage/editConfig.vue +++ b/src/views/system/deviceManage/editConfig.vue @@ -22,7 +22,7 @@ - + - + - + - + { @@ -402,12 +400,18 @@ export default { getMapFunctioById(functionId).then(response=>{ if (resp.data) { const roleList = resp.data[response.data.simType]; + const clientListMapIn = ConstConfig.ConstSelect.clientMap; + this.clientListMap = clientListMapIn[response.data.simType]; const covertRoleList = []; roleList.forEach(member => { const data = this.handleMember(member, this.stationList); covertRoleList.push(data); }); + this.clientList = []; this.roleList = covertRoleList; + const roleCode = this.formIbp.roleCode || this.formIm.roleCode || this.formLw.roleCode || this.formIscs.roleCode; + const role = this.roleList.find(each=>{ return each.value == roleCode; }); + this.clientList = this.clientListMap[role.memberType] || []; } }); } @@ -419,6 +423,26 @@ export default { this.stationList = []; } }, + changeRoleIBP(role) { + this.formIbp.client = ''; + this.changeRole(role); + }, + changeRoleIM(role) { + this.formIm.client = ''; + this.changeRole(role); + }, + changeRoleLW(role) { + this.formLw.client = ''; + this.changeRole(role); + }, + changeRoleIscs(role) { + this.formIscs.client = ''; + this.changeRole(role); + }, + changeRole(role) { + const roleMember = this.roleList.find(each=>{ return each.value == role; }); + this.clientList = this.clientListMap[roleMember.memberType] || []; + }, handleMember(member, stationList) { const data = { value: member.id, label: '', memberType: member.type }; const device = stationList.find(station => station.code === member.deviceCode) || {};