剧本编制代码调整
This commit is contained in:
parent
2b5b21c1cf
commit
5deef9fe6b
@ -228,21 +228,17 @@ const training = {
|
||||
setSimulationUserList: (state, simulationUserList) => {
|
||||
state.simulationUserList = simulationUserList;
|
||||
},
|
||||
updateMemberListInScript:(state, {oldMemberId, newMemberId, userId, isDriver}) => {
|
||||
updateMemberListInScript:(state, {oldMemberId, newMemberId, userId}) => {
|
||||
if (oldMemberId) {
|
||||
// 重置旧数据
|
||||
if (state.memberData[oldMemberId].trust) {
|
||||
state.memberData[newMemberId].trust = false;
|
||||
}
|
||||
state.memberData[oldMemberId].trust = false;
|
||||
delete state.memberData[oldMemberId].userId;
|
||||
state.memberData[oldMemberId].disabled = false;
|
||||
}
|
||||
// 更新新数据
|
||||
state.memberData[newMemberId].userId = userId;
|
||||
state.memberData[newMemberId].disabled = true;
|
||||
if (isDriver) {
|
||||
state.memberData[newMemberId].trust = true;
|
||||
}
|
||||
state.memberData[newMemberId].trust = true;
|
||||
},
|
||||
updateMemberAndUser: (state, {simulationUserList, userId}) => {
|
||||
simulationUserList.forEach(item => {
|
||||
|
@ -176,7 +176,7 @@ export default {
|
||||
prdType = '';
|
||||
}
|
||||
}
|
||||
this.$store.dispatch('training/updateMemberListInScript', {oldMemberId:this.oldMemberId, newMemberId:role, userId:this.$store.state.user.id, isDriver:memberInfo.type == '司机'});
|
||||
this.$store.dispatch('training/updateMemberListInScript', {oldMemberId:this.oldMemberId, newMemberId:role, userId:this.$store.state.user.id});
|
||||
this.oldMemberId = role;
|
||||
this.$store.dispatch('training/setPrdType', prdType);
|
||||
ConstConfig.ConstSelect.roleTypeNew.forEach(each=>{
|
||||
|
Loading…
Reference in New Issue
Block a user