项目设备管理 代码调整

This commit is contained in:
joylink_cuiweidong 2022-12-28 16:04:12 +08:00
parent 36fddc3a12
commit e28fc6665e
2 changed files with 159 additions and 31 deletions

View File

@ -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' } ------
// ]
}
};

View File

@ -22,7 +22,7 @@
</el-select>
</el-form-item>
<el-form-item label="关联角色:" prop="roleCode">
<el-select v-model="formIbp.roleCode" placeholder="请选择" size="small">
<el-select v-model="formIbp.roleCode" placeholder="请选择" size="small" @change="changeRoleIBP">
<el-option
v-for="item in roleList"
:key="item.value"
@ -44,7 +44,7 @@
</el-form>
<el-form v-show="['IM','CW','DRIVE','DEPOT'].includes(data.type)" ref="formIm" :model="formIm" label-width="100px" :rules="rulesIm">
<el-form-item label="关联角色:" prop="roleCode">
<el-select v-model="formIm.roleCode" placeholder="请选择" size="small">
<el-select v-model="formIm.roleCode" placeholder="请选择" size="small" @change="changeRoleIM">
<el-option
v-for="item in roleList"
:key="item.value"
@ -76,7 +76,7 @@
</el-select>
</el-form-item>
<el-form-item label="关联角色:" prop="roleCode">
<el-select v-model="formLw.roleCode" placeholder="请选择" size="small">
<el-select v-model="formLw.roleCode" placeholder="请选择" size="small" @change="changeRoleLW">
<el-option
v-for="item in roleList"
:key="item.value"
@ -128,7 +128,7 @@
</el-select>
</el-form-item>
<el-form-item label="关联角色:" prop="roleCode">
<el-select v-model="formIscs.roleCode" placeholder="请选择" size="small">
<el-select v-model="formIscs.roleCode" placeholder="请选择" size="small" @change="changeRoleIscs">
<el-option
v-for="item in roleList"
:key="item.value"
@ -167,7 +167,7 @@ export default {
return {
dialogVisible: false,
data: {},
mapList: [],
clientListMap:{},
roleList:[],
lwList: [],
formIm:{
@ -192,7 +192,7 @@ export default {
roleCode:'',
client:''
},
clientList: ConstConfig.ConstSelect.clientList,
clientList: [],
pictureList: [
{ label: '广播系统', value: 'paMain' },
{ label: '乘客信息', value: 'pidsMain' }
@ -276,9 +276,7 @@ export default {
},
doShow(row) {
this.initData(row);
this.data = row;
this.mapList = [];
this.stationList = [];
if (['VR_IBP', 'ISCS_LW'].includes(this.data.type)) {
getDevicesByType(row.project, 'LW').then(res => {
@ -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) || {};