-- 学员添加

This commit is contained in:
yuping
2022-12-10 18:05:46 +08:00
parent 4a66e1a657
commit 05695d18f9

View File

@@ -897,26 +897,8 @@ export default {
console.log("selectedRowKeys changed: ", selectedRowKeys, item);
console.log("choosepeople : ", state.choosepeople);
state.selectedRowKeys = selectedRowKeys;
const se = state.studentList.map(e => e.id).join(',') || ''
const addItem = item.filter(e => (e && !se.includes(e.id + '')))
addItem.forEach(e => {
e.name = e.realName
})
const selectStr = selectedRowKeys.join(',')
console.log(selectStr)
state.studentList = state.studentList.filter(e => selectStr.includes(e.id + ''))
console.log(state.studentList)
state.choosepeople = [...addItem.reverse(), ...state.studentList];
state.choosepeople = item.map(e => ({...e, name: e.realName})).reverse()
selectedsHeight();
// if (selectedRowKeys.length > 0 && item.length > 0) {
// state.selectedRowKeys.push(selectedRowKeys[selectedRowKeys.length - 1]);
// state.choosepeople.unshift(item[item.length - 1]);
// // console.log(
// // "selectedRowKeys changed22222: ",
// // state.selectedRowKeys,
// // state.choosepeople
// // );
// }
};
//单个删除选中的人
const deleteChoosePeople = (item) => {