需求:
每個小組只能有一個組長,當打開開關設置組長時候,其他的組長一列為否狀態
setupLeader(row, event){ console.log(row, event, '設置組長開關') this.$axios({ method: 'get', url: this.saveThousandCheckGroupLeader, params: { userId: row.userId, groupId: row.groupId } }).then((res) => { let id = row.id; console.log(id); this.tableData.forEach(item => { if (row.userId == item.userId) { row.isLeader = item.isLeader; } }); this.tableData.filter((val) => { return val.id != row.id; }) this.getCheckGroupUserExList(); }) },