调度电话代码调整
This commit is contained in:
parent
e7cb90c1cb
commit
773e61519d
@ -322,25 +322,12 @@ export default {
|
||||
member.active = false;
|
||||
member.isConnect = false;
|
||||
member.disabled = false;
|
||||
// item.children.forEach(data =>{
|
||||
// if (data.id == val.memberId) {
|
||||
// data.active = false;
|
||||
// data.isConnect = false;
|
||||
// data.disabled = false;
|
||||
// }
|
||||
// });
|
||||
}
|
||||
});
|
||||
},
|
||||
'$store.state.training.memberList': function (val) {
|
||||
if (val && val.length) {
|
||||
this.memberData = this.$store.state.training.memberData;
|
||||
// const dispatcherList = [];
|
||||
// const electricDispatcherList = [];
|
||||
// const depotDispatcherList = [];
|
||||
// const stationSupervisorList = [];
|
||||
// const driverList = [];
|
||||
// const maintainerList = [];
|
||||
const dispatcherList = {};
|
||||
const electricDispatcherList = {};
|
||||
const depotDispatcherList = {};
|
||||
@ -382,7 +369,7 @@ export default {
|
||||
});
|
||||
// { label: '全部集中站', value: 'allConcentrateStation', active: false, sign: 'DEVICE_STATION' },
|
||||
stationSupervisorList['ALL_STATION'] = { label: '全部车站', value: 'allStation', active: false, sign: 'ALL_STATION' };
|
||||
driverList['ALL_TRAIN'] = { label: '所有列车', value: 'allTrain', show: false, active: false, sign: 'ALL_TRAIN' };
|
||||
driverList['ALL_TRAIN'] = { label: '所有司机', value: 'allTrain', show: false, active: false, sign: 'ALL_TRAIN' };
|
||||
this.treeData = [{
|
||||
label: '行调',
|
||||
id: 'dispatcher',
|
||||
@ -502,6 +489,18 @@ export default {
|
||||
item.loading = false;
|
||||
}
|
||||
});
|
||||
} else if (this.memberObject == 'ALL_TRAIN') {
|
||||
const trainList = Object.values(this.treeData[2].children);
|
||||
const length = trainList.length;
|
||||
trainList.forEach((item, index) => {
|
||||
if (index != length - 1) {
|
||||
item.active = true;
|
||||
item.loading = true;
|
||||
} else {
|
||||
item.active = false;
|
||||
item.loading = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
startConversition(this.group, this.memberIdList, this.memberObject).then(resp => {
|
||||
@ -510,6 +509,11 @@ export default {
|
||||
const member = stationList['ALL_STATION'];
|
||||
member.active = false;
|
||||
member.isConnect = true;
|
||||
} else if (this.memberObject == 'ALL_TRAIN') {
|
||||
const trainList = this.treeData[2].children;
|
||||
const train = trainList['ALL_TRAIN'];
|
||||
train.active = false;
|
||||
train.isConnect = true;
|
||||
}
|
||||
this.messageList = [];
|
||||
this.memberIdList = [];
|
||||
@ -650,19 +654,38 @@ export default {
|
||||
if (member && member.active) { member.active = false; }
|
||||
});
|
||||
});
|
||||
const stationList = Object.values(this.treeData[1].children);
|
||||
if (!data.active) {
|
||||
stationList.forEach((item, index) => {
|
||||
if (index != length - 1) {
|
||||
item.disabled = true;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
stationList.forEach((item, index) => {
|
||||
if (index != length - 1) {
|
||||
item.disabled = false;
|
||||
}
|
||||
});
|
||||
if (data.value == 'allStation') {
|
||||
const stationList = Object.values(this.treeData[1].children);
|
||||
const length = stationList.length;
|
||||
if (!data.active) {
|
||||
stationList.forEach((item, index) => {
|
||||
if (index != length - 1) {
|
||||
item.disabled = true;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
stationList.forEach((item, index) => {
|
||||
if (index != length - 1) {
|
||||
item.disabled = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if (data.value == 'allTrain') {
|
||||
const trainList = Object.values(this.treeData[2].children);
|
||||
const length = trainList.length;
|
||||
if (!data.active) {
|
||||
trainList.forEach((item, index) => {
|
||||
if (index != length - 1) {
|
||||
item.disabled = true;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
trainList.forEach((item, index) => {
|
||||
if (index != length - 1) {
|
||||
item.disabled = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
this.memberIdList = [];
|
||||
data.active = !data.active;
|
||||
@ -699,10 +722,21 @@ export default {
|
||||
if (this.activeTrains.includes(train.deviceCode)) {
|
||||
train.show = true;
|
||||
}
|
||||
if (train.value == 'allTrain') {
|
||||
train.show = true;
|
||||
}
|
||||
});
|
||||
const member = this.treeData[2]['children']['ALL_TRAIN'];
|
||||
if (this.activeTrains.length > 0) {
|
||||
member.show = true;
|
||||
} else {
|
||||
this.memberObject = '';
|
||||
const trainList = Object.values(this.treeData[2].children);
|
||||
trainList.forEach(train=>{
|
||||
if (train.active) {
|
||||
train.active = false;
|
||||
const memberId = train.id;
|
||||
this.memberIdList.splice(this.memberIdList.indexOf(memberId), 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
// 退出会话
|
||||
|
Loading…
Reference in New Issue
Block a user