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