Bug:参演角色重复问题修复
This commit is contained in:
parent
f38fb8891a
commit
73514ebc1f
@ -468,6 +468,7 @@ export default {
|
|||||||
this.addPlayerIdList(val);
|
this.addPlayerIdList(val);
|
||||||
},
|
},
|
||||||
addPlayerIdList(playId) {
|
addPlayerIdList(playId) {
|
||||||
|
console.log(this.playerIdList.includes(playId), this.playerIdList, playId);
|
||||||
if (!this.playerIdList.includes(playId)) {
|
if (!this.playerIdList.includes(playId)) {
|
||||||
this.playerIdList.push(playId);
|
this.playerIdList.push(playId);
|
||||||
}
|
}
|
||||||
@ -476,7 +477,7 @@ export default {
|
|||||||
checkPlayerIdHas() {
|
checkPlayerIdHas() {
|
||||||
const list = [];
|
const list = [];
|
||||||
this.tableData.forEach(elem => {
|
this.tableData.forEach(elem => {
|
||||||
if (this.playerIdList.includes(elem.memberId)) {
|
if (this.playerIdList.includes(elem.memberId) && !list.includes(elem.memberId)) {
|
||||||
list.push(elem.memberId);
|
list.push(elem.memberId);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user