代码调整
This commit is contained in:
parent
1776eae6d3
commit
a10ef8fa1b
@ -339,6 +339,7 @@ export default {
|
||||
{ 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' },
|
||||
|
@ -270,7 +270,7 @@ export default {
|
||||
getLoginInfo(getToken()).then(resp => {
|
||||
const deviceVO = resp.data.deviceVO;
|
||||
if (deviceVO) {
|
||||
const config = JSON.parse(deviceVO.config);
|
||||
const config = JSON.parse(deviceVO.config || {});
|
||||
if (config && config.roleCode) {
|
||||
const params = [{userId: res.id, memberId:config.roleCode}];
|
||||
assignUsersPlayRoles(params, group).then(() => {
|
||||
|
@ -87,7 +87,7 @@
|
||||
import { setDeviceConfig, getDeviceDetail } from '@/api/project';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
// getAllMapOnline, getStationListNeedAttendant, getPsdListByStandCode, getStandListByStationCode
|
||||
import {getPublishMapListOnline, querySimulationMemberByMapId } from '@/api/jmap/map';
|
||||
import {getPublishMapListOnline, querySimulationMemberByMapId, querySimulationStationsByMapId } from '@/api/jmap/map';
|
||||
import { getBackProjectConfigByCode } from '@/api/projectConfig';
|
||||
import { getMapFunctioById } from '@/api/trainingPlatform';
|
||||
|
||||
@ -127,12 +127,12 @@ export default {
|
||||
mapList: [],
|
||||
roleList:[],
|
||||
// stationCode: '',
|
||||
// stationList: [],
|
||||
stationList: [],
|
||||
// standList: [],
|
||||
// standCode: '',
|
||||
// psdList: [],
|
||||
jsonConfig: '',
|
||||
rulesLw: {
|
||||
rulesPis: {
|
||||
roleCode: [
|
||||
{ required: true, message: '请选择关联角色', trigger: 'change'}
|
||||
],
|
||||
@ -180,6 +180,7 @@ export default {
|
||||
doShow(row) {
|
||||
this.initData(row);
|
||||
// this.initForm(row);
|
||||
this.stationList = [];
|
||||
this.dialogVisible = true;
|
||||
this.data = row;
|
||||
if (['PIS_STAND', 'PIS_TRAIN'].includes(row.type)) {
|
||||
@ -229,7 +230,7 @@ export default {
|
||||
// this.formModel = {};
|
||||
this.data = {};
|
||||
this.mapList = [];
|
||||
// this.stationList = [];
|
||||
this.stationList = [];
|
||||
// this.standList = [];
|
||||
// this.psdList = [];
|
||||
this.mapId = '';
|
||||
@ -240,6 +241,13 @@ export default {
|
||||
},
|
||||
mapIdChange(mapId) {
|
||||
if (mapId) {
|
||||
querySimulationStationsByMapId(mapId).then(resp => {
|
||||
if (resp.data && resp.data.length) {
|
||||
this.stationList = resp.data;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message.error('获取车站列表失败');
|
||||
});
|
||||
querySimulationMemberByMapId(mapId).then(resp => {
|
||||
if (resp.data) {
|
||||
getBackProjectConfigByCode(this.data.project).then(res=>{
|
||||
@ -277,7 +285,7 @@ export default {
|
||||
// this.$message.error('获取车站列表失败');
|
||||
// });
|
||||
// }
|
||||
}
|
||||
},
|
||||
// stationCodeChange(stationCode) {
|
||||
// this.standList = [];
|
||||
// if (stationCode) {
|
||||
@ -302,6 +310,73 @@ export default {
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
handleMember(member, stationList) {
|
||||
const data = { value: member.id, label: '', memberType: member.type };
|
||||
const device = stationList.find(station => station.code === member.deviceCode) || {};
|
||||
switch (member.type) {
|
||||
case 'DISPATCHER':
|
||||
data.label = '行调' + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'STATION_SUPERVISOR':
|
||||
data.label = '行值-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'DRIVER':
|
||||
data.label = '司机-' + member.deviceCode;
|
||||
break;
|
||||
case 'MAINTAINER':
|
||||
data.label = '通号' + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'DEPOT_DISPATCHER':
|
||||
data.label = '调度-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'SIGNAL_BUILDING':
|
||||
data.label = '信号楼-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'STATION_ASSISTANT':
|
||||
data.label = '助理-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'STATION_MASTER':
|
||||
data.label = '站长-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'STATION_SIGNALER':
|
||||
data.label = '信号员-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'STATION_PASSENGER':
|
||||
data.label = '客运员-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'STATION_SWITCH_MAN':
|
||||
data.label = '扳道员-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'STATION_FACILITATOR':
|
||||
data.label = '引导员-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'STATION_WORKER':
|
||||
data.label = '工务工-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'DEVICE_MANAGER':
|
||||
data.label = '设备管理员-' + device.name + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'TRAIN_MASTER':
|
||||
data.label = '车务段段长' + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'ELECTRIC_DISPATCHER':
|
||||
data.label = '工电调度' + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'PARENT_DEPARTMENT':
|
||||
data.label = '上级部分' + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'SCHEDULING':
|
||||
data.label = '派班员' + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'SHIFT_MANAGER':
|
||||
data.label = '值班主任' + (member.name ? `-${member.name }` : '');
|
||||
break;
|
||||
case 'ENVIRONMENT_DISPATCHER':
|
||||
data.label = '环控调度' + (member.name ? `-${member.name}` : '');
|
||||
break;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user