mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 03:16:44 +08:00
feat:合并
This commit is contained in:
@@ -141,6 +141,7 @@ export const addStudentCourse = (obj) => http.post("/admin/offcourse/addStudent"
|
||||
// 获取组织结构树
|
||||
export const orgtree = () => http.get("/org/tree");
|
||||
export const saveStu = obj => http.post("/admin/student/addStudent", obj);
|
||||
export const getAllStudentByProjectId = obj => http.get("/admin/student/getAllStudentByProjectId", { params: obj });
|
||||
export const moveStudent = obj => http.post("/admin/student/moveStudent", obj);
|
||||
export const getStuPage = obj => http.get("/admin/student/getStudent", { params: obj });
|
||||
export const delStudentList = obj => http.post("/admin/student/delStudent", obj);
|
||||
@@ -176,7 +177,7 @@ export const exportHomeWork = (obj) => http.get('/admin/student/exportHomeWork',
|
||||
export const exportHomeWorkTemplate = (obj) => http.get('/admin/student/exportHomeWorkTemplate', { params: obj })
|
||||
//签到
|
||||
export const attendanceSign = (obj) => http.post('/stu/task/attendance/sign', obj)
|
||||
//请假
|
||||
//请假
|
||||
export const attendanceLeave = (obj) => http.post('/stu/task/attendance/leave', obj)
|
||||
|
||||
//批量标记完成
|
||||
|
||||
@@ -304,6 +304,7 @@ import {
|
||||
} from "@/api/ThirdApi";
|
||||
import {
|
||||
saveStu,
|
||||
getAllStudentByProjectId,
|
||||
// addGroupMember,
|
||||
getStuPage,
|
||||
} from "@/api/index1";
|
||||
@@ -366,6 +367,7 @@ console.log("props.activeKey1" + props.activeKey1);
|
||||
// 获取项目学员;
|
||||
const procurrentPage = ref(1);
|
||||
const projectList = ref([]);
|
||||
const allProjectStudent = ref([]);
|
||||
const proStudentName = ref("");
|
||||
const projectListTotal = ref(-1);
|
||||
const projectPageSize = ref(10);
|
||||
@@ -384,6 +386,16 @@ const projectRowSelection = computed(() => ({
|
||||
onChange: onProjectSelectChange,
|
||||
preserveSelectedRowKeys: true,
|
||||
}));
|
||||
|
||||
const getAllStudent = () => {
|
||||
let params = {
|
||||
projectId:props.id
|
||||
};
|
||||
getAllStudentByProjectId(params).then(res => {
|
||||
allProjectStudent.value = res.data.data;
|
||||
})
|
||||
};
|
||||
getAllStudent();
|
||||
const getStu = () => {
|
||||
let obj = {
|
||||
studentName: proStudentName.value,
|
||||
@@ -811,15 +823,16 @@ function handleStageOk() {
|
||||
}
|
||||
} else if (activeKey.value === 1) {
|
||||
selectMember = selectsData.value.studentList.length;
|
||||
|
||||
|
||||
let arr = [...allProjectStudent.value].filter(x => [...selectsData.value.studentList].some(y => y.id === x.studentId));
|
||||
if (arr.length > 0) {
|
||||
message.warning("部分学员已经有小组,再次添加会被添加到当前小组.");
|
||||
}
|
||||
} else if (activeKey.value === 2) {
|
||||
selectMember = selectsData.value.groupList.length;
|
||||
} else if (activeKey.value === 3) {
|
||||
selectMember = selectsData.value.deptList.length;
|
||||
}
|
||||
|
||||
|
||||
if (props.groupMemberCount < selectMember + Number(props.groupMemberNumber)) {
|
||||
return message.warning("添加小组学员超过最大值");
|
||||
}
|
||||
@@ -839,7 +852,7 @@ function handleStageOk() {
|
||||
stageId: selectsData.value.stageId,
|
||||
groupIds: selectsData.value.groupList?.map((e) => e.id),
|
||||
studentList: selectsData.value.studentList.concat(
|
||||
selectsData.value.projectMemberList
|
||||
selectsData.value.projectMemberList
|
||||
),
|
||||
groupName: props.groupName,
|
||||
groupId: props.groupId,
|
||||
|
||||
Reference in New Issue
Block a user