diff --git a/src/components/drawers/ProjCheckPower.vue b/src/components/drawers/ProjCheckPower.vue index 9a60d7e1..fec954d7 100644 --- a/src/components/drawers/ProjCheckPower.vue +++ b/src/components/drawers/ProjCheckPower.vue @@ -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) => {