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 () => {
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getCheckInStatusData()
|
||||
// 初始化数据
|
||||
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(() => {
|
||||
init()
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,30 +1,24 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog v-model="newStuCheckInDialog" width="40%">
|
||||
<el-form :model="form" :rules="rules" ref="formRef" label-width="120px"
|
||||
<el-dialog v-model="newStuCheckInDialog" width="600" title="新生报到">
|
||||
<el-form :model="form" :rules="rules" ref="formRef" label-width="100px"
|
||||
class="demo-ruleForm">
|
||||
|
||||
<el-form-item label="姓名" prop="realName">
|
||||
<el-input v-model="form.name" style=" width: 80%"></el-input>
|
||||
<el-input v-model="form.name"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="性别" prop="gender">
|
||||
<el-select v-model="form.gender" placeholder="请选择性别" style=" width: 80%">
|
||||
<el-option
|
||||
v-for="item in genderData"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-radio-group v-model="form.gender">
|
||||
<el-radio v-for="item in genderData" :key="item.value" :label="item.value">{{ item.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="身份证号" prop="idCard">
|
||||
<el-input v-model="form.idNumber" style=" width: 80%"></el-input>
|
||||
<el-input v-model="form.idNumber"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="报到状态" prop="checkInStatus">
|
||||
<el-select v-model="form.checkInStatus" filterable placeholder="请选择报到状态" style=" width: 80% ">
|
||||
<el-select v-model="form.checkInStatus" filterable placeholder="请选择报到状态">
|
||||
<el-option
|
||||
v-for="item in checkInStatusData"
|
||||
:key="item.value"
|
||||
@@ -35,7 +29,7 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="是否住宿" prop="isRoom" v-if="isRoomTab">
|
||||
<el-select v-model="form.isRoom" filterable placeholder="是否住宿" style=" width: 80% ">
|
||||
<el-select v-model="form.isRoom" filterable placeholder="是否住宿">
|
||||
<el-option
|
||||
v-for="item in yesOrNoData"
|
||||
:key="item.value"
|
||||
@@ -54,7 +48,6 @@
|
||||
:remote-method="remoteMethod"
|
||||
@change="handleRoomNoChange"
|
||||
:loading="loading"
|
||||
style=" width: 80% "
|
||||
>
|
||||
<el-option
|
||||
v-for="item in roomNoList"
|
||||
@@ -66,7 +59,7 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="床号" prop="bedNo" v-if="isRoomTab && form.isRoom=='1'">
|
||||
<el-select v-model="form.bedNo" filterable placeholder="请选择床号" style=" width: 80% " :key="bedNoKey">
|
||||
<el-select v-model="form.bedNo" filterable placeholder="请选择床号" :key="bedNoKey">
|
||||
<el-option
|
||||
v-for="item in bedNoData"
|
||||
:key="item.bedNo"
|
||||
@@ -78,13 +71,13 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="备注" prop="remarks">
|
||||
<el-input v-model="form.remarks" :rows="2" style=" width: 80%"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="checkIn" v-loading="submitLoading">确定</el-button>
|
||||
<el-button @click="newStuCheckInDialog = false">取消</el-button>
|
||||
<el-input v-model="form.remarks" :rows="2"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="newStuCheckInDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="checkIn" :loading="submitLoading">确定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
@@ -92,10 +85,12 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, watch } from 'vue'
|
||||
import { useMessage } from '/@/hooks/message'
|
||||
import { getDataByRoomNo } from "/@/api/stuwork/dormroom"
|
||||
import { fearchRoomStuNum } from "/@/api/stuwork/dormroomstudent"
|
||||
import { getDicts } from "/@/api/admin/dict"
|
||||
import { putObj } from '@/api/recruit/newstucheckin'
|
||||
import { putObj } from '/@/api/recruit/newstucheckin'
|
||||
import { useDict } from '/@/hooks/dict'
|
||||
import { getDicts } from '/@/api/admin/dict'
|
||||
import { getDataByRoomNo } from '/@/api/stuwork/dormroom'
|
||||
const { sexy:genderData ,yes_no_type:yesOrNoData} = useDict('sexy','yes_no_type')
|
||||
|
||||
// Emits
|
||||
const emit = defineEmits<{
|
||||
@@ -118,15 +113,7 @@ const loading = ref(false)
|
||||
const isRoomTab = ref(false)
|
||||
const bedNoKey = ref(0) // 用于强制更新床号选择器
|
||||
|
||||
const yesOrNoData = [
|
||||
{ label: '否', value: '0' },
|
||||
{ label: '是', value: '1' }
|
||||
]
|
||||
|
||||
const genderData = [
|
||||
{ label: '女', value: '2' },
|
||||
{ label: '男', value: '1' }
|
||||
]
|
||||
|
||||
const submitLoading = ref(false)
|
||||
|
||||
@@ -225,7 +212,6 @@ const init = (formData: any, pageData: any) => {
|
||||
getDicts('check_in_status').then(data => {
|
||||
checkInStatusData.value = data.data
|
||||
})
|
||||
console.log("OKKK")
|
||||
}
|
||||
|
||||
// 报到提交
|
||||
@@ -255,8 +241,6 @@ const remoteMethod = (query: string) => {
|
||||
loading.value = true
|
||||
getDataByRoomNo(data).then(data => {
|
||||
roomNoList.value = data.data
|
||||
console.log("this.roomNoList")
|
||||
console.log(roomNoList.value)
|
||||
loading.value = false
|
||||
}).catch(() => {
|
||||
loading.value = false
|
||||
|
||||
Reference in New Issue
Block a user