换组功能

This commit is contained in:
lpq
2023-02-24 22:39:03 +08:00
parent 8273426db0
commit a663f4711d
3 changed files with 18 additions and 7 deletions

View File

@@ -48,6 +48,10 @@ const props = defineProps({
type: Boolean,
default: false,
},
checkBatch: {
type: Boolean,
default: false,
},
groupList: {
type: Array,
default: () => [],
@@ -56,10 +60,10 @@ const props = defineProps({
type: Number,
default: null,
},
});
const option = computed(() => {
debugger
console.log("props.groupList", props.groupList);
return props.groupList.map((e) => ({
label: e.groupName,
@@ -81,13 +85,13 @@ const selectGroup = (e, v) => {
};
//确认换组
const changeGroup = (item) => {
// debugger
debugger
console.log("换组", selectGroupId.value, item);
props.checkgroupStuId.forEach(stu => {
let obj = {
groupId: selectGroupId.value,
groupName: selectGroupName.value,
studentId: stu,
id: stu,
};
console.log("换组obj", obj);
api

View File

@@ -164,7 +164,7 @@
<ChangeLevelModal v-model:visiblene="visiblene" :stage="stage" :ids="stuSelectKeys" @finash="submitCall" />
<!-- 换组弹窗 -->
<ChangeGroupModal v-model:changegroupV="checkgroupParam.changegroupV" :groupList="groupList"
<ChangeGroupModal v-model:changegroupV="checkgroupParam.changegroupV" :groupList="groupList" :checkBatch="checkgroupParam.checkBatch"
:checkgroupStuId="stuSelectKeys" />
<!-- 批量调整关卡弹窗 -->
<!-- 取消学员弹窗 -->
@@ -407,6 +407,7 @@ const checkgroupParam = ref({
changegroupV: false, //学员名称
checkgroupList: "", //学员小组
checkgroupStuId: null,
checkBatch: true
});
const stuSelectKeys = ref([]);
@@ -426,10 +427,13 @@ const stuRowSelection = computed(() => ({
//显示学员换组弹窗
function showChangeGroupModal() {
debugger
console.log("批量")
const d = props.groupList
console.log("d" + d)
// debugger
checkgroupParam.value.changegroupV = true;
checkgroupParam.value.checkBatch = true;
}
// 导出数据

View File

@@ -2356,6 +2356,7 @@ export default {
],
//小组信息列表
groupList: [],
isBatch: false, // 批量
// stuName: "", //搜索的学员姓名
// stuGroup: "", //搜索的学员小组名称
// stuBum: "", //搜索的学员小组部门
@@ -3068,9 +3069,12 @@ export default {
};
//显示学员换组弹窗
const showChangeGroupModal = (record) => {
debugger
console.log("单个")
state.changegroupV = true;
console.log("点击换组", record.studentId);
state.checkgroupStuId = record.studentId;
console.log("点击换组", record.id);
state.checkgroupStuId = [];
state.checkgroupStuId.push(record.id) ;
};
const showModal2 = (item, isEdit) => {
state.isEdit = isEdit;
@@ -3147,7 +3151,6 @@ export default {
}
//考勤的抽屉
const showAA = (course, a, data) => {
// debugger;
state.AAvisible = true;
state.liveData = data;
state.showKaoqinText = "直播";