Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
6fd27205fa
@ -77,29 +77,29 @@ export default {
|
||||
{ label: '车务段段长', value: 'TRAIN_MASTER', enLabel: 'Train_Master' }
|
||||
],
|
||||
roleTypeList: [
|
||||
{label: '行调', value: 'DISPATCHER'},
|
||||
{label: 'NCC调度', value: 'NCC_DISPATCHER'},
|
||||
{label: '信息调度', value: 'OCC_DISPATCHER'},
|
||||
{label: '行值', value: 'STATION_SUPERVISOR'},
|
||||
{label: '司机', value: 'DRIVER'},
|
||||
{label: '通号', value: 'MAINTAINER'},
|
||||
{label: '车辆段/停车场调度', value: 'DEPOT_DISPATCHER'},
|
||||
{label: '车辆段/停车场信号楼', value: 'SIGNAL_BUILDING'},
|
||||
{label: '车站助理', value: 'STATION_ASSISTANT'},
|
||||
{label: '车站站长', value: 'STATION_MASTER'},
|
||||
{label: '车站信号员', value: 'STATION_SIGNALER'},
|
||||
{label: '车站客运员', value: 'STATION_PASSENGER'},
|
||||
{label: '车站扳道员', value: 'STATION_SWITCH_MAN'},
|
||||
{label: '车站引导员', value: 'STATION_FACILITATOR'},
|
||||
{label: '车站工务工', value: 'STATION_WORKER'},
|
||||
{label: '车务段段长', value: 'TRAIN_MASTER'},
|
||||
{label: '工电调度', value: 'ELECTRIC_DISPATCHER'},
|
||||
{ label: '电力工务', value: 'STATION_ELECTRIC_WORKER'},
|
||||
{label: '上级部分', value: 'PARENT_DEPARTMENT'},
|
||||
{label: '派班员', value: 'SCHEDULING'},
|
||||
{label: '设备管理员', value: 'DEVICE_MANAGER'},
|
||||
{label: '值班主任', value: 'SHIFT_MANAGER'},
|
||||
{label: '环控调度', value: 'ENVIRONMENT_DISPATCHER'}
|
||||
{label: 'NCC调度', value: 'NCC_DISPATCHER', simTypeList: ['METRO', 'RAILWAY', 'EMERGENCY']},
|
||||
{label: '信息调度', value: 'OCC_DISPATCHER', simTypeList: ['METRO', 'RAILWAY', 'EMERGENCY']},
|
||||
{label: '行调', value: 'DISPATCHER', simTypeList: ['METRO', 'RAILWAY', 'EMERGENCY']},
|
||||
{label: '行值', value: 'STATION_SUPERVISOR', simTypeList: ['METRO', 'RAILWAY', 'EMERGENCY']},
|
||||
{label: '司机', value: 'DRIVER', simTypeList: ['METRO', 'RAILWAY', 'EMERGENCY']},
|
||||
{label: '通号', value: 'MAINTAINER', simTypeList: ['METRO', 'RAILWAY', 'EMERGENCY']},
|
||||
{label: '车辆段/停车场调度', value: 'DEPOT_DISPATCHER', simTypeList: ['METRO']},
|
||||
{label: '车辆段/停车场信号楼', value: 'SIGNAL_BUILDING', simTypeList: ['METRO']},
|
||||
{label: '车站助理', value: 'STATION_ASSISTANT', simTypeList: ['RAILWAY']},
|
||||
{label: '车站站长', value: 'STATION_MASTER', simTypeList: ['RAILWAY']},
|
||||
{label: '车站信号员', value: 'STATION_SIGNALER', simTypeList: ['RAILWAY']},
|
||||
{label: '车站客运员', value: 'STATION_PASSENGER', simTypeList: ['RAILWAY']},
|
||||
{label: '车站扳道员', value: 'STATION_SWITCH_MAN', simTypeList: ['RAILWAY']},
|
||||
{label: '车站引导员', value: 'STATION_FACILITATOR', simTypeList: ['RAILWAY']},
|
||||
{label: '车站工务工', value: 'STATION_WORKER', simTypeList: ['RAILWAY']},
|
||||
{label: '车务段段长', value: 'TRAIN_MASTER', simTypeList: ['METRO']},
|
||||
{label: '工电调度', value: 'ELECTRIC_DISPATCHER', simTypeList: ['METRO']},
|
||||
{label: '电力工务', value: 'STATION_ELECTRIC_WORKER', simTypeList: ['METRO']},
|
||||
{label: '上级部分', value: 'PARENT_DEPARTMENT', simTypeList: ['METRO']},
|
||||
{label: '派班员', value: 'SCHEDULING', simTypeList: ['METRO']},
|
||||
{label: '设备管理员', value: 'DEVICE_MANAGER', simTypeList: ['RAILWAY']},
|
||||
{label: '值班主任', value: 'SHIFT_MANAGER', simTypeList: ['METRO']},
|
||||
{label: '环控调度', value: 'ENVIRONMENT_DISPATCHER', simTypeList: ['METRO']}
|
||||
],
|
||||
releaseReview: [
|
||||
{ enlabel: 'Unpublished', label: '未发布', value: '0' },
|
||||
|
@ -49,7 +49,8 @@ const training = {
|
||||
domConfig: {}, // 线路功能前端配置项
|
||||
simulationUserType: '', // 仿真用户角色
|
||||
simulationCreator: false,
|
||||
chatBoxMin: true // 聊天框最小化
|
||||
chatBoxMin: true, // 聊天框最小化
|
||||
memberTreeData: [] // 仿真成员树数据
|
||||
},
|
||||
|
||||
getters: {
|
||||
@ -201,6 +202,7 @@ const training = {
|
||||
state.memberList = memberList;
|
||||
state.memberData = {};
|
||||
if (memberList && memberList.length) {
|
||||
let hasUserId = false;
|
||||
memberList.forEach(item => {
|
||||
state.memberData[item.id] = deepAssign({userId: ''}, item);
|
||||
state.memberData[item.id].disabled = userId == item.userId;
|
||||
@ -208,8 +210,14 @@ const training = {
|
||||
state.roles = item.type;
|
||||
state.roleDeviceCode = item.deviceCode;
|
||||
state.myMemberId = item.id;
|
||||
hasUserId = true;
|
||||
}
|
||||
});
|
||||
if (!hasUserId) {
|
||||
state.roles = '';
|
||||
state.roleDeviceCode = '';
|
||||
state.myMemberId = '';
|
||||
}
|
||||
}
|
||||
},
|
||||
setSimulationUserList: (state, simulationUserList) => {
|
||||
@ -324,6 +332,9 @@ const training = {
|
||||
},
|
||||
setChatBoxMin: (state, chatBoxMin) => {
|
||||
state.chatBoxMin = chatBoxMin;
|
||||
},
|
||||
setMemberTreeData: (state, memberTreeData) => {
|
||||
state.memberTreeData = memberTreeData;
|
||||
}
|
||||
},
|
||||
|
||||
@ -660,6 +671,9 @@ const training = {
|
||||
},
|
||||
setChatBoxMin: ({ commit }, chatBoxMin) => {
|
||||
commit('setChatBoxMin', chatBoxMin);
|
||||
},
|
||||
setMemberTreeData: ({ commit }, memberTreeData) => {
|
||||
commit('setMemberTreeData', memberTreeData);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -152,13 +152,13 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
alarmDetailMessage(newValue, oldValue) {
|
||||
if (newValue.length > 0) {
|
||||
if (newValue.length > 0 && newValue[0].handleMethod === 'NCC') {
|
||||
const clone = JSON.parse(JSON.stringify(this.alarmDetailMessage));
|
||||
this.alarmDetailMessageList.unshift(...clone);
|
||||
this.alarmDetailMessageList.forEach((item, i)=>{
|
||||
this.$set(item, 'show', true);
|
||||
});
|
||||
if (newValue[0].handleMethod === 'NCC' && this.$store.getters['map/getDeviceByCode'](this.alarmDetailMessageList[0].deviceCode) !== undefined) {
|
||||
if (this.$store.getters['map/getDeviceByCode'](this.alarmDetailMessageList[0].deviceCode) !== undefined) {
|
||||
this.showAlarmPlayAlarmMusic();
|
||||
}
|
||||
}
|
||||
|
@ -43,6 +43,7 @@
|
||||
|
||||
<script>
|
||||
import { addSimulationMember } from '@/api/jointSimulation';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
export default {
|
||||
name: 'AddMember',
|
||||
props: {
|
||||
@ -78,28 +79,30 @@ export default {
|
||||
'STATION_FACILITATOR',
|
||||
'STATION_WORKER',
|
||||
'DEVICE_MANAGER'
|
||||
],
|
||||
typeList: [
|
||||
{label: 'NCC调度', value: 'NCC_DISPATCHER'},
|
||||
{label: '信息调度', value: 'OCC_DISPATCHER'},
|
||||
{label: '行调', value: 'DISPATCHER'},
|
||||
{label: '通号', value: 'MAINTAINER'},
|
||||
{label: '车站值班员', value: 'STATION_SUPERVISOR'},
|
||||
{label: '车站助理', value: 'STATION_ASSISTANT'},
|
||||
{label: '车站站长', value: 'STATION_MASTER'},
|
||||
{label: '车站信号员', value: 'STATION_SIGNALER'},
|
||||
{label: '车站客运员', value: 'STATION_PASSENGER'},
|
||||
{label: '车站扳道员', value: 'STATION_SWITCH_MAN'},
|
||||
{label: '车站引导员', value: 'STATION_FACILITATOR'},
|
||||
{label: '车站工务工', value: 'STATION_WORKER'},
|
||||
{label: '设备管理员', value: 'DEVICE_MANAGER'},
|
||||
{label: '车务段段长', value: 'TRAIN_MASTER'}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '添加仿真角色成员';
|
||||
},
|
||||
simType() {
|
||||
return this.$route.query.simType || 'METRO';
|
||||
},
|
||||
typeList() {
|
||||
const list = [];
|
||||
ConstConfig.ConstSelect.roleTypeList.forEach(item => {
|
||||
if (item.simTypeList.includes(this.simType)) {
|
||||
const obj = {
|
||||
...item
|
||||
};
|
||||
if (item.value == 'STATION_SUPERVISOR' && this.simType == 'RAILWAY') {
|
||||
obj.label = '车站值班员';
|
||||
}
|
||||
list.push(obj);
|
||||
}
|
||||
});
|
||||
return list;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -9,7 +9,7 @@
|
||||
>
|
||||
<div class="room">
|
||||
<div class="room__container">
|
||||
<div style="width: 70%;height: calc(100% - 20px);">
|
||||
<div style="width: 70%;height: 100%;">
|
||||
<div style="margin-left: 10px;margin-right: 10px;">
|
||||
<el-input v-model="queryMember" placeholder="请输入搜索人员">
|
||||
<el-button slot="append" icon="el-icon-search" />
|
||||
@ -21,7 +21,7 @@
|
||||
:data="treeData"
|
||||
:props="defaultProps"
|
||||
default-expand-all
|
||||
style="margin: 10px;margin-bottom: 0;border: 1px solid #ccc;overflow-y: auto;height: calc(100% - 120px);"
|
||||
style="margin: 10px;margin-bottom: 0;border: 1px solid #ccc;overflow-y: auto;height: calc(100% - 50px);"
|
||||
:filter-node-method="filterNode"
|
||||
>
|
||||
<span :id="data.id" slot-scope="{ data }" class="custom-tree-node">
|
||||
@ -58,6 +58,7 @@ import eMembers from './e-members';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import { assignUsersPlayRoles } from '@/api/jointSimulation';
|
||||
import AddMember from './addMember';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
export default {
|
||||
name: 'MembersManage',
|
||||
components: {
|
||||
@ -159,6 +160,9 @@ export default {
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
},
|
||||
simType() {
|
||||
return this.$route.query.simType || 'METRO';
|
||||
},
|
||||
userId() {
|
||||
return this.$store.state.user ? this.$store.state.user.id : '';
|
||||
},
|
||||
@ -198,6 +202,12 @@ export default {
|
||||
const deviceManagerList = [];
|
||||
const trainMasterList = [];
|
||||
const stationElectricWorkerList = [];
|
||||
const signalBuildingList = [];
|
||||
const shiftManagerList = [];
|
||||
const environmentDispatherList = [];
|
||||
const parentDepartmentList = [];
|
||||
const schedulingList = [];
|
||||
const t = this.simType == 'METRO' ? '行值-' : '值班员-';
|
||||
val.forEach(item => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
|
||||
switch (item.type) {
|
||||
@ -214,15 +224,19 @@ export default {
|
||||
dispatcherList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'ELECTRIC_DISPATCHER':
|
||||
this.memberData[item.id].labelName = '电力调度' + (item.name || '');
|
||||
this.memberData[item.id].labelName = '工电调度' + (item.name || '');
|
||||
electricDispatcherList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'DEPOT_DISPATCHER':
|
||||
this.memberData[item.id].labelName = '信号楼-' + device.name + (item.name || '');
|
||||
this.memberData[item.id].labelName = '车辆段调度-' + device.name + (item.name || '');
|
||||
depotDispatcherList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'SIGNAL_BUILDING':
|
||||
this.memberData[item.id].labelName = '信号楼-' + device.name + (item.name || '');
|
||||
signalBuildingList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'STATION_SUPERVISOR':
|
||||
this.memberData[item.id].labelName = '值班员-' + device.name + (item.name ? `-${item.name }` : '');
|
||||
this.memberData[item.id].labelName = t + device.name + (item.name ? `-${item.name }` : '');
|
||||
stationSupervisorList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'DRIVER':
|
||||
@ -270,107 +284,176 @@ export default {
|
||||
deviceManagerList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'TRAIN_MASTER':
|
||||
// device.name;
|
||||
this.memberData[item.id].labelName = '车务段段长-' + (item.name ? `-${item.name }` : '');
|
||||
trainMasterList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'SHIFT_MANAGER':
|
||||
this.memberData[item.id].labelName = '值班主任-' + (item.name ? `-${item.name }` : '');
|
||||
shiftManagerList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'ENVIRONMENT_DISPATCHER':
|
||||
this.memberData[item.id].labelName = '环控调度-' + (item.name ? `-${item.name }` : '');
|
||||
environmentDispatherList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'PARENT_DEPARTMENT':
|
||||
this.memberData[item.id].labelName = '上级部门' + (item.name ? `-${item.name }` : '');
|
||||
parentDepartmentList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'SCHEDULING':
|
||||
this.memberData[item.id].labelName = '派班员' + (item.name ? `-${item.name }` : '');
|
||||
schedulingList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'STATION_ELECTRIC_WORKER':
|
||||
this.memberData[item.id].labelName = '电力工务' + (item.name || '');
|
||||
stationElectricWorkerList.push(this.memberData[item.id]);
|
||||
break;
|
||||
// DEVICE_MANAGER:'设备管理员' deviceManager
|
||||
}
|
||||
});
|
||||
this.treeData = [{
|
||||
labelName: 'NCC调度',
|
||||
id: 'nccDispatcher',
|
||||
memberType: 'NCC_DISPATCHER',
|
||||
children: nccDispatcherList
|
||||
}, {
|
||||
labelName: '信息调度',
|
||||
id: 'occDispatcher',
|
||||
memberType: 'OCC_DISPATCHER',
|
||||
children: occDispatcherList
|
||||
}, {
|
||||
labelName: '行调',
|
||||
id: 'dispatcher',
|
||||
memberType: 'DISPATCHER',
|
||||
children: dispatcherList
|
||||
}, {
|
||||
labelName: '车站值班员',
|
||||
labelName: this.simType == 'METRO' ? '行值' : '车站值班员',
|
||||
id: 'stationSupervisor',
|
||||
memberType: 'STATION_SUPERVISOR',
|
||||
children: stationSupervisorList
|
||||
}, {
|
||||
labelName: '司机',
|
||||
id: 'driver',
|
||||
memberType: 'DRIVER',
|
||||
children: driverList
|
||||
}, {
|
||||
labelName: '通号',
|
||||
id: 'maintainer',
|
||||
memberType: 'MAINTAINER',
|
||||
children: maintainerList
|
||||
}, {
|
||||
labelName: '车辆段信号楼',
|
||||
labelName: '车辆段调度',
|
||||
id: 'depotDispatcher',
|
||||
memberType: 'DEPOT_DISPATCHER',
|
||||
children: depotDispatcherList
|
||||
}, {
|
||||
labelName: '电力调度',
|
||||
labelName: '车辆段信号楼',
|
||||
id: 'signalBuilding',
|
||||
memberType: 'SIGNAL_BUILDING',
|
||||
children: signalBuildingList
|
||||
}, {
|
||||
labelName: '工电调度',
|
||||
id: 'electricDispatcher',
|
||||
memberType: 'ELECTRIC_DISPATCHER',
|
||||
children: electricDispatcherList
|
||||
}, {
|
||||
labelName: 'CTC操作员',
|
||||
id: 'ctcOperator',
|
||||
memberType: 'RAIL_CTC',
|
||||
children: ctcOperatorList
|
||||
}, {
|
||||
labelName: '车站助理',
|
||||
id: 'stationAssistant',
|
||||
memberType: 'STATION_ASSISTANT',
|
||||
children: stationAssistantList
|
||||
},
|
||||
{
|
||||
labelName: '车站站长',
|
||||
id: 'stationMaster',
|
||||
memberType: 'STATION_MASTER',
|
||||
children: stationMasterList
|
||||
},
|
||||
{
|
||||
labelName: '车站信号员',
|
||||
id: 'stationSignaler',
|
||||
memberType: 'STATION_SIGNALER',
|
||||
children: stationSignalerList
|
||||
},
|
||||
{
|
||||
labelName: '车站客运员',
|
||||
id: 'stationPassenger',
|
||||
memberType: 'STATION_PASSENGER',
|
||||
children: stationPassengerList
|
||||
},
|
||||
{
|
||||
labelName: '车站扳道员',
|
||||
id: 'stationSwitchMan',
|
||||
memberType: 'STATION_SWITCH_MAN',
|
||||
children: stationSwitchManList
|
||||
},
|
||||
{
|
||||
labelName: '车站引导员',
|
||||
id: 'stationFacilitator',
|
||||
memberType: 'STATION_FACILITATOR',
|
||||
children: stationFacilitatorList
|
||||
},
|
||||
{
|
||||
labelName: '车站工务工',
|
||||
id: 'stationWorker',
|
||||
memberType: 'STATION_WORKER',
|
||||
children: stationWorkerList
|
||||
},
|
||||
{
|
||||
labelName: '设备管理员',
|
||||
id: 'deviceManager',
|
||||
memberType: 'DEVICE_MANAGER',
|
||||
children: deviceManagerList
|
||||
},
|
||||
{
|
||||
labelName: '车务段段长 ',
|
||||
id: 'trainMaster',
|
||||
memberType: 'TRAIN_MASTER',
|
||||
children: trainMasterList
|
||||
},
|
||||
{
|
||||
labelName: '值班主任 ',
|
||||
id: 'shiftManager',
|
||||
memberType: 'SHIFT_MANAGER',
|
||||
children: shiftManagerList
|
||||
},
|
||||
{
|
||||
labelName: '环控调度 ',
|
||||
id: 'environmentDispather',
|
||||
memberType: 'ENVIRONMENT_DISPATCHER',
|
||||
children: environmentDispatherList
|
||||
},
|
||||
{
|
||||
labelName: '电力工务 ',
|
||||
id: 'stationElectricWorker',
|
||||
memberType: 'STATION_ELECTRIC_WORKER',
|
||||
children: stationElectricWorkerList
|
||||
},
|
||||
{
|
||||
labelName: '上级部门 ',
|
||||
id: 'parentDepartment',
|
||||
memberType: 'PARENT_DEPARTMENT',
|
||||
children: parentDepartmentList
|
||||
},
|
||||
{
|
||||
labelName: '派班员 ',
|
||||
id: 'scheduling',
|
||||
memberType: 'SCHEDULING',
|
||||
children: schedulingList
|
||||
}
|
||||
];
|
||||
const sType = [];
|
||||
ConstConfig.ConstSelect.roleTypeList.forEach(ii => {
|
||||
if (ii.simTypeList.includes(this.simType)) {
|
||||
sType.push(ii.value);
|
||||
}
|
||||
});
|
||||
this.treeData = this.treeData.filter(ii => {
|
||||
return sType.includes(ii.memberType);
|
||||
});
|
||||
this.$store.dispatch('training/setMemberTreeData', this.treeData);
|
||||
EventBus.$emit('trainTicketMember', [...stationSupervisorList, ...stationAssistantList]);
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.tree) {
|
||||
@ -488,7 +571,7 @@ export default {
|
||||
background: #f0f0f0;
|
||||
|
||||
&__container {
|
||||
height: 100%;
|
||||
height: calc(100% - 20px);
|
||||
display: flex;
|
||||
flex-grow: 1;
|
||||
padding: 10px;
|
||||
|
@ -111,7 +111,6 @@ export default {
|
||||
groupList: [],
|
||||
id: 0, // 当前的群组id
|
||||
privateChatId: '', // 私聊角色id
|
||||
memberTreeData: [],
|
||||
menu: [] // 右键菜单
|
||||
};
|
||||
},
|
||||
@ -162,12 +161,16 @@ export default {
|
||||
}
|
||||
}
|
||||
return name;
|
||||
},
|
||||
memberTreeData() {
|
||||
return this.$store.state.training.memberTreeData;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.socket.simulationReset': function (val) { // 仿真重置
|
||||
if (val) {
|
||||
this.initGroupList();
|
||||
this.getGroupList();
|
||||
}
|
||||
},
|
||||
'$store.state.socket.conversationGroup.MESSAGE': function(val) {
|
||||
@ -241,6 +244,17 @@ export default {
|
||||
totalUnread() {
|
||||
this.$emit('setTotalUnread', this.totalUnread);
|
||||
},
|
||||
dialogVisible() {
|
||||
if (this.dialogVisible && this.id) {
|
||||
const index = this.groupList.findIndex(item => {
|
||||
return item.id == this.id;
|
||||
});
|
||||
if (index > -1 && this.getBadge(this.groupList[index].messageList)) {
|
||||
this.setReadGroup();
|
||||
this.scrollTop(index);
|
||||
}
|
||||
}
|
||||
},
|
||||
myMemberId: {
|
||||
handler(val) {
|
||||
this.initGroupList();
|
||||
@ -249,15 +263,11 @@ export default {
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
},
|
||||
memberList () {
|
||||
this.getTreeData();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
created() {
|
||||
this.getTreeData();
|
||||
this.getBaseInfo();
|
||||
},
|
||||
beforeDestroy() {
|
||||
@ -399,206 +409,6 @@ export default {
|
||||
this.$store.dispatch('socket/resetConversationGroup');
|
||||
this.groupList = [];
|
||||
},
|
||||
getTreeData() {
|
||||
const val = this.memberList;
|
||||
if (val && val.length) {
|
||||
const dispatcherList = [];
|
||||
const nccDispatcherList = [];
|
||||
const occDispatcherList = [];
|
||||
const electricDispatcherList = [];
|
||||
const depotDispatcherList = [];
|
||||
const stationSupervisorList = [];
|
||||
const driverList = [];
|
||||
const maintainerList = [];
|
||||
const ctcOperatorList = [];
|
||||
const stationAssistantList = [];
|
||||
const stationMasterList = [];
|
||||
const stationSignalerList = [];
|
||||
const stationPassengerList = [];
|
||||
const stationSwitchManList = [];
|
||||
const stationFacilitatorList = [];
|
||||
const stationWorkerList = [];
|
||||
const deviceManagerList = [];
|
||||
const trainMasterList = [];
|
||||
const stationElectricWorkerList = [];
|
||||
val.forEach(item => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
|
||||
switch (item.type) {
|
||||
case 'NCC_DISPATCHER':
|
||||
this.memberData[item.id].labelName = 'NCC调度' + (item.name || '');
|
||||
nccDispatcherList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'OCC_DISPATCHER':
|
||||
this.memberData[item.id].labelName = item.name || '';
|
||||
occDispatcherList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'DISPATCHER':
|
||||
this.memberData[item.id].labelName = '行调' + (item.name || '');
|
||||
dispatcherList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'ELECTRIC_DISPATCHER':
|
||||
this.memberData[item.id].labelName = '电力调度' + (item.name || '');
|
||||
electricDispatcherList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'DEPOT_DISPATCHER':
|
||||
this.memberData[item.id].labelName = '信号楼-' + `${ device ? device.name : '' }` + (item.name || '');
|
||||
depotDispatcherList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'STATION_SUPERVISOR':
|
||||
this.memberData[item.id].labelName = '值班员-' + `${ device ? device.name : '' }` + (item.name ? `-${item.name }` : '');
|
||||
stationSupervisorList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'DRIVER':
|
||||
this.memberData[item.id].labelName = '司机-列车' + item.deviceCode;
|
||||
driverList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'MAINTAINER':
|
||||
this.memberData[item.id].labelName = '通号' + (item.name || '');
|
||||
maintainerList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'RAIL_CTC':
|
||||
this.memberData[item.id].labelName = 'CTC操作员' + `${ device ? device.name : '' }`;
|
||||
ctcOperatorList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'STATION_ASSISTANT':
|
||||
this.memberData[item.id].labelName = '车站助理-' + `${ device ? device.name : '' }` + (item.name ? `-${item.name }` : '');
|
||||
stationAssistantList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'STATION_MASTER':
|
||||
this.memberData[item.id].labelName = '车站站长-' + `${ device ? device.name : '' }` + (item.name ? `-${item.name }` : '');
|
||||
stationMasterList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'STATION_SIGNALER':
|
||||
this.memberData[item.id].labelName = '车站信号员-' + `${ device ? device.name : '' }` + (item.name ? `-${item.name }` : '');
|
||||
stationSignalerList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'STATION_PASSENGER':
|
||||
this.memberData[item.id].labelName = '车站客运员-' + `${ device ? device.name : '' }` + (item.name ? `-${item.name }` : '');
|
||||
stationPassengerList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'STATION_SWITCH_MAN':
|
||||
this.memberData[item.id].labelName = '车站扳道员-' + `${ device ? device.name : '' }` + (item.name ? `-${item.name }` : '');
|
||||
stationSwitchManList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'STATION_FACILITATOR':
|
||||
this.memberData[item.id].labelName = '车站引导员-' + `${ device ? device.name : '' }` + (item.name ? `-${item.name }` : '');
|
||||
stationFacilitatorList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'STATION_WORKER':
|
||||
this.memberData[item.id].labelName = '车站工务工-' + `${ device ? device.name : '' }` + (item.name ? `-${item.name }` : '');
|
||||
stationWorkerList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'DEVICE_MANAGER':
|
||||
this.memberData[item.id].labelName = '设备管理员-' + `${ device ? device.name : '' }` + (item.name ? `-${item.name }` : '');
|
||||
deviceManagerList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'TRAIN_MASTER':
|
||||
this.memberData[item.id].labelName = '车务段段长-' + (item.name ? `-${item.name }` : '');
|
||||
trainMasterList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'PARENT_DEPARTMENT':
|
||||
this.memberData[item.id].labelName = '上级部门' + (item.name ? `-${item.name }` : '');
|
||||
break;
|
||||
case 'STATION_ELECTRIC_WORKER':
|
||||
this.memberData[item.id].labelName = '电力工务' + (item.name || '');
|
||||
stationElectricWorkerList.push(this.memberData[item.id]);
|
||||
break;
|
||||
}
|
||||
});
|
||||
this.memberTreeData = [{
|
||||
labelName: 'NCC调度',
|
||||
id: 'nccDispatcher',
|
||||
children: nccDispatcherList
|
||||
}, {
|
||||
labelName: '信息调度',
|
||||
id: 'occDispatcher',
|
||||
children: occDispatcherList
|
||||
}, {
|
||||
labelName: '行调',
|
||||
id: 'dispatcher',
|
||||
children: dispatcherList
|
||||
}, {
|
||||
labelName: '车站值班员',
|
||||
id: 'stationSupervisor',
|
||||
children: stationSupervisorList
|
||||
}, {
|
||||
labelName: '司机',
|
||||
id: 'driver',
|
||||
children: driverList
|
||||
}, {
|
||||
labelName: '通号',
|
||||
id: 'maintainer',
|
||||
children: maintainerList
|
||||
}, {
|
||||
labelName: '车辆段信号楼',
|
||||
id: 'depotDispatcher',
|
||||
children: depotDispatcherList
|
||||
}, {
|
||||
labelName: '电力调度',
|
||||
id: 'electricDispatcher',
|
||||
children: electricDispatcherList
|
||||
}, {
|
||||
labelName: 'CTC操作员',
|
||||
id: 'ctcOperator',
|
||||
children: ctcOperatorList
|
||||
}, {
|
||||
labelName: '车站助理',
|
||||
id: 'stationAssistant',
|
||||
children: stationAssistantList
|
||||
},
|
||||
{
|
||||
labelName: '车站站长',
|
||||
id: 'stationMaster',
|
||||
children: stationMasterList
|
||||
},
|
||||
{
|
||||
labelName: '车站信号员',
|
||||
id: 'stationSignaler',
|
||||
children: stationSignalerList
|
||||
},
|
||||
{
|
||||
labelName: '车站客运员',
|
||||
id: 'stationPassenger',
|
||||
children: stationPassengerList
|
||||
},
|
||||
{
|
||||
labelName: '车站扳道员',
|
||||
id: 'stationSwitchMan',
|
||||
children: stationSwitchManList
|
||||
},
|
||||
{
|
||||
labelName: '车站引导员',
|
||||
id: 'stationFacilitator',
|
||||
children: stationFacilitatorList
|
||||
},
|
||||
{
|
||||
labelName: '车站工务工',
|
||||
id: 'stationWorker',
|
||||
children: stationWorkerList
|
||||
},
|
||||
{
|
||||
labelName: '设备管理员',
|
||||
id: 'deviceManager',
|
||||
children: deviceManagerList
|
||||
},
|
||||
{
|
||||
labelName: '车务段段长 ',
|
||||
id: 'trainMaster',
|
||||
children: trainMasterList
|
||||
},
|
||||
{
|
||||
labelName: '电力工务 ',
|
||||
id: 'stationElectricWorker',
|
||||
children: stationElectricWorkerList
|
||||
}
|
||||
];
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.tree) {
|
||||
this.$refs.tree.filter(this.queryMember);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
getMessageStatus(val) {
|
||||
const find = this.groupList.find(item => {
|
||||
return item.id == val.id;
|
||||
@ -758,7 +568,7 @@ export default {
|
||||
return pId;
|
||||
},
|
||||
setReadGroup() {
|
||||
if (!this.id) { return; }
|
||||
if (!this.id || !this.dialogVisible) { return; }
|
||||
const id = this.id;
|
||||
setGroupReadMessage(this.groupId, {id}).then(res => {
|
||||
res.data.forEach(item => {
|
||||
|
Loading…
Reference in New Issue
Block a user