代码调整
This commit is contained in:
parent
c2e0182d53
commit
7a84b23cdc
@ -159,20 +159,12 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
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) {
|
if (val && val.length) {
|
||||||
const memberData = this.$store.state.training.memberData;
|
this.getRoleList();
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
editData() {
|
editData() {
|
||||||
@ -198,6 +190,20 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
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) {
|
updateDetails(data) {
|
||||||
this.editData = data;
|
this.editData = data;
|
||||||
this.getStepList(data);
|
this.getStepList(data);
|
||||||
|
Loading…
Reference in New Issue
Block a user