Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test_ls
This commit is contained in:
commit
d23037f4f3
@ -86,9 +86,15 @@ export default {
|
||||
},
|
||||
{
|
||||
label: '封锁/解封',
|
||||
handler: '',
|
||||
cmdType: ''
|
||||
handler: this.lockOrUnlock
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
|
||||
|
||||
},
|
||||
// {
|
||||
// label: '解封',
|
||||
// handler: '',
|
||||
// cmdType: ''
|
||||
// },
|
||||
{
|
||||
label: '总人解',
|
||||
handler: this.humanTrainRoute,
|
||||
@ -312,14 +318,14 @@ export default {
|
||||
});
|
||||
},
|
||||
lockOrUnlock() {
|
||||
if (this.selected.lock) {
|
||||
commitOperate(menuOperate.Signal.lock, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (this.selected.blockade) {
|
||||
commitOperate(menuOperate.Signal.unlock, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
commitOperate(menuOperate.Signal.unlock, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
commitOperate(menuOperate.Signal.lock, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
|
@ -1113,6 +1113,14 @@ export default {
|
||||
const temMaintainerList = [];
|
||||
const temDriverList = [];
|
||||
const temDepotDispatcherList = [];
|
||||
const temStationAssistList = [];
|
||||
const temStationMasterList = [];
|
||||
const temStationSignalerList = [];
|
||||
const temStationPassengerList = [];
|
||||
const temStationSwitchManList = [];
|
||||
const temStationFacilitatorList = [];
|
||||
const temStationWorkerList = [];
|
||||
const temDeviceManagerList = [];
|
||||
this.$store.state.training.memberList.forEach(item =>{
|
||||
switch (item.type) {
|
||||
case 'DISPATCHER':
|
||||
@ -1130,9 +1138,35 @@ export default {
|
||||
case 'DEPOT_DISPATCHER':
|
||||
temDepotDispatcherList.push({memberId: item.id, connect:true });
|
||||
break;
|
||||
case 'STATION_ASSISTANT':
|
||||
temStationAssistList.push({memberId: item.id, connect:true });
|
||||
break;
|
||||
case 'STATION_MASTER':
|
||||
temStationMasterList.push({memberId: item.id, connect:true });
|
||||
break;
|
||||
case 'STATION_SIGNALER':
|
||||
temStationSignalerList.push({memberId: item.id, connect:true });
|
||||
break;
|
||||
case 'STATION_PASSENGER':
|
||||
temStationPassengerList.push({memberId: item.id, connect:true });
|
||||
break;
|
||||
case 'STATION_SWITCH_MAN':
|
||||
temStationSwitchManList.push({memberId: item.id, connect:true });
|
||||
break;
|
||||
case 'STATION_FACILITATOR':
|
||||
temStationFacilitatorList.push({memberId: item.id, connect:true });
|
||||
break;
|
||||
case 'STATION_WORKER':
|
||||
temStationWorkerList.push({memberId: item.id, connect:true });
|
||||
break;
|
||||
case 'DEVICE_MANAGER':
|
||||
temDeviceManagerList.push({memberId: item.id, connect:true });
|
||||
break;
|
||||
}
|
||||
});
|
||||
this.commonMemberList = [...temDispatcherList, ...temStationSupervisorList, ...temMaintainerList, ...temDriverList, ...temDepotDispatcherList];
|
||||
this.commonMemberList = [...temDispatcherList, ...temStationSupervisorList, ...temMaintainerList, ...temDriverList, ...temDepotDispatcherList,
|
||||
...temStationAssistList, ...temStationMasterList, ...temStationSignalerList, ...temStationPassengerList, ...temStationSwitchManList,
|
||||
...temStationFacilitatorList, temStationWorkerList, temDeviceManagerList];
|
||||
if (this.userRole == 'AUDIENCE' || this.commonConversation) {
|
||||
this.conversitionMemberList = [];
|
||||
this.messageList = [...this.commonMessageList];
|
||||
|
@ -306,8 +306,10 @@ export default {
|
||||
this.$refs.registerBook.doShow();
|
||||
},
|
||||
checkRoleInit(data) {
|
||||
const stationRoleList = ['STATION_SUPERVISOR', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER',
|
||||
'STATION_PASSENGER', 'STATION_SWITCH_MAN', 'STATION_FACILITATOR', 'STATION_WORKER', 'DEVICE_MANAGER'];
|
||||
data.forEach(item => {
|
||||
if ((item.admin && item.online) && item.userId == this.userId && item.type == 'STATION_SUPERVISOR') {
|
||||
if ((item.admin && item.online) && item.userId == this.userId && stationRoleList.includes(item.type)) {
|
||||
this.$store.dispatch('training/setRoleDeviceCode', item.deviceCode);
|
||||
this.deviceCode = item.deviceCode;
|
||||
this.setShowStation(item.deviceCode);
|
||||
@ -316,8 +318,10 @@ export default {
|
||||
});
|
||||
},
|
||||
checkRoleChange(data) {
|
||||
const stationRoleList = ['STATION_SUPERVISOR', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER',
|
||||
'STATION_PASSENGER', 'STATION_SWITCH_MAN', 'STATION_FACILITATOR', 'STATION_WORKER', 'DEVICE_MANAGER'];
|
||||
data.forEach(item => {
|
||||
if ((item.messageType === 'PLAY_CHANGE' || item.messageType === 'ONLINE' ) && item.userId == this.userId && item.type == 'STATION_SUPERVISOR') {
|
||||
if ((item.messageType === 'PLAY_CHANGE' || item.messageType === 'ONLINE' ) && item.userId == this.userId && stationRoleList.includes(item.type)) {
|
||||
// this.userRole = item.type || 'AUDIENCE';
|
||||
this.$store.dispatch('training/setRoleDeviceCode', item.deviceCode);
|
||||
this.deviceCode = item.deviceCode;
|
||||
|
@ -148,8 +148,10 @@ export default {
|
||||
return mem.userId != '' && mem.userId != undefined;
|
||||
});
|
||||
if (member) {
|
||||
const memberType = ['STATION_SUPERVISOR', 'DISPATCHER', 'DRIVER', 'MAINTAINER', 'DEPOT_DISPATCHER', 'PARENT_DEPARTMENT', 'ELECTRIC_DISPATCHER', 'PARKING_LOT_SIGNAL_BUILDING'];
|
||||
const prdTypeList = ['01', '02', '04', '', '05', '', ''];
|
||||
const memberType = ['STATION_SUPERVISOR', 'DISPATCHER', 'DRIVER', 'MAINTAINER', 'DEPOT_DISPATCHER', 'PARENT_DEPARTMENT',
|
||||
'ELECTRIC_DISPATCHER', 'PARKING_LOT_SIGNAL_BUILDING', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER',
|
||||
'STATION_PASSENGER', 'STATION_SWITCH_MAN', 'STATION_FACILITATOR', 'STATION_WORKER', 'DEVICE_MANAGER'];
|
||||
const prdTypeList = ['01', '02', '04', '', '05', '', '', '', '', '', '01', '', '', '', '', ''];
|
||||
const index = memberType.indexOf(member.type);
|
||||
let prdType;
|
||||
if (index >= 0) {
|
||||
@ -220,13 +222,22 @@ export default {
|
||||
},
|
||||
|
||||
checkRoleChange(data) {
|
||||
const stationRoleList = ['STATION_SUPERVISOR', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER',
|
||||
'STATION_PASSENGER', 'STATION_SWITCH_MAN', 'STATION_FACILITATOR', 'STATION_WORKER', 'DEVICE_MANAGER'];
|
||||
data.forEach(item => {
|
||||
if ((item.messageType === 'PLAY_CHANGE' || item.messageType === 'ONLINE' ) && item.userId == this.userId && item.type == 'STATION_SUPERVISOR') {
|
||||
if ((item.messageType === 'PLAY_CHANGE' || item.messageType === 'ONLINE' ) && item.userId == this.userId && (stationRoleList.includes(item.type) )) {
|
||||
// this.userRole = item.type || 'AUDIENCE';
|
||||
this.$store.dispatch('training/setRoleDeviceCode', item.deviceCode);
|
||||
this.deviceCode = item.deviceCode;
|
||||
this.setShowStation(item.deviceCode);
|
||||
this.$store.dispatch('training/setPrdType', '01');
|
||||
|
||||
if (item.type == 'STATION_SUPERVISOR' || item.type == 'STATION_SIGNALER') {
|
||||
this.setShowStation(item.deviceCode);
|
||||
this.$store.dispatch('training/setPrdType', '01');
|
||||
} else {
|
||||
const showStation = this.centralizedStationMap[item.deviceCode];
|
||||
this.setShowStation('');
|
||||
this.$jlmap.setCenter(showStation);
|
||||
}
|
||||
// this.setSimulationPrdType(this.centralizedStationMap[item.deviceCode]);
|
||||
// this.$nextTick(() => {
|
||||
// if (item.deviceCode && this.$store.state.training.prdType !== '09') { this.setCenter(item.deviceCode); }
|
||||
|
@ -560,7 +560,7 @@ export default {
|
||||
role.type = 'STATION_MASTER';
|
||||
this.$store.dispatch('training/setRoles', 'STATION_MASTER');
|
||||
} else if (role.type == '车站信号员') {
|
||||
prdType = '';
|
||||
prdType = '01';
|
||||
role.type = 'STATION_SIGNALER';
|
||||
this.$store.dispatch('training/setRoles', 'STATION_SIGNALER');
|
||||
} else if (role.type == '车站客运员') {
|
||||
|
Loading…
Reference in New Issue
Block a user