过滤司机角色调整

This commit is contained in:
fan 2020-07-09 13:05:50 +08:00
parent 577cc3c887
commit 404c56e874
3 changed files with 7 additions and 5 deletions

View File

@ -208,8 +208,8 @@ export default {
this.activeTrains = [];
const activeTrainList = this.$store.state.map.activeTrainList;
if (activeTrainList && activeTrainList.length) {
activeTrainList.forEach(train => {
this.activeTrains.push(train.groupNumber);
activeTrainList.forEach(groupNumber => {
this.activeTrains.push(groupNumber);
});
}
this.$refs.tree && this.$refs.tree.filter(this.queryMember);
@ -270,6 +270,7 @@ export default {
if (data.type && data.type === 'DRIVER' && !this.activeTrains.includes(data.deviceCode)) {
driverNoShow = false;
}
console.log(data.type, data.deviceCode, this.activeTrains, driverNoShow);
return (data.label.indexOf(value) !== -1 || flag) && driverNoShow;
},
handlerMemberOnOff(data) {

View File

@ -318,6 +318,7 @@ export default {
}
this.$store.dispatch('training/over').then(() => {
this.backLoading = true;
this.$store.dispatch('map/resetActiveTrainList');
if (this.$route.query.projectDevice) {
this.$store.dispatch('LogOut').then(() => {
location.reload();

View File

@ -186,8 +186,8 @@ export default {
this.activeTrains = [];
const activeTrainList = this.$store.state.map.activeTrainList;
if (activeTrainList && activeTrainList.length) {
activeTrainList.forEach(train => {
this.activeTrains.push(train.groupNumber);
activeTrainList.forEach(groupNumber => {
this.activeTrains.push(groupNumber);
});
}
if (this.$refs.tree) {
@ -457,7 +457,7 @@ export default {
flag = this.memberData[data.id].nickName.indexOf(value) !== -1;
}
let driverNoShow = true;
if (data.role && data.role === 'DRIVER' && !this.activeTrains.includes(data.deviceCode)) {
if (data.type && data.type === 'DRIVER' && !this.activeTrains.includes(data.deviceCode)) {
driverNoShow = false;
}
return (data.label.indexOf(value) !== -1 || flag) && driverNoShow;