【修改】修改试卷任务班级分配,试题的标题位置 #9
@@ -36,6 +36,9 @@ export const ClassApi = {
|
||||
getClassIdName: async () => {
|
||||
return await request.get({ url: `/exam/class/getClassIdName` })
|
||||
},
|
||||
getClassIdAndName: async () => {
|
||||
return await request.get({ url: `/exam/class/getClassIdAndName` })
|
||||
},
|
||||
|
||||
// 绑定学生班级
|
||||
bindingClass: async (data: ClassStudentSaveReqVO) => {
|
||||
|
||||
@@ -23,6 +23,21 @@
|
||||
:rules="formRules"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="标题" prop="contentText">
|
||||
<el-input v-model="formData.contentText" placeholder="请输入标题" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="启用状态" prop="status">
|
||||
<el-radio-group v-model="formData.status">
|
||||
<el-radio :label="'0'">启用</el-radio>
|
||||
<el-radio :label="'1'">禁用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="专业" prop="specialtyName">
|
||||
@@ -86,22 +101,7 @@
|
||||
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="启用状态" prop="status">
|
||||
<el-radio-group v-model="formData.status">
|
||||
<el-radio :label="'0'">启用</el-radio>
|
||||
<el-radio :label="'1'">禁用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="标题" prop="contentText">
|
||||
<el-input v-model="formData.contentText" placeholder="请输入标题" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
<div class="edit-bottom">
|
||||
|
||||
@@ -10,6 +10,21 @@
|
||||
:rules="formRules"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="标题" prop="contentText">
|
||||
<el-input v-model="formData.contentText" placeholder="请输入标题" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="启用状态" prop="status">
|
||||
<el-radio-group v-model="formData.status">
|
||||
<el-radio :label="'0'">启用</el-radio>
|
||||
<el-radio :label="'1'">禁用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="专业" prop="specialtyName">
|
||||
@@ -95,22 +110,8 @@
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
<el-row>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="启用状态" prop="status">
|
||||
<el-radio-group v-model="formData.status">
|
||||
<el-radio :label="'0'">启用</el-radio>
|
||||
<el-radio :label="'1'">禁用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="标题" prop="contentText">
|
||||
<el-input v-model="formData.contentText" placeholder="请输入标题" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-form>
|
||||
<div class="edit-bottom">
|
||||
<div class="edit-left bottom-common">
|
||||
|
||||
@@ -10,6 +10,21 @@
|
||||
:rules="formRules"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="标题" prop="contentText">
|
||||
<el-input v-model="formData.contentText" placeholder="请输入标题" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="启用状态" prop="status">
|
||||
<el-radio-group v-model="formData.status">
|
||||
<el-radio :label="'0'">启用</el-radio>
|
||||
<el-radio :label="'1'">禁用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="专业" prop="specialtyName">
|
||||
@@ -75,21 +90,7 @@
|
||||
/>
|
||||
</el-dialog>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="启用状态" prop="status">
|
||||
<el-radio-group v-model="formData.status">
|
||||
<el-radio :label="'0'">启用</el-radio>
|
||||
<el-radio :label="'1'">禁用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="标题" prop="contentText">
|
||||
<el-input v-model="formData.contentText" placeholder="请输入标题" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
<div class="edit-bottom">
|
||||
<div class="edit-left bottom-common">
|
||||
|
||||
@@ -22,6 +22,22 @@
|
||||
:rules="formRules"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="标题" prop="contentText">
|
||||
<el-input v-model="formData.contentText" placeholder="请输入标题" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="启用状态" prop="status">
|
||||
<el-radio-group v-model="formData.status">
|
||||
<el-radio :label="'0'">启用</el-radio>
|
||||
<el-radio :label="'1'">禁用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="专业" prop="specialtyName">
|
||||
@@ -86,22 +102,6 @@
|
||||
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="启用状态" prop="status">
|
||||
<el-radio-group v-model="formData.status">
|
||||
<el-radio :label="'0'">启用</el-radio>
|
||||
<el-radio :label="'1'">禁用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="标题" prop="contentText">
|
||||
<el-input v-model="formData.contentText" placeholder="请输入标题" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
<div class="edit-bottom">
|
||||
|
||||
@@ -10,6 +10,21 @@
|
||||
:rules="formRules"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="标题" prop="contentText">
|
||||
<el-input v-model="formData.contentText" placeholder="请输入标题" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="启用状态" prop="status">
|
||||
<el-radio-group v-model="formData.status">
|
||||
<el-radio :label="'0'">启用</el-radio>
|
||||
<el-radio :label="'1'">禁用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="专业" prop="specialtyName">
|
||||
@@ -85,27 +100,14 @@
|
||||
|
||||
<el-row>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="启用状态" prop="status">
|
||||
<el-radio-group v-model="formData.status">
|
||||
<el-radio :label="'0'">启用</el-radio>
|
||||
<el-radio :label="'1'">禁用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="数据库名" prop="tname">
|
||||
<el-input v-model="formData.tname" placeholder="请输入数据库名" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="标题" prop="contentText">
|
||||
<el-input v-model="formData.contentText" placeholder="请输入标题" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
<div class="edit-bottom">
|
||||
<div class="edit-left bottom-common">
|
||||
|
||||
@@ -22,6 +22,22 @@
|
||||
:rules="formRules"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="标题" prop="contentText">
|
||||
<el-input v-model="formData.contentText" placeholder="请输入标题" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="启用状态" prop="status">
|
||||
<el-radio-group v-model="formData.status">
|
||||
<el-radio :label="'0'">启用</el-radio>
|
||||
<el-radio :label="'1'">禁用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="专业" prop="specialtyName">
|
||||
@@ -86,22 +102,7 @@
|
||||
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="启用状态" prop="status">
|
||||
<el-radio-group v-model="formData.status">
|
||||
<el-radio :label="'0'">启用</el-radio>
|
||||
<el-radio :label="'1'">禁用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="标题" prop="contentText">
|
||||
<el-input v-model="formData.contentText" placeholder="请输入标题" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div class="edit-bottom">
|
||||
<div class="edit-left bottom-common">
|
||||
|
||||
@@ -10,6 +10,22 @@
|
||||
:rules="formRules"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="标题" prop="contentText">
|
||||
<el-input v-model="formData.contentText" placeholder="请输入标题" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="启用状态" prop="status">
|
||||
<el-radio-group v-model="formData.status">
|
||||
<el-radio :label="'0'">启用</el-radio>
|
||||
<el-radio :label="'1'">禁用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="专业" prop="specialtyName">
|
||||
@@ -75,21 +91,7 @@
|
||||
/>
|
||||
</el-dialog>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="启用状态" prop="status">
|
||||
<el-radio-group v-model="formData.status">
|
||||
<el-radio :label="'0'">启用</el-radio>
|
||||
<el-radio :label="'1'">禁用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="标题" prop="contentText">
|
||||
<el-input v-model="formData.contentText" placeholder="请输入标题" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
<div class="edit-bottom">
|
||||
<div class="edit-left bottom-common">
|
||||
|
||||
@@ -10,6 +10,22 @@
|
||||
:rules="formRules"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-row>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="标题" prop="contentText">
|
||||
<el-input v-model="formData.contentText" placeholder="请输入标题" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="启用状态" prop="status">
|
||||
<el-radio-group v-model="formData.status">
|
||||
<el-radio :label="'0'">启用</el-radio>
|
||||
<el-radio :label="'1'">禁用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="专业" prop="specialtyName">
|
||||
@@ -75,21 +91,7 @@
|
||||
/>
|
||||
</el-dialog>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="启用状态" prop="status">
|
||||
<el-radio-group v-model="formData.status">
|
||||
<el-radio :label="'0'">启用</el-radio>
|
||||
<el-radio :label="'1'">禁用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="标题" prop="contentText">
|
||||
<el-input v-model="formData.contentText" placeholder="请输入标题" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
<div class="edit-bottom">
|
||||
<div class="edit-left bottom-common">
|
||||
|
||||
@@ -10,6 +10,22 @@
|
||||
:rules="formRules"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="标题" prop="contentText">
|
||||
<el-input v-model="formData.contentText" placeholder="请输入标题" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="启用状态" prop="status">
|
||||
<el-radio-group v-model="formData.status">
|
||||
<el-radio :label="'0'">启用</el-radio>
|
||||
<el-radio :label="'1'">禁用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="专业" prop="specialtyName">
|
||||
@@ -75,21 +91,7 @@
|
||||
/>
|
||||
</el-dialog>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="启用状态" prop="status">
|
||||
<el-radio-group v-model="formData.status">
|
||||
<el-radio :label="'0'">启用</el-radio>
|
||||
<el-radio :label="'1'">禁用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="标题" prop="contentText">
|
||||
<el-input v-model="formData.contentText" placeholder="请输入标题" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
<div class="edit-bottom">
|
||||
<div class="edit-left bottom-common">
|
||||
|
||||
@@ -10,6 +10,22 @@
|
||||
:rules="formRules"
|
||||
label-width="80px"
|
||||
>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="标题" prop="contentText">
|
||||
<el-input v-model="formData.contentText" placeholder="请输入标题" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="启用状态" prop="status">
|
||||
<el-radio-group v-model="formData.status">
|
||||
<el-radio :label="'0'">启用</el-radio>
|
||||
<el-radio :label="'1'">禁用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="专业" prop="specialtyName">
|
||||
@@ -75,21 +91,7 @@
|
||||
/>
|
||||
</el-dialog>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="启用状态" prop="status">
|
||||
<el-radio-group v-model="formData.status">
|
||||
<el-radio :label="'0'">启用</el-radio>
|
||||
<el-radio :label="'1'">禁用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="标题" prop="contentText">
|
||||
<el-input v-model="formData.contentText" placeholder="请输入标题" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
<div class="edit-bottom">
|
||||
<div class="edit-left bottom-common">
|
||||
|
||||
@@ -10,6 +10,22 @@
|
||||
:rules="formRules"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-row>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="标题" prop="contentText">
|
||||
<el-input v-model="formData.contentText" placeholder="请输入标题" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="启用状态" prop="status">
|
||||
<el-radio-group v-model="formData.status">
|
||||
<el-radio :label="'0'">启用</el-radio>
|
||||
<el-radio :label="'1'">禁用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="专业" prop="specialtyName">
|
||||
@@ -75,21 +91,7 @@
|
||||
/>
|
||||
</el-dialog>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="启用状态" prop="status">
|
||||
<el-radio-group v-model="formData.status">
|
||||
<el-radio :label="'0'">启用</el-radio>
|
||||
<el-radio :label="'1'">禁用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="标题" prop="contentText">
|
||||
<el-input v-model="formData.contentText" placeholder="请输入标题" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
<div class="edit-bottom">
|
||||
<div class="edit-left bottom-common">
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||
@@ -35,6 +36,17 @@
|
||||
>
|
||||
<Icon icon="ep:plus" class="mr-5px" /> 添加学生</el-button
|
||||
>
|
||||
<el-button
|
||||
|
||||
type="primary"
|
||||
plain
|
||||
@click="openQueDialog"
|
||||
>
|
||||
<Icon icon="ep:plus" class="mr-5px" /> 按班级分配</el-button
|
||||
>
|
||||
|
||||
|
||||
|
||||
<el-button
|
||||
v-if="showAssignButton"
|
||||
type="primary"
|
||||
@@ -92,6 +104,56 @@
|
||||
/>
|
||||
</ContentWrap>
|
||||
|
||||
<el-dialog v-model="queDialogVisible" title="选择班级" width="700px" center>
|
||||
<!-- 顶部:全选 -->
|
||||
<el-checkbox
|
||||
v-model="checkAll"
|
||||
@change="handleCheckAllChange"
|
||||
style="margin-bottom: 10px;"
|
||||
>
|
||||
全选
|
||||
</el-checkbox>
|
||||
|
||||
<!-- 主体内容:左班级 + 右考场 -->
|
||||
<div style="display: flex; gap: 20px;">
|
||||
<!-- ✅ 左侧班级复选框区域(可滚动) -->
|
||||
<el-checkbox-group
|
||||
v-model="selectedQue"
|
||||
style="flex: 1; display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; padding-right: 8px; border: 1px solid #ebeef5; border-radius: 4px; padding: 10px;"
|
||||
>
|
||||
<el-checkbox
|
||||
v-for="item in currentSpNames"
|
||||
:key="item.id"
|
||||
:label="item.id"
|
||||
>
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
|
||||
<!-- ✅ 右侧考场单选框(由 showAssignButton 控制显示) -->
|
||||
<div
|
||||
v-if="showAssignButton"
|
||||
style="flex: 1; border: 1px solid #ebeef5; border-radius: 4px; padding: 10px; max-height: 300px; overflow-y: auto;"
|
||||
>
|
||||
<div style="font-weight: bold; margin-bottom: 8px;">选择考场</div>
|
||||
<el-radio-group v-model="selectedExamRoom">
|
||||
<el-radio
|
||||
v-for="room in examRooms"
|
||||
:key="room.sessionId"
|
||||
:label="room.sessionId"
|
||||
>
|
||||
{{ room.batch }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 底部按钮 -->
|
||||
<template #footer>
|
||||
<el-button @click="queDialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="confirmQue">确定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
|
||||
@@ -107,7 +169,9 @@ import * as SmsPersonlApi from '@/api/system/person';
|
||||
import PersonEdit from './components/person-edit.vue';
|
||||
import PersonSearch from './components/person-serach.vue'
|
||||
import StudentImportForm from './components/StudentImportForm.vue'
|
||||
import * as ClassApi from '@/api/exam/class'
|
||||
import * as SmsChannelApi from '@/api/system/session';
|
||||
import * as PersonApi from '@/api/system/person'
|
||||
import { fa } from 'element-plus/es/locale';
|
||||
|
||||
defineOptions({ name: 'SystemSmsChannel' })
|
||||
@@ -151,10 +215,15 @@ const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
batch: undefined,
|
||||
status: undefined,
|
||||
createTime: [],
|
||||
taskId: props.taskId
|
||||
})
|
||||
const queryParamsSessions = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 999,
|
||||
status: 0,
|
||||
taskId: props.taskId
|
||||
})
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
@@ -200,6 +269,63 @@ const handleSelectionChange = (rows) => {
|
||||
}
|
||||
|
||||
|
||||
const checkAll = ref(false);
|
||||
const queDialogVisible = ref(false);
|
||||
const currentSpNames = ref<Array<string>>([]);
|
||||
const examRooms = ref<Array<any>>([]);
|
||||
const selectedExamRoom = ref<string | null>(null);
|
||||
const openQueDialog =async () => {
|
||||
currentSpNames.value = await ClassApi.ClassApi.getClassIdAndName()
|
||||
// 获取考场列表
|
||||
const res = await SmsChannelApi.pageSessions(queryParamsSessions);
|
||||
if (res.list) {
|
||||
examRooms.value = res.list || []; // ✅ 把返回的列表存入考场数组
|
||||
} else {
|
||||
examRooms.value = [];
|
||||
}
|
||||
queDialogVisible.value = true;
|
||||
};
|
||||
const selectedQue = ref<string[]>([]);
|
||||
|
||||
watch(selectedQue, (val) => {
|
||||
if (val.length === currentSpNames.value.length) {
|
||||
checkAll.value = true;
|
||||
} else {
|
||||
checkAll.value = false;
|
||||
}
|
||||
});
|
||||
|
||||
const handleCheckAllChange = (val: boolean) => {
|
||||
if (val) {
|
||||
selectedQue.value = currentSpNames.value.map(item => item.id);
|
||||
} else {
|
||||
selectedQue.value = [];
|
||||
}
|
||||
};
|
||||
|
||||
const confirmQue = async () => {
|
||||
try {
|
||||
const payload = {
|
||||
taskId: props.taskId,
|
||||
classIds: selectedQue.value, // 数组形式传递
|
||||
sessionId:selectedExamRoom.value
|
||||
};
|
||||
|
||||
console.log(payload)
|
||||
await PersonApi.setSessionStu(payload)
|
||||
ElMessage.success('设置成功');
|
||||
getList()
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
|
||||
// 关闭弹窗 & 清空数据
|
||||
queDialogVisible.value = false;
|
||||
selectedQue.value = [];
|
||||
checkAll.value = false;
|
||||
};
|
||||
|
||||
|
||||
const selectedRows = ref<string[]>([]);
|
||||
|
||||
const handleDeletes = async () => {
|
||||
@@ -237,10 +363,6 @@ if(res =='删除成功'){
|
||||
await getList()
|
||||
} catch {}
|
||||
}
|
||||
const importFormRef = ref()
|
||||
const handleImport = () => {
|
||||
importFormRef.value.open()
|
||||
}
|
||||
|
||||
|
||||
const openEdit = (type: string, row?: object) => {
|
||||
@@ -258,7 +380,10 @@ const openSearch = (type: string, row?: object) => {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
const importFormRef = ref()
|
||||
const handleImport = () => {
|
||||
importFormRef.value.open()
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (id: number) => {
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||
@@ -35,6 +36,17 @@
|
||||
>
|
||||
<Icon icon="ep:plus" class="mr-5px" /> 添加学生</el-button
|
||||
>
|
||||
<el-button
|
||||
|
||||
type="primary"
|
||||
plain
|
||||
@click="openQueDialog"
|
||||
>
|
||||
<Icon icon="ep:plus" class="mr-5px" /> 按班级分配</el-button
|
||||
>
|
||||
|
||||
|
||||
|
||||
<el-button
|
||||
v-if="showAssignButton"
|
||||
type="primary"
|
||||
@@ -92,6 +104,56 @@
|
||||
/>
|
||||
</ContentWrap>
|
||||
|
||||
<el-dialog v-model="queDialogVisible" title="选择班级" width="700px" center>
|
||||
<!-- 顶部:全选 -->
|
||||
<el-checkbox
|
||||
v-model="checkAll"
|
||||
@change="handleCheckAllChange"
|
||||
style="margin-bottom: 10px;"
|
||||
>
|
||||
全选
|
||||
</el-checkbox>
|
||||
|
||||
<!-- 主体内容:左班级 + 右考场 -->
|
||||
<div style="display: flex; gap: 20px;">
|
||||
<!-- ✅ 左侧班级复选框区域(可滚动) -->
|
||||
<el-checkbox-group
|
||||
v-model="selectedQue"
|
||||
style="flex: 1; display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; padding-right: 8px; border: 1px solid #ebeef5; border-radius: 4px; padding: 10px;"
|
||||
>
|
||||
<el-checkbox
|
||||
v-for="item in currentSpNames"
|
||||
:key="item.id"
|
||||
:label="item.id"
|
||||
>
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
|
||||
<!-- ✅ 右侧考场单选框(由 showAssignButton 控制显示) -->
|
||||
<div
|
||||
v-if="showAssignButton"
|
||||
style="flex: 1; border: 1px solid #ebeef5; border-radius: 4px; padding: 10px; max-height: 300px; overflow-y: auto;"
|
||||
>
|
||||
<div style="font-weight: bold; margin-bottom: 8px;">选择考场</div>
|
||||
<el-radio-group v-model="selectedExamRoom">
|
||||
<el-radio
|
||||
v-for="room in examRooms"
|
||||
:key="room.sessionId"
|
||||
:label="room.sessionId"
|
||||
>
|
||||
{{ room.batch }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 底部按钮 -->
|
||||
<template #footer>
|
||||
<el-button @click="queDialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="confirmQue">确定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
|
||||
@@ -106,8 +168,10 @@ import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
||||
import * as SmsPersonlApi from '@/api/system/person';
|
||||
import PersonEdit from './components/person-edit.vue';
|
||||
import PersonSearch from './components/person-serach.vue'
|
||||
import * as SmsChannelApi from '@/api/system/session';
|
||||
import StudentImportForm from './components/StudentImportForm.vue'
|
||||
import * as ClassApi from '@/api/exam/class'
|
||||
import * as SmsChannelApi from '@/api/system/session';
|
||||
import * as PersonApi from '@/api/system/person'
|
||||
import { fa } from 'element-plus/es/locale';
|
||||
|
||||
defineOptions({ name: 'SystemSmsChannel' })
|
||||
@@ -151,10 +215,15 @@ const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
batch: undefined,
|
||||
status: undefined,
|
||||
createTime: [],
|
||||
taskId: props.taskId
|
||||
})
|
||||
const queryParamsSessions = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 999,
|
||||
status: 0,
|
||||
taskId: props.taskId
|
||||
})
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
@@ -200,6 +269,63 @@ const handleSelectionChange = (rows) => {
|
||||
}
|
||||
|
||||
|
||||
const checkAll = ref(false);
|
||||
const queDialogVisible = ref(false);
|
||||
const currentSpNames = ref<Array<string>>([]);
|
||||
const examRooms = ref<Array<any>>([]);
|
||||
const selectedExamRoom = ref<string | null>(null);
|
||||
const openQueDialog =async () => {
|
||||
currentSpNames.value = await ClassApi.ClassApi.getClassIdAndName()
|
||||
// 获取考场列表
|
||||
const res = await SmsChannelApi.pageSessions(queryParamsSessions);
|
||||
if (res.list) {
|
||||
examRooms.value = res.list || []; // ✅ 把返回的列表存入考场数组
|
||||
} else {
|
||||
examRooms.value = [];
|
||||
}
|
||||
queDialogVisible.value = true;
|
||||
};
|
||||
const selectedQue = ref<string[]>([]);
|
||||
|
||||
watch(selectedQue, (val) => {
|
||||
if (val.length === currentSpNames.value.length) {
|
||||
checkAll.value = true;
|
||||
} else {
|
||||
checkAll.value = false;
|
||||
}
|
||||
});
|
||||
|
||||
const handleCheckAllChange = (val: boolean) => {
|
||||
if (val) {
|
||||
selectedQue.value = currentSpNames.value.map(item => item.id);
|
||||
} else {
|
||||
selectedQue.value = [];
|
||||
}
|
||||
};
|
||||
|
||||
const confirmQue = async () => {
|
||||
try {
|
||||
const payload = {
|
||||
taskId: props.taskId,
|
||||
classIds: selectedQue.value, // 数组形式传递
|
||||
sessionId:selectedExamRoom.value
|
||||
};
|
||||
|
||||
console.log(payload)
|
||||
await PersonApi.setSessionStu(payload)
|
||||
ElMessage.success('设置成功');
|
||||
getList()
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
|
||||
// 关闭弹窗 & 清空数据
|
||||
queDialogVisible.value = false;
|
||||
selectedQue.value = [];
|
||||
checkAll.value = false;
|
||||
};
|
||||
|
||||
|
||||
const selectedRows = ref<string[]>([]);
|
||||
|
||||
const handleDeletes = async () => {
|
||||
@@ -238,10 +364,6 @@ if(res =='删除成功'){
|
||||
} catch {}
|
||||
}
|
||||
|
||||
const importFormRef = ref()
|
||||
const handleImport = () => {
|
||||
importFormRef.value.open()
|
||||
}
|
||||
|
||||
const openEdit = (type: string, row?: object) => {
|
||||
showEdit.value = true
|
||||
@@ -258,7 +380,10 @@ const openSearch = (type: string, row?: object) => {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
const importFormRef = ref()
|
||||
const handleImport = () => {
|
||||
importFormRef.value.open()
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (id: number) => {
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||
@@ -35,6 +36,17 @@
|
||||
>
|
||||
<Icon icon="ep:plus" class="mr-5px" /> 添加学生</el-button
|
||||
>
|
||||
<el-button
|
||||
|
||||
type="primary"
|
||||
plain
|
||||
@click="openQueDialog"
|
||||
>
|
||||
<Icon icon="ep:plus" class="mr-5px" /> 按班级分配</el-button
|
||||
>
|
||||
|
||||
|
||||
|
||||
<el-button
|
||||
v-if="showAssignButton"
|
||||
type="primary"
|
||||
@@ -92,6 +104,56 @@
|
||||
/>
|
||||
</ContentWrap>
|
||||
|
||||
<el-dialog v-model="queDialogVisible" title="选择班级" width="700px" center>
|
||||
<!-- 顶部:全选 -->
|
||||
<el-checkbox
|
||||
v-model="checkAll"
|
||||
@change="handleCheckAllChange"
|
||||
style="margin-bottom: 10px;"
|
||||
>
|
||||
全选
|
||||
</el-checkbox>
|
||||
|
||||
<!-- 主体内容:左班级 + 右考场 -->
|
||||
<div style="display: flex; gap: 20px;">
|
||||
<!-- ✅ 左侧班级复选框区域(可滚动) -->
|
||||
<el-checkbox-group
|
||||
v-model="selectedQue"
|
||||
style="flex: 1; display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; padding-right: 8px; border: 1px solid #ebeef5; border-radius: 4px; padding: 10px;"
|
||||
>
|
||||
<el-checkbox
|
||||
v-for="item in currentSpNames"
|
||||
:key="item.id"
|
||||
:label="item.id"
|
||||
>
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
|
||||
<!-- ✅ 右侧考场单选框(由 showAssignButton 控制显示) -->
|
||||
<div
|
||||
v-if="showAssignButton"
|
||||
style="flex: 1; border: 1px solid #ebeef5; border-radius: 4px; padding: 10px; max-height: 300px; overflow-y: auto;"
|
||||
>
|
||||
<div style="font-weight: bold; margin-bottom: 8px;">选择考场</div>
|
||||
<el-radio-group v-model="selectedExamRoom">
|
||||
<el-radio
|
||||
v-for="room in examRooms"
|
||||
:key="room.sessionId"
|
||||
:label="room.sessionId"
|
||||
>
|
||||
{{ room.batch }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 底部按钮 -->
|
||||
<template #footer>
|
||||
<el-button @click="queDialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="confirmQue">确定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
|
||||
@@ -107,7 +169,9 @@ import * as SmsPersonlApi from '@/api/system/person';
|
||||
import PersonEdit from './components/person-edit.vue';
|
||||
import PersonSearch from './components/person-serach.vue'
|
||||
import StudentImportForm from './components/StudentImportForm.vue'
|
||||
import * as ClassApi from '@/api/exam/class'
|
||||
import * as SmsChannelApi from '@/api/system/session';
|
||||
import * as PersonApi from '@/api/system/person'
|
||||
import { fa } from 'element-plus/es/locale';
|
||||
|
||||
defineOptions({ name: 'SystemSmsChannel' })
|
||||
@@ -151,10 +215,15 @@ const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
batch: undefined,
|
||||
status: undefined,
|
||||
createTime: [],
|
||||
taskId: props.taskId
|
||||
})
|
||||
const queryParamsSessions = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 999,
|
||||
status: 0,
|
||||
taskId: props.taskId
|
||||
})
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
@@ -200,6 +269,63 @@ const handleSelectionChange = (rows) => {
|
||||
}
|
||||
|
||||
|
||||
const checkAll = ref(false);
|
||||
const queDialogVisible = ref(false);
|
||||
const currentSpNames = ref<Array<string>>([]);
|
||||
const examRooms = ref<Array<any>>([]);
|
||||
const selectedExamRoom = ref<string | null>(null);
|
||||
const openQueDialog =async () => {
|
||||
currentSpNames.value = await ClassApi.ClassApi.getClassIdAndName()
|
||||
// 获取考场列表
|
||||
const res = await SmsChannelApi.pageSessions(queryParamsSessions);
|
||||
if (res.list) {
|
||||
examRooms.value = res.list || []; // ✅ 把返回的列表存入考场数组
|
||||
} else {
|
||||
examRooms.value = [];
|
||||
}
|
||||
queDialogVisible.value = true;
|
||||
};
|
||||
const selectedQue = ref<string[]>([]);
|
||||
|
||||
watch(selectedQue, (val) => {
|
||||
if (val.length === currentSpNames.value.length) {
|
||||
checkAll.value = true;
|
||||
} else {
|
||||
checkAll.value = false;
|
||||
}
|
||||
});
|
||||
|
||||
const handleCheckAllChange = (val: boolean) => {
|
||||
if (val) {
|
||||
selectedQue.value = currentSpNames.value.map(item => item.id);
|
||||
} else {
|
||||
selectedQue.value = [];
|
||||
}
|
||||
};
|
||||
|
||||
const confirmQue = async () => {
|
||||
try {
|
||||
const payload = {
|
||||
taskId: props.taskId,
|
||||
classIds: selectedQue.value, // 数组形式传递
|
||||
sessionId:selectedExamRoom.value
|
||||
};
|
||||
|
||||
console.log(payload)
|
||||
await PersonApi.setSessionStu(payload)
|
||||
ElMessage.success('设置成功');
|
||||
getList()
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
|
||||
// 关闭弹窗 & 清空数据
|
||||
queDialogVisible.value = false;
|
||||
selectedQue.value = [];
|
||||
checkAll.value = false;
|
||||
};
|
||||
|
||||
|
||||
const selectedRows = ref<string[]>([]);
|
||||
|
||||
const handleDeletes = async () => {
|
||||
@@ -237,10 +363,6 @@ if(res =='删除成功'){
|
||||
await getList()
|
||||
} catch {}
|
||||
}
|
||||
const importFormRef = ref()
|
||||
const handleImport = () => {
|
||||
importFormRef.value.open()
|
||||
}
|
||||
|
||||
|
||||
const openEdit = (type: string, row?: object) => {
|
||||
@@ -258,7 +380,10 @@ const openSearch = (type: string, row?: object) => {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
const importFormRef = ref()
|
||||
const handleImport = () => {
|
||||
importFormRef.value.open()
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (id: number) => {
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||
@@ -35,6 +36,17 @@
|
||||
>
|
||||
<Icon icon="ep:plus" class="mr-5px" /> 添加学生</el-button
|
||||
>
|
||||
<el-button
|
||||
|
||||
type="primary"
|
||||
plain
|
||||
@click="openQueDialog"
|
||||
>
|
||||
<Icon icon="ep:plus" class="mr-5px" /> 按班级分配</el-button
|
||||
>
|
||||
|
||||
|
||||
|
||||
<el-button
|
||||
v-if="showAssignButton"
|
||||
type="primary"
|
||||
@@ -92,6 +104,56 @@
|
||||
/>
|
||||
</ContentWrap>
|
||||
|
||||
<el-dialog v-model="queDialogVisible" title="选择班级" width="700px" center>
|
||||
<!-- 顶部:全选 -->
|
||||
<el-checkbox
|
||||
v-model="checkAll"
|
||||
@change="handleCheckAllChange"
|
||||
style="margin-bottom: 10px;"
|
||||
>
|
||||
全选
|
||||
</el-checkbox>
|
||||
|
||||
<!-- 主体内容:左班级 + 右考场 -->
|
||||
<div style="display: flex; gap: 20px;">
|
||||
<!-- ✅ 左侧班级复选框区域(可滚动) -->
|
||||
<el-checkbox-group
|
||||
v-model="selectedQue"
|
||||
style="flex: 1; display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; padding-right: 8px; border: 1px solid #ebeef5; border-radius: 4px; padding: 10px;"
|
||||
>
|
||||
<el-checkbox
|
||||
v-for="item in currentSpNames"
|
||||
:key="item.id"
|
||||
:label="item.id"
|
||||
>
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
|
||||
<!-- ✅ 右侧考场单选框(由 showAssignButton 控制显示) -->
|
||||
<div
|
||||
v-if="showAssignButton"
|
||||
style="flex: 1; border: 1px solid #ebeef5; border-radius: 4px; padding: 10px; max-height: 300px; overflow-y: auto;"
|
||||
>
|
||||
<div style="font-weight: bold; margin-bottom: 8px;">选择考场</div>
|
||||
<el-radio-group v-model="selectedExamRoom">
|
||||
<el-radio
|
||||
v-for="room in examRooms"
|
||||
:key="room.sessionId"
|
||||
:label="room.sessionId"
|
||||
>
|
||||
{{ room.batch }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 底部按钮 -->
|
||||
<template #footer>
|
||||
<el-button @click="queDialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="confirmQue">确定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
|
||||
@@ -107,7 +169,9 @@ import * as SmsPersonlApi from '@/api/system/person';
|
||||
import PersonEdit from './components/person-edit.vue';
|
||||
import PersonSearch from './components/person-serach.vue'
|
||||
import StudentImportForm from './components/StudentImportForm.vue'
|
||||
import * as ClassApi from '@/api/exam/class'
|
||||
import * as SmsChannelApi from '@/api/system/session';
|
||||
import * as PersonApi from '@/api/system/person'
|
||||
import { fa } from 'element-plus/es/locale';
|
||||
|
||||
defineOptions({ name: 'SystemSmsChannel' })
|
||||
@@ -151,10 +215,15 @@ const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
batch: undefined,
|
||||
status: undefined,
|
||||
createTime: [],
|
||||
taskId: props.taskId
|
||||
})
|
||||
const queryParamsSessions = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 999,
|
||||
status: 0,
|
||||
taskId: props.taskId
|
||||
})
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
@@ -200,6 +269,63 @@ const handleSelectionChange = (rows) => {
|
||||
}
|
||||
|
||||
|
||||
const checkAll = ref(false);
|
||||
const queDialogVisible = ref(false);
|
||||
const currentSpNames = ref<Array<string>>([]);
|
||||
const examRooms = ref<Array<any>>([]);
|
||||
const selectedExamRoom = ref<string | null>(null);
|
||||
const openQueDialog =async () => {
|
||||
currentSpNames.value = await ClassApi.ClassApi.getClassIdAndName()
|
||||
// 获取考场列表
|
||||
const res = await SmsChannelApi.pageSessions(queryParamsSessions);
|
||||
if (res.list) {
|
||||
examRooms.value = res.list || []; // ✅ 把返回的列表存入考场数组
|
||||
} else {
|
||||
examRooms.value = [];
|
||||
}
|
||||
queDialogVisible.value = true;
|
||||
};
|
||||
const selectedQue = ref<string[]>([]);
|
||||
|
||||
watch(selectedQue, (val) => {
|
||||
if (val.length === currentSpNames.value.length) {
|
||||
checkAll.value = true;
|
||||
} else {
|
||||
checkAll.value = false;
|
||||
}
|
||||
});
|
||||
|
||||
const handleCheckAllChange = (val: boolean) => {
|
||||
if (val) {
|
||||
selectedQue.value = currentSpNames.value.map(item => item.id);
|
||||
} else {
|
||||
selectedQue.value = [];
|
||||
}
|
||||
};
|
||||
|
||||
const confirmQue = async () => {
|
||||
try {
|
||||
const payload = {
|
||||
taskId: props.taskId,
|
||||
classIds: selectedQue.value, // 数组形式传递
|
||||
sessionId:selectedExamRoom.value
|
||||
};
|
||||
|
||||
console.log(payload)
|
||||
await PersonApi.setSessionStu(payload)
|
||||
ElMessage.success('设置成功');
|
||||
getList()
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
|
||||
// 关闭弹窗 & 清空数据
|
||||
queDialogVisible.value = false;
|
||||
selectedQue.value = [];
|
||||
checkAll.value = false;
|
||||
};
|
||||
|
||||
|
||||
const selectedRows = ref<string[]>([]);
|
||||
|
||||
const handleDeletes = async () => {
|
||||
@@ -237,10 +363,7 @@ if(res =='删除成功'){
|
||||
await getList()
|
||||
} catch {}
|
||||
}
|
||||
const importFormRef = ref()
|
||||
const handleImport = () => {
|
||||
importFormRef.value.open()
|
||||
}
|
||||
|
||||
|
||||
const openEdit = (type: string, row?: object) => {
|
||||
showEdit.value = true
|
||||
@@ -257,7 +380,10 @@ const openSearch = (type: string, row?: object) => {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
const importFormRef = ref()
|
||||
const handleImport = () => {
|
||||
importFormRef.value.open()
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (id: number) => {
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||
@@ -35,6 +36,17 @@
|
||||
>
|
||||
<Icon icon="ep:plus" class="mr-5px" /> 添加学生</el-button
|
||||
>
|
||||
<el-button
|
||||
|
||||
type="primary"
|
||||
plain
|
||||
@click="openQueDialog"
|
||||
>
|
||||
<Icon icon="ep:plus" class="mr-5px" /> 按班级分配</el-button
|
||||
>
|
||||
|
||||
|
||||
|
||||
<el-button
|
||||
v-if="showAssignButton"
|
||||
type="primary"
|
||||
@@ -92,6 +104,56 @@
|
||||
/>
|
||||
</ContentWrap>
|
||||
|
||||
<el-dialog v-model="queDialogVisible" title="选择班级" width="700px" center>
|
||||
<!-- 顶部:全选 -->
|
||||
<el-checkbox
|
||||
v-model="checkAll"
|
||||
@change="handleCheckAllChange"
|
||||
style="margin-bottom: 10px;"
|
||||
>
|
||||
全选
|
||||
</el-checkbox>
|
||||
|
||||
<!-- 主体内容:左班级 + 右考场 -->
|
||||
<div style="display: flex; gap: 20px;">
|
||||
<!-- ✅ 左侧班级复选框区域(可滚动) -->
|
||||
<el-checkbox-group
|
||||
v-model="selectedQue"
|
||||
style="flex: 1; display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; padding-right: 8px; border: 1px solid #ebeef5; border-radius: 4px; padding: 10px;"
|
||||
>
|
||||
<el-checkbox
|
||||
v-for="item in currentSpNames"
|
||||
:key="item.id"
|
||||
:label="item.id"
|
||||
>
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
|
||||
<!-- ✅ 右侧考场单选框(由 showAssignButton 控制显示) -->
|
||||
<div
|
||||
v-if="showAssignButton"
|
||||
style="flex: 1; border: 1px solid #ebeef5; border-radius: 4px; padding: 10px; max-height: 300px; overflow-y: auto;"
|
||||
>
|
||||
<div style="font-weight: bold; margin-bottom: 8px;">选择考场</div>
|
||||
<el-radio-group v-model="selectedExamRoom">
|
||||
<el-radio
|
||||
v-for="room in examRooms"
|
||||
:key="room.sessionId"
|
||||
:label="room.sessionId"
|
||||
>
|
||||
{{ room.batch }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 底部按钮 -->
|
||||
<template #footer>
|
||||
<el-button @click="queDialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="confirmQue">确定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
|
||||
@@ -107,7 +169,9 @@ import * as SmsPersonlApi from '@/api/system/person';
|
||||
import PersonEdit from './components/person-edit.vue';
|
||||
import PersonSearch from './components/person-serach.vue'
|
||||
import StudentImportForm from './components/StudentImportForm.vue'
|
||||
import * as ClassApi from '@/api/exam/class'
|
||||
import * as SmsChannelApi from '@/api/system/session';
|
||||
import * as PersonApi from '@/api/system/person'
|
||||
import { fa } from 'element-plus/es/locale';
|
||||
|
||||
defineOptions({ name: 'SystemSmsChannel' })
|
||||
@@ -151,10 +215,15 @@ const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
batch: undefined,
|
||||
status: undefined,
|
||||
createTime: [],
|
||||
taskId: props.taskId
|
||||
})
|
||||
const queryParamsSessions = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 999,
|
||||
status: 0,
|
||||
taskId: props.taskId
|
||||
})
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
@@ -200,6 +269,63 @@ const handleSelectionChange = (rows) => {
|
||||
}
|
||||
|
||||
|
||||
const checkAll = ref(false);
|
||||
const queDialogVisible = ref(false);
|
||||
const currentSpNames = ref<Array<string>>([]);
|
||||
const examRooms = ref<Array<any>>([]);
|
||||
const selectedExamRoom = ref<string | null>(null);
|
||||
const openQueDialog =async () => {
|
||||
currentSpNames.value = await ClassApi.ClassApi.getClassIdAndName()
|
||||
// 获取考场列表
|
||||
const res = await SmsChannelApi.pageSessions(queryParamsSessions);
|
||||
if (res.list) {
|
||||
examRooms.value = res.list || []; // ✅ 把返回的列表存入考场数组
|
||||
} else {
|
||||
examRooms.value = [];
|
||||
}
|
||||
queDialogVisible.value = true;
|
||||
};
|
||||
const selectedQue = ref<string[]>([]);
|
||||
|
||||
watch(selectedQue, (val) => {
|
||||
if (val.length === currentSpNames.value.length) {
|
||||
checkAll.value = true;
|
||||
} else {
|
||||
checkAll.value = false;
|
||||
}
|
||||
});
|
||||
|
||||
const handleCheckAllChange = (val: boolean) => {
|
||||
if (val) {
|
||||
selectedQue.value = currentSpNames.value.map(item => item.id);
|
||||
} else {
|
||||
selectedQue.value = [];
|
||||
}
|
||||
};
|
||||
|
||||
const confirmQue = async () => {
|
||||
try {
|
||||
const payload = {
|
||||
taskId: props.taskId,
|
||||
classIds: selectedQue.value, // 数组形式传递
|
||||
sessionId:selectedExamRoom.value
|
||||
};
|
||||
|
||||
console.log(payload)
|
||||
await PersonApi.setSessionStu(payload)
|
||||
ElMessage.success('设置成功');
|
||||
getList()
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
|
||||
// 关闭弹窗 & 清空数据
|
||||
queDialogVisible.value = false;
|
||||
selectedQue.value = [];
|
||||
checkAll.value = false;
|
||||
};
|
||||
|
||||
|
||||
const selectedRows = ref<string[]>([]);
|
||||
|
||||
const handleDeletes = async () => {
|
||||
@@ -259,7 +385,6 @@ const handleImport = () => {
|
||||
importFormRef.value.open()
|
||||
}
|
||||
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (id: number) => {
|
||||
try {
|
||||
|
||||
@@ -36,6 +36,17 @@
|
||||
>
|
||||
<Icon icon="ep:plus" class="mr-5px" /> 添加学生</el-button
|
||||
>
|
||||
<el-button
|
||||
|
||||
type="primary"
|
||||
plain
|
||||
@click="openQueDialog"
|
||||
>
|
||||
<Icon icon="ep:plus" class="mr-5px" /> 按班级分配</el-button
|
||||
>
|
||||
|
||||
|
||||
|
||||
<el-button
|
||||
v-if="showAssignButton"
|
||||
type="primary"
|
||||
@@ -93,6 +104,56 @@
|
||||
/>
|
||||
</ContentWrap>
|
||||
|
||||
<el-dialog v-model="queDialogVisible" title="选择班级" width="700px" center>
|
||||
<!-- 顶部:全选 -->
|
||||
<el-checkbox
|
||||
v-model="checkAll"
|
||||
@change="handleCheckAllChange"
|
||||
style="margin-bottom: 10px;"
|
||||
>
|
||||
全选
|
||||
</el-checkbox>
|
||||
|
||||
<!-- 主体内容:左班级 + 右考场 -->
|
||||
<div style="display: flex; gap: 20px;">
|
||||
<!-- ✅ 左侧班级复选框区域(可滚动) -->
|
||||
<el-checkbox-group
|
||||
v-model="selectedQue"
|
||||
style="flex: 1; display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; padding-right: 8px; border: 1px solid #ebeef5; border-radius: 4px; padding: 10px;"
|
||||
>
|
||||
<el-checkbox
|
||||
v-for="item in currentSpNames"
|
||||
:key="item.id"
|
||||
:label="item.id"
|
||||
>
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
|
||||
<!-- ✅ 右侧考场单选框(由 showAssignButton 控制显示) -->
|
||||
<div
|
||||
v-if="showAssignButton"
|
||||
style="flex: 1; border: 1px solid #ebeef5; border-radius: 4px; padding: 10px; max-height: 300px; overflow-y: auto;"
|
||||
>
|
||||
<div style="font-weight: bold; margin-bottom: 8px;">选择考场</div>
|
||||
<el-radio-group v-model="selectedExamRoom">
|
||||
<el-radio
|
||||
v-for="room in examRooms"
|
||||
:key="room.sessionId"
|
||||
:label="room.sessionId"
|
||||
>
|
||||
{{ room.batch }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 底部按钮 -->
|
||||
<template #footer>
|
||||
<el-button @click="queDialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="confirmQue">确定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
|
||||
@@ -108,7 +169,9 @@ import * as SmsPersonlApi from '@/api/system/person';
|
||||
import PersonEdit from './components/person-edit.vue';
|
||||
import PersonSearch from './components/person-serach.vue'
|
||||
import StudentImportForm from './components/StudentImportForm.vue'
|
||||
import * as ClassApi from '@/api/exam/class'
|
||||
import * as SmsChannelApi from '@/api/system/session';
|
||||
import * as PersonApi from '@/api/system/person'
|
||||
import { fa } from 'element-plus/es/locale';
|
||||
|
||||
defineOptions({ name: 'SystemSmsChannel' })
|
||||
@@ -155,6 +218,12 @@ const queryParams = reactive({
|
||||
createTime: [],
|
||||
taskId: props.taskId
|
||||
})
|
||||
const queryParamsSessions = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 999,
|
||||
status: 0,
|
||||
taskId: props.taskId
|
||||
})
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
@@ -200,6 +269,63 @@ const handleSelectionChange = (rows) => {
|
||||
}
|
||||
|
||||
|
||||
const checkAll = ref(false);
|
||||
const queDialogVisible = ref(false);
|
||||
const currentSpNames = ref<Array<string>>([]);
|
||||
const examRooms = ref<Array<any>>([]);
|
||||
const selectedExamRoom = ref<string | null>(null);
|
||||
const openQueDialog =async () => {
|
||||
currentSpNames.value = await ClassApi.ClassApi.getClassIdAndName()
|
||||
// 获取考场列表
|
||||
const res = await SmsChannelApi.pageSessions(queryParamsSessions);
|
||||
if (res.list) {
|
||||
examRooms.value = res.list || []; // ✅ 把返回的列表存入考场数组
|
||||
} else {
|
||||
examRooms.value = [];
|
||||
}
|
||||
queDialogVisible.value = true;
|
||||
};
|
||||
const selectedQue = ref<string[]>([]);
|
||||
|
||||
watch(selectedQue, (val) => {
|
||||
if (val.length === currentSpNames.value.length) {
|
||||
checkAll.value = true;
|
||||
} else {
|
||||
checkAll.value = false;
|
||||
}
|
||||
});
|
||||
|
||||
const handleCheckAllChange = (val: boolean) => {
|
||||
if (val) {
|
||||
selectedQue.value = currentSpNames.value.map(item => item.id);
|
||||
} else {
|
||||
selectedQue.value = [];
|
||||
}
|
||||
};
|
||||
|
||||
const confirmQue = async () => {
|
||||
try {
|
||||
const payload = {
|
||||
taskId: props.taskId,
|
||||
classIds: selectedQue.value, // 数组形式传递
|
||||
sessionId:selectedExamRoom.value
|
||||
};
|
||||
|
||||
console.log(payload)
|
||||
await PersonApi.setSessionStu(payload)
|
||||
ElMessage.success('设置成功');
|
||||
getList()
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
|
||||
// 关闭弹窗 & 清空数据
|
||||
queDialogVisible.value = false;
|
||||
selectedQue.value = [];
|
||||
checkAll.value = false;
|
||||
};
|
||||
|
||||
|
||||
const selectedRows = ref<string[]>([]);
|
||||
|
||||
const handleDeletes = async () => {
|
||||
|
||||
Reference in New Issue
Block a user