zhaosheng

This commit is contained in:
guochunsi
2026-01-26 18:19:57 +08:00
parent 741af78a0e
commit c5eea52c46
48 changed files with 656 additions and 488 deletions

View File

@@ -15,8 +15,7 @@
v-model="queryForm.deptCode"
filterable
clearable
placeholder="请选择学院"
style="width: 200px">
placeholder="请选择学院">
<el-option
v-for="item in deptList"
:key="item.deptCode"
@@ -30,8 +29,7 @@
v-model="queryForm.grade"
filterable
clearable
placeholder="请选择入学年份"
style="width: 150px">
placeholder="请选择入学年份">
<el-option
v-for="item in planList"
:key="item.id"
@@ -45,8 +43,7 @@
v-model="queryForm.classCode"
filterable
clearable
placeholder="请选择班级"
style="width: 200px">
placeholder="请选择班级">
<el-option
v-for="item in classList"
:key="item.classCode"
@@ -60,8 +57,7 @@
v-model="queryForm.checkInStatus"
filterable
clearable
placeholder="请选择报到状态"
style="width: 150px">
placeholder="请选择报到状态">
<el-option
v-for="item in checkInStatusData"
:key="item.value"
@@ -75,10 +71,13 @@
v-model="queryForm.isDormApply"
filterable
clearable
placeholder="请选择住宿申请"
style="width: 150px">
<el-option label="未通过" value="0" />
<el-option label="申请通过" value="1" />
placeholder="请选择住宿申请">
<el-option
v-for="item in dormApplyStatusList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
@@ -91,7 +90,7 @@
<!-- 操作按钮 -->
<div class="mb15">
<el-button
v-if="permissions.recruit_newstucheckin_output"
v-auth="'recruit_newstucheckin_output'"
type="warning"
plain
icon="Download"
@@ -128,9 +127,14 @@
<el-table-column prop="idNumber" label="身份证号" align="center" show-overflow-tooltip />
<el-table-column prop="checkInStatus" label="报到状态" align="center" show-overflow-tooltip>
<template #default="scope">
<el-tag v-if="scope.row.checkInStatus">
{{ getCheckInStatusLabel(scope.row.checkInStatus) }}
</el-tag>
<ClickableTag
v-if="getCheckInStatusConfigLocal(scope.row.checkInStatus)"
:type="getCheckInStatusConfigLocal(scope.row.checkInStatus)?.type || 'info'"
:left-icon="getCheckInStatusConfigLocal(scope.row.checkInStatus)?.icon"
:right-icon="null">
{{ getCheckInStatusConfigLocal(scope.row.checkInStatus)?.label }}
</ClickableTag>
<span v-else class="empty-text">-</span>
</template>
</el-table-column>
<el-table-column prop="isRoom" label="是否住宿" align="center" width="120">
@@ -155,29 +159,21 @@
}
]">
<template #reference>
<el-tag type="success" class="dorm-tag">
<ClickableTag
type="success"
>
{{ getStatusConfig(yes_no_type, scope.row.isRoom)?.label }}
<el-icon class="info-icon"><InfoFilled /></el-icon>
</el-tag>
</ClickableTag>
</template>
<!-- 住宿申请状态 -->
<template #content-0>
<div class="dorm-apply-content">
<ClickableTag
v-if="scope.row.isDormApply == '1'"
type="success"
size="small"
:left-icon="CircleCheck"
v-if="getStatusConfig(dormApplyStatusList, scope.row.isDormApply)"
:type="scope.row.isDormApply == '1'?'success':'danger'"
:left-icon="scope.row.isDormApply == '1'?'CircleCheck':'CircleClose'"
:right-icon="null">
申请通过
</ClickableTag>
<ClickableTag
v-else-if="scope.row.isDormApply == '0'"
type="danger"
size="small"
:left-icon="CircleClose"
:right-icon="null">
未通过
{{getStatusConfig(dormApplyStatusList, scope.row.isDormApply)?.label}}
</ClickableTag>
<span v-else class="empty-text">-</span>
</div>
@@ -208,16 +204,8 @@
</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 label="家长电话" align="center" show-overflow-tooltip>
<template #default="scope">
<div v-if="scope.row.parentTelOne || scope.row.parentTelTwo" class="parent-tel">
<span v-if="scope.row.parentTelOne" class="tel-item">{{ scope.row.parentTelOne }}</span>
<span v-if="scope.row.parentTelOne && scope.row.parentTelTwo" class="tel-separator">/</span>
<span v-if="scope.row.parentTelTwo" class="tel-item">{{ scope.row.parentTelTwo }}</span>
</div>
<span v-else class="empty-text">-</span>
</template>
</el-table-column>
<el-table-column label="家长电话1" align="center" prop="parentTelOne" show-overflow-tooltip></el-table-column>
<el-table-column label="家长电话2" align="center" prop="parentTelTwo" show-overflow-tooltip></el-table-column>
<el-table-column prop="remarks" label="备注" align="center" show-overflow-tooltip />
<el-table-column label="操作" width="100" align="center" fixed="right">
<template #default="scope">
@@ -248,21 +236,19 @@
</template>
<script setup lang="ts" name="newstucheckin">
import { ref, reactive, computed, onMounted, defineAsyncComponent } from 'vue'
import { storeToRefs } from 'pinia'
import { useUserInfo } from '/@/stores/userInfo'
import { ref, reactive, onMounted, defineAsyncComponent } from 'vue'
import { BasicTableProps, useTable } from '/@/hooks/table'
import { useMessage } from '/@/hooks/message'
import { fetchList } from '/@/api/recruit/newstucheckin'
import { getDictsByTypes } from '/@/api/admin/dict'
import { useDict } from '/@/hooks/dict'
import request from '/@/utils/request'
import { getStatusConfig } from '/@/config/global'
import { getStatusConfig, getCheckInStatusConfig, DORM_APPLY_STATUS_LIST } from '/@/config/global'
import { getDeptList, getClassListByRole } from '/@/api/basic/basicclass'
import { getList } from '/@/api/recruit/recruitstudentplangroup'
import DetailPopover from '/@/components/DetailPopover/index.vue'
import ClickableTag from '/@/components/ClickableTag/index.vue'
import { InfoFilled, CircleCheck, CircleClose, HomeFilled, Grid } from '@element-plus/icons-vue'
import { InfoFilled, CircleCheck, CircleClose, DocumentChecked, Warning, Clock } from '@element-plus/icons-vue'
const StuCheckIn = defineAsyncComponent(() => import('./stu-check-in.vue'))
const TeacherNameNo = defineAsyncComponent(() => import('/@/components/TeacherNameNo/index.vue'))
@@ -271,18 +257,8 @@ const GenderTag = defineAsyncComponent(() => import('/@/components/GenderTag/ind
// 是否住宿字典
const { yes_no_type } = useDict('yes_no_type')
// 使用 Pinia store
const userInfoStore = useUserInfo()
const { userInfos } = storeToRefs(userInfoStore)
// 创建权限对象
const permissions = computed(() => {
const perms: Record<string, boolean> = {}
userInfos.value.authBtnList.forEach((perm: string) => {
perms[perm] = true
})
return perms
})
// 住宿申请状态列表
const dormApplyStatusList = DORM_APPLY_STATUS_LIST
// 消息提示 hooks
const message = useMessage()
@@ -341,10 +317,15 @@ const state: BasicTableProps = reactive<BasicTableProps>({
// 使用 table hook
const { getDataList, currentChangeHandle, sizeChangeHandle, tableStyle } = useTable(state)
// 获取报到状态标签
const getCheckInStatusLabel = (value: string) => {
const item = checkInStatusData.value.find(item => item.value === value)
return item ? item.label : value
// 获取报到状态配置(用于 ClickableTag
const getCheckInStatusConfigLocal = (value: string) => {
return getCheckInStatusConfig(checkInStatusData.value, value, {
CircleCheck,
CircleClose,
DocumentChecked,
Warning,
Clock
})
}
// 重置查询
@@ -406,7 +387,7 @@ const handleExportOut = async () => {
message.success('导出成功')
} catch (error: any) {
message.error(error.msg || '导出失败')
// console.log(error)
} finally {
exportLoading.value = false
}
@@ -443,7 +424,7 @@ const init = async () => {
getDataList()
} catch (error) {
message.error('初始化失败')
// console.log(error)
}
}
@@ -456,7 +437,7 @@ onMounted(() => {
.parent-tel {
display: flex;
align-items: center;
justify-content: center;
// justify-content: center;
gap: 4px;
.tel-item {