a
This commit is contained in:
@@ -2,14 +2,86 @@
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<!-- 搜索表单 -->
|
||||
<el-form :model="queryForm" inline>
|
||||
<el-form-item label="">
|
||||
<el-form :model="queryForm" inline ref="searchFormRef">
|
||||
<el-form-item label="关键词">
|
||||
<el-input
|
||||
v-model="queryForm.searchTotal"
|
||||
clearable
|
||||
placeholder="请输入姓名/身份证号/家庭联系人"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="学院" prop="deptCode">
|
||||
<el-select
|
||||
v-model="queryForm.deptCode"
|
||||
filterable
|
||||
clearable
|
||||
placeholder="请选择学院"
|
||||
style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in deptList"
|
||||
:key="item.deptCode"
|
||||
:label="item.deptName"
|
||||
:value="item.deptCode"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="入学年份" prop="grade">
|
||||
<el-select
|
||||
v-model="queryForm.grade"
|
||||
filterable
|
||||
clearable
|
||||
placeholder="请选择入学年份"
|
||||
style="width: 150px">
|
||||
<el-option
|
||||
v-for="item in planList"
|
||||
:key="item.id"
|
||||
:label="item.year"
|
||||
:value="item.year"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="班级" prop="classCode">
|
||||
<el-select
|
||||
v-model="queryForm.classCode"
|
||||
filterable
|
||||
clearable
|
||||
placeholder="请选择班级"
|
||||
style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in classList"
|
||||
:key="item.classCode"
|
||||
:label="item.classNo"
|
||||
:value="item.classCode"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="报到状态" prop="checkInStatus">
|
||||
<el-select
|
||||
v-model="queryForm.checkInStatus"
|
||||
filterable
|
||||
clearable
|
||||
placeholder="请选择报到状态"
|
||||
style="width: 150px">
|
||||
<el-option
|
||||
v-for="item in checkInStatusData"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="住宿申请" prop="isDormApply">
|
||||
<el-select
|
||||
v-model="queryForm.isDormApply"
|
||||
filterable
|
||||
clearable
|
||||
placeholder="请选择住宿申请"
|
||||
style="width: 150px">
|
||||
<el-option label="未通过" value="0" />
|
||||
<el-option label="申请通过" value="1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="getDataList">查询</el-button>
|
||||
<el-button icon="Refresh" class="ml10" @click="resetQuery">重置</el-button>
|
||||
@@ -74,7 +146,11 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="roomNo" label="宿舍号" align="center" width="80" show-overflow-tooltip />
|
||||
<el-table-column prop="bedNo" label="床位号" align="center" width="80" show-overflow-tooltip />
|
||||
<el-table-column prop="degreeOfEducation" label="文化程度" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="degreeOfEducation" label="文化程度" align="center" show-overflow-tooltip >
|
||||
<template #default="scope">
|
||||
<span>{{ getStatusConfig(eduList, scope.row.degreeOfEducation)?.label }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="residenceDetail" label="居住地址" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="parentName" label="家庭联系人" width="100" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="parentTelOne" label="家长电话1" align="center" show-overflow-tooltip />
|
||||
@@ -119,6 +195,8 @@ import { getDictsByTypes } from '/@/api/admin/dict'
|
||||
import { useDict } from '/@/hooks/dict'
|
||||
import request from '/@/utils/request'
|
||||
import { getStatusConfig } from '/@/config/global'
|
||||
import { getDeptList, getClassListByRole } from '/@/api/basic/basicclass'
|
||||
import { getList } from '/@/api/recruit/recruitstudentplangroup'
|
||||
|
||||
const StuCheckIn = defineAsyncComponent(() => import('./stu-check-in.vue'))
|
||||
const TeacherNameNo = defineAsyncComponent(() => import('/@/components/TeacherNameNo/index.vue'))
|
||||
@@ -148,13 +226,24 @@ const eduList = ref<any[]>([])
|
||||
|
||||
// 表格引用
|
||||
const tableRef = ref()
|
||||
const searchFormRef = ref()
|
||||
const stuCheckInRef = ref()
|
||||
|
||||
// 导出加载状态
|
||||
const exportLoading = ref(false)
|
||||
|
||||
// 数据列表
|
||||
const deptList = ref<any[]>([])
|
||||
const planList = ref<any[]>([])
|
||||
const classList = ref<any[]>([])
|
||||
|
||||
// 查询表单
|
||||
const queryForm = reactive({
|
||||
deptCode: '',
|
||||
grade: '',
|
||||
classCode: '',
|
||||
checkInStatus: '',
|
||||
isDormApply: '',
|
||||
searchTotal: ''
|
||||
})
|
||||
|
||||
@@ -167,6 +256,11 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
pageList: async (params: any) => {
|
||||
const response = await fetchList({
|
||||
...params,
|
||||
deptCode: queryForm.deptCode,
|
||||
grade: queryForm.grade,
|
||||
classCode: queryForm.classCode,
|
||||
checkInStatus: queryForm.checkInStatus,
|
||||
isDormApply: queryForm.isDormApply,
|
||||
searchTotal: queryForm.searchTotal
|
||||
})
|
||||
return {
|
||||
@@ -189,6 +283,12 @@ const getCheckInStatusLabel = (value: string) => {
|
||||
|
||||
// 重置查询
|
||||
const resetQuery = () => {
|
||||
searchFormRef.value?.resetFields()
|
||||
queryForm.deptCode = ''
|
||||
queryForm.grade = ''
|
||||
queryForm.classCode = ''
|
||||
queryForm.checkInStatus = ''
|
||||
queryForm.isDormApply = ''
|
||||
queryForm.searchTotal = ''
|
||||
getDataList()
|
||||
}
|
||||
@@ -257,9 +357,32 @@ const getCheckInStatusData = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
// 初始化数据
|
||||
const init = async () => {
|
||||
try {
|
||||
// 获取学院列表
|
||||
const deptData = await getDeptList()
|
||||
deptList.value = deptData.data || []
|
||||
|
||||
// 获取入学年份列表(招生计划)
|
||||
const planData = await getList()
|
||||
planList.value = planData.data || []
|
||||
|
||||
// 获取班级列表
|
||||
const classData = await getClassListByRole()
|
||||
classList.value = classData.data || []
|
||||
|
||||
// 获取字典数据
|
||||
await getCheckInStatusData()
|
||||
|
||||
getDataList()
|
||||
} catch (error) {
|
||||
message.error('初始化失败')
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getCheckInStatusData()
|
||||
getDataList()
|
||||
init()
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user