From ff46cc24356b2cd2f23ab3cd7892e61b682d2b8c Mon Sep 17 00:00:00 2001
From: 祖安之光 <11848914+light-of-zuan@user.noreply.gitee.com>
Date: Mon, 11 May 2026 10:03:42 +0800
Subject: [PATCH] 主线提交
---
src/views/onlineEducation/classHourBatch/components/chooseStudent.vue | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/src/views/onlineEducation/classHourBatch/components/chooseStudent.vue b/src/views/onlineEducation/classHourBatch/components/chooseStudent.vue
index 1c0f495..8d097ba 100644
--- a/src/views/onlineEducation/classHourBatch/components/chooseStudent.vue
+++ b/src/views/onlineEducation/classHourBatch/components/chooseStudent.vue
@@ -37,7 +37,7 @@
<!-- 表格数据 -->
<el-table
ref="tableRef"
- v-loading="loading"
+ v-loading="state.allLoading"
:data="state.dataList"
:border="true"
:row-key="getRowKey"
@@ -76,7 +76,8 @@
<template #footer>
<span class="dialog-footer">
<el-button @click="handleClose" size="default">取 消</el-button>
- <el-button type="primary" @click="onSubmit" size="default" v-preReClick>确认</el-button>
+ <el-button type="primary" v-if="state.allLoading && state.DisableSelection " disabled>全选加载中</el-button>
+ <el-button type="primary" v-else @click="onSubmit" size="default" v-preReClick>确认</el-button>
</span>
</template>
</el-dialog>
@@ -115,7 +116,8 @@
companyId: null,
selectRowKeys: [],
DisableSelection:false,
- allStuList: []
+ allStuList: [],
+ allLoading: false
})
const loading = ref(false);
@@ -125,12 +127,12 @@
}
const openDialog = async (data) => {
// state.selectRowKeys = [10,11]
-
state.phaseId = data.queryParams.phaseId
title.value = '学员选择';
dialogVisible.value = true;
- await getList()
await getAllStudent()
+ await getList()
+
}
const getList = async () => {
@@ -155,6 +157,7 @@
}
const onSubmit = async () => {
+ console.log('state.chooseStu',state.chooseStu)
const res = await batchAddStudent(state.chooseStu)
if(res.code === 200){
ElMessage({
@@ -182,6 +185,7 @@
companyName: '',
companyId: null
}
+
tableRef.value.clearSelection();
state.dataList = []
state.allStuList = []
@@ -226,7 +230,6 @@
}
getList()
- getAllStudent()
}
const selectable = (row,rowIndex) => {
if(state.DisableSelection){
@@ -260,13 +263,14 @@
}
}
const getAllStudent = async () => {
+ state.allLoading = true
const res = await getStudentAll()
if(res.code == 200){
state.allStuList = res.data
+ state.allLoading = false
}else{
ElMessage.warning(res.message)
}
-
}
defineExpose({
--
Gitblit v1.9.2