mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-11 11:56:46 +08:00
-- 学员添加
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user