代码调整
This commit is contained in:
parent
c2e0182d53
commit
7a84b23cdc
@ -159,20 +159,12 @@ export default {
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.training.memberList': function (val) {
|
||||
'$store.state.training.roles': function(val) {
|
||||
this.getRoleList();
|
||||
},
|
||||
'$store.state.training.memberList': function(val) {
|
||||
if (val && val.length) {
|
||||
const memberData = this.$store.state.training.memberData;
|
||||
let activeTrainList = [];
|
||||
if (this.$store.state.training.started) {
|
||||
activeTrainList = this.$store.state.map.activeTrainList;
|
||||
}
|
||||
// 获取仿真成员列表
|
||||
const result = covertMemberData(activeTrainList, Object.values(memberData));
|
||||
let list = [];
|
||||
result.deviceListData.forEach(item => {
|
||||
list = list.concat(item);
|
||||
});
|
||||
this.roleList = list;
|
||||
this.getRoleList();
|
||||
}
|
||||
},
|
||||
editData() {
|
||||
@ -198,6 +190,20 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getRoleList() {
|
||||
const memberData = this.$store.state.training.memberData;
|
||||
let activeTrainList = [];
|
||||
if (this.$store.state.training.started) {
|
||||
activeTrainList = this.$store.state.map.activeTrainList;
|
||||
}
|
||||
// 获取仿真成员列表
|
||||
const result = covertMemberData(activeTrainList, Object.values(memberData));
|
||||
let list = [];
|
||||
result.deviceListData.forEach(item => {
|
||||
list = list.concat(item);
|
||||
});
|
||||
this.roleList = list;
|
||||
},
|
||||
updateDetails(data) {
|
||||
this.editData = data;
|
||||
this.getStepList(data);
|
||||
|
Loading…
Reference in New Issue
Block a user