招生
This commit is contained in:
57
src/views/recruit/backSchoolCheckin/index.vue
Normal file
57
src/views/recruit/backSchoolCheckin/index.vue
Normal file
@@ -0,0 +1,57 @@
|
||||
<!--
|
||||
- Copyright (c) 2018-2025, cyweb All rights reserved.
|
||||
-
|
||||
- Redistribution and use in source and binary forms, with or without
|
||||
- modification, are permitted provided that the following conditions are met:
|
||||
-
|
||||
- Redistributions of source code must retain the above copyright notice,
|
||||
- this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
- notice, this list of conditions and the following disclaimer in the
|
||||
- documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of the pig4cloud.com developer nor the names of its
|
||||
- contributors may be used to endorse or promote products derived from
|
||||
- this software without specific prior written permission.
|
||||
-
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-tabs v-model="activeName" @tab-click="handleTabClick">
|
||||
<el-tab-pane label="回校列表" name="tab">
|
||||
<tab-index ref="tabIndexRef" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="回校统计" name="static">
|
||||
<static-index ref="staticIndexRef" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="backSchool">
|
||||
import { ref, nextTick, defineAsyncComponent } from 'vue'
|
||||
|
||||
const TabIndex = defineAsyncComponent(() => import('./tabIndex.vue'))
|
||||
const StaticIndex = defineAsyncComponent(() => import('./staticIndex.vue'))
|
||||
|
||||
const activeName = ref('tab')
|
||||
const tabIndexRef = ref()
|
||||
const staticIndexRef = ref()
|
||||
|
||||
const handleTabClick = (tab: any) => {
|
||||
if (tab.paneName == 'tab') {
|
||||
nextTick(() => {
|
||||
tabIndexRef.value?.init()
|
||||
})
|
||||
} else {
|
||||
nextTick(() => {
|
||||
staticIndexRef.value?.init()
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
170
src/views/recruit/backSchoolCheckin/staticIndex.vue
Normal file
170
src/views/recruit/backSchoolCheckin/staticIndex.vue
Normal file
@@ -0,0 +1,170 @@
|
||||
<!--
|
||||
- Copyright (c) 2018-2025, cyweb All rights reserved.
|
||||
-
|
||||
- Redistribution and use in source and binary forms, with or without
|
||||
- modification, are permitted provided that the following conditions are met:
|
||||
-
|
||||
- Redistributions of source code must retain the above copyright notice,
|
||||
- this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
- notice, this list of conditions and the following disclaimer in the
|
||||
- documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of the pig4cloud.com developer nor the names of its
|
||||
- contributors may be used to endorse or promote products derived from
|
||||
- this software without specific prior written permission.
|
||||
-
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<!-- 搜索表单 -->
|
||||
<el-form :model="queryForm" inline class="mb-4" ref="searchFormRef">
|
||||
<el-form-item label="招生计划" prop="groupId">
|
||||
<el-select v-model="queryForm.groupId" filterable clearable placeholder="请选择招生计划" @change="getTabStaticDataList" style="width: 150px;">
|
||||
<el-option
|
||||
v-for="item in planList"
|
||||
:key="item.id"
|
||||
:label="item.groupName"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="getTabStaticDataList">查询</el-button>
|
||||
<el-button type="primary" plain icon="Refresh" class="ml10" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
ref="tableRef"
|
||||
:data="tableData"
|
||||
v-loading="dataListLoading"
|
||||
border
|
||||
stripe
|
||||
show-summary
|
||||
:summary-method="getSummaries"
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
>
|
||||
<el-table-column prop="groupId" label="招生计划" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{ getPlanName(scope.row.groupId) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="zymc" label="专业名称" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="wlx" label="未联系" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="yjbd" label="已经报到" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="tcbd" label="推迟报到" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="fqbd" label="放弃报到" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="fwlx" label="无法联系" align="center" show-overflow-tooltip />
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="backSchoolCheckinStaticIndex">
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { list } from '/@/api/recruit/recruitstudentplangroup'
|
||||
import { getTabStaticDataList as getTabStaticDataListApi } from '/@/api/recruit/recruitstudentsignup'
|
||||
// @ts-ignore
|
||||
import global from '@/components/tools/commondict'
|
||||
import { useTable } from '/@/hooks/table'
|
||||
|
||||
// 表格引用
|
||||
const tableRef = ref()
|
||||
const searchFormRef = ref()
|
||||
|
||||
// 数据
|
||||
const planList = ref<any[]>([])
|
||||
const tableData = ref<any[]>([])
|
||||
const dataListLoading = ref(false)
|
||||
|
||||
// 查询表单
|
||||
const queryForm = reactive({
|
||||
groupId: ''
|
||||
})
|
||||
|
||||
// 获取计划名称
|
||||
const getPlanName = (groupId: string) => {
|
||||
const item = planList.value.find(item => item.id === groupId)
|
||||
return item ? item.groupName : ''
|
||||
}
|
||||
|
||||
// 表格样式
|
||||
const { tableStyle } = useTable({ queryForm: queryForm, pageList: async () => ({ data: { records: [], total: 0 } }), createdIsNeed: false })
|
||||
|
||||
// 获取汇总数据
|
||||
const getSummaries = (param: any) => {
|
||||
const { columns, data } = param
|
||||
const sums: any[] = []
|
||||
columns.forEach((column: any, index: number) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '总计'
|
||||
} else if (index != 1) {
|
||||
const values = data.map((item: any) => Number(item[column.property]))
|
||||
if (!values.every((value: any) => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev: number, curr: number) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0)
|
||||
} else {
|
||||
sums[index] = '--'
|
||||
}
|
||||
} else {
|
||||
sums[index] = '--'
|
||||
}
|
||||
})
|
||||
return sums
|
||||
}
|
||||
|
||||
// 获取统计数据
|
||||
const getTabStaticDataList = async () => {
|
||||
try {
|
||||
tableData.value = []
|
||||
dataListLoading.value = true
|
||||
const response = await getTabStaticDataListApi(queryForm)
|
||||
tableData.value = response.data.data || []
|
||||
} catch (error) {
|
||||
console.error('获取统计数据失败', error)
|
||||
} finally {
|
||||
dataListLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 重置查询
|
||||
const resetQuery = () => {
|
||||
searchFormRef.value?.resetFields()
|
||||
queryForm.groupId = ''
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
}
|
||||
getTabStaticDataList()
|
||||
}
|
||||
|
||||
// 初始化
|
||||
const init = async () => {
|
||||
try {
|
||||
const data = await list()
|
||||
planList.value = data.data.data || []
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
getTabStaticDataList()
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('初始化失败', error)
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
init()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
275
src/views/recruit/backSchoolCheckin/statistics.vue
Normal file
275
src/views/recruit/backSchoolCheckin/statistics.vue
Normal file
@@ -0,0 +1,275 @@
|
||||
<!--
|
||||
- Copyright (c) 2018-2025, cyweb All rights reserved.
|
||||
-
|
||||
- Redistribution and use in source and binary forms, with or without
|
||||
- modification, are permitted provided that the following conditions are met:
|
||||
-
|
||||
- Redistributions of source code must retain the above copyright notice,
|
||||
- this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
- notice, this list of conditions and the following disclaimer in the
|
||||
- documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of the pig4cloud.com developer nor the names of its
|
||||
- contributors may be used to endorse or promote products derived from
|
||||
- this software without specific prior written permission.
|
||||
-
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-form :model="queryForm" inline class="mb-4" ref="searchFormRef">
|
||||
<el-form-item label="入学年份" prop="grade">
|
||||
<el-select v-model="queryForm.grade" filterable clearable placeholder="请选择入学年份">
|
||||
<el-option
|
||||
v-for="item in gradeList"
|
||||
:key="item.year"
|
||||
:label="item.year"
|
||||
:value="item.year"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="学院" prop="deptCode">
|
||||
<el-select v-model="queryForm.deptCode" filterable clearable placeholder="请选择学院">
|
||||
<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="classCode">
|
||||
<el-select v-model="queryForm.classCode" filterable clearable placeholder="请选择班级">
|
||||
<el-option
|
||||
v-for="item in classData"
|
||||
:key="item.classCode"
|
||||
:label="item.classNo"
|
||||
:value="item.classCode"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="searchData">查询</el-button>
|
||||
<el-button type="primary" plain icon="Refresh" class="ml10" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div class="mb15">
|
||||
<el-button
|
||||
v-if="permissions.recruit_newstucheckin_statistics_output"
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
:loading="exportLoading"
|
||||
@click="handleExportOut"
|
||||
>
|
||||
导出
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
:data="tableData"
|
||||
height="650"
|
||||
show-summary
|
||||
:summary-method="getSummaries"
|
||||
stripe
|
||||
border
|
||||
v-loading="tableLoading"
|
||||
:header-cell-style="{ 'text-align': 'center' }"
|
||||
:cell-style="{ 'text-align': 'center' }"
|
||||
class="el_table_job_fair_stu"
|
||||
>
|
||||
<el-table-column type="index" width="50" fixed label="序号" />
|
||||
<el-table-column prop="deptName" label="学院" />
|
||||
<el-table-column prop="classNo" label="班级" />
|
||||
<el-table-column prop="classNum" label="预计报到人数" />
|
||||
<el-table-column prop="checkInOk" label="已经报到" />
|
||||
<el-table-column prop="postpone" label="推迟报到" />
|
||||
<el-table-column prop="abandon" label="放弃报到" />
|
||||
<el-table-column prop="missing" label="无法联系" />
|
||||
<el-table-column prop="contact" label="未联系" />
|
||||
<el-table-column prop="checkInRate" label="报到率" />
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="backSchoolCheckin-statistics">
|
||||
import { ref, reactive, computed, onMounted } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useUserInfo } from '/@/stores/userInfo'
|
||||
import { useMessage } from '/@/hooks/message'
|
||||
import { getDataStatistics } from '/@/api/recruit/newstucheckin'
|
||||
import { list } from '/@/api/recruit/recruitstudentplangroup'
|
||||
import { getDeptList } from '/@/api/basic/basicclass'
|
||||
import { getClasslist } from '/@/api/stuwork/stupunlish'
|
||||
import axios from 'axios'
|
||||
|
||||
// 使用 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
|
||||
})
|
||||
|
||||
// 消息提示 hooks
|
||||
const message = useMessage()
|
||||
|
||||
// 引用
|
||||
const searchFormRef = ref()
|
||||
|
||||
// 状态
|
||||
const tableData = ref<any[]>([])
|
||||
const tableLoading = ref(false)
|
||||
const exportLoading = ref(false)
|
||||
const gradeList = ref<any[]>([])
|
||||
const deptList = ref<any[]>([])
|
||||
const classData = ref<any[]>([])
|
||||
|
||||
// 查询表单
|
||||
const queryForm = reactive({
|
||||
grade: '',
|
||||
deptCode: '',
|
||||
classCode: ''
|
||||
})
|
||||
|
||||
// 初始化
|
||||
const init = async () => {
|
||||
await Promise.all([
|
||||
getGradeData(),
|
||||
getDeptData(),
|
||||
getClassData()
|
||||
])
|
||||
getList()
|
||||
}
|
||||
|
||||
// 查看所有入学年份
|
||||
const getGradeData = async () => {
|
||||
try {
|
||||
const data = await list()
|
||||
gradeList.value = data.data.data || []
|
||||
} catch (error) {
|
||||
console.error('获取入学年份失败', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 查找所有二级学院
|
||||
const getDeptData = async () => {
|
||||
try {
|
||||
const data = await getDeptList()
|
||||
deptList.value = data.data.data || []
|
||||
} catch (error) {
|
||||
console.error('获取学院列表失败', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 查找所有班级
|
||||
const getClassData = async () => {
|
||||
try {
|
||||
const data = await getClasslist()
|
||||
classData.value = data.data.data || []
|
||||
} catch (error) {
|
||||
console.error('获取班级列表失败', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 获取数据列表
|
||||
const getList = async () => {
|
||||
try {
|
||||
tableLoading.value = true
|
||||
const response = await getDataStatistics(queryForm)
|
||||
tableData.value = response.data.data || []
|
||||
} catch (error) {
|
||||
console.error('获取数据失败', error)
|
||||
} finally {
|
||||
tableLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 查询
|
||||
const searchData = () => {
|
||||
getList()
|
||||
}
|
||||
|
||||
// 重置查询
|
||||
const resetQuery = () => {
|
||||
searchFormRef.value?.resetFields()
|
||||
queryForm.grade = ''
|
||||
queryForm.deptCode = ''
|
||||
queryForm.classCode = ''
|
||||
getList()
|
||||
}
|
||||
|
||||
// 导出
|
||||
const handleExportOut = async () => {
|
||||
try {
|
||||
exportLoading.value = true
|
||||
const res = await axios({
|
||||
method: 'post',
|
||||
url: '/recruit/newstucheckin/exportDataStatistics',
|
||||
data: queryForm,
|
||||
responseType: 'blob',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
const blob = new Blob([res.data])
|
||||
const fileName = '新生报到统计.xls'
|
||||
const elink = document.createElement('a')
|
||||
elink.download = fileName
|
||||
elink.style.display = 'none'
|
||||
elink.href = URL.createObjectURL(blob)
|
||||
document.body.appendChild(elink)
|
||||
elink.click()
|
||||
URL.revokeObjectURL(elink.href)
|
||||
document.body.removeChild(elink)
|
||||
} catch (error: any) {
|
||||
message.error(error.msg || '导出失败')
|
||||
} finally {
|
||||
exportLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 合计方法
|
||||
const getSummaries = (param: any) => {
|
||||
const { columns, data } = param
|
||||
const sums: any[] = []
|
||||
columns.forEach((column: any, index: number) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '合计'
|
||||
return
|
||||
}
|
||||
if (index === 1 || index === 2) {
|
||||
sums[index] = ''
|
||||
return
|
||||
}
|
||||
const values = data.map((item: any) => Number(item[column.property]))
|
||||
if (!values.every((value: any) => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev: number, curr: any) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0)
|
||||
sums[index] += ''
|
||||
}
|
||||
})
|
||||
return sums
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
init()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
159
src/views/recruit/backSchoolCheckin/stu-check-in.vue
Normal file
159
src/views/recruit/backSchoolCheckin/stu-check-in.vue
Normal file
@@ -0,0 +1,159 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog v-model="newStuCheckInDialog" width="40%">
|
||||
<el-form :model="form" :rules="rules" ref="formRef" label-width="120px" class="demo-ruleForm">
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="form.name" disabled style="width: 80%" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="性别" prop="gender">
|
||||
<el-select v-model="form.gender" placeholder="请选择性别" disabled style="width: 80%">
|
||||
<el-option
|
||||
v-for="item in genderData"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="身份证号" prop="idNumber">
|
||||
<el-input v-model="form.idNumber" disabled style="width: 80%" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="报到状态" prop="backSchoolState">
|
||||
<el-select v-model="form.backSchoolState" filterable placeholder="请选择报到状态" style="width: 80%">
|
||||
<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="backSchoolRemark">
|
||||
<el-input v-model="form.backSchoolRemark" :rows="2" style="width: 80%" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="checkIn" :loading="submitLoading">确定</el-button>
|
||||
<el-button @click="newStuCheckInDialog = false">取消</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="backSchoolCheckin-stu-check-in">
|
||||
import { ref, reactive } from 'vue'
|
||||
import { useMessage } from '/@/hooks/message'
|
||||
import { useDict } from '/@/hooks/dict'
|
||||
import { putBackObj } from '/@/api/recruit/recruitstudentsignup'
|
||||
|
||||
// 消息提示 hooks
|
||||
const message = useMessage()
|
||||
|
||||
// 字典
|
||||
const { getTypeValue } = useDict()
|
||||
|
||||
// 定义 emits
|
||||
const emit = defineEmits(['reload'])
|
||||
|
||||
// 引用
|
||||
const formRef = ref()
|
||||
|
||||
// 状态
|
||||
const newStuCheckInDialog = ref(false)
|
||||
const checkInStatusData = ref<any[]>([])
|
||||
const submitLoading = ref(false)
|
||||
const page = ref<any>({})
|
||||
|
||||
// 固定数据
|
||||
const genderData = [
|
||||
{ label: '女', value: '2' },
|
||||
{ label: '男', value: '1' }
|
||||
]
|
||||
|
||||
// 表单数据
|
||||
const form = reactive({
|
||||
id: '',
|
||||
name: '',
|
||||
backSchoolState: '',
|
||||
gender: '',
|
||||
idNumber: '',
|
||||
backSchoolRemark: ''
|
||||
})
|
||||
|
||||
// 表单验证规则
|
||||
const rules = reactive({
|
||||
name: [
|
||||
{ required: true, message: '请输入姓名', trigger: ['blur', 'change'] }
|
||||
],
|
||||
gender: [
|
||||
{ required: true, message: '请输入性别', trigger: ['blur', 'change'] }
|
||||
],
|
||||
idNumber: [
|
||||
{ required: true, message: '请输入身份证号', trigger: ['blur', 'change'] }
|
||||
],
|
||||
backSchoolState: [
|
||||
{ required: true, message: '请输入报到状态', trigger: ['blur', 'change'] }
|
||||
]
|
||||
})
|
||||
|
||||
// 初始化表单
|
||||
const initForm = () => {
|
||||
form.id = ''
|
||||
form.name = ''
|
||||
form.backSchoolState = ''
|
||||
form.gender = ''
|
||||
form.idNumber = ''
|
||||
form.backSchoolRemark = ''
|
||||
}
|
||||
|
||||
// 初始化
|
||||
const init = async (formData: any, pageData: any) => {
|
||||
initForm()
|
||||
page.value = pageData
|
||||
submitLoading.value = false
|
||||
newStuCheckInDialog.value = true
|
||||
checkInStatusData.value = []
|
||||
|
||||
try {
|
||||
const data = await getTypeValue('check_in_status')
|
||||
checkInStatusData.value = data.data.data || []
|
||||
} catch (error) {
|
||||
console.error('获取字典数据失败', error)
|
||||
}
|
||||
|
||||
Object.assign(form, formData)
|
||||
}
|
||||
|
||||
// 报到
|
||||
const checkIn = async () => {
|
||||
if (!formRef.value) return
|
||||
|
||||
try {
|
||||
await formRef.value.validate()
|
||||
submitLoading.value = true
|
||||
await putBackObj(form)
|
||||
message.success('报到成功')
|
||||
emit('reload')
|
||||
newStuCheckInDialog.value = false
|
||||
} catch (error: any) {
|
||||
if (error !== false) {
|
||||
message.error(error.msg || '报到失败')
|
||||
}
|
||||
} finally {
|
||||
submitLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 暴露方法
|
||||
defineExpose({
|
||||
init
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
547
src/views/recruit/backSchoolCheckin/tabIndex.vue
Normal file
547
src/views/recruit/backSchoolCheckin/tabIndex.vue
Normal file
@@ -0,0 +1,547 @@
|
||||
<!--
|
||||
- Copyright (c) 2018-2025, cyweb All rights reserved.
|
||||
-
|
||||
- Redistribution and use in source and binary forms, with or without
|
||||
- modification, are permitted provided that the following conditions are met:
|
||||
-
|
||||
- Redistributions of source code must retain the above copyright notice,
|
||||
- this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
- notice, this list of conditions and the following disclaimer in the
|
||||
- documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of the pig4cloud.com developer nor the names of its
|
||||
- contributors may be used to endorse or promote products derived from
|
||||
- this software without specific prior written permission.
|
||||
-
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<!-- 搜索表单 -->
|
||||
<el-form :model="queryForm" inline class="mb-4" ref="searchFormRef">
|
||||
<el-form-item label="招生计划" prop="groupId">
|
||||
<el-select v-model="queryForm.groupId" filterable clearable placeholder="请选择招生计划" @change="chanMajor" style="width: 150px;">
|
||||
<el-option
|
||||
v-for="item in planList"
|
||||
:key="item.id"
|
||||
:label="item.groupName"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="学院" prop="xy">
|
||||
<el-select v-model="queryForm.xy" filterable clearable placeholder="请选择学院" style="width: 130px;">
|
||||
<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="confirmedMajor">
|
||||
<el-select v-model="queryForm.confirmedMajor" filterable clearable placeholder="请选择录取专业">
|
||||
<el-option
|
||||
v-for="item in planMajorList"
|
||||
:key="item.zydm"
|
||||
:label="item.zymc + '(' + item.xz + '年制)'"
|
||||
:value="item.zydm"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="唯一号/姓名/身份证号/学校名称" prop="search">
|
||||
<el-input v-model="queryForm.search" clearable placeholder="唯一号/姓名/身份证号/学校名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="缴费状态" prop="paystatus">
|
||||
<el-select v-model="queryForm.paystatus" filterable clearable placeholder="请选择缴费状态" style="width: 120px;">
|
||||
<el-option
|
||||
v-for="item in paystatusList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="推送状态" prop="pushed">
|
||||
<el-select v-model="queryForm.pushed" filterable clearable placeholder="请选择推送状态" style="width: 120px;">
|
||||
<el-option
|
||||
v-for="item in pushedList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="报到状态" prop="backSchoolState">
|
||||
<el-select v-model="queryForm.backSchoolState" filterable clearable placeholder="请选择报到状态" style="width: 120px;">
|
||||
<el-option
|
||||
v-for="item in backSchoolStateList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="getDataList">查询</el-button>
|
||||
<el-button type="primary" plain icon="Refresh" class="ml10" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<div class="mb15">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
>
|
||||
名单导出
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitstudentsignup_allCX"
|
||||
type="success"
|
||||
plain
|
||||
icon="Search"
|
||||
class="ml10"
|
||||
@click="updateAllFS"
|
||||
>
|
||||
批量查询
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
ref="tableRef"
|
||||
:data="state.dataList"
|
||||
v-loading="state.loading"
|
||||
border
|
||||
stripe
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column label="操作" width="200" align="center" fixed="left">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitstudentsignup_show && scope.row.pushed == '1' && scope.row.paiedOffline != '10' && (scope.row.clfPayCode != undefined && scope.row.clfPayCode != '')"
|
||||
type="primary"
|
||||
link
|
||||
icon="QrCode"
|
||||
@click="showPayCode(scope.row)"
|
||||
>
|
||||
支付二维码
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitstudentsignup_back"
|
||||
type="success"
|
||||
link
|
||||
icon="CircleCheck"
|
||||
@click="handleCheckIn(scope.row)"
|
||||
>
|
||||
报到
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="serialNumber" label="唯一号" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="xy" label="学院" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.auditStatus == 20">
|
||||
{{ getDeptName(scope.row.xy) }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="confirmedMajor" label="录取专业" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.auditStatus == 20">
|
||||
{{ getMajorName(scope.row.confirmedMajor) }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="姓名" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="gender" label="性别" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{ getGender(scope.row.gender) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="idNumber" label="身份证号" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="parentTelOne" label="家长电话1" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="parentTelTwo" label="家长电话2" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="backSchoolState" label="报到状态" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{ getBackSchoolStateLabel(scope.row.backSchoolState) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="backSchoolRemark" label="报到备注" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="paiedOffline" label="缴费状态" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{ getStatus(scope.row.paiedOffline) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="pushed" label="推送状态" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.pushed == 0" style="color: red">{{ getPushed(scope.row.pushed) }}</span>
|
||||
<span v-if="scope.row.pushed == 1" style="color: green">{{ getPushed(scope.row.pushed) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<pagination
|
||||
v-bind="state.pagination"
|
||||
@current-change="currentChangeHandle"
|
||||
@size-change="sizeChangeHandle"
|
||||
/>
|
||||
|
||||
<!-- 支付二维码弹窗 -->
|
||||
<el-dialog v-model="dialogFormVisible" title="支付二维码" width="800px" @close="dialogFormVisible = false">
|
||||
<el-table :data="tableData" border>
|
||||
<el-table-column label="唯一号" prop="serialNumber" align="center" />
|
||||
<el-table-column label="姓名" prop="name" align="center" />
|
||||
<el-table-column label="家长手机号" prop="parentTelOne" align="center" />
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-button type="danger" icon="Search" @click="updateFS">立即查询</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div style="padding-top: 20px;">
|
||||
<div id="payQrcode1" style="display: inline-block;">
|
||||
{{ payQrcode1Msg }}
|
||||
</div>
|
||||
<!-- <vue-qr :text="payQrcode1" :size="200" v-if="showPrise1" style="display: inline-block"></vue-qr> -->
|
||||
|
||||
<div id="payQrcode2" style="display: inline-block">
|
||||
{{ payQrcode2Msg }}
|
||||
</div>
|
||||
<!-- <vue-qr :text="payQrcode2" :size="200" v-if="showPrise2" style="display: inline-block"></vue-qr> -->
|
||||
|
||||
<div id="payQrcode3" style="display: inline-block">
|
||||
{{ payQrcode3Msg }}
|
||||
</div>
|
||||
<!-- <vue-qr :text="payQrcode3" :size="200" v-if="showPrise3" style="display: inline-block"></vue-qr> -->
|
||||
</div>
|
||||
<span style="color: red;padding-top: 20px;">** 此界面为查询学生缴款二维码,如有收不到微信推送,或手机号填错的,可直接在此扫码支付,支付成功后,请手动点击"立即查询"按钮,查询该生的缴费情况;因财政收费系统有一定的滞后性,如点击"立即查询"后任显示未交费,请稍后再继续查询,或重新点击"立即查询"按钮 **</span>
|
||||
</el-dialog>
|
||||
|
||||
<stu-check-in ref="stuCheckInRef" @reload="refreshChange" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="backSchoolCheckinTabIndex">
|
||||
import { ref, reactive, computed, onMounted, nextTick, defineAsyncComponent } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useUserInfo } from '/@/stores/userInfo'
|
||||
import { BasicTableProps, useTable } from '/@/hooks/table'
|
||||
import { useMessage, useMessageBox } from '/@/hooks/message'
|
||||
import { list } from '/@/api/recruit/recruitstudentplangroup'
|
||||
import { backPush, backSchoolStuPage, batchPushAll } from '/@/api/recruit/recruitstudentsignup'
|
||||
import { getDeptList } from '/@/api/basic/basicclass'
|
||||
import { list as planMajor } from '/@/api/recruit/recruitplanmajor'
|
||||
import { updateFs, updateAllFS } from '/@/api/finance/financenormalstu'
|
||||
import { getTypeValue } from '/@/api/admin/dict'
|
||||
// @ts-ignore
|
||||
import global from '@/components/tools/commondict'
|
||||
|
||||
const StuCheckIn = defineAsyncComponent(() => import('./stu-check-in.vue'))
|
||||
|
||||
// 使用 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
|
||||
})
|
||||
|
||||
// 消息提示 hooks
|
||||
const message = useMessage()
|
||||
const messageBox = useMessageBox()
|
||||
|
||||
// 表格引用
|
||||
const tableRef = ref()
|
||||
const searchFormRef = ref()
|
||||
const stuCheckInRef = ref()
|
||||
|
||||
// 数据
|
||||
const planList = ref<any[]>([])
|
||||
const planMajorList = ref<any[]>([])
|
||||
const deptList = ref<any[]>([])
|
||||
const backSchoolStateList = ref<any[]>([])
|
||||
const paystatusList = ref([{ label: '已缴费', value: '10' }, { label: '未缴费', value: '0' }, { label: '部分缴费', value: '5' }])
|
||||
const pushedList = ref([{ label: '未推送', value: '0' }, { label: '已推送', value: '1' }])
|
||||
|
||||
// 查询表单
|
||||
const queryForm = reactive({
|
||||
groupId: '',
|
||||
xy: '',
|
||||
confirmedMajor: '',
|
||||
search: '',
|
||||
paystatus: '',
|
||||
pushed: '',
|
||||
backSchoolState: '',
|
||||
isOut: '1',
|
||||
auditStatus: '20'
|
||||
})
|
||||
|
||||
// 弹窗状态
|
||||
const dialogFormVisible = ref(false)
|
||||
const tableData = ref<any[]>([])
|
||||
const payQrcode1 = ref('')
|
||||
const showPrise1 = ref(false)
|
||||
const payQrcode1Msg = ref('')
|
||||
const payQrcode2 = ref('')
|
||||
const payQrcode2Msg = ref('')
|
||||
const showPrise2 = ref(false)
|
||||
const payQrcode3 = ref('')
|
||||
const payQrcode3Msg = ref('')
|
||||
const showPrise3 = ref(false)
|
||||
|
||||
// 获取学院名称
|
||||
const getDeptName = (deptCode: string) => {
|
||||
const item = deptList.value.find(item => item.deptCode === deptCode)
|
||||
return item ? item.deptName : ''
|
||||
}
|
||||
|
||||
// 获取专业名称
|
||||
const getMajorName = (majorCode: string) => {
|
||||
const item = planMajorList.value.find(item => item.zydm === majorCode)
|
||||
return item ? item.zymc : ''
|
||||
}
|
||||
|
||||
// 获取性别
|
||||
const getGender = (gender: string) => {
|
||||
if (gender == '2') {
|
||||
return '女'
|
||||
}
|
||||
if (gender == '1') {
|
||||
return '男'
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
// 获取报到状态标签
|
||||
const getBackSchoolStateLabel = (value: string) => {
|
||||
const item = backSchoolStateList.value.find(item => item.value === value)
|
||||
return item ? item.label : ''
|
||||
}
|
||||
|
||||
// 获取缴费状态
|
||||
const getStatus = (type: string) => {
|
||||
if (type == '0') {
|
||||
return '未缴费'
|
||||
} else if (type == '5') {
|
||||
return '部分缴费'
|
||||
} else if (type == '10') {
|
||||
return '已缴费'
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
// 获取推送状态
|
||||
const getPushed = (type: string) => {
|
||||
if (type == '0') {
|
||||
return '未推送'
|
||||
} else if (type == '1') {
|
||||
return '已推送'
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
// 表格状态
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
queryForm: queryForm,
|
||||
pageList: async (params: any) => {
|
||||
const response = await backSchoolStuPage(params)
|
||||
return {
|
||||
data: {
|
||||
records: response.data.data.records,
|
||||
total: response.data.data.total
|
||||
}
|
||||
}
|
||||
},
|
||||
createdIsNeed: false
|
||||
})
|
||||
|
||||
// 使用 table hook
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, tableStyle, downBlobFile } = useTable(state)
|
||||
|
||||
// 招生计划改变
|
||||
const chanMajor = async () => {
|
||||
if (queryForm.groupId) {
|
||||
await getMajorList(queryForm.groupId)
|
||||
}
|
||||
}
|
||||
|
||||
// 获取专业列表
|
||||
const getMajorList = async (groupId: string) => {
|
||||
try {
|
||||
const data = await planMajor({ groupId })
|
||||
planMajorList.value = data.data.data || []
|
||||
} catch (error) {
|
||||
console.error('获取专业列表失败', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 初始化
|
||||
const init = async () => {
|
||||
try {
|
||||
// 查询报到状态字典
|
||||
const dictData = await getTypeValue('check_in_status')
|
||||
backSchoolStateList.value = dictData.data.data || []
|
||||
|
||||
// 查询二级学院信息
|
||||
const deptData = await getDeptList()
|
||||
deptList.value = deptData.data.data || []
|
||||
|
||||
// 获取招生计划列表
|
||||
const planData = await list()
|
||||
planList.value = planData.data.data || []
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
await getMajorList(queryForm.groupId)
|
||||
}
|
||||
|
||||
getDataList()
|
||||
} catch (error) {
|
||||
console.error('初始化失败', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 打开报到窗口
|
||||
const handleCheckIn = (row: any) => {
|
||||
nextTick(() => {
|
||||
stuCheckInRef.value?.init(row, state.pagination.current)
|
||||
})
|
||||
}
|
||||
|
||||
// 刷新回调
|
||||
const refreshChange = () => {
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 批量查询
|
||||
const updateAllFS = async () => {
|
||||
if (!queryForm.groupId) {
|
||||
message.warning('招生计划不能为空')
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
const plan = planList.value.find(e => e.id === queryForm.groupId)
|
||||
if (!plan) return
|
||||
|
||||
const data = await updateAllFS({ year: plan.year, stuSource: '1' })
|
||||
if (data.data.code == '200') {
|
||||
message.success('正在更新所有缴费单状态,请稍后查看更新结果')
|
||||
}
|
||||
} catch (error: any) {
|
||||
message.error(error.msg || '操作失败')
|
||||
}
|
||||
}
|
||||
|
||||
// 导出
|
||||
const handleExport = async () => {
|
||||
if (!queryForm.groupId) {
|
||||
message.warning('招生计划不能为空')
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
await downBlobFile(
|
||||
'/recruit/recruitstudentsignup/exportBackData',
|
||||
queryForm,
|
||||
'招生名单导出.xls'
|
||||
)
|
||||
} catch (error: any) {
|
||||
message.error(error.msg || '导出失败')
|
||||
}
|
||||
}
|
||||
|
||||
// 立即查询
|
||||
const updateFS = async () => {
|
||||
if (tableData.value.length === 0) return
|
||||
|
||||
try {
|
||||
const serialNumber = tableData.value[0].serialNumber.substring(1, tableData.value[0].serialNumber.length)
|
||||
await updateFs({ serialNumber })
|
||||
message.success('已提交查询请求,请等待1分钟后重新查询')
|
||||
dialogFormVisible.value = false
|
||||
getDataList()
|
||||
} catch (error: any) {
|
||||
message.error(error.msg || '查询失败')
|
||||
}
|
||||
}
|
||||
|
||||
// 显示支付二维码
|
||||
const showPayCode = (row: any) => {
|
||||
showPrise1.value = false
|
||||
showPrise2.value = false
|
||||
showPrise3.value = false
|
||||
|
||||
payQrcode1.value = ''
|
||||
payQrcode2.value = ''
|
||||
payQrcode3.value = ''
|
||||
|
||||
if (row.clfPayCode && row.clfPayCode != '') {
|
||||
payQrcode1Msg.value = '材料费、代办费'
|
||||
showPrise1.value = true
|
||||
payQrcode1.value = 'https://jscz.govpay.ccb.com/online/fsjf?PyF_BillNo=' + row.clfPayCode + '&Verf_CD=blank&Admn_Rgon_Cd=320400'
|
||||
} else {
|
||||
payQrcode1Msg.value = ''
|
||||
showPrise1.value = false
|
||||
}
|
||||
|
||||
if (row.xfPayCode && row.xfPayCode != '') {
|
||||
payQrcode2Msg.value = '学费'
|
||||
showPrise2.value = true
|
||||
payQrcode2.value = 'https://jscz.govpay.ccb.com/online/fsjf?PyF_BillNo=' + row.xfPayCode + '&Verf_CD=blank&Admn_Rgon_Cd=320400'
|
||||
} else {
|
||||
payQrcode2Msg.value = ''
|
||||
showPrise2.value = false
|
||||
}
|
||||
|
||||
if (row.zdbPayCode && row.zdbPayCode != '') {
|
||||
payQrcode3Msg.value = '中德班学费'
|
||||
showPrise3.value = true
|
||||
payQrcode3.value = 'https://jscz.govpay.ccb.com/online/fsjf?PyF_BillNo=' + row.zdbPayCode + '&Verf_CD=blank&Admn_Rgon_Cd=320400'
|
||||
} else {
|
||||
payQrcode3Msg.value = ''
|
||||
showPrise3.value = false
|
||||
}
|
||||
|
||||
tableData.value = [row]
|
||||
dialogFormVisible.value = true
|
||||
}
|
||||
|
||||
// 重置查询
|
||||
const resetQuery = () => {
|
||||
searchFormRef.value?.resetFields()
|
||||
queryForm.groupId = ''
|
||||
queryForm.xy = ''
|
||||
queryForm.confirmedMajor = ''
|
||||
queryForm.search = ''
|
||||
queryForm.paystatus = ''
|
||||
queryForm.pushed = ''
|
||||
queryForm.backSchoolState = ''
|
||||
queryForm.isOut = '1'
|
||||
queryForm.auditStatus = '20'
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
}
|
||||
getDataList()
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
init()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
269
src/views/recruit/newstucheckin/index.vue
Normal file
269
src/views/recruit/newstucheckin/index.vue
Normal file
@@ -0,0 +1,269 @@
|
||||
<!--
|
||||
- Copyright (c) 2018-2025, cyweb All rights reserved.
|
||||
-
|
||||
- Redistribution and use in source and binary forms, with or without
|
||||
- modification, are permitted provided that the following conditions are met:
|
||||
-
|
||||
- Redistributions of source code must retain the above copyright notice,
|
||||
- this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
- notice, this list of conditions and the following disclaimer in the
|
||||
- documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of the pig4cloud.com developer nor the names of its
|
||||
- contributors may be used to endorse or promote products derived from
|
||||
- this software without specific prior written permission.
|
||||
-
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<!-- 搜索表单 -->
|
||||
<el-form :model="queryForm" inline class="mb-4">
|
||||
<el-form-item label="">
|
||||
<el-input
|
||||
v-model="queryForm.searchTotal"
|
||||
style="width: 300px"
|
||||
clearable
|
||||
placeholder="请输入姓名/身份证号/家庭联系人"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="getDataList">查询</el-button>
|
||||
<el-button type="primary" plain icon="Refresh" class="ml10" @click="resetQuery">重置</el-button>
|
||||
<el-button
|
||||
v-if="permissions.recruit_newstucheckin_output"
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
class="ml10"
|
||||
@click="handleExportOut"
|
||||
:loading="exportLoading"
|
||||
>
|
||||
导出
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
ref="tableRef"
|
||||
:data="state.dataList"
|
||||
v-loading="state.loading"
|
||||
border
|
||||
stripe
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="xy" label="学院" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="classCode" label="班级" align="center" width="80" show-overflow-tooltip />
|
||||
<el-table-column prop="stuNo" label="学号" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="name" label="姓名" align="center" width="80" show-overflow-tooltip />
|
||||
<el-table-column prop="gender" label="性别" align="center" width="60">
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.gender === '1' ? '男' : scope.row.gender === '2' ? '女' : '' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="isDormApply" label="住宿申请" align="center" width="100">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.isDormApply == '1'" type="success">通过</el-tag>
|
||||
<el-tag v-else-if="scope.row.isDormApply == '0'" type="info">未通过</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="isRoom" label="是否住宿" align="center" width="100">
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.isRoom === '1' ? '是' : scope.row.isRoom === '0' ? '否' : '' }}</span>
|
||||
</template>
|
||||
</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="residenceDetail" label="居住地址" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="parentName" label="家庭联系人" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="parentTelOne" label="家长电话1" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="parentTelTwo" label="家长电话2" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="remarks" label="备注" align="center" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="100" align="center" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
v-if="permissions.recruit_newstucheckin_edit"
|
||||
type="primary"
|
||||
link
|
||||
icon="CircleCheck"
|
||||
@click="handleCheckIn(scope.row)"
|
||||
>
|
||||
报到
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<pagination
|
||||
v-bind="state.pagination"
|
||||
@current-change="currentChangeHandle"
|
||||
@size-change="sizeChangeHandle"
|
||||
/>
|
||||
|
||||
<!-- 报到弹窗组件 -->
|
||||
<stu-check-in ref="stuCheckInRef" @reload="refreshChange"></stu-check-in>
|
||||
</div>
|
||||
</div>
|
||||
</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 { BasicTableProps, useTable } from '/@/hooks/table'
|
||||
import { useMessage, useMessageBox } from '/@/hooks/message'
|
||||
import { fetchList } from '/@/api/recruit/newstucheckin'
|
||||
import { getTypeValue } from '/@/api/admin/dict'
|
||||
import request from '/@/utils/request'
|
||||
|
||||
const StuCheckIn = defineAsyncComponent(() => import('./stu-check-in.vue'))
|
||||
|
||||
// 使用 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
|
||||
})
|
||||
|
||||
// 消息提示 hooks
|
||||
const message = useMessage()
|
||||
const messageBox = useMessageBox()
|
||||
|
||||
// 表格引用
|
||||
const tableRef = ref()
|
||||
const stuCheckInRef = ref()
|
||||
|
||||
// 导出加载状态
|
||||
const exportLoading = ref(false)
|
||||
|
||||
// 查询表单
|
||||
const queryForm = reactive({
|
||||
searchTotal: ''
|
||||
})
|
||||
|
||||
// 报到状态字典数据
|
||||
const checkInStatusData = ref<any[]>([])
|
||||
|
||||
// 表格状态
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
queryForm: queryForm,
|
||||
pageList: async (params: any) => {
|
||||
const response = await fetchList({
|
||||
...params,
|
||||
searchTotal: queryForm.searchTotal
|
||||
})
|
||||
return {
|
||||
data: {
|
||||
records: response.data.data.records,
|
||||
total: response.data.data.total
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
// 使用 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
|
||||
}
|
||||
|
||||
// 重置查询
|
||||
const resetQuery = () => {
|
||||
queryForm.searchTotal = ''
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 刷新回调
|
||||
const refreshChange = () => {
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 打开报到窗口
|
||||
const handleCheckIn = (row: any) => {
|
||||
if (stuCheckInRef.value) {
|
||||
stuCheckInRef.value.init(row, {
|
||||
currentPage: state.pagination?.current || 1,
|
||||
pageSize: state.pagination?.size || 10,
|
||||
total: state.pagination?.total || 0
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 导出
|
||||
const handleExportOut = async () => {
|
||||
exportLoading.value = true
|
||||
try {
|
||||
const res = await request({
|
||||
method: 'post',
|
||||
url: '/recruit/newstucheckin/exportData',
|
||||
data: {
|
||||
...queryForm,
|
||||
current: state.pagination?.current || 1,
|
||||
size: state.pagination?.size || 10
|
||||
},
|
||||
responseType: 'blob',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
|
||||
const blob = new Blob([res.data])
|
||||
const fileName = '新生报到导出表.xls'
|
||||
const elink = document.createElement('a')
|
||||
elink.download = fileName
|
||||
elink.style.display = 'none'
|
||||
elink.href = URL.createObjectURL(blob)
|
||||
document.body.appendChild(elink)
|
||||
elink.click()
|
||||
URL.revokeObjectURL(elink.href)
|
||||
document.body.removeChild(elink)
|
||||
|
||||
message.success('导出成功')
|
||||
} catch (error: any) {
|
||||
message.error(error.msg || '导出失败')
|
||||
} finally {
|
||||
exportLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 查询报到状态字典
|
||||
const getCheckInStatusData = async () => {
|
||||
try {
|
||||
const data = await getTypeValue('check_in_status')
|
||||
checkInStatusData.value = data.data || []
|
||||
} catch (error) {
|
||||
console.error('获取报到状态字典失败', error)
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getCheckInStatusData()
|
||||
getDataList()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
275
src/views/recruit/newstucheckin/statistics.vue
Normal file
275
src/views/recruit/newstucheckin/statistics.vue
Normal file
@@ -0,0 +1,275 @@
|
||||
<!--
|
||||
- Copyright (c) 2018-2025, cyweb All rights reserved.
|
||||
-
|
||||
- Redistribution and use in source and binary forms, with or without
|
||||
- modification, are permitted provided that the following conditions are met:
|
||||
-
|
||||
- Redistributions of source code must retain the above copyright notice,
|
||||
- this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
- notice, this list of conditions and the following disclaimer in the
|
||||
- documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of the pig4cloud.com developer nor the names of its
|
||||
- contributors may be used to endorse or promote products derived from
|
||||
- this software without specific prior written permission.
|
||||
-
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-form :model="queryForm" inline class="mb-4" ref="searchFormRef">
|
||||
<el-form-item label="入学年份" prop="grade">
|
||||
<el-select v-model="queryForm.grade" filterable clearable placeholder="请选择入学年份">
|
||||
<el-option
|
||||
v-for="item in gradeList"
|
||||
:key="item.year"
|
||||
:label="item.year"
|
||||
:value="item.year"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="学院" prop="deptCode">
|
||||
<el-select v-model="queryForm.deptCode" filterable clearable placeholder="请选择学院">
|
||||
<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="classCode">
|
||||
<el-select v-model="queryForm.classCode" filterable clearable placeholder="请选择班级">
|
||||
<el-option
|
||||
v-for="item in classData"
|
||||
:key="item.classCode"
|
||||
:label="item.classNo"
|
||||
:value="item.classCode"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="searchData">查询</el-button>
|
||||
<el-button type="primary" plain icon="Refresh" class="ml10" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div class="mb15">
|
||||
<el-button
|
||||
v-if="permissions.recruit_newstucheckin_statistics_output"
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
:loading="exportLoading"
|
||||
@click="handleExportOut"
|
||||
>
|
||||
导出
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
:data="tableData"
|
||||
height="650"
|
||||
show-summary
|
||||
:summary-method="getSummaries"
|
||||
stripe
|
||||
border
|
||||
v-loading="tableLoading"
|
||||
:header-cell-style="{ 'text-align': 'center' }"
|
||||
:cell-style="{ 'text-align': 'center' }"
|
||||
class="el_table_job_fair_stu"
|
||||
>
|
||||
<el-table-column type="index" width="50" fixed label="序号" />
|
||||
<el-table-column prop="deptName" label="学院" />
|
||||
<el-table-column prop="classNo" label="班级" />
|
||||
<el-table-column prop="classNum" label="预计报到人数" />
|
||||
<el-table-column prop="checkInOk" label="已经报到" />
|
||||
<el-table-column prop="postpone" label="推迟报到" />
|
||||
<el-table-column prop="abandon" label="放弃报到" />
|
||||
<el-table-column prop="missing" label="无法联系" />
|
||||
<el-table-column prop="contact" label="未联系" />
|
||||
<el-table-column prop="checkInRate" label="报到率" />
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="newstucheckin-statistics">
|
||||
import { ref, reactive, computed, onMounted } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useUserInfo } from '/@/stores/userInfo'
|
||||
import { useMessage } from '/@/hooks/message'
|
||||
import { getDataStatistics } from '/@/api/recruit/newstucheckin'
|
||||
import { list } from '/@/api/recruit/recruitstudentplangroup'
|
||||
import { getDeptList } from '/@/api/basic/basicclass'
|
||||
import { getClasslist } from '/@/api/stuwork/stupunlish'
|
||||
import axios from 'axios'
|
||||
|
||||
// 使用 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
|
||||
})
|
||||
|
||||
// 消息提示 hooks
|
||||
const message = useMessage()
|
||||
|
||||
// 引用
|
||||
const searchFormRef = ref()
|
||||
|
||||
// 状态
|
||||
const tableData = ref<any[]>([])
|
||||
const tableLoading = ref(false)
|
||||
const exportLoading = ref(false)
|
||||
const gradeList = ref<any[]>([])
|
||||
const deptList = ref<any[]>([])
|
||||
const classData = ref<any[]>([])
|
||||
|
||||
// 查询表单
|
||||
const queryForm = reactive({
|
||||
grade: '',
|
||||
deptCode: '',
|
||||
classCode: ''
|
||||
})
|
||||
|
||||
// 初始化
|
||||
const init = async () => {
|
||||
await Promise.all([
|
||||
getGradeData(),
|
||||
getDeptData(),
|
||||
getClassData()
|
||||
])
|
||||
getList()
|
||||
}
|
||||
|
||||
// 查看所有入学年份
|
||||
const getGradeData = async () => {
|
||||
try {
|
||||
const data = await list()
|
||||
gradeList.value = data.data.data || []
|
||||
} catch (error) {
|
||||
console.error('获取入学年份失败', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 查找所有二级学院
|
||||
const getDeptData = async () => {
|
||||
try {
|
||||
const data = await getDeptList()
|
||||
deptList.value = data.data.data || []
|
||||
} catch (error) {
|
||||
console.error('获取学院列表失败', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 查找所有班级
|
||||
const getClassData = async () => {
|
||||
try {
|
||||
const data = await getClasslist()
|
||||
classData.value = data.data.data || []
|
||||
} catch (error) {
|
||||
console.error('获取班级列表失败', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 获取数据列表
|
||||
const getList = async () => {
|
||||
try {
|
||||
tableLoading.value = true
|
||||
const response = await getDataStatistics(queryForm)
|
||||
tableData.value = response.data.data || []
|
||||
} catch (error) {
|
||||
console.error('获取数据失败', error)
|
||||
} finally {
|
||||
tableLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 查询
|
||||
const searchData = () => {
|
||||
getList()
|
||||
}
|
||||
|
||||
// 重置查询
|
||||
const resetQuery = () => {
|
||||
searchFormRef.value?.resetFields()
|
||||
queryForm.grade = ''
|
||||
queryForm.deptCode = ''
|
||||
queryForm.classCode = ''
|
||||
getList()
|
||||
}
|
||||
|
||||
// 导出
|
||||
const handleExportOut = async () => {
|
||||
try {
|
||||
exportLoading.value = true
|
||||
const res = await axios({
|
||||
method: 'post',
|
||||
url: '/recruit/newstucheckin/exportDataStatistics',
|
||||
data: queryForm,
|
||||
responseType: 'blob',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
const blob = new Blob([res.data])
|
||||
const fileName = '新生报到统计.xls'
|
||||
const elink = document.createElement('a')
|
||||
elink.download = fileName
|
||||
elink.style.display = 'none'
|
||||
elink.href = URL.createObjectURL(blob)
|
||||
document.body.appendChild(elink)
|
||||
elink.click()
|
||||
URL.revokeObjectURL(elink.href)
|
||||
document.body.removeChild(elink)
|
||||
} catch (error: any) {
|
||||
message.error(error.msg || '导出失败')
|
||||
} finally {
|
||||
exportLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 合计方法
|
||||
const getSummaries = (param: any) => {
|
||||
const { columns, data } = param
|
||||
const sums: any[] = []
|
||||
columns.forEach((column: any, index: number) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '合计'
|
||||
return
|
||||
}
|
||||
if (index === 1 || index === 2) {
|
||||
sums[index] = ''
|
||||
return
|
||||
}
|
||||
const values = data.map((item: any) => Number(item[column.property]))
|
||||
if (!values.every((value: any) => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev: number, curr: any) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0)
|
||||
sums[index] += ''
|
||||
}
|
||||
})
|
||||
return sums
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
init()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
280
src/views/recruit/newstucheckin/stu-check-in.vue
Normal file
280
src/views/recruit/newstucheckin/stu-check-in.vue
Normal file
@@ -0,0 +1,280 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog :visible.sync="newStuCheckInDialog" width="40%">
|
||||
<el-form :model="form" :rules="rules" ref="form" label-width="120px"
|
||||
class="demo-ruleForm">
|
||||
|
||||
<el-form-item label="姓名" prop="realName">
|
||||
<el-input v-model="form.name" style=" width: 80%"></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-form-item>
|
||||
|
||||
<el-form-item label="身份证号" prop="idCard">
|
||||
<el-input v-model="form.idNumber" style=" width: 80%"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="报到状态" prop="checkInStatus">
|
||||
<el-select v-model="form.checkInStatus" filterable placeholder="请选择报到状态" style=" width: 80% ">
|
||||
<el-option
|
||||
v-for="item in checkInStatusData"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="是否住宿" prop="isRoom" v-if="isRoomTab">
|
||||
<el-select v-model="form.isRoom" filterable placeholder="是否住宿" style=" width: 80% ">
|
||||
<el-option
|
||||
v-for="item in yesOrNoData"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="宿舍号" prop="roomNo" v-if="isRoomTab && form.isRoom=='1'">
|
||||
<!-- <el-select v-model="form.roomNo" filterable placeholder="请选择房间号" :remote-method="remoteMethod" style=" width: 80% ">-->
|
||||
<el-select
|
||||
v-model="form.roomNo"
|
||||
filterable
|
||||
remote
|
||||
placeholder="请选择宿舍号"
|
||||
:remote-method="remoteMethod"
|
||||
@change="change"
|
||||
:loading="loading"
|
||||
style=" width: 80% "
|
||||
>
|
||||
<el-option
|
||||
v-for="item in roomNoList"
|
||||
:key="item.id"
|
||||
:label="item.roomNo"
|
||||
:value="item.roomNo">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</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% ">
|
||||
<el-option
|
||||
v-for="item in bedNoData"
|
||||
:key="item.bedNo"
|
||||
:label="item.bedNo"
|
||||
:value="item.bedNo"
|
||||
:disabled="isRoomDisable(item.notBedNo)">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</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('form')" v-loading="submitLoading">确定</el-button>
|
||||
<el-button @click="newStuCheckInDialog = false">取消</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getDataByRoomNo} from "/@/api/stuwork/dormroom";
|
||||
import {fearchRoomStuNum} from "/@/api/stuwork/dormroomstudent";
|
||||
import {getDictByType} from "/@/api/contract/contract";
|
||||
|
||||
import {putObj} from '@/api/recruit/newstucheckin'
|
||||
|
||||
export default {
|
||||
name: "stu-check-in",
|
||||
data() {
|
||||
return {
|
||||
page:{},
|
||||
newStuCheckInDialog:false,
|
||||
bedNoData:[],
|
||||
roomNoList:[],
|
||||
checkInStatusData:[],
|
||||
loading:false,
|
||||
isRoomTab:false,
|
||||
yesOrNoData:[{label:'否', value:'0'},{label:'是', value:'1'}],
|
||||
genderData:[{label:'女', value:'2'},{label:'男', value:'1'}],
|
||||
submitLoading:false,
|
||||
form:{
|
||||
name:"",
|
||||
checkInStatus:"",
|
||||
gender:"",
|
||||
idNumber:"",
|
||||
isRoom:"",
|
||||
roomNo:"",
|
||||
bedNo:"",
|
||||
remarks:"",
|
||||
residenceDetail:"",
|
||||
parentName:"",
|
||||
parentTelOne:"",
|
||||
parentTelTwo:""
|
||||
},
|
||||
rules: {
|
||||
name: [
|
||||
{ required: true, message: '请输入姓名', trigger: [ "blur","change"] }
|
||||
],
|
||||
gender: [
|
||||
{ required: true, message: '请输入性别', trigger: [ "blur","change"] }
|
||||
],
|
||||
idNumber: [
|
||||
{ required: true, message: '请输入身份证号', trigger: [ "blur","change"] }
|
||||
],
|
||||
checkInStatus: [
|
||||
{ required: true, message: '请输入报到状态', trigger: [ "blur","change"] }
|
||||
],
|
||||
isRoom: [
|
||||
{ required: true, message: '请选择是否住宿', trigger: [ "blur","change"] }
|
||||
],
|
||||
roomNo: [
|
||||
{ required: true, message: '请选择宿舍号', trigger: [ "blur","change"] }
|
||||
],
|
||||
bedNo: [
|
||||
{ required: true, message: '请选择床位号', trigger: [ "blur","change"] }
|
||||
],
|
||||
}
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
'form.checkInStatus':{
|
||||
handler(newVal){
|
||||
if(newVal==='1'){
|
||||
this.isRoomTab = true
|
||||
}else {
|
||||
this.isRoomTab = false
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
'form.roomNo':{
|
||||
handler(newVal){
|
||||
console.log(newVal)
|
||||
if (newVal){
|
||||
this.fearchRoomStuNums(newVal)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
'form.isRoom':{
|
||||
handler(newVal){
|
||||
if (newVal === '0'){
|
||||
this.form.roomNo = ''
|
||||
this.form.bedNo = ''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
methods:{
|
||||
initForm(){
|
||||
this.form.name = ""
|
||||
this.form.checkInStatus = ""
|
||||
this.form.gender = ""
|
||||
this.form.idNumber = ""
|
||||
this.form.isRoom = ""
|
||||
this.form.roomNo = ""
|
||||
this.form.bedNo = ""
|
||||
this.form.remarks = ""
|
||||
this.form.residenceDetail="";
|
||||
this.form.parentName="";
|
||||
this.form.parentTelOne="";
|
||||
this.form.parentTelTwo="";
|
||||
},
|
||||
init(formData,page){
|
||||
this.initForm();
|
||||
this.page = page
|
||||
this.submitLoading = false
|
||||
this.newStuCheckInDialog = true
|
||||
|
||||
Object.assign(this.form,formData)
|
||||
if(formData.roomNo){
|
||||
this.remoteMethod(formData.roomNo);
|
||||
this.fearchRoomStuNums(formData.bedNo);
|
||||
}
|
||||
getDictByType('check_in_status').then(data=>{
|
||||
this.checkInStatusData = data.data.data
|
||||
})
|
||||
console.log("OKKK")
|
||||
},
|
||||
checkIn(form) {
|
||||
let _that = this
|
||||
_that.submitLoading = true;
|
||||
_that.$refs[form].validate((valid) => {
|
||||
if (valid) {
|
||||
// console.log("form",this.form)
|
||||
// _that.formLoading = true
|
||||
putObj(this.form).then(data => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: '报到成功',
|
||||
type: 'success'
|
||||
})
|
||||
_that.$emit("reload",this.page);
|
||||
_that.newStuCheckInDialog = false
|
||||
_that.submitLoading = false
|
||||
})
|
||||
// _that.formLoading = false
|
||||
}else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
//实时检索宿舍号
|
||||
remoteMethod(query) {
|
||||
if (query != '' && query.length>=3) {
|
||||
let data = {'roomNo':query}
|
||||
this.loading = true
|
||||
let _this = this
|
||||
getDataByRoomNo(data).then(data=>{
|
||||
_this.roomNoList = data.data.data;
|
||||
console.log("this.roomNoList")
|
||||
console.log(_this.roomNoList)
|
||||
_this.loading = false
|
||||
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//查询此房间为几人间
|
||||
fearchRoomStuNums(roomNo){
|
||||
var data = {"roomNo":roomNo}
|
||||
fearchRoomStuNum(data).then(data =>{
|
||||
this.bedNoData = data.data.data;
|
||||
})
|
||||
},
|
||||
isRoomDisable(notBedNo){
|
||||
if(undefined != notBedNo && "" != notBedNo){
|
||||
return true
|
||||
}else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
change(){
|
||||
this.form.bedNo='';
|
||||
this.$forceUpdate()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
263
src/views/recruit/recruitImitateAdjustBatch/addMNStu.vue
Normal file
263
src/views/recruit/recruitImitateAdjustBatch/addMNStu.vue
Normal file
@@ -0,0 +1,263 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="!dataForm.id ? '新增' : '修改'"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="visible"
|
||||
append-to-body
|
||||
>
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="140px">
|
||||
|
||||
<el-form-item label="模拟学生" prop="serialNumber">
|
||||
<el-select
|
||||
v-model="dataForm.serialNumber"
|
||||
@change="changeStu"
|
||||
filterable
|
||||
remote
|
||||
clearable
|
||||
reserve-keyword
|
||||
:disabled="!dataForm.id ? false : true" placeholder="请选择唯一号" size="small" style="width: 100%"
|
||||
:remote-method="remoteTeacherByQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in serialNumberList"
|
||||
:key="item.serialNumber"
|
||||
:label="item.name+'('+item.serialNumber+')'"
|
||||
:value="item.serialNumber">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="来源" prop="isOut">
|
||||
<el-select v-model="dataForm.isOut" filterable disabled placeholder="请选择来源" size="small" style="width: 100%" >
|
||||
<el-option
|
||||
v-for="item in isOutList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="拟报专业1" prop="wishMajorOne">
|
||||
<el-select v-model="dataForm.wishMajorOne" filterable placeholder="请选择拟报专业1" size="small" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in planMajorList"
|
||||
:key="item.zydm"
|
||||
:label="item.zymc+' | '+item.xz+'年 | '+item.zydm"
|
||||
:value="item.zydm"
|
||||
:disabled="isDisable(item.zydm)"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="拟报专业2" prop="wishMajorTwo">
|
||||
<el-select v-model="dataForm.wishMajorTwo" filterable placeholder="请选择拟报专业2" size="small" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in planMajorList"
|
||||
:key="item.zydm"
|
||||
:label="item.zymc+' | '+item.xz+'年 | '+item.zydm"
|
||||
:value="item.zydm"
|
||||
:disabled="isDisable(item.zydm)"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="拟报专业3" prop="wishMajorThree">
|
||||
<el-select v-model="dataForm.wishMajorThree" filterable placeholder="请选择拟报专业3" size="small" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in planMajorList"
|
||||
:key="item.zydm"
|
||||
:label="item.zymc+' | '+item.xz+'年 | '+item.zydm"
|
||||
:value="item.zydm"
|
||||
:disabled="isDisable(item.zydm)"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="录取专业" prop="confirmedMajor">
|
||||
<el-select v-model="dataForm.confirmedMajor" filterable placeholder="请选择录取专业" size="small" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in planMajorEduList"
|
||||
:key="item.zydm"
|
||||
:label="item.zymc+' | '+item.xz+'年 | '+item.zydm"
|
||||
:value="item.zydm">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</el-form>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()" v-if="canSubmit">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {addMNObj, getMNObj, putMNObj} from '@/api/recruit/recruitImitateAdjustBatch'
|
||||
import {getList} from "@/api/recruit/recruitstudentsignup";
|
||||
import {list as planMajor, listByEdu} from "@/api/recruit/recruitplanmajor";
|
||||
import {queryTeacherStationInfo} from "@/api/professional/teacherbase";
|
||||
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
canSubmit: false,
|
||||
dataForm: {
|
||||
id:"",
|
||||
serialNumber:"",
|
||||
groupId:"",
|
||||
wishMajorOne:'',
|
||||
wishMajorTwo:'',
|
||||
wishMajorThree:'',
|
||||
confirmedMajor:'',
|
||||
isOut:'',
|
||||
degreeOfEducation:"",
|
||||
name:"",
|
||||
gender:"",
|
||||
idNumber:"",
|
||||
},
|
||||
disabled:false,
|
||||
serialNumberList:[],
|
||||
planMajorEduList:[],
|
||||
isOutList:[{label:"学校",value:"0"},{label:"市平台",value:"1"}],
|
||||
planMajorList:[],
|
||||
dataRule: {
|
||||
serialNumber: [
|
||||
{ required: true, message: '模拟学生不能为空', trigger: 'blur' },
|
||||
],
|
||||
confirmedMajor: [
|
||||
{ required: true, message: '录取专业不能为空', trigger: 'blur' },
|
||||
],
|
||||
}
|
||||
}
|
||||
},
|
||||
created () {
|
||||
},
|
||||
methods: {
|
||||
init (id,groupId,batchNo) {
|
||||
this.dataForm.id = id || null;
|
||||
this.dataForm.batchNo = batchNo;
|
||||
this.dataForm.groupId= groupId;
|
||||
this.visible = true;
|
||||
this.canSubmit = true;
|
||||
this.planMajorEduList = [];
|
||||
this.initData();
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
getMNObj(this.dataForm.id).then(response => {
|
||||
this.dataForm = response.data.data
|
||||
this.getMajorListByEdu();
|
||||
})
|
||||
}else{
|
||||
this.disabled = true;
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 判断拟报专业是否已经占用,占用不可选
|
||||
* @param notBedNo
|
||||
* @returns {boolean}
|
||||
*/
|
||||
isDisable(zydm){
|
||||
if(zydm == this.dataForm.wishMajorOne
|
||||
|| zydm == this.dataForm.wishMajorTwo
|
||||
|| zydm == this.dataForm.wishMajorThree
|
||||
){
|
||||
return true
|
||||
}else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
initData() {
|
||||
this.planMajorList=[];
|
||||
this.serialNumberList=[];
|
||||
planMajor({groupId: this.dataForm.groupId}).then(data =>{
|
||||
this.planMajorList = data.data.data;
|
||||
});
|
||||
// getList({groupId:this.dataForm.groupId}).then(data =>{
|
||||
// this.serialNumberList = data.data.data
|
||||
// });
|
||||
},
|
||||
remoteTeacherByQuery(query) {
|
||||
this.serialNumberList = []
|
||||
if (query !== '') {
|
||||
setTimeout(() => {
|
||||
getList({groupId:this.dataForm.groupId,name:query}).then(response => {
|
||||
this.serialNumberList = response.data.data
|
||||
})
|
||||
}, 200);
|
||||
}
|
||||
},
|
||||
changeStu(){
|
||||
let _this = this;
|
||||
_this.planMajorEduList = [];
|
||||
_this.dataForm.wishMajorOne='';
|
||||
_this.dataForm.wishMajorTwo='';
|
||||
_this.dataForm.wishMajorThree='';
|
||||
_this.dataForm.degreeOfEducation = "";
|
||||
_this.dataForm.oldConfirmedMajor = "";
|
||||
_this.dataForm.name = "";
|
||||
_this.dataForm.idNumber = "";
|
||||
_this.dataForm.confirmedMajor = "";
|
||||
_this.dataForm.gender = "";
|
||||
_this.dataForm.isOut = "";
|
||||
console.log(_this.dataForm);
|
||||
_this.serialNumberList.forEach(e=>{
|
||||
if(e.serialNumber == _this.dataForm.serialNumber){
|
||||
_this.dataForm.wishMajorOne = e.wishMajorOne;
|
||||
_this.dataForm.wishMajorTwo = e.wishMajorTwo;
|
||||
_this.dataForm.wishMajorThree = e.wishMajorThree;
|
||||
_this.dataForm.degreeOfEducation = e.degreeOfEducation;
|
||||
_this.dataForm.name = e.name;
|
||||
_this.dataForm.idNumber = e.idNumber;
|
||||
|
||||
_this.dataForm.gender = e.gender;
|
||||
_this.dataForm.isOut = e.isOut;
|
||||
_this.dataForm.confirmedMajor = e.confirmedMajor;
|
||||
_this.dataForm.oldConfirmedMajor = e.confirmedMajor;
|
||||
_this.getMajorListByEdu();
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
getMajorListByEdu(){
|
||||
this.planMajorEduList=[];
|
||||
listByEdu({groupId: this.dataForm.groupId,degreeOfEducation:this.dataForm.degreeOfEducation}).then(res=> {
|
||||
this.planMajorEduList = res.data.data;
|
||||
});
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit () {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
if(this.dataForm.oldConfirmedMajor == this.dataForm.confirmedMajor){
|
||||
this.$notify.error('模拟调整的专业不能和原录取专业相同,请检查');
|
||||
return
|
||||
}
|
||||
this.canSubmit = false;
|
||||
if (this.dataForm.id) {
|
||||
putMNObj(this.dataForm).then(data => {
|
||||
this.$notify.success('修改成功')
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
} else {
|
||||
addMNObj(this.dataForm).then(data => {
|
||||
this.$notify.success('添加成功')
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
113
src/views/recruit/recruitImitateAdjustBatch/detaiform.vue
Normal file
113
src/views/recruit/recruitImitateAdjustBatch/detaiform.vue
Normal file
@@ -0,0 +1,113 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="!dataForm.id ? '新增' : '修改'"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="140px">
|
||||
|
||||
<el-form-item label="招生计划" prop="groupId">
|
||||
<el-select v-model="dataForm.groupId" filterable :disabled="!dataForm.id ? false : true" placeholder="请选择招生计划" size="small" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in planList"
|
||||
:key="item.id"
|
||||
:label="item.groupName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次名称" prop="batchName">
|
||||
<el-input v-model="dataForm.batchName" placeholder="批次名称"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()" v-if="canSubmit">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {addObj, getObj, putObj} from '@/api/recruit/recruitImitateAdjustBatch'
|
||||
import {list} from "@/api/recruit/recruitstudentplangroup";
|
||||
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
canSubmit: false,
|
||||
dataForm: {
|
||||
id:"",
|
||||
batchName:"",
|
||||
groupId:"",
|
||||
},
|
||||
disabled:false,
|
||||
planList: [],
|
||||
areaList:[],
|
||||
deptList:[],
|
||||
dataRule: {
|
||||
groupId: [
|
||||
{ required: true, message: '招生计划不能为空', trigger: 'blur' },
|
||||
],
|
||||
batchName: [
|
||||
{ required: true, message: '批次名称不能为空', trigger: 'blur' },
|
||||
{ min: 1, max: 20, message: '批次名称长度不大于20个字符', trigger: 'blur' }
|
||||
],
|
||||
}
|
||||
}
|
||||
},
|
||||
created () {
|
||||
},
|
||||
methods: {
|
||||
init (id) {
|
||||
this.dataForm.id = id || null;
|
||||
this.visible = true;
|
||||
this.canSubmit = true;
|
||||
this.initData();
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
getObj(this.dataForm.id).then(response => {
|
||||
this.dataForm = response.data.data
|
||||
})
|
||||
}else{
|
||||
this.disabled = true;
|
||||
}
|
||||
})
|
||||
},
|
||||
initData() {
|
||||
list().then(data =>{
|
||||
this.planList = data.data.data
|
||||
if(!this.dataForm.id){
|
||||
this.dataForm.groupId=this.planList[0].id
|
||||
}
|
||||
});
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit () {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.canSubmit = false;
|
||||
if (this.dataForm.id) {
|
||||
putObj(this.dataForm).then(data => {
|
||||
this.$notify.success('修改成功')
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
} else {
|
||||
addObj(this.dataForm).then(data => {
|
||||
this.$notify.success('添加成功')
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
268
src/views/recruit/recruitImitateAdjustBatch/index.vue
Normal file
268
src/views/recruit/recruitImitateAdjustBatch/index.vue
Normal file
@@ -0,0 +1,268 @@
|
||||
<!--
|
||||
- Copyright (c) 2018-2025, cyweb All rights reserved.
|
||||
-
|
||||
- Redistribution and use in source and binary forms, with or without
|
||||
- modification, are permitted provided that the following conditions are met:
|
||||
-
|
||||
- Redistributions of source code must retain the above copyright notice,
|
||||
- this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
- notice, this list of conditions and the following disclaimer in the
|
||||
- documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of the pig4cloud.com developer nor the names of its
|
||||
- contributors may be used to endorse or promote products derived from
|
||||
- this software without specific prior written permission.
|
||||
-
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<!-- 搜索表单 -->
|
||||
<el-form :model="queryForm" inline class="mb-4" ref="searchFormRef">
|
||||
<el-form-item label="招生计划" prop="groupId">
|
||||
<el-select v-model="queryForm.groupId" filterable clearable placeholder="请选择招生计划">
|
||||
<el-option
|
||||
v-for="item in planList"
|
||||
:key="item.id"
|
||||
:label="item.groupName"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次名称" prop="batchName">
|
||||
<el-input v-model="queryForm.batchName" clearable placeholder="批次名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="批次代码" prop="batchCode">
|
||||
<el-input v-model="queryForm.batchCode" clearable placeholder="批次代码" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="getDataList">查询</el-button>
|
||||
<el-button type="primary" plain icon="Refresh" class="ml10" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<div class="mb15">
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitImitateAdjustBatch_add"
|
||||
type="primary"
|
||||
icon="FolderAdd"
|
||||
@click="addOrUpdateHandle"
|
||||
>
|
||||
新增
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
ref="tableRef"
|
||||
:data="state.dataList"
|
||||
v-loading="state.loading"
|
||||
border
|
||||
stripe
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="batchName" label="批次名称" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="batchCode" label="批次代码" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="peopleNumber" label="人数" align="center" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="300" align="center" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitImitateAdjustBatch_show"
|
||||
type="primary"
|
||||
link
|
||||
icon="Document"
|
||||
@click="showTable(scope.row.batchCode, scope.row.groupId)"
|
||||
>
|
||||
模拟列表
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitImitateAdjustBatch_show"
|
||||
type="warning"
|
||||
link
|
||||
icon="Download"
|
||||
@click="handleExport(scope.row.batchCode, scope.row.groupId)"
|
||||
>
|
||||
导出模拟结果
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitImitateAdjustBatch_edit"
|
||||
type="primary"
|
||||
link
|
||||
icon="EditPen"
|
||||
@click="addOrUpdateHandle(scope.row.id)"
|
||||
>
|
||||
修改
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitImitateAdjustBatch_del"
|
||||
type="danger"
|
||||
link
|
||||
icon="Delete"
|
||||
@click="deleteHandle(scope.row.id)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<pagination
|
||||
v-bind="state.pagination"
|
||||
@current-change="currentChangeHandle"
|
||||
@size-change="sizeChangeHandle"
|
||||
/>
|
||||
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<table-form v-if="addOrUpdateVisible" ref="addOrUpdateRef" @refreshDataList="getDataList" />
|
||||
<mn-table v-if="mnTableVisible" ref="mnTableRef" @refreshDataList="getDataList" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="recruitImitateAdjustBatch">
|
||||
import { ref, reactive, computed, onMounted, nextTick, defineAsyncComponent } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useUserInfo } from '/@/stores/userInfo'
|
||||
import { BasicTableProps, useTable } from '/@/hooks/table'
|
||||
import { useMessage, useMessageBox } from '/@/hooks/message'
|
||||
import { list } from '/@/api/recruit/recruitstudentplangroup'
|
||||
import { addObj, delObj, fetchList } from '/@/api/recruit/recruitImitateAdjustBatch'
|
||||
import request from '/@/utils/request'
|
||||
|
||||
const TableForm = defineAsyncComponent(() => import('./detaiform.vue'))
|
||||
const MnTable = defineAsyncComponent(() => import('./mnTable.vue'))
|
||||
|
||||
// 使用 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
|
||||
})
|
||||
|
||||
// 消息提示 hooks
|
||||
const message = useMessage()
|
||||
const messageBox = useMessageBox()
|
||||
|
||||
// 表格引用
|
||||
const tableRef = ref()
|
||||
const searchFormRef = ref()
|
||||
const addOrUpdateRef = ref()
|
||||
const mnTableRef = ref()
|
||||
|
||||
// 弹窗状态
|
||||
const addOrUpdateVisible = ref(false)
|
||||
const mnTableVisible = ref(false)
|
||||
|
||||
// 数据
|
||||
const planList = ref<any[]>([])
|
||||
|
||||
// 查询表单
|
||||
const queryForm = reactive({
|
||||
groupId: '',
|
||||
batchName: '',
|
||||
batchCode: ''
|
||||
})
|
||||
|
||||
// 表格状态
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
queryForm: queryForm,
|
||||
pageList: async (params: any) => {
|
||||
const response = await fetchList(params)
|
||||
return {
|
||||
data: {
|
||||
records: response.data.data.records,
|
||||
total: response.data.data.total
|
||||
}
|
||||
}
|
||||
},
|
||||
createdIsNeed: false
|
||||
})
|
||||
|
||||
// 使用 table hook
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, tableStyle, downBlobFile } = useTable(state)
|
||||
|
||||
// 初始化
|
||||
const init = async () => {
|
||||
try {
|
||||
const data = await list()
|
||||
planList.value = data.data.data || []
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
}
|
||||
getDataList()
|
||||
} catch (error) {
|
||||
console.error('初始化失败', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 新增 / 修改
|
||||
const addOrUpdateHandle = (id?: string) => {
|
||||
addOrUpdateVisible.value = true
|
||||
nextTick(() => {
|
||||
addOrUpdateRef.value?.init(id)
|
||||
})
|
||||
}
|
||||
|
||||
// 显示模拟列表
|
||||
const showTable = (batchNo: string, groupId: string) => {
|
||||
mnTableVisible.value = true
|
||||
nextTick(() => {
|
||||
mnTableRef.value?.init(batchNo, groupId)
|
||||
})
|
||||
}
|
||||
|
||||
// 导出模拟结果
|
||||
const handleExport = async (code: string, gid: string) => {
|
||||
try {
|
||||
await downBlobFile(
|
||||
'/recruit/recruitImitateAdjustBatch/exportExcel',
|
||||
{ batchNo: code, groupId: gid },
|
||||
'招生模拟统计.xls'
|
||||
)
|
||||
} catch (error: any) {
|
||||
message.error(error.msg || '导出失败')
|
||||
}
|
||||
}
|
||||
|
||||
// 删除
|
||||
const deleteHandle = async (id: string) => {
|
||||
try {
|
||||
await messageBox.confirm('是否确认删除本条数据?请谨慎操作')
|
||||
await delObj(id)
|
||||
message.success('删除成功')
|
||||
getDataList()
|
||||
} catch {
|
||||
// 用户取消
|
||||
}
|
||||
}
|
||||
|
||||
// 重置查询
|
||||
const resetQuery = () => {
|
||||
searchFormRef.value?.resetFields()
|
||||
Object.keys(queryForm).forEach(key => {
|
||||
queryForm[key] = ''
|
||||
})
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
}
|
||||
getDataList()
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
init()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
216
src/views/recruit/recruitImitateAdjustBatch/mnTable.vue
Normal file
216
src/views/recruit/recruitImitateAdjustBatch/mnTable.vue
Normal file
@@ -0,0 +1,216 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="模拟列表"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="visible"
|
||||
width="80%"
|
||||
>
|
||||
<el-form :inline="true" >
|
||||
<el-form-item>
|
||||
<el-button v-if="permissions.recruit_recruitImitateAdjustBatch_add" icon="el-icon-plus" size="small" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="avue-crud">
|
||||
<el-table
|
||||
:data="dataList"
|
||||
border
|
||||
stripe
|
||||
v-loading="dataListLoading">
|
||||
<el-table-column
|
||||
prop="serialNumber"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="唯一号">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="姓名">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="gender"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="性别">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.gender==1">男</span>
|
||||
<span v-if="scope.row.gender==2">女</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="degreeOfEducation"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="学历">
|
||||
<template slot-scope="scope">
|
||||
{{global.getLabelValueByPropes(eduList,scope.row.degreeOfEducation,{'key':'value','value':'label'})}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="wishMajorOne"
|
||||
header-align="center"
|
||||
width="100px"
|
||||
align="center"
|
||||
label="拟报专业1">
|
||||
<template slot-scope="scope">
|
||||
{{global.getLabelValueByPropes2(planMajorList,scope.row.wishMajorOne,{'key':'zydm','value':'zymc'})}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="wishMajorTwo"
|
||||
header-align="center"
|
||||
align="center"
|
||||
width="100px"
|
||||
label="拟报专业2">
|
||||
<template slot-scope="scope">
|
||||
{{global.getLabelValueByPropes2(planMajorList,scope.row.wishMajorTwo,{'key':'zydm','value':'zymc'})}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="wishMajorThree"
|
||||
header-align="center"
|
||||
align="center"
|
||||
width="100px"
|
||||
label="拟报专业3">
|
||||
<template slot-scope="scope">
|
||||
{{global.getLabelValueByPropes2(planMajorList,scope.row.wishMajorThree,{'key':'zydm','value':'zymc'})}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="oldConfirmedMajor"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="原录取专业">
|
||||
<template slot-scope="scope">
|
||||
{{global.getLabelValueByPropes2(planMajorList,scope.row.oldConfirmedMajor,{'key':'zydm','value':'zymc'})}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="confirmedMajor"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="模拟录取专业">
|
||||
<template slot-scope="scope">
|
||||
{{global.getLabelValueByPropes2(planMajorList,scope.row.confirmedMajor,{'key':'zydm','value':'zymc'})}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="isOut"
|
||||
header-align="center"
|
||||
align="center"
|
||||
width="120"
|
||||
label="来源">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.isOut==0">学校</span>
|
||||
<span v-if="scope.row.isOut==1">市平台</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="permissions.recruit_recruitImitateAdjustBatch_edit" type="text" size="small" icon="el-icon-edit" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
||||
<el-button v-if="permissions.recruit_recruitImitateAdjustBatch_del" type="text" size="small" icon="el-icon-delete" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
|
||||
<add-m-n-stu v-if="addMnStuVisible" ref="addMnStu" @refreshDataList="getDataList"></add-m-n-stu>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getMNStuList,delMNObj} from '@/api/recruit/recruitImitateAdjustBatch'
|
||||
import {list as planMajor} from "@/api/recruit/recruitplanmajor";
|
||||
import {mapGetters} from "vuex";
|
||||
import addMNStu from './addMNStu'
|
||||
import global from '@/components/tools/commondict'
|
||||
import {getTypeValue} from "@/api/admin/dict";
|
||||
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
canSubmit: false,
|
||||
dataForm: {
|
||||
batchNo:"",
|
||||
groupId:""
|
||||
},
|
||||
dataListLoading: false,
|
||||
addMnStuVisible: false,
|
||||
global:global,
|
||||
disabled:false,
|
||||
dataRule: {
|
||||
},
|
||||
planAllMajorList:[],
|
||||
dataList: [],
|
||||
eduList:[],
|
||||
|
||||
}
|
||||
},
|
||||
created () {
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['permissions'])
|
||||
},
|
||||
components: {
|
||||
addMNStu
|
||||
},
|
||||
methods: {
|
||||
init (batchNo,groupId) {
|
||||
this.dataForm.batchNo = batchNo;
|
||||
this.dataForm.groupId = groupId;
|
||||
this.visible = true;
|
||||
this.canSubmit = true;
|
||||
this.initData();
|
||||
|
||||
},
|
||||
// 新增 / 修改
|
||||
addOrUpdateHandle (id) {
|
||||
this.addMnStuVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addMnStu.init(id,this.dataForm.groupId,this.dataForm.batchNo)
|
||||
})
|
||||
},
|
||||
// 删除
|
||||
deleteHandle (id) {
|
||||
this.$confirm('是否确认删除本条数据?请谨慎操作', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(function () {
|
||||
return delMNObj(id)
|
||||
}).then(data => {
|
||||
this.$message.success('删除成功')
|
||||
this.getDataList()
|
||||
})
|
||||
},
|
||||
getDataList(){
|
||||
this.dataList=[]
|
||||
this.dataListLoading = true
|
||||
this.$emit('refreshDataList')
|
||||
getMNStuList(this.dataForm).then(response => {
|
||||
this.dataList = response.data.data
|
||||
})
|
||||
this.dataListLoading = false
|
||||
},
|
||||
initData(){
|
||||
this.eduList=[];
|
||||
getTypeValue('finance_student_source').then(res=>{
|
||||
this.eduList=res.data.data
|
||||
})
|
||||
this.planMajorList=[];
|
||||
planMajor({groupId: this.dataForm.groupId}).then(data =>{
|
||||
this.planMajorList = data.data.data;
|
||||
this.getDataList();
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
264
src/views/recruit/recruitexampeople/index.vue
Normal file
264
src/views/recruit/recruitexampeople/index.vue
Normal file
@@ -0,0 +1,264 @@
|
||||
<!--
|
||||
- Copyright (c) 2018-2025, cyweb All rights reserved.
|
||||
-
|
||||
- Redistribution and use in source and binary forms, with or without
|
||||
- modification, are permitted provided that the following conditions are met:
|
||||
-
|
||||
- Redistributions of source code must retain the above copyright notice,
|
||||
- this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
- notice, this list of conditions and the following disclaimer in the
|
||||
- documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of the pig4cloud.com developer nor the names of its
|
||||
- contributors may be used to endorse or promote products derived from
|
||||
- this software without specific prior written permission.
|
||||
-
|
||||
-->
|
||||
|
||||
<template>
|
||||
<el-dialog
|
||||
title="招生审核人员管理"
|
||||
:close-on-click-modal="false"
|
||||
v-model="visible"
|
||||
>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<div style="margin-top: 10px;">
|
||||
<el-time-picker
|
||||
is-range
|
||||
style="width:90%"
|
||||
v-model="form.time1"
|
||||
type="daterange"
|
||||
format="HH:mm:ss"
|
||||
value-format="HH:mm:ss"
|
||||
range-separator="至"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
placeholder="选择时间范围"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- 搜索表单 -->
|
||||
<el-form :model="queryForm" inline class="mb-4">
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="getDataList">查询</el-button>
|
||||
<el-button type="primary" plain icon="Refresh" class="ml10" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="permissions.recruit_recruitexampeople_add">
|
||||
<el-button type="primary" icon="FolderAdd" class="ml10" @click="handleAdd">新增</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
ref="tableRef"
|
||||
:data="state.dataList"
|
||||
v-loading="state.loading"
|
||||
border
|
||||
stripe
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="teacherNo" label="工号" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="teacherName" label="姓名" align="center" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="100" align="center" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitexampeople_del"
|
||||
type="danger"
|
||||
link
|
||||
icon="Delete"
|
||||
@click="handleDel(scope.row)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<pagination
|
||||
v-bind="state.pagination"
|
||||
@current-change="currentChangeHandle"
|
||||
@size-change="sizeChangeHandle"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 保存审核人员弹窗 -->
|
||||
<el-dialog v-model="setTeachNoFormVisible" title="保存审核人员" width="20%" append-to-body>
|
||||
<div style="margin-top: 10px;">
|
||||
<el-select
|
||||
v-model="belongTeacherNos"
|
||||
filterable
|
||||
remote
|
||||
style="width: 90%"
|
||||
clearable
|
||||
reserve-keyword
|
||||
placeholder="请选择保管老师"
|
||||
:remote-method="remoteTeacherByQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in teacherList"
|
||||
:key="item.teacherNo"
|
||||
:label="item.realName"
|
||||
:value="item.realName"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="dialog-footer" style="margin-top: 10px">
|
||||
<el-button type="primary" @click="updateTeachNo">保存</el-button>
|
||||
<el-button @click="clouseWin">关闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="recruitexampeople">
|
||||
import { ref, reactive, computed } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useUserInfo } from '/@/stores/userInfo'
|
||||
import { BasicTableProps, useTable } from '/@/hooks/table'
|
||||
import { useMessage, useMessageBox } from '/@/hooks/message'
|
||||
import { addObj, delObj, fetchList } from '/@/api/recruit/recruitexampeople'
|
||||
import { queryTeacherBaseByNoByAssets } from '/@/api/professional/teacherbase'
|
||||
|
||||
// 使用 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
|
||||
})
|
||||
|
||||
// 消息提示 hooks
|
||||
const message = useMessage()
|
||||
const messageBox = useMessageBox()
|
||||
|
||||
// 表格引用
|
||||
const tableRef = ref()
|
||||
|
||||
// 弹窗状态
|
||||
const visible = ref(false)
|
||||
const setTeachNoFormVisible = ref(false)
|
||||
const belongTeacherNos = ref('')
|
||||
const teacherList = ref<any[]>([])
|
||||
|
||||
// 表单数据
|
||||
const form = reactive({
|
||||
time1: [] as string[]
|
||||
})
|
||||
|
||||
// 查询表单
|
||||
const queryForm = reactive({})
|
||||
|
||||
// 表格状态
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
queryForm: queryForm,
|
||||
pageList: async (params: any) => {
|
||||
const response = await fetchList(params)
|
||||
return {
|
||||
data: {
|
||||
records: response.data.data.records,
|
||||
total: response.data.data.total
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoaded: async (state) => {
|
||||
// 如果有数据,设置时间范围
|
||||
if (state.dataList.length > 0) {
|
||||
form.time1 = [state.dataList[0].startTime, state.dataList[0].endTime]
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
// 使用 table hook
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, tableStyle } = useTable(state)
|
||||
|
||||
// 初始化
|
||||
const init = () => {
|
||||
form.time1 = []
|
||||
belongTeacherNos.value = ''
|
||||
getDataList()
|
||||
visible.value = true
|
||||
}
|
||||
|
||||
// 检索教师
|
||||
const remoteTeacherByQuery = (query: string) => {
|
||||
teacherList.value = []
|
||||
if (query !== '') {
|
||||
setTimeout(() => {
|
||||
queryTeacherBaseByNoByAssets(query).then(response => {
|
||||
teacherList.value = response.data.data
|
||||
})
|
||||
}, 200)
|
||||
}
|
||||
}
|
||||
|
||||
// 更新教师编号
|
||||
const updateTeachNo = async () => {
|
||||
if (form.time1.length === 0) {
|
||||
message.error('审核时间不能为空')
|
||||
return
|
||||
}
|
||||
try {
|
||||
await addObj({
|
||||
teacherNo: belongTeacherNos.value,
|
||||
startTime: form.time1[0],
|
||||
endTime: form.time1[1]
|
||||
})
|
||||
message.success('添加成功')
|
||||
setTeachNoFormVisible.value = false
|
||||
getDataList()
|
||||
} catch (error: any) {
|
||||
message.error(error.msg || '添加失败')
|
||||
}
|
||||
}
|
||||
|
||||
// 关闭窗口
|
||||
const clouseWin = () => {
|
||||
belongTeacherNos.value = ''
|
||||
setTeachNoFormVisible.value = false
|
||||
}
|
||||
|
||||
// 新增
|
||||
const handleAdd = () => {
|
||||
belongTeacherNos.value = ''
|
||||
setTeachNoFormVisible.value = true
|
||||
}
|
||||
|
||||
// 删除
|
||||
const handleDel = async (row: any) => {
|
||||
try {
|
||||
await messageBox.confirm(`是否确认删除ID为${row.id}的记录?`)
|
||||
await delObj(row.id)
|
||||
message.success('删除成功')
|
||||
getDataList()
|
||||
} catch {
|
||||
// 用户取消
|
||||
}
|
||||
}
|
||||
|
||||
// 重置查询
|
||||
const resetQuery = () => {
|
||||
Object.keys(queryForm).forEach(key => {
|
||||
queryForm[key] = ''
|
||||
})
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 暴露方法
|
||||
defineExpose({
|
||||
init
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
292
src/views/recruit/recruitplanmajor/detaiform.vue
Normal file
292
src/views/recruit/recruitplanmajor/detaiform.vue
Normal file
@@ -0,0 +1,292 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="!dataForm.id ? '新增' : '修改'"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()"
|
||||
label-width="140px">
|
||||
|
||||
<el-form-item label="招生计划" prop="groupId">
|
||||
<el-select v-model="dataForm.groupId" filterable placeholder="请选择招生计划" size="small" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in planList"
|
||||
:key="item.id"
|
||||
:label="item.groupName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="专业代码" prop="zydm">
|
||||
<el-input v-model="dataForm.zydm" placeholder="专业代码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="专业名称" prop="zymc">
|
||||
<el-input v-model="dataForm.zymc" placeholder="专业名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="专业规范名称" prop="zygfmc">
|
||||
<el-input v-model="dataForm.zygfmc" placeholder="专业规范名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属学院" prop="deptCode">
|
||||
<el-select v-model="dataForm.deptCode" filterable placeholder="请选择" size="small" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in deptList"
|
||||
:key="item.deptCode"
|
||||
:label="item.deptName"
|
||||
:value="item.deptCode">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="学制" prop="xz">
|
||||
<el-select v-model="dataForm.xz" filterable placeholder="请选择学制" size="small" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in majorYears"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="层次" prop="cc">
|
||||
<el-select v-model="dataForm.cc" filterable placeholder="请选择层次" size="small" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in ccList"
|
||||
:key="item.label"
|
||||
:label="item.label"
|
||||
:value="item.label">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="中德班" prop="isZd">
|
||||
<el-radio-group v-model="dataForm.isZd">
|
||||
<el-radio label="1">是</el-radio>
|
||||
<el-radio label="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单班" prop="isOrder">
|
||||
<el-radio-group v-model="dataForm.isOrder">
|
||||
<el-radio label="1">是</el-radio>
|
||||
<el-radio label="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="联院班" prop="isUnion">
|
||||
<el-radio-group v-model="dataForm.isUnion">
|
||||
<el-radio label="1">是</el-radio>
|
||||
<el-radio label="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="正式专业代码" prop="offcialZydm">
|
||||
<el-select v-model="dataForm.offcialZydm" filterable placeholder="请选择正式专业代码" size="small" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in offcialZydmList"
|
||||
:key="item.majorCode"
|
||||
:label="item.majorCodeAndName"
|
||||
:value="item.majorCode">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="市平台代码" prop="cityPlanId">
|
||||
<el-select v-model="dataForm.cityPlanId" filterable placeholder="请选择市平台代码" size="small" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in cityPlanIdList"
|
||||
:key="item.id"
|
||||
:label="item.schoolMajorName+' | '+item.educational"
|
||||
:value="item.id"
|
||||
:disabled="isCityDisable(item.id)"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-input-number :min="0" :max="999" v-model="dataForm.sort" placeholder="排序"
|
||||
style="width: 100%"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remarks">
|
||||
<el-input type="textarea" :rows="3" placeholder="请输入备注信息" v-model="dataForm.remarks"
|
||||
style="width: 100%;margin-top: 10px"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()" v-if="canSubmit">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {addObj, getObj, putObj,getCityPlan} from '@/api/recruit/recruitplanmajor'
|
||||
import {getDeptList} from "@/api/basic/basicclass";
|
||||
import {getDictByType} from "@/api/contract/contract";
|
||||
import {list} from "@/api/recruit/recruitstudentplangroup";
|
||||
import {getMajorNameList} from "@/api/basic/major";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
canSubmit: false,
|
||||
dataForm: {
|
||||
id: "",
|
||||
groupId: "",
|
||||
zydm: "",
|
||||
zymc: "",
|
||||
zygfmc: "",
|
||||
deptCode: "",
|
||||
xz: "",
|
||||
cc: "",
|
||||
isZd: "0",
|
||||
isOrder: "0",
|
||||
remarks: "",
|
||||
offcialZydm: "",
|
||||
isUnion:"0",
|
||||
tuitionFee:0,
|
||||
cityPlanId:null
|
||||
},
|
||||
cityPlanIdList:[],
|
||||
offcialZydmList: [],
|
||||
planList: [],
|
||||
yeNoList: [],
|
||||
deptList: [],
|
||||
ccList: [],
|
||||
majorYears: [],
|
||||
dataRule: {
|
||||
zydm: [
|
||||
{required: true, message: '专业代码不能为空', trigger: 'blur'},
|
||||
{min: 1, max: 6, message: '专业代码长度不大于6个字符', trigger: 'blur'}
|
||||
],
|
||||
tuitionFee: [
|
||||
{required: true, message: '学费不能为空', trigger: 'blur'}
|
||||
],
|
||||
zymc: [
|
||||
{required: true, message: '专业名称不能为空', trigger: 'blur'},
|
||||
{min: 1, max: 200, message: '专业名称长度不大于200个字符', trigger: 'blur'}
|
||||
|
||||
],
|
||||
zygfmc: [
|
||||
{required: true, message: '专业规范名称不能为空', trigger: 'blur'},
|
||||
{min: 1, max: 200, message: '专业规范名称长度不大于200个字符', trigger: 'blur'}
|
||||
],
|
||||
groupId: [
|
||||
{required: true, message: '招生计划不能为空', trigger: 'blur'}
|
||||
],
|
||||
xz: [
|
||||
{required: true, message: '学制不能为空', trigger: 'blur'}
|
||||
],
|
||||
deptCode: [
|
||||
{required: true, message: '学院不能为空', trigger: 'blur'}
|
||||
],
|
||||
cc: [
|
||||
{required: true, message: '层次不能为空', trigger: 'blur'}
|
||||
],
|
||||
isOrder: [
|
||||
{required: true, message: '订单班不能为空', trigger: 'blur'}
|
||||
],
|
||||
isZd: [
|
||||
{required: true, message: '订单班不能为空', trigger: 'blur'}
|
||||
],
|
||||
isUnion: [
|
||||
{required: true, message: '联院班不能为空', trigger: 'blur'}
|
||||
],
|
||||
remarks: [
|
||||
{min: 1, max: 100, message: '备注长度不大于100个字符', trigger: 'blur'}
|
||||
],
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
this.dataForm.id = id || null;
|
||||
this.visible = true;
|
||||
this.canSubmit = true;
|
||||
this.initData();
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
getObj(this.dataForm.id).then(response => {
|
||||
this.dataForm = response.data.data
|
||||
//获取市平台对应年份下的招生计划
|
||||
getCityPlan({id:this.dataForm.id}).then(data =>{
|
||||
this.cityPlanIdList = data.data.data
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 判断市平台招生专业是否占用,占用不可选
|
||||
* @param notBedNo
|
||||
* @returns {boolean}
|
||||
*/
|
||||
isCityDisable(id){
|
||||
var returnFlag = false;
|
||||
this.dataForm.cityPlanIds.forEach(e=>{
|
||||
if(e == id){
|
||||
returnFlag = true;
|
||||
}
|
||||
})
|
||||
return returnFlag;
|
||||
},
|
||||
initData() {
|
||||
//查询二级学院信息
|
||||
getDeptList().then(data => {
|
||||
this.deptList = data.data.data
|
||||
})
|
||||
list().then(data => {
|
||||
this.planList = data.data.data
|
||||
if (!this.dataForm.id) {
|
||||
this.dataForm.groupId = this.planList[0].id;
|
||||
}
|
||||
});
|
||||
getMajorNameList().then(data =>{
|
||||
this.offcialZydmList = data.data.data
|
||||
})
|
||||
//获取数据字典
|
||||
getDictByType("yes_no").then(res => {
|
||||
this.yesNoList = res.data.data
|
||||
})
|
||||
getDictByType("basic_major_years").then(res => {
|
||||
this.majorYears = res.data.data
|
||||
})
|
||||
getDictByType("basic_major_level").then(res => {
|
||||
this.ccList = res.data.data
|
||||
})
|
||||
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
if(this.dataForm.cityPlanId !=null){
|
||||
this.cityPlanIdList.forEach(e=>{
|
||||
if(e.id == this.dataForm.cityPlanId){
|
||||
this.dataForm.cityPlanName = e.schoolMajorName;
|
||||
this.dataForm.cityPlanYear = e.educational;
|
||||
}
|
||||
})
|
||||
}
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.canSubmit = false;
|
||||
if (this.dataForm.id) {
|
||||
putObj(this.dataForm).then(data => {
|
||||
this.$notify.success('修改成功')
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
} else {
|
||||
addObj(this.dataForm).then(data => {
|
||||
this.$notify.success('添加成功')
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
340
src/views/recruit/recruitplanmajor/index.vue
Normal file
340
src/views/recruit/recruitplanmajor/index.vue
Normal file
@@ -0,0 +1,340 @@
|
||||
<!--
|
||||
- Copyright (c) 2018-2025, cyweb All rights reserved.
|
||||
-
|
||||
- Redistribution and use in source and binary forms, with or without
|
||||
- modification, are permitted provided that the following conditions are met:
|
||||
-
|
||||
- Redistributions of source code must retain the above copyright notice,
|
||||
- this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
- notice, this list of conditions and the following disclaimer in the
|
||||
- documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of the pig4cloud.com developer nor the names of its
|
||||
- contributors may be used to endorse or promote products derived from
|
||||
- this software without specific prior written permission.
|
||||
-
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<!-- 搜索表单 -->
|
||||
<el-form :model="queryForm" inline class="mb-4" ref="searchFormRef">
|
||||
<el-form-item label="招生计划" prop="groupId">
|
||||
<el-select v-model="queryForm.groupId" filterable clearable placeholder="请选择招生计划">
|
||||
<el-option
|
||||
v-for="item in planList"
|
||||
:key="item.id"
|
||||
:label="item.groupName"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="学院" prop="deptCode">
|
||||
<el-select v-model="queryForm.deptCode" filterable clearable placeholder="请选择">
|
||||
<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="zydm">
|
||||
<el-input v-model="queryForm.zydm" placeholder="专业序号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="专业名称" prop="zymc">
|
||||
<el-input v-model="queryForm.zymc" placeholder="专业名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="学制" prop="xz">
|
||||
<el-input v-model="queryForm.xz" placeholder="学制" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="getDataList">查询</el-button>
|
||||
<el-button type="primary" plain icon="Refresh" class="ml10" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<div class="mb15">
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitplanmajor_add"
|
||||
type="primary"
|
||||
icon="FolderAdd"
|
||||
@click="addOrUpdateHandle"
|
||||
>
|
||||
新增
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
ref="tableRef"
|
||||
:data="state.dataList"
|
||||
v-loading="state.loading"
|
||||
border
|
||||
stripe
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="groupId" label="招生计划名称" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{ getPlanName(scope.row.groupId) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="zydm" label="专业序号" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="zymc" label="专业名称" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="zygfmc" label="专业规范名称" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="deptCode" label="学院" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{ getDeptName(scope.row.deptCode) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="xz" label="学制" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="cc" label="层次" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="isOrder" label="订单班" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{ getYesNoLabel(scope.row.isOrder) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="isZd" label="中德班" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{ getYesNoLabel(scope.row.isZd) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="isUnion" label="联院班" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{ getYesNoLabel(scope.row.isUnion) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="sm" label="色盲不可录" align="center" width="120">
|
||||
<template #default="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.sm"
|
||||
active-text="是"
|
||||
inactive-text="否"
|
||||
active-value="1"
|
||||
inactive-value="0"
|
||||
@change="changeSm(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="offcialZydm" label="正式专业代码" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{ getMajorCodeName(scope.row.offcialZydm) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="cityPlanId" label="市平台招生计划" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{ scope.row.cityPlanName != undefined ? (scope.row.cityPlanName + '|' + scope.row.cityPlanYear) : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="sort" label="排序" align="center" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="150" align="center" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitplanmajor_edit"
|
||||
type="primary"
|
||||
link
|
||||
icon="EditPen"
|
||||
@click="addOrUpdateHandle(scope.row.id)"
|
||||
>
|
||||
修改
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitplanmajor_del"
|
||||
type="danger"
|
||||
link
|
||||
icon="Delete"
|
||||
@click="deleteHandle(scope.row.id)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<pagination
|
||||
v-bind="state.pagination"
|
||||
@current-change="currentChangeHandle"
|
||||
@size-change="sizeChangeHandle"
|
||||
/>
|
||||
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<table-form v-if="addOrUpdateVisible" ref="addOrUpdateRef" @refreshDataList="getDataList" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="recruitplanmajor">
|
||||
import { ref, reactive, computed, onMounted, nextTick, defineAsyncComponent } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useUserInfo } from '/@/stores/userInfo'
|
||||
import { BasicTableProps, useTable } from '/@/hooks/table'
|
||||
import { useMessage, useMessageBox } from '/@/hooks/message'
|
||||
import { list } from '/@/api/recruit/recruitstudentplangroup'
|
||||
import { fetchList, putObj, delObj } from '/@/api/recruit/recruitplanmajor'
|
||||
import { getDeptList } from '/@/api/basic/basicclass'
|
||||
import { getMajorNameList } from '/@/api/basic/major'
|
||||
// @ts-ignore
|
||||
import global from '@/components/tools/commondict'
|
||||
|
||||
const TableForm = defineAsyncComponent(() => import('./detaiform.vue'))
|
||||
|
||||
// 使用 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
|
||||
})
|
||||
|
||||
// 消息提示 hooks
|
||||
const message = useMessage()
|
||||
const messageBox = useMessageBox()
|
||||
|
||||
// 表格引用
|
||||
const tableRef = ref()
|
||||
const searchFormRef = ref()
|
||||
const addOrUpdateRef = ref()
|
||||
|
||||
// 弹窗状态
|
||||
const addOrUpdateVisible = ref(false)
|
||||
|
||||
// 数据
|
||||
const planList = ref<any[]>([])
|
||||
const deptList = ref<any[]>([])
|
||||
const offcialZydmList = ref<any[]>([])
|
||||
|
||||
// 查询表单
|
||||
const queryForm = reactive({
|
||||
groupId: '',
|
||||
deptCode: '',
|
||||
zydm: '',
|
||||
zymc: '',
|
||||
xz: ''
|
||||
})
|
||||
|
||||
// 获取计划名称
|
||||
const getPlanName = (groupId: string) => {
|
||||
const item = planList.value.find(item => item.id === groupId)
|
||||
return item ? item.groupName : ''
|
||||
}
|
||||
|
||||
// 获取学院名称
|
||||
const getDeptName = (deptCode: string) => {
|
||||
const item = deptList.value.find(item => item.deptCode === deptCode)
|
||||
return item ? item.deptName : ''
|
||||
}
|
||||
|
||||
// 获取是/否标签
|
||||
const getYesNoLabel = (value: string) => {
|
||||
return global.getLabelValue(global.YES_OR_NO, value)
|
||||
}
|
||||
|
||||
// 获取专业代码名称
|
||||
const getMajorCodeName = (majorCode: string) => {
|
||||
const item = offcialZydmList.value.find(item => item.majorCode === majorCode)
|
||||
return item ? item.majorCodeAndName : ''
|
||||
}
|
||||
|
||||
// 表格状态
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
queryForm: queryForm,
|
||||
pageList: async (params: any) => {
|
||||
const response = await fetchList(params)
|
||||
return {
|
||||
data: {
|
||||
records: response.data.data.records,
|
||||
total: response.data.data.total
|
||||
}
|
||||
}
|
||||
},
|
||||
createdIsNeed: false
|
||||
})
|
||||
|
||||
// 使用 table hook
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, tableStyle } = useTable(state)
|
||||
|
||||
// 初始化
|
||||
const init = async () => {
|
||||
try {
|
||||
// 查询二级学院信息
|
||||
const deptData = await getDeptList()
|
||||
deptList.value = deptData.data.data || []
|
||||
|
||||
// 获取招生计划列表
|
||||
const planData = await list()
|
||||
planList.value = planData.data.data || []
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
}
|
||||
|
||||
// 获取专业名称列表
|
||||
const majorData = await getMajorNameList()
|
||||
offcialZydmList.value = majorData.data.data || []
|
||||
|
||||
getDataList()
|
||||
} catch (error) {
|
||||
console.error('初始化失败', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 修改开关
|
||||
const changeSm = async (row: any) => {
|
||||
try {
|
||||
await putObj(row)
|
||||
message.success('修改成功')
|
||||
} catch (error: any) {
|
||||
message.error(error.msg || '修改失败')
|
||||
}
|
||||
}
|
||||
|
||||
// 新增 / 修改
|
||||
const addOrUpdateHandle = (id?: string) => {
|
||||
addOrUpdateVisible.value = true
|
||||
nextTick(() => {
|
||||
addOrUpdateRef.value?.init(id)
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
const deleteHandle = async (id: string) => {
|
||||
try {
|
||||
await messageBox.confirm('是否确认删除本条数据?请谨慎操作')
|
||||
await delObj(id)
|
||||
message.success('删除成功')
|
||||
getDataList()
|
||||
} catch {
|
||||
// 用户取消
|
||||
}
|
||||
}
|
||||
|
||||
// 重置查询
|
||||
const resetQuery = () => {
|
||||
searchFormRef.value?.resetFields()
|
||||
queryForm.groupId = ''
|
||||
queryForm.deptCode = ''
|
||||
queryForm.zydm = ''
|
||||
queryForm.zymc = ''
|
||||
queryForm.xz = ''
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
}
|
||||
getDataList()
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
init()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
227
src/views/recruit/recruitplanmajor/majorGroupByDept.vue
Normal file
227
src/views/recruit/recruitplanmajor/majorGroupByDept.vue
Normal file
@@ -0,0 +1,227 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="招生计划专业调整"
|
||||
append-to-body
|
||||
width="90%"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="visible">
|
||||
<el-form :model="dataForm" ref="dataForm" label-width="140px">
|
||||
<el-form-item label="招生计划名称" prop="groupName">
|
||||
<el-input v-model="dataForm.groupName" placeholder="招生计划名称" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-tabs v-model="activiName" @tab-click="handleChange">
|
||||
<el-tab-pane v-for="item in deptList"
|
||||
:key="item.deptCode"
|
||||
:label="item.deptName"
|
||||
:name="item.deptCode">
|
||||
<div class="avue-crud">
|
||||
<el-table
|
||||
:data="dataList"
|
||||
border
|
||||
stripe
|
||||
v-loading="dataListLoading">
|
||||
<el-table-column
|
||||
prop="zymc"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="专业"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span >{{ scope.row.zymc+' || '+scope.row.zydm+' || '+scope.row.xz+' 年制'}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="planStudentNum"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="计划总数"
|
||||
width="180px"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-input-number style="width: 80%" v-model="scope.row.planStudentNum" :min="0" :max="999" @change="updateMajor(scope.row)" width="100px"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="needStudentNum"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="控制数"
|
||||
width="180px"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-input-number style="width: 80%" v-model="scope.row.needStudentNum" :min="0" :max="999"
|
||||
@change="updateMajor(scope.row)"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="needStudentOverNum"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="预留"
|
||||
width="180px"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-input-number style="width: 80%" v-model="scope.row.needStudentOverNum" :min="0" :max="999"
|
||||
@change="updateMajor(scope.row)"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="scoreLine"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="录取线"
|
||||
width="180px"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-input-number style="width: 80%" v-model="scope.row.scoreLine" :min="0" :max="999"
|
||||
@change="updateMajor(scope.row)"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="degreeOfEducation"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="生源">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.degreeOfEducation" placeholder="请选择生源" style=" width: 100%;text-align:center" multiple
|
||||
@change="updateMajor(scope.row)">
|
||||
<el-option
|
||||
v-for="item in degreeOfEducationList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {list, delObj} from '@/api/recruit/recruitplanmajor'
|
||||
import {putObj} from '@/api/recruit/recruitstudentplan'
|
||||
|
||||
import {mapGetters} from 'vuex'
|
||||
import global from '@/components/tools/commondict'
|
||||
import {fetchSecondTree} from "@/api/basic/basicdept";
|
||||
import {getDictByType} from "@/api/contract/contract";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dataForm: {
|
||||
groupId: "",
|
||||
groupName: "",
|
||||
deptCode: "11",
|
||||
},
|
||||
activiName: "11",
|
||||
global: global,
|
||||
dataList: [],
|
||||
deptList: [],
|
||||
degreeOfEducationList:[],
|
||||
dataListLoading: false,
|
||||
visible: false,
|
||||
tableLoading: false,
|
||||
}
|
||||
},
|
||||
components: {},
|
||||
created() {
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['permissions'])
|
||||
},
|
||||
methods: {
|
||||
init(row) {
|
||||
this.visible = true;
|
||||
this.dataForm.deptCode = "11";
|
||||
this.dataForm.groupName = row.groupName;
|
||||
this.dataForm.groupId = row.id;
|
||||
this.initData()
|
||||
this.getDepartment();
|
||||
this.getDataList()
|
||||
},
|
||||
initData(){
|
||||
this.degreeOfEducationList=[];
|
||||
//获取数据字典
|
||||
getDictByType("finance_student_source").then(res => {
|
||||
this.degreeOfEducationList = res.data.data
|
||||
})
|
||||
},
|
||||
getDepartment() {
|
||||
fetchSecondTree().then(res => {
|
||||
this.deptList = res.data.data
|
||||
})
|
||||
},
|
||||
updateMajor(row) {
|
||||
if(row.degreeOfEducation.length!=0){
|
||||
row.degreeOfEducations = row.degreeOfEducation.join(",");
|
||||
}else{
|
||||
row.degreeOfEducations="";
|
||||
}
|
||||
putObj({
|
||||
id: row.planId,
|
||||
planStudentNum: row.planStudentNum,
|
||||
planStudentBoyNum: row.planStudentBoyNum,
|
||||
planStudentGirlNum: row.planStudentGirlNum,
|
||||
needStudentNum: row.needStudentNum,
|
||||
needStudentOverNum:row.needStudentOverNum,
|
||||
scoreLine: row.scoreLine,
|
||||
scoreMinLine: row.scoreMinLine,
|
||||
degreeOfEducations: row.degreeOfEducations
|
||||
}).then(res => {
|
||||
this.$notify.success('修改成功')
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
handleChange(tab, event) {
|
||||
this.dataForm.deptCode = tab.name;
|
||||
this.getDataList()
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataList = []
|
||||
this.dataListLoading = true
|
||||
if (this.dataForm.deptCode == '') {
|
||||
this.dataForm.deptCode = "11";
|
||||
}
|
||||
list({groupId: this.dataForm.groupId, deptCode: this.dataForm.deptCode}).then(response => {
|
||||
this.dataList = response.data.data
|
||||
this.dataList.forEach(e=>{
|
||||
if(e.degreeOfEducation){
|
||||
e.degreeOfEducation = e.degreeOfEducation.split(",")
|
||||
}
|
||||
})
|
||||
})
|
||||
this.dataListLoading = false
|
||||
},
|
||||
|
||||
// 删除
|
||||
deleteHandle(id) {
|
||||
this.$confirm('是否确认删除本条数据?请谨慎操作', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(function () {
|
||||
return delObj(id)
|
||||
}).then(data => {
|
||||
this.$message.success('删除成功')
|
||||
this.getDataList()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
395
src/views/recruit/recruitprestudent/enrolplantemplate-form.vue
Normal file
395
src/views/recruit/recruitprestudent/enrolplantemplate-form.vue
Normal file
@@ -0,0 +1,395 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="!dataForm.id ? '新增' : '修改'"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="140px">
|
||||
|
||||
<el-form-item label="招生计划名称" prop="groupId">
|
||||
<el-select v-model="dataForm.groupId" filterable placeholder="请选择招生计划" size="small" style="width: 100%;" :disabled="!dataForm.id ? false : true">
|
||||
<el-option
|
||||
v-for="item in planList"
|
||||
:key="item.id"
|
||||
:label="item.groupName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="dataForm.name" placeholder="姓名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="电话" prop="phone">
|
||||
<el-input v-model="dataForm.phone" placeholder="电话"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证" prop="idCard">
|
||||
<el-input v-model="dataForm.idCard" placeholder="身份证"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" prop="gender">
|
||||
<el-select v-model="dataForm.gender" style="width: 100%" >
|
||||
<el-option
|
||||
v-for="item in sexyList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="准考证" prop="admission">
|
||||
<el-input v-model="dataForm.admission" placeholder="准考证"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="中考成绩" prop="achievement">
|
||||
<el-input-number v-model="dataForm.achievement" :min=0 :max=700 placeholder="中考成绩" style="width: 100%"></el-input-number>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="联系人" prop="contactsNo">-->
|
||||
<!-- <el-select v-model="dataForm.contactsNo" filterable clearable placeholder="" size="small" style="width: 100%" >-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in contactNameList"-->
|
||||
<!-- :key="item.teacherNo"-->
|
||||
<!-- :label="item.realName+'-'+item.deptCode"-->
|
||||
<!-- :value="item.teacherNo">-->
|
||||
<!-- </el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="对接人" prop="djUser" v-if="permissions.recruit_recruitprestudent_dj_sure">
|
||||
<el-select v-model="dataForm.djUser" filterable clearable placeholder="" size="small" style="width: 100%" >
|
||||
<el-option
|
||||
v-for="item in contactNameList"
|
||||
:key="item.teacherNo"
|
||||
:label="item.realName+'-'+item.deptCode"
|
||||
:value="item.teacherNo">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="学校" prop="schoolId">
|
||||
<el-select v-model="dataForm.schoolId" filterable placeholder="请选择学校" size="small" style="width: 100%;" >
|
||||
<el-option
|
||||
v-for="item in schoolList"
|
||||
:key="item.id"
|
||||
:label="item.schoolName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="拟报专业1" prop="planMajorOne">
|
||||
<el-select v-model="dataForm.planMajorOne" filterable placeholder="请选择拟报专业1" size="small" style="width: 100%;" >
|
||||
<el-option
|
||||
v-for="item in planMajorList"
|
||||
:key="item.id"
|
||||
:label="item.zymc"
|
||||
:value="item.id"
|
||||
:disabled="isDisable(item.id)"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="拟报专业2" prop="planMajorTwo">
|
||||
<el-select v-model="dataForm.planMajorTwo" filterable clearable placeholder="请选择拟报专业2" size="small" style="width: 100%;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in planMajorList"
|
||||
:key="item.id"
|
||||
:label="item.zymc"
|
||||
:value="item.id"
|
||||
:disabled="isDisable(item.id)"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="拟报专业3" prop="planMajorThree">
|
||||
<el-select v-model="dataForm.planMajorThree" filterable clearable placeholder="请选择拟报专业3" size="small" style="width: 100%;" >
|
||||
<el-option
|
||||
v-for="item in planMajorList"
|
||||
:key="item.id"
|
||||
:label="item.zymc"
|
||||
:value="item.id"
|
||||
:disabled="isDisable(item.id)"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="拟报专业4" prop="planMajorFour">
|
||||
<el-select v-model="dataForm.planMajorFour" filterable clearable placeholder="请选择拟报专业4" size="small" style="width: 100%;" >
|
||||
<el-option
|
||||
v-for="item in planMajorList"
|
||||
:key="item.id"
|
||||
:label="item.zymc"
|
||||
:value="item.id"
|
||||
:disabled="isDisable(item.id)"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="拟报专业5" prop="planMajorFive">
|
||||
<el-select v-model="dataForm.planMajorFive" filterable clearable placeholder="请选择拟报专业5" size="small" style="width: 100%;" >
|
||||
<el-option
|
||||
v-for="item in planMajorList"
|
||||
:key="item.id"
|
||||
:label="item.zymc"
|
||||
:value="item.id"
|
||||
:disabled="isDisable(item.id)"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="拟报专业6" prop="planMajorSix">
|
||||
<el-select v-model="dataForm.planMajorSix" filterable clearable placeholder="请选择拟报专业6" size="small" style="width: 100%;" >
|
||||
<el-option
|
||||
v-for="item in planMajorList"
|
||||
:key="item.id"
|
||||
:label="item.zymc"
|
||||
:value="item.id"
|
||||
:disabled="isDisable(item.id)"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="拟报专业7" prop="planMajorSeven">
|
||||
<el-select v-model="dataForm.planMajorSeven" filterable clearable placeholder="请选择拟报专业5" size="small" style="width: 100%;" >
|
||||
<el-option
|
||||
v-for="item in planMajorList"
|
||||
:key="item.id"
|
||||
:label="item.zymc"
|
||||
:value="item.id"
|
||||
:disabled="isDisable(item.id)"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="拟报专业8" prop="planMajorEight">
|
||||
<el-select v-model="dataForm.planMajorEight" filterable clearable placeholder="请选择拟报专业8" size="small" style="width: 100%;" >
|
||||
<el-option
|
||||
v-for="item in planMajorList"
|
||||
:key="item.id"
|
||||
:label="item.zymc"
|
||||
:value="item.id"
|
||||
:disabled="isDisable(item.id)"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="拟报专业9" prop="planMajorNine">
|
||||
<el-select v-model="dataForm.planMajorNine" filterable clearable placeholder="请选择拟报专业9" size="small" style="width: 100%;" >
|
||||
<el-option
|
||||
v-for="item in planMajorList"
|
||||
:key="item.id"
|
||||
:label="item.zymc"
|
||||
:value="item.id"
|
||||
:disabled="isDisable(item.id)"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="拟报专业10" prop="planMajorTen">
|
||||
<el-select v-model="dataForm.planMajorTen" filterable clearable placeholder="请选择拟报专业10" size="small" style="width: 100%;" >
|
||||
<el-option
|
||||
v-for="item in planMajorList"
|
||||
:key="item.id"
|
||||
:label="item.zymc"
|
||||
:value="item.id"
|
||||
:disabled="isDisable(item.id)"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="拟报专业11" prop="planMajorEleven">
|
||||
<el-select v-model="dataForm.planMajorEleven" filterable clearable placeholder="请选择拟报专业11" size="small" style="width: 100%;" >
|
||||
<el-option
|
||||
v-for="item in planMajorList"
|
||||
:key="item.id"
|
||||
:label="item.zymc"
|
||||
:value="item.id"
|
||||
:disabled="isDisable(item.id)"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="拟报专业12" prop="planMajorTwelve">
|
||||
<el-select v-model="dataForm.planMajorTwelve" filterable clearable placeholder="请选择拟报专业12" size="small" style="width: 100%;" >
|
||||
<el-option
|
||||
v-for="item in planMajorList"
|
||||
:key="item.id"
|
||||
:label="item.zymc"
|
||||
:value="item.id"
|
||||
:disabled="isDisable(item.id)"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()" v-if="canSubmit">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getObj,addObjStu,putObj} from '@/api/recruit/recruitprestudent'
|
||||
import {queryAllTeacherByRecruit} from "@/api/professional/teacherbase";
|
||||
import {mapGetters} from "vuex";
|
||||
import {list} from "@/api/recruit/recruitstudentplangroup";
|
||||
export default {
|
||||
props:["planList","planMajorList","schoolList"],
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
canSubmit: false,
|
||||
contactNameList:[],
|
||||
sexyList: [
|
||||
{
|
||||
label: '男',
|
||||
value: '1'
|
||||
},
|
||||
{
|
||||
label: '女',
|
||||
value: '2'
|
||||
}
|
||||
],
|
||||
dataForm: {
|
||||
groupId:"",
|
||||
name:"",
|
||||
gender:"",
|
||||
phone:"",
|
||||
idCard:"",
|
||||
schoolId:"",
|
||||
planMajorOne:"",
|
||||
planMajorTwo:"",
|
||||
planMajorThree:"",
|
||||
planMajorFour:"",
|
||||
planMajorFive:"",
|
||||
planMajorSix:"",
|
||||
planMajorSeven:"",
|
||||
planMajorEight:"",
|
||||
planMajorNine:"",
|
||||
planMajorTen:"",
|
||||
planMajorEleven:"",
|
||||
planMajorTwelve:"",
|
||||
admission:"",
|
||||
achievement:"",
|
||||
contactsNo:"",
|
||||
djUser:""
|
||||
},
|
||||
dataRule: {
|
||||
planMajorOne: [
|
||||
{ required: true, message: '拟报专业1不能为空', trigger: 'blur' }
|
||||
],
|
||||
groupId: [
|
||||
{ required: true, message: '招生计划不能为空', trigger: 'blur' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: '姓名不能为空', trigger: 'blur' },
|
||||
{ min: 1,max:20, message: "姓名长度最多20位", trigger: "blur" }
|
||||
],
|
||||
phone: [
|
||||
{ required: true, message: '电话不能为空', trigger: 'blur' },
|
||||
{ min: 11,max:11, message: "电话号码长度为11位", trigger: "blur" }
|
||||
],
|
||||
gender: [
|
||||
{ required: true, message: '性别不能为空', trigger: 'blur' }
|
||||
],
|
||||
|
||||
schoolId: [
|
||||
{ required: true, message: '学校不能为空', trigger: 'blur' }
|
||||
],
|
||||
// admission: [
|
||||
// { required: true, message: '准考证不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// achievement: [
|
||||
// { required: true, message: '中考成绩不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
}
|
||||
}
|
||||
},
|
||||
created () {
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['permissions'])
|
||||
},
|
||||
methods: {
|
||||
init (id) {
|
||||
let _this = this;
|
||||
this.dataForm.id = id || null;
|
||||
this.visible = true;
|
||||
this.canSubmit = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
queryAllTeacherByRecruit().then(res =>{
|
||||
this.contactNameList = res.data.data
|
||||
});
|
||||
if (this.dataForm.id) {
|
||||
|
||||
getObj(this.dataForm.id).then(response => {
|
||||
_this.dataForm = response.data.data
|
||||
_this.dataForm.year = this.dataForm.year+"";
|
||||
|
||||
})
|
||||
|
||||
}else {
|
||||
list().then(data => {
|
||||
_this.planList = data.data.data
|
||||
_this.dataForm.groupId = _this.planList[0].id;
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
isDisable(id){
|
||||
if(id==this.dataForm.planMajorOne
|
||||
||id==this.dataForm.planMajorTwo
|
||||
||id==this.dataForm.planMajorThree
|
||||
||id==this.dataForm.planMajorFour
|
||||
||id==this.dataForm.planMajorFive
|
||||
||id==this.dataForm.planMajorSix
|
||||
||id==this.dataForm.planMajorSeven
|
||||
||id==this.dataForm.planMajorEight
|
||||
||id==this.dataForm.planMajorNine
|
||||
||id==this.dataForm.planMajorTen
|
||||
||id==this.dataForm.planMajorEleven
|
||||
||id==this.dataForm.planMajorTwelve
|
||||
){
|
||||
return true
|
||||
}else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit () {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.canSubmit = false;
|
||||
if (this.dataForm.id) {
|
||||
putObj(this.dataForm).then(data => {
|
||||
this.$notify.success('修改成功')
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
} else {
|
||||
this.dataForm.djUser=null;
|
||||
this.dataForm.djTime=null;
|
||||
this.dataForm.djName=null;
|
||||
this.dataForm.djDept=null;
|
||||
this.dataForm.isDj="0";
|
||||
addObjStu(this.dataForm).then(data => {
|
||||
this.$notify.success('添加成功')
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
396
src/views/recruit/recruitprestudent/index.vue
Normal file
396
src/views/recruit/recruitprestudent/index.vue
Normal file
@@ -0,0 +1,396 @@
|
||||
<!--
|
||||
- Copyright (c) 2018-2025, cyweb All rights reserved.
|
||||
-
|
||||
- Redistribution and use in source and binary forms, with or without
|
||||
- modification, are permitted provided that the following conditions are met:
|
||||
-
|
||||
- Redistributions of source code must retain the above copyright notice,
|
||||
- this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
- notice, this list of conditions and the following disclaimer in the
|
||||
- documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of the pig4cloud.com developer nor the names of its
|
||||
- contributors may be used to endorse or promote products derived from
|
||||
- this software without specific prior written permission.
|
||||
-
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<!-- 搜索表单 -->
|
||||
<el-form :model="queryForm" inline class="mb-4" ref="searchFormRef">
|
||||
<el-form-item label="招生计划" prop="groupId">
|
||||
<el-select v-model="queryForm.groupId" filterable clearable placeholder="请选择招生计划" @change="changeG" style="width: 150px;">
|
||||
<el-option
|
||||
v-for="item in planList"
|
||||
:key="item.id"
|
||||
:label="item.groupName"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="对接部门" prop="deptCode">
|
||||
<el-select v-model="queryForm.deptCode" filterable clearable placeholder="请选择对接部门" style="width: 150px;">
|
||||
<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="isDj">
|
||||
<el-select v-model="queryForm.isDj" filterable clearable placeholder="请选择是否对接" style="width: 80px;">
|
||||
<el-option
|
||||
v-for="item in isDjList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="对接人" prop="djUser">
|
||||
<el-input v-model="queryForm.djName" type="text" style="width: 100px;" placeholder="请输入对接人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名/身份证/电话" prop="name">
|
||||
<el-input v-model="queryForm.name" clearable placeholder="请填写学生姓名/身份证/电话" />
|
||||
</el-form-item>
|
||||
<el-form-item label="学校" prop="schoolId">
|
||||
<el-select v-model="queryForm.schoolId" filterable clearable placeholder="请选择学校">
|
||||
<el-option
|
||||
v-for="item in schoolList"
|
||||
:key="item.id"
|
||||
:label="item.schoolName"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="拟报专业" prop="planMajorOne">
|
||||
<el-select v-model="queryForm.planMajorOne" filterable clearable placeholder="请选择拟报专业">
|
||||
<el-option
|
||||
v-for="item in planMajorList"
|
||||
:key="item.id"
|
||||
:label="item.zymc + ' || ' + item.zydm"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="getDataList">查询</el-button>
|
||||
<el-button type="primary" plain icon="Refresh" class="ml10" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<div class="mb15">
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitprestudent_add"
|
||||
type="primary"
|
||||
icon="FolderAdd"
|
||||
@click="addOrUpdateHandle(null)"
|
||||
>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
class="ml10"
|
||||
:loading="exportLoading"
|
||||
@click="dataExportHandle"
|
||||
>
|
||||
导出
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
ref="tableRef"
|
||||
:data="state.dataList"
|
||||
v-loading="state.loading"
|
||||
border
|
||||
stripe
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column label="操作" width="200" align="center" fixed="left">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitprestudent_edit"
|
||||
type="primary"
|
||||
link
|
||||
icon="EditPen"
|
||||
@click="addOrUpdateHandle(scope.row.id)"
|
||||
>
|
||||
调整
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitprestudent_dj && scope.row.isDj == '0'"
|
||||
type="success"
|
||||
link
|
||||
icon="CircleCheck"
|
||||
@click="sureDJ(scope.row.id)"
|
||||
>
|
||||
确认对接
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitprestudent_del"
|
||||
type="danger"
|
||||
link
|
||||
icon="Delete"
|
||||
@click="deleteHandle(scope.row.id)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="djName" label="对接人" width="150" align="center">
|
||||
<template #default="scope">
|
||||
{{ scope.row.djName }} <br />
|
||||
<span style="color: #0e90d2">{{ scope.row.djTime }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="学生姓名" width="120" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="phone" label="电话" width="120" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="achievement" label="中考分数" width="80" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="admission" label="准考证号" width="120" align="left" show-overflow-tooltip />
|
||||
<el-table-column prop="planMajorOne" label="拟报专业1" align="left" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{ getMajorName(scope.row.planMajorOne) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="schoolId" label="学校" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{ getSchoolName(scope.row.schoolId) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<pagination
|
||||
v-bind="state.pagination"
|
||||
@current-change="currentChangeHandle"
|
||||
@size-change="sizeChangeHandle"
|
||||
/>
|
||||
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<table-form
|
||||
v-if="addOrUpdateVisible"
|
||||
ref="addOrUpdateRef"
|
||||
@refreshDataList="getDataList"
|
||||
:planList="planList"
|
||||
:planMajorList="planMajorList"
|
||||
:schoolList="schoolList"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="recruitprestudent">
|
||||
import { ref, reactive, computed, onMounted, nextTick, defineAsyncComponent } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useUserInfo } from '/@/stores/userInfo'
|
||||
import { BasicTableProps, useTable } from '/@/hooks/table'
|
||||
import { useMessage, useMessageBox } from '/@/hooks/message'
|
||||
import { delObj, fetchList, sureDJ } from '/@/api/recruit/recruitprestudent'
|
||||
import { list } from '/@/api/recruit/recruitstudentplangroup'
|
||||
import { listcz } from '/@/api/recruit/recruitplanmajor'
|
||||
import { list as schoolListApi } from '/@/api/recruit/recruitstudentschool'
|
||||
import { getDeptListByLevelTwo } from '/@/api/basic/basicdept'
|
||||
// @ts-ignore
|
||||
import global from '@/components/tools/commondict'
|
||||
|
||||
const TableForm = defineAsyncComponent(() => import('./enrolplantemplate-form.vue'))
|
||||
|
||||
// 使用 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
|
||||
})
|
||||
|
||||
// 消息提示 hooks
|
||||
const message = useMessage()
|
||||
const messageBox = useMessageBox()
|
||||
|
||||
// 表格引用
|
||||
const tableRef = ref()
|
||||
const searchFormRef = ref()
|
||||
const addOrUpdateRef = ref()
|
||||
|
||||
// 弹窗状态
|
||||
const addOrUpdateVisible = ref(false)
|
||||
const exportLoading = ref(false)
|
||||
|
||||
// 数据
|
||||
const planList = ref<any[]>([])
|
||||
const deptList = ref<any[]>([])
|
||||
const schoolList = ref<any[]>([])
|
||||
const planMajorList = ref<any[]>([])
|
||||
const isDjList = ref([{ label: '是', value: '1' }, { label: '否', value: '0' }])
|
||||
|
||||
// 查询表单
|
||||
const queryForm = reactive({
|
||||
groupId: '',
|
||||
deptCode: '',
|
||||
isDj: '',
|
||||
djName: '',
|
||||
name: '',
|
||||
schoolId: '',
|
||||
planMajorOne: ''
|
||||
})
|
||||
|
||||
// 获取专业名称
|
||||
const getMajorName = (majorId: string) => {
|
||||
const item = planMajorList.value.find(item => item.id === majorId)
|
||||
return item ? item.zymc : ''
|
||||
}
|
||||
|
||||
// 获取学校名称
|
||||
const getSchoolName = (schoolId: string) => {
|
||||
const item = schoolList.value.find(item => item.id === schoolId)
|
||||
return item ? item.schoolName : ''
|
||||
}
|
||||
|
||||
// 表格状态
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
queryForm: queryForm,
|
||||
pageList: async (params: any) => {
|
||||
const response = await fetchList(params)
|
||||
return {
|
||||
data: {
|
||||
records: response.data.data.records,
|
||||
total: response.data.data.total
|
||||
}
|
||||
}
|
||||
},
|
||||
createdIsNeed: false
|
||||
})
|
||||
|
||||
// 使用 table hook
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, tableStyle, downBlobFile } = useTable(state)
|
||||
|
||||
// 初始化
|
||||
const init = async () => {
|
||||
try {
|
||||
// 获取部门列表
|
||||
const deptData = await getDeptListByLevelTwo()
|
||||
deptList.value = deptData.data.data || []
|
||||
|
||||
// 获取招生计划列表
|
||||
const planData = await list()
|
||||
planList.value = planData.data.data || []
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
await getMajor(queryForm.groupId)
|
||||
|
||||
// 获取学校列表
|
||||
const schoolData = await schoolListApi({ groupId: queryForm.groupId })
|
||||
schoolList.value = schoolData.data.data || []
|
||||
}
|
||||
|
||||
getDataList()
|
||||
} catch (error) {
|
||||
console.error('初始化失败', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 招生计划改变
|
||||
const changeG = async () => {
|
||||
if (queryForm.groupId) {
|
||||
await getMajor(queryForm.groupId)
|
||||
const schoolData = await schoolListApi({ groupId: queryForm.groupId })
|
||||
schoolList.value = schoolData.data.data || []
|
||||
}
|
||||
}
|
||||
|
||||
// 获取专业列表
|
||||
const getMajor = async (groupId: string) => {
|
||||
try {
|
||||
const data = await listcz({ groupId })
|
||||
planMajorList.value = data.data.data || []
|
||||
getDataList()
|
||||
} catch (error) {
|
||||
console.error('获取专业列表失败', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 新增 / 修改
|
||||
const addOrUpdateHandle = (id?: string) => {
|
||||
addOrUpdateVisible.value = true
|
||||
nextTick(() => {
|
||||
addOrUpdateRef.value?.init(id)
|
||||
})
|
||||
}
|
||||
|
||||
// 确认对接
|
||||
const sureDJ = async (id: string) => {
|
||||
try {
|
||||
await messageBox.confirm('是否确认已对接?请谨慎操作')
|
||||
await sureDJ({ id, isDj: '1' })
|
||||
message.success('确认成功')
|
||||
getDataList()
|
||||
} catch {
|
||||
// 用户取消
|
||||
}
|
||||
}
|
||||
|
||||
// 删除
|
||||
const deleteHandle = async (id: string) => {
|
||||
try {
|
||||
await messageBox.confirm('是否确认删除本条数据?请谨慎操作')
|
||||
await delObj(id)
|
||||
message.success('删除成功')
|
||||
getDataList()
|
||||
} catch {
|
||||
// 用户取消
|
||||
}
|
||||
}
|
||||
|
||||
// 重置查询
|
||||
const resetQuery = () => {
|
||||
searchFormRef.value?.resetFields()
|
||||
queryForm.groupId = ''
|
||||
queryForm.deptCode = ''
|
||||
queryForm.isDj = ''
|
||||
queryForm.djName = ''
|
||||
queryForm.name = ''
|
||||
queryForm.schoolId = ''
|
||||
queryForm.planMajorOne = ''
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
}
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 导出
|
||||
const dataExportHandle = async () => {
|
||||
try {
|
||||
exportLoading.value = true
|
||||
await downBlobFile(
|
||||
'/recruit/recruitprestudent/export',
|
||||
queryForm,
|
||||
'预登记导出.xls'
|
||||
)
|
||||
} catch (error: any) {
|
||||
message.error(error.msg || '导出失败')
|
||||
} finally {
|
||||
exportLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
init()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
145
src/views/recruit/recruitprestudent/static.vue
Normal file
145
src/views/recruit/recruitprestudent/static.vue
Normal file
@@ -0,0 +1,145 @@
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-form :model="queryForm" inline class="mb-4" ref="searchFormRef">
|
||||
<el-form-item label="招生计划" prop="groupId">
|
||||
<el-select v-model="queryForm.groupId" filterable clearable placeholder="请选择招生计划" @change="handleFilter">
|
||||
<el-option
|
||||
v-for="item in planList"
|
||||
:key="item.id"
|
||||
:label="item.groupName"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleFilter">查询</el-button>
|
||||
<el-button type="primary" plain icon="Refresh" class="ml10" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div class="mb15">
|
||||
<el-button type="warning" plain icon="Download" :loading="exportLoading" @click="dataExportHandle">导出</el-button>
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
:data="state.dataList"
|
||||
border
|
||||
stripe
|
||||
v-loading="state.loading"
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
>
|
||||
<el-table-column prop="zymc" header-align="center" align="center" label="专业" />
|
||||
<el-table-column prop="number" header-align="center" align="center" label="人数" />
|
||||
<el-table-column prop="rate" header-align="center" align="center" label="占比" />
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="recruitprestudent-static">
|
||||
import { ref, reactive, computed, onMounted } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useUserInfo } from '/@/stores/userInfo'
|
||||
import { BasicTableProps, useTable } from '/@/hooks/table'
|
||||
import { useMessage } from '/@/hooks/message'
|
||||
import { fetchListStatic } from '/@/api/recruit/recruitprestudent'
|
||||
import { list } from '/@/api/recruit/recruitstudentplangroup'
|
||||
// @ts-ignore
|
||||
import global from '/@/components/tools/commondict.vue'
|
||||
|
||||
// 使用 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
|
||||
})
|
||||
|
||||
// 消息提示 hooks
|
||||
const message = useMessage()
|
||||
|
||||
// 引用
|
||||
const searchFormRef = ref()
|
||||
|
||||
// 状态
|
||||
const planList = ref<any[]>([])
|
||||
const exportLoading = ref(false)
|
||||
|
||||
// 查询表单
|
||||
const queryForm = reactive({
|
||||
groupId: ''
|
||||
})
|
||||
|
||||
// 表格状态
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
queryForm: queryForm,
|
||||
pageList: async (params: any) => {
|
||||
const response = await fetchListStatic(params)
|
||||
return {
|
||||
data: {
|
||||
records: response.data.data || [],
|
||||
total: response.data.data?.length || 0
|
||||
}
|
||||
}
|
||||
},
|
||||
createdIsNeed: false
|
||||
})
|
||||
|
||||
// 使用 table hook
|
||||
const { getDataList, tableStyle, downBlobFile } = useTable(state)
|
||||
|
||||
// 初始化
|
||||
const init = async () => {
|
||||
try {
|
||||
const data = await list()
|
||||
planList.value = data.data.data || []
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
getDataList()
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('初始化失败', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 查询
|
||||
const handleFilter = () => {
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 重置查询
|
||||
const resetQuery = () => {
|
||||
searchFormRef.value?.resetFields()
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
}
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 导出
|
||||
const dataExportHandle = async () => {
|
||||
try {
|
||||
exportLoading.value = true
|
||||
await downBlobFile(
|
||||
'/recruit/recruitprestudent/staticExport',
|
||||
queryForm,
|
||||
'预登记统计.xls'
|
||||
)
|
||||
} catch (error: any) {
|
||||
message.error(error.msg || '导出失败')
|
||||
} finally {
|
||||
exportLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
init()
|
||||
})
|
||||
</script>
|
||||
123
src/views/recruit/recruitschoolcode/detaiform.vue
Normal file
123
src/views/recruit/recruitschoolcode/detaiform.vue
Normal file
@@ -0,0 +1,123 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="!dataForm.id ? '新增' : '修改'"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="140px">
|
||||
|
||||
<el-form-item label="招生计划" prop="groupId">
|
||||
<el-select v-model="dataForm.groupId" filterable :disabled="!dataForm.id ? false : true" placeholder="请选择招生计划" size="small" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in planList"
|
||||
:key="item.id"
|
||||
:label="item.groupName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="学校名称" prop="schoolName">
|
||||
<el-input v-model="dataForm.schoolName" placeholder="学校名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="学校代码" prop="schoolCode">
|
||||
<el-input v-model="dataForm.schoolCode" placeholder="学校代码"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()" v-if="canSubmit">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {addObj, getObj, putObj} from '@/api/recruit/recruitschoolcode'
|
||||
import {list} from "@/api/recruit/recruitstudentplangroup";
|
||||
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
canSubmit: false,
|
||||
dataForm: {
|
||||
id:"",
|
||||
groupId:"",
|
||||
schoolName:"",
|
||||
schoolCode:"",
|
||||
},
|
||||
disabled:false,
|
||||
planList: [],
|
||||
areaList:[],
|
||||
deptList:[],
|
||||
dataRule: {
|
||||
groupId: [
|
||||
{ required: true, message: '招生计划不能为空', trigger: 'blur' },
|
||||
],
|
||||
schoolName: [
|
||||
{ required: true, message: '学校名称不能为空', trigger: 'blur' },
|
||||
{ min: 1, max: 20, message: '学校名称长度不大于20个字符', trigger: 'blur' }
|
||||
],
|
||||
schoolCode: [
|
||||
{ required: true, message: '学校代码不能为空', trigger: 'blur' },
|
||||
{ min: 4, max: 4, message: '学校代码长度为4个字符', trigger: 'blur' }
|
||||
],
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
created () {
|
||||
},
|
||||
methods: {
|
||||
init (id) {
|
||||
this.dataForm.id = id || null;
|
||||
this.visible = true;
|
||||
this.canSubmit = true;
|
||||
this.initData();
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
getObj(this.dataForm.id).then(response => {
|
||||
this.dataForm = response.data.data
|
||||
this.dataForm.area = this.dataForm.area+"";
|
||||
})
|
||||
}else{
|
||||
this.disabled = true;
|
||||
}
|
||||
})
|
||||
},
|
||||
initData() {
|
||||
list().then(data =>{
|
||||
this.planList = data.data.data
|
||||
if(!this.dataForm.id){
|
||||
this.dataForm.groupId=this.planList[0].id
|
||||
}
|
||||
});
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit () {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.canSubmit = false;
|
||||
if (this.dataForm.id) {
|
||||
putObj(this.dataForm).then(data => {
|
||||
this.$notify.success('修改成功')
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
} else {
|
||||
addObj(this.dataForm).then(data => {
|
||||
this.$notify.success('添加成功')
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
372
src/views/recruit/recruitschoolcode/index.vue
Normal file
372
src/views/recruit/recruitschoolcode/index.vue
Normal file
@@ -0,0 +1,372 @@
|
||||
<!--
|
||||
- Copyright (c) 2018-2025, cyweb All rights reserved.
|
||||
-
|
||||
- Redistribution and use in source and binary forms, with or without
|
||||
- modification, are permitted provided that the following conditions are met:
|
||||
-
|
||||
- Redistributions of source code must retain the above copyright notice,
|
||||
- this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
- notice, this list of conditions and the following disclaimer in the
|
||||
- documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of the pig4cloud.com developer nor the names of its
|
||||
- contributors may be used to endorse or promote products derived from
|
||||
- this software without specific prior written permission.
|
||||
-
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<!-- 搜索表单 -->
|
||||
<el-form :model="queryForm" inline class="mb-4" ref="searchFormRef">
|
||||
<el-form-item label="招生计划" prop="groupId">
|
||||
<el-select v-model="queryForm.groupId" filterable clearable placeholder="请选择招生计划">
|
||||
<el-option
|
||||
v-for="item in planList"
|
||||
:key="item.id"
|
||||
:label="item.groupName"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="学校名称" prop="schoolName">
|
||||
<el-input v-model="queryForm.schoolName" clearable placeholder="学校名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="学校代码" prop="schoolCode">
|
||||
<el-input v-model="queryForm.schoolCode" clearable placeholder="学校代码" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="getDataList">查询</el-button>
|
||||
<el-button type="primary" plain icon="Refresh" class="ml10" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<div class="mb15">
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitschoolcode_add"
|
||||
type="primary"
|
||||
icon="FolderAdd"
|
||||
@click="addOrUpdateHandle"
|
||||
>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitschoolcode_add"
|
||||
type="primary"
|
||||
plain
|
||||
icon="UploadFilled"
|
||||
class="ml10"
|
||||
@click="handleExportIn"
|
||||
>
|
||||
导入
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
ref="tableRef"
|
||||
:data="state.dataList"
|
||||
v-loading="state.loading"
|
||||
border
|
||||
stripe
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="groupId" label="招生计划名称" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{ getPlanName(scope.row.groupId) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="schoolCode" label="学校代码" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="schoolName" label="学校名称" align="center" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="150" align="center" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitschoolcode_edit"
|
||||
type="primary"
|
||||
link
|
||||
icon="EditPen"
|
||||
@click="addOrUpdateHandle(scope.row.id)"
|
||||
>
|
||||
修改
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitschoolcode_del"
|
||||
type="danger"
|
||||
link
|
||||
icon="Delete"
|
||||
@click="deleteHandle(scope.row.id)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<pagination
|
||||
v-bind="state.pagination"
|
||||
@current-change="currentChangeHandle"
|
||||
@size-change="sizeChangeHandle"
|
||||
/>
|
||||
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<table-form v-if="addOrUpdateVisible" ref="addOrUpdateRef" @refreshDataList="getDataList" />
|
||||
|
||||
<!-- 导入弹窗 -->
|
||||
<el-dialog v-model="dialogViewVisible" title="导入学校代码" append-to-body>
|
||||
<el-form :model="exportForm" inline>
|
||||
<el-form-item label="招生计划" prop="groupId">
|
||||
<el-select v-model="exportForm.groupId" filterable clearable placeholder="请选择招生计划">
|
||||
<el-option
|
||||
v-for="item in planList"
|
||||
:key="item.id"
|
||||
:label="item.groupName"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-upload
|
||||
class="upload-container"
|
||||
ref="uploadFormRef"
|
||||
action="doUpload"
|
||||
:limit="1"
|
||||
:file-list="fileList"
|
||||
:before-upload="beforeUpload"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button type="primary">选取文件</el-button>
|
||||
</template>
|
||||
<a href="schoolCode.xlsx" rel="external nofollow" download="常州中学代码模版">
|
||||
<el-button type="success" class="ml10">下载模板</el-button>
|
||||
</a>
|
||||
<template #tip>
|
||||
<div class="el-upload__tip">只能上传excel文件,且不超过5MB</div>
|
||||
<div class="el-upload-list__item-name">{{ fileName }}</div>
|
||||
</template>
|
||||
</el-upload>
|
||||
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="dialogViewVisible = false; impoerLoadinBtn = false">取消</el-button>
|
||||
<el-button type="primary" @click="submitUpload" :loading="impoerLoadinBtn">导入</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="recruitschoolcode">
|
||||
import { ref, reactive, computed, onMounted, defineAsyncComponent } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useUserInfo } from '/@/stores/userInfo'
|
||||
import { BasicTableProps, useTable } from '/@/hooks/table'
|
||||
import { useMessage, useMessageBox } from '/@/hooks/message'
|
||||
import { list } from '/@/api/recruit/recruitstudentplangroup'
|
||||
import { delObj, fetchList } from '/@/api/recruit/recruitschoolcode'
|
||||
import request from '/@/utils/request'
|
||||
|
||||
const TableForm = defineAsyncComponent(() => import('./detaiform.vue'))
|
||||
|
||||
// 使用 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
|
||||
})
|
||||
|
||||
// 消息提示 hooks
|
||||
const message = useMessage()
|
||||
const messageBox = useMessageBox()
|
||||
|
||||
// 表格引用
|
||||
const tableRef = ref()
|
||||
const searchFormRef = ref()
|
||||
const addOrUpdateRef = ref()
|
||||
const uploadFormRef = ref()
|
||||
|
||||
// 弹窗状态
|
||||
const addOrUpdateVisible = ref(false)
|
||||
const dialogViewVisible = ref(false)
|
||||
const impoerLoadinBtn = ref(false)
|
||||
|
||||
// 数据
|
||||
const planList = ref<any[]>([])
|
||||
const fileList = ref<any[]>([])
|
||||
const fileName = ref('')
|
||||
const files = ref<File | null>(null)
|
||||
|
||||
// 查询表单
|
||||
const queryForm = reactive({
|
||||
groupId: '',
|
||||
schoolName: '',
|
||||
schoolCode: ''
|
||||
})
|
||||
|
||||
// 导出表单
|
||||
const exportForm = reactive({
|
||||
groupId: ''
|
||||
})
|
||||
|
||||
// 获取计划名称
|
||||
const getPlanName = (groupId: string) => {
|
||||
const item = planList.value.find(item => item.id === groupId)
|
||||
return item ? item.groupName : ''
|
||||
}
|
||||
|
||||
// 表格状态
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
queryForm: queryForm,
|
||||
pageList: async (params: any) => {
|
||||
const response = await fetchList(params)
|
||||
return {
|
||||
data: {
|
||||
records: response.data.data.records,
|
||||
total: response.data.data.total
|
||||
}
|
||||
}
|
||||
},
|
||||
createdIsNeed: false
|
||||
})
|
||||
|
||||
// 使用 table hook
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, tableStyle } = useTable(state)
|
||||
|
||||
// 初始化
|
||||
const init = async () => {
|
||||
try {
|
||||
const data = await list()
|
||||
planList.value = data.data.data || []
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
}
|
||||
getDataList()
|
||||
} catch (error) {
|
||||
console.error('初始化失败', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 上传验证
|
||||
const beforeUpload = (file: File) => {
|
||||
const fileLast = file.name.split('.')
|
||||
const extension = fileLast[fileLast.length - 1] === 'xls'
|
||||
const extension2 = fileLast[fileLast.length - 1] === 'xlsx'
|
||||
const isLt2M = file.size / 1024 / 1024 < 5
|
||||
|
||||
if (!extension && !extension2) {
|
||||
message.warning('上传模板只能是 xls、xlsx格式!')
|
||||
return false
|
||||
}
|
||||
if (!isLt2M) {
|
||||
message.warning('上传模板大小不能超过 5MB!')
|
||||
return false
|
||||
}
|
||||
fileName.value = file.name
|
||||
files.value = file
|
||||
return false // 返回false不会自动上传
|
||||
}
|
||||
|
||||
// 提交上传
|
||||
const submitUpload = async () => {
|
||||
if (fileName.value === '') {
|
||||
message.warning('请选择要上传的文件!')
|
||||
return
|
||||
}
|
||||
if (exportForm.groupId === '') {
|
||||
message.warning('请选择招生计划!')
|
||||
return
|
||||
}
|
||||
|
||||
impoerLoadinBtn.value = true
|
||||
try {
|
||||
const fileFormData = new FormData()
|
||||
fileFormData.append('file', files.value!, fileName.value)
|
||||
|
||||
const res = await request({
|
||||
method: 'post',
|
||||
url: `/recruit/recruitschoolcode/exportSchoolCode?groupId=${exportForm.groupId}`,
|
||||
data: fileFormData,
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
})
|
||||
|
||||
if (res.data.data === 'fail') {
|
||||
message.error('请上传正确的学校代码模板')
|
||||
return
|
||||
}
|
||||
if (res.data && res.data.data === 0) {
|
||||
message.error(res.data.msg)
|
||||
} else if (res.data && res.data.data === 10) {
|
||||
message.error(res.data.msg)
|
||||
} else {
|
||||
message.success('操作成功')
|
||||
dialogViewVisible.value = false
|
||||
state.pagination!.current = 1
|
||||
getDataList()
|
||||
}
|
||||
} catch (error: any) {
|
||||
message.error(error.msg || '导入失败')
|
||||
} finally {
|
||||
impoerLoadinBtn.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 导入
|
||||
const handleExportIn = () => {
|
||||
fileName.value = ''
|
||||
exportForm.groupId = ''
|
||||
dialogViewVisible.value = true
|
||||
}
|
||||
|
||||
// 新增 / 修改
|
||||
const addOrUpdateHandle = (id?: string) => {
|
||||
addOrUpdateVisible.value = true
|
||||
nextTick(() => {
|
||||
addOrUpdateRef.value?.init(id)
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
const deleteHandle = async (id: string) => {
|
||||
try {
|
||||
await messageBox.confirm('是否确认删除本条数据?请谨慎操作')
|
||||
await delObj(id)
|
||||
message.success('删除成功')
|
||||
getDataList()
|
||||
} catch {
|
||||
// 用户取消
|
||||
}
|
||||
}
|
||||
|
||||
// 重置查询
|
||||
const resetQuery = () => {
|
||||
searchFormRef.value?.resetFields()
|
||||
Object.keys(queryForm).forEach(key => {
|
||||
queryForm[key] = ''
|
||||
})
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
}
|
||||
getDataList()
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
init()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
321
src/views/recruit/recruitstudentplan/index.vue
Normal file
321
src/views/recruit/recruitstudentplan/index.vue
Normal file
@@ -0,0 +1,321 @@
|
||||
<!--
|
||||
- Copyright (c) 2018-2025, cyweb All rights reserved.
|
||||
-
|
||||
- Redistribution and use in source and binary forms, with or without
|
||||
- modification, are permitted provided that the following conditions are met:
|
||||
-
|
||||
- Redistributions of source code must retain the above copyright notice,
|
||||
- this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
- notice, this list of conditions and the following disclaimer in the
|
||||
- documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of the pig4cloud.com developer nor the names of its
|
||||
- contributors may be used to endorse or promote products derived from
|
||||
- this software without specific prior written permission.
|
||||
-
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<!-- 搜索表单 -->
|
||||
<el-form :model="queryForm" inline class="mb-4">
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="getDataList">查询</el-button>
|
||||
<el-button type="primary" plain icon="Refresh" class="ml10" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="permissions.recruit_recruitstudentplan_add">
|
||||
<el-button type="primary" icon="FolderAdd" class="ml10" @click="handleAdd">新增</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
ref="tableRef"
|
||||
:data="state.dataList"
|
||||
v-loading="state.loading"
|
||||
border
|
||||
stripe
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="zydm" label="专业代码" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="xy" label="系部" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="needStudentNum" label="拟招人数(不限男女)和拟招男女生数互斥" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="needStudentBoyNum" label="拟招男生数" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="needStudentGirlNum" label="拟招女生数" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="needStudentOverNum" label="拟招过载人数(不限男女) 和拟招过载男女生数互斥" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="needStudentOverBoyNum" label="拟招过载男生数" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="needStudentOverGirlNum" label="拟招过载女生数" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="scoreLine" label="录取分数线" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="scoreMinLine" label="最低录取分数线" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="planStudentNum" label="计划招生人数(不限男女)" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="planStudentBoyNum" label="计划招生男生数" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="planStudentGirlNum" label="计划招生女生数" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="degreeOfEducation" label="生源" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="scoreFeeConf" label="捐资助学费配置" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="tuition" label="学费配置,和生源对应" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="remarks" label="备注信息" align="center" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="150" align="center" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitstudentplan_edit"
|
||||
type="primary"
|
||||
link
|
||||
icon="EditPen"
|
||||
@click="handleEdit(scope.row)"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitstudentplan_del"
|
||||
type="danger"
|
||||
link
|
||||
icon="Delete"
|
||||
@click="handleDel(scope.row)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<pagination
|
||||
v-bind="state.pagination"
|
||||
@current-change="currentChangeHandle"
|
||||
@size-change="sizeChangeHandle"
|
||||
/>
|
||||
|
||||
<!-- 新增/编辑弹窗 -->
|
||||
<el-dialog
|
||||
v-model="dialogVisible"
|
||||
:title="form.id ? '编辑' : '新增'"
|
||||
width="600px"
|
||||
:close-on-click-modal="false"
|
||||
destroy-on-close
|
||||
>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="form"
|
||||
:rules="formRules"
|
||||
label-width="180px"
|
||||
>
|
||||
<el-form-item label="专业代码" prop="zydm">
|
||||
<el-input v-model="form.zydm" placeholder="请输入专业代码" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="系部" prop="xy">
|
||||
<el-input v-model="form.xy" placeholder="请输入系部" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="拟招人数(不限男女)" prop="needStudentNum">
|
||||
<el-input-number v-model="form.needStudentNum" :min="0" placeholder="请输入拟招人数" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="拟招男生数" prop="needStudentBoyNum">
|
||||
<el-input-number v-model="form.needStudentBoyNum" :min="0" placeholder="请输入拟招男生数" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="拟招女生数" prop="needStudentGirlNum">
|
||||
<el-input-number v-model="form.needStudentGirlNum" :min="0" placeholder="请输入拟招女生数" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="拟招过载人数(不限男女)" prop="needStudentOverNum">
|
||||
<el-input-number v-model="form.needStudentOverNum" :min="0" placeholder="请输入拟招过载人数" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="拟招过载男生数" prop="needStudentOverBoyNum">
|
||||
<el-input-number v-model="form.needStudentOverBoyNum" :min="0" placeholder="请输入拟招过载男生数" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="拟招过载女生数" prop="needStudentOverGirlNum">
|
||||
<el-input-number v-model="form.needStudentOverGirlNum" :min="0" placeholder="请输入拟招过载女生数" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="录取分数线" prop="scoreLine">
|
||||
<el-input-number v-model="form.scoreLine" :min="0" placeholder="请输入录取分数线" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="最低录取分数线" prop="scoreMinLine">
|
||||
<el-input-number v-model="form.scoreMinLine" :min="0" placeholder="请输入最低录取分数线" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="计划招生人数(不限男女)" prop="planStudentNum">
|
||||
<el-input-number v-model="form.planStudentNum" :min="0" placeholder="请输入计划招生人数" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="计划招生男生数" prop="planStudentBoyNum">
|
||||
<el-input-number v-model="form.planStudentBoyNum" :min="0" placeholder="请输入计划招生男生数" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="计划招生女生数" prop="planStudentGirlNum">
|
||||
<el-input-number v-model="form.planStudentGirlNum" :min="0" placeholder="请输入计划招生女生数" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="生源" prop="degreeOfEducation">
|
||||
<el-input v-model="form.degreeOfEducation" placeholder="请输入生源" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="捐资助学费配置" prop="scoreFeeConf">
|
||||
<el-input v-model="form.scoreFeeConf" placeholder="请输入捐资助学费配置" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="学费配置,和生源对应" prop="tuition">
|
||||
<el-input v-model="form.tuition" placeholder="请输入学费配置" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注信息" prop="remarks">
|
||||
<el-input v-model="form.remarks" type="textarea" :rows="3" placeholder="请输入备注信息" clearable />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="handleSubmit" :loading="submitLoading">确定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="recruitstudentplan">
|
||||
import { ref, reactive, computed, onMounted } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useUserInfo } from '/@/stores/userInfo'
|
||||
import { BasicTableProps, useTable } from '/@/hooks/table'
|
||||
import { useMessage, useMessageBox } from '/@/hooks/message'
|
||||
import { addObj, delObj, fetchList, putObj } from '/@/api/recruit/recruitstudentplan'
|
||||
|
||||
// 使用 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
|
||||
})
|
||||
|
||||
// 消息提示 hooks
|
||||
const message = useMessage()
|
||||
const messageBox = useMessageBox()
|
||||
|
||||
// 表格引用
|
||||
const tableRef = ref()
|
||||
const formRef = ref()
|
||||
|
||||
// 弹窗状态
|
||||
const dialogVisible = ref(false)
|
||||
const submitLoading = ref(false)
|
||||
|
||||
// 查询表单
|
||||
const queryForm = reactive({})
|
||||
|
||||
// 表单数据
|
||||
const form = reactive({
|
||||
id: '',
|
||||
zydm: '',
|
||||
xy: '',
|
||||
needStudentNum: undefined,
|
||||
needStudentBoyNum: undefined,
|
||||
needStudentGirlNum: undefined,
|
||||
needStudentOverNum: undefined,
|
||||
needStudentOverBoyNum: undefined,
|
||||
needStudentOverGirlNum: undefined,
|
||||
scoreLine: undefined,
|
||||
scoreMinLine: undefined,
|
||||
planStudentNum: undefined,
|
||||
planStudentBoyNum: undefined,
|
||||
planStudentGirlNum: undefined,
|
||||
degreeOfEducation: '',
|
||||
scoreFeeConf: '',
|
||||
tuition: '',
|
||||
remarks: ''
|
||||
})
|
||||
|
||||
// 表单验证规则
|
||||
const formRules = {}
|
||||
|
||||
// 表格状态
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
queryForm: queryForm,
|
||||
pageList: async (params: any) => {
|
||||
const response = await fetchList(params)
|
||||
return {
|
||||
data: {
|
||||
records: response.data.data.records,
|
||||
total: response.data.data.total
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
// 使用 table hook
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, tableStyle } = useTable(state)
|
||||
|
||||
// 重置查询
|
||||
const resetQuery = () => {
|
||||
Object.keys(queryForm).forEach(key => {
|
||||
queryForm[key] = ''
|
||||
})
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 新增
|
||||
const handleAdd = () => {
|
||||
Object.keys(form).forEach(key => {
|
||||
if (key === 'id') {
|
||||
form[key] = ''
|
||||
} else if (typeof form[key] === 'number') {
|
||||
form[key] = undefined
|
||||
} else {
|
||||
form[key] = ''
|
||||
}
|
||||
})
|
||||
dialogVisible.value = true
|
||||
}
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (row: any) => {
|
||||
Object.keys(form).forEach(key => {
|
||||
form[key] = row[key]
|
||||
})
|
||||
dialogVisible.value = true
|
||||
}
|
||||
|
||||
// 删除
|
||||
const handleDel = async (row: any) => {
|
||||
try {
|
||||
await messageBox.confirm(`是否确认删除ID为${row.id}的记录?`)
|
||||
await delObj(row.id)
|
||||
message.success('删除成功')
|
||||
getDataList()
|
||||
} catch {
|
||||
// 用户取消
|
||||
}
|
||||
}
|
||||
|
||||
// 提交表单
|
||||
const handleSubmit = async () => {
|
||||
if (!formRef.value) return
|
||||
|
||||
await formRef.value.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
submitLoading.value = true
|
||||
try {
|
||||
if (form.id) {
|
||||
await putObj(form)
|
||||
message.success('修改成功')
|
||||
} else {
|
||||
await addObj(form)
|
||||
message.success('添加成功')
|
||||
}
|
||||
dialogVisible.value = false
|
||||
getDataList()
|
||||
} catch (error: any) {
|
||||
message.error(error.msg || '操作失败')
|
||||
} finally {
|
||||
submitLoading.value = false
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getDataList()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
@@ -0,0 +1,129 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="!dataForm.id ? '新增' : '修改'"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()"
|
||||
label-width="140px">
|
||||
|
||||
<el-form-item label="招生计划" prop="groupId">
|
||||
<el-select v-model="dataForm.groupId" filterable placeholder="请选择招生计划" size="small" style="width: 100%" :disabled="!dataForm.id ? false : true">
|
||||
<el-option
|
||||
v-for="item in planList"
|
||||
:key="item.id"
|
||||
:label="item.groupName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="地区" prop="regionId">
|
||||
<el-select v-model="dataForm.regionId" filterable placeholder="请选择地区" size="small" style="width: 100%" >
|
||||
<el-option
|
||||
v-for="item in regionList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="分数线" prop="fullScore">
|
||||
<el-input-number v-model="dataForm.fullScore" :min="0" :max="999" style="width: 100%"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()" v-if="canSubmit">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {addObj, getObj, putObj} from '@/api/recruit/recruitstudentplancorrectscoreconfig'
|
||||
import {areaList} from "@/api/recruit/recruitstudentschool";
|
||||
import {list} from "@/api/recruit/recruitstudentplangroup";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
canSubmit: false,
|
||||
dataForm: {
|
||||
id: "",
|
||||
groupId: "",
|
||||
regionId:"",
|
||||
fullScore:""
|
||||
},
|
||||
regionList:[],
|
||||
planList:[],
|
||||
dataRule: {
|
||||
groupId: [
|
||||
{required: true, message: '招生计划不能为空', trigger: 'blur'}
|
||||
],
|
||||
regionId:[
|
||||
{required: true, message: '地区不能为空', trigger: 'blur'}
|
||||
],
|
||||
fullScore:[
|
||||
{required: true, message: '分数线不能为空', trigger: 'blur'}
|
||||
],
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
this.dataForm.id = id || null;
|
||||
this.visible = true;
|
||||
this.canSubmit = true;
|
||||
this.$nextTick(() => {
|
||||
this.initData();
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
getObj(this.dataForm.id).then(response => {
|
||||
this.dataForm = response.data.data
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
initData() {
|
||||
list().then(data => {
|
||||
this.planList = data.data.data
|
||||
});
|
||||
areaList({type:"0",parentId:"11"}).then(data =>{
|
||||
this.regionList = data.data.data;
|
||||
});
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.canSubmit = false;
|
||||
this.regionList.forEach(e=>{
|
||||
if(e.code == this.dataForm.regionId){
|
||||
this.dataForm.regionName =e.name;
|
||||
}
|
||||
});
|
||||
if (this.dataForm.id) {
|
||||
putObj(this.dataForm).then(data => {
|
||||
this.$notify.success('修改成功')
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
} else {
|
||||
addObj(this.dataForm).then(data => {
|
||||
this.$notify.success('添加成功')
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
226
src/views/recruit/recruitstudentplancorrectscoreconfig/index.vue
Normal file
226
src/views/recruit/recruitstudentplancorrectscoreconfig/index.vue
Normal file
@@ -0,0 +1,226 @@
|
||||
<!--
|
||||
- Copyright (c) 2018-2025, cyweb All rights reserved.
|
||||
-
|
||||
- Redistribution and use in source and binary forms, with or without
|
||||
- modification, are permitted provided that the following conditions are met:
|
||||
-
|
||||
- Redistributions of source code must retain the above copyright notice,
|
||||
- this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
- notice, this list of conditions and the following disclaimer in the
|
||||
- documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of the pig4cloud.com developer nor the names of its
|
||||
- contributors may be used to endorse or promote products derived from
|
||||
- this software without specific prior written permission.
|
||||
-
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<!-- 搜索表单 -->
|
||||
<el-form :model="queryForm" inline class="mb-4" ref="searchFormRef">
|
||||
<el-form-item label="招生计划" prop="groupId">
|
||||
<el-select v-model="queryForm.groupId" filterable clearable placeholder="请选择招生计划">
|
||||
<el-option
|
||||
v-for="item in planList"
|
||||
:key="item.id"
|
||||
:label="item.groupName"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="getDataList">查询</el-button>
|
||||
<el-button type="primary" plain icon="Refresh" class="ml10" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<div class="mb15">
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitstudentplancorrectscoreconfig_add"
|
||||
type="primary"
|
||||
icon="FolderAdd"
|
||||
@click="addOrUpdateHandle"
|
||||
>
|
||||
新增
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
ref="tableRef"
|
||||
:data="state.dataList"
|
||||
v-loading="state.loading"
|
||||
border
|
||||
stripe
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="groupId" label="招生计划名称" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{ getPlanName(scope.row.groupId) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="regionName" label="地区" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="fullScore" label="分数线" align="center" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="150" align="center" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitstudentplancorrectscoreconfig_edit"
|
||||
type="primary"
|
||||
link
|
||||
icon="EditPen"
|
||||
@click="addOrUpdateHandle(scope.row.id)"
|
||||
>
|
||||
修改
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitstudentplancorrectscoreconfig_del"
|
||||
type="danger"
|
||||
link
|
||||
icon="Delete"
|
||||
@click="deleteHandle(scope.row.id)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<pagination
|
||||
v-bind="state.pagination"
|
||||
@current-change="currentChangeHandle"
|
||||
@size-change="sizeChangeHandle"
|
||||
/>
|
||||
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<table-form v-if="addOrUpdateVisible" ref="addOrUpdateRef" @refreshDataList="getDataList" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="recruitstudentplancorrectscoreconfig">
|
||||
import { ref, reactive, computed, onMounted, nextTick, defineAsyncComponent } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useUserInfo } from '/@/stores/userInfo'
|
||||
import { BasicTableProps, useTable } from '/@/hooks/table'
|
||||
import { useMessage, useMessageBox } from '/@/hooks/message'
|
||||
import { list } from '/@/api/recruit/recruitstudentplangroup'
|
||||
import { fetchList, delObj } from '/@/api/recruit/recruitstudentplancorrectscoreconfig'
|
||||
|
||||
const TableForm = defineAsyncComponent(() => import('./detaiform.vue'))
|
||||
|
||||
// 使用 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
|
||||
})
|
||||
|
||||
// 消息提示 hooks
|
||||
const message = useMessage()
|
||||
const messageBox = useMessageBox()
|
||||
|
||||
// 表格引用
|
||||
const tableRef = ref()
|
||||
const searchFormRef = ref()
|
||||
const addOrUpdateRef = ref()
|
||||
|
||||
// 弹窗状态
|
||||
const addOrUpdateVisible = ref(false)
|
||||
|
||||
// 数据
|
||||
const planList = ref<any[]>([])
|
||||
|
||||
// 查询表单
|
||||
const queryForm = reactive({
|
||||
groupId: ''
|
||||
})
|
||||
|
||||
// 获取计划名称
|
||||
const getPlanName = (groupId: string) => {
|
||||
const item = planList.value.find(item => item.id === groupId)
|
||||
return item ? item.groupName : ''
|
||||
}
|
||||
|
||||
// 表格状态
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
queryForm: queryForm,
|
||||
pageList: async (params: any) => {
|
||||
const response = await fetchList(params)
|
||||
return {
|
||||
data: {
|
||||
records: response.data.data.records,
|
||||
total: response.data.data.total
|
||||
}
|
||||
}
|
||||
},
|
||||
createdIsNeed: false
|
||||
})
|
||||
|
||||
// 使用 table hook
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, tableStyle } = useTable(state)
|
||||
|
||||
// 初始化
|
||||
const init = async () => {
|
||||
try {
|
||||
const data = await list()
|
||||
planList.value = data.data.data || []
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
}
|
||||
getDataList()
|
||||
} catch (error) {
|
||||
console.error('初始化失败', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 新增 / 修改
|
||||
const addOrUpdateHandle = (id?: string) => {
|
||||
addOrUpdateVisible.value = true
|
||||
nextTick(() => {
|
||||
addOrUpdateRef.value?.init(id)
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
const deleteHandle = async (id: string) => {
|
||||
try {
|
||||
await messageBox.confirm('是否确认删除本条数据?请谨慎操作')
|
||||
await delObj(id)
|
||||
message.success('删除成功')
|
||||
getDataList()
|
||||
} catch {
|
||||
// 用户取消
|
||||
}
|
||||
}
|
||||
|
||||
// 重置查询
|
||||
const resetQuery = () => {
|
||||
searchFormRef.value?.resetFields()
|
||||
Object.keys(queryForm).forEach(key => {
|
||||
queryForm[key] = ''
|
||||
})
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
}
|
||||
getDataList()
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
init()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
251
src/views/recruit/recruitstudentplandegreeofeducation/index.vue
Normal file
251
src/views/recruit/recruitstudentplandegreeofeducation/index.vue
Normal file
@@ -0,0 +1,251 @@
|
||||
<!--
|
||||
- Copyright (c) 2018-2025, cyweb All rights reserved.
|
||||
-
|
||||
- Redistribution and use in source and binary forms, with or without
|
||||
- modification, are permitted provided that the following conditions are met:
|
||||
-
|
||||
- Redistributions of source code must retain the above copyright notice,
|
||||
- this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
- notice, this list of conditions and the following disclaimer in the
|
||||
- documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of the pig4cloud.com developer nor the names of its
|
||||
- contributors may be used to endorse or promote products derived from
|
||||
- this software without specific prior written permission.
|
||||
-
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<!-- 搜索表单 -->
|
||||
<el-form :model="queryForm" inline class="mb-4">
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="getDataList">查询</el-button>
|
||||
<el-button type="primary" plain icon="Refresh" class="ml10" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="permissions.recruit_recruitstudentplandegreeofeducation_add">
|
||||
<el-button type="primary" icon="FolderAdd" class="ml10" @click="handleAdd">新增</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
ref="tableRef"
|
||||
:data="state.dataList"
|
||||
v-loading="state.loading"
|
||||
border
|
||||
stripe
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="planId" label="计划明细ID" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="degreeOfEducation" label="生源" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="remarks" label="备注信息" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="createBy" label="创建者" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="createDate" label="创建时间" align="center" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="150" align="center" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitstudentplandegreeofeducation_edit"
|
||||
type="primary"
|
||||
link
|
||||
icon="EditPen"
|
||||
@click="handleEdit(scope.row)"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitstudentplandegreeofeducation_del"
|
||||
type="danger"
|
||||
link
|
||||
icon="Delete"
|
||||
@click="handleDel(scope.row)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<pagination
|
||||
v-bind="state.pagination"
|
||||
@current-change="currentChangeHandle"
|
||||
@size-change="sizeChangeHandle"
|
||||
/>
|
||||
|
||||
<!-- 新增/编辑弹窗 -->
|
||||
<el-dialog
|
||||
v-model="dialogVisible"
|
||||
:title="form.id ? '编辑' : '新增'"
|
||||
width="600px"
|
||||
:close-on-click-modal="false"
|
||||
destroy-on-close
|
||||
>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="form"
|
||||
:rules="formRules"
|
||||
label-width="120px"
|
||||
>
|
||||
<el-form-item label="计划明细ID" prop="planId">
|
||||
<el-input v-model="form.planId" placeholder="请输入计划明细ID" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="生源" prop="degreeOfEducation">
|
||||
<el-input v-model="form.degreeOfEducation" placeholder="请输入生源" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注信息" prop="remarks">
|
||||
<el-input v-model="form.remarks" type="textarea" :rows="3" placeholder="请输入备注信息" clearable />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="handleSubmit" :loading="submitLoading">确定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="recruitstudentplandegreeofeducation">
|
||||
import { ref, reactive, computed, onMounted } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useUserInfo } from '/@/stores/userInfo'
|
||||
import { BasicTableProps, useTable } from '/@/hooks/table'
|
||||
import { useMessage, useMessageBox } from '/@/hooks/message'
|
||||
import { addObj, delObj, fetchList, putObj } from '/@/api/recruit/recruitstudentplandegreeofeducation'
|
||||
|
||||
// 使用 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
|
||||
})
|
||||
|
||||
// 消息提示 hooks
|
||||
const message = useMessage()
|
||||
const messageBox = useMessageBox()
|
||||
|
||||
// 表格引用
|
||||
const tableRef = ref()
|
||||
const formRef = ref()
|
||||
|
||||
// 弹窗状态
|
||||
const dialogVisible = ref(false)
|
||||
const submitLoading = ref(false)
|
||||
|
||||
// 查询表单
|
||||
const queryForm = reactive({})
|
||||
|
||||
// 表单数据
|
||||
const form = reactive({
|
||||
id: '',
|
||||
planId: '',
|
||||
degreeOfEducation: '',
|
||||
remarks: ''
|
||||
})
|
||||
|
||||
// 表单验证规则
|
||||
const formRules = {}
|
||||
|
||||
// 表格状态
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
queryForm: queryForm,
|
||||
pageList: async (params: any) => {
|
||||
const response = await fetchList(params)
|
||||
return {
|
||||
data: {
|
||||
records: response.data.data.records,
|
||||
total: response.data.data.total
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
// 使用 table hook
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, tableStyle } = useTable(state)
|
||||
|
||||
// 重置查询
|
||||
const resetQuery = () => {
|
||||
Object.keys(queryForm).forEach(key => {
|
||||
queryForm[key] = ''
|
||||
})
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 新增
|
||||
const handleAdd = () => {
|
||||
Object.keys(form).forEach(key => {
|
||||
if (key === 'id') {
|
||||
form[key] = ''
|
||||
} else {
|
||||
form[key] = ''
|
||||
}
|
||||
})
|
||||
dialogVisible.value = true
|
||||
}
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (row: any) => {
|
||||
Object.keys(form).forEach(key => {
|
||||
form[key] = row[key]
|
||||
})
|
||||
dialogVisible.value = true
|
||||
}
|
||||
|
||||
// 删除
|
||||
const handleDel = async (row: any) => {
|
||||
try {
|
||||
await messageBox.confirm(`是否确认删除ID为${row.id}的记录?`)
|
||||
await delObj(row.id)
|
||||
message.success('删除成功')
|
||||
getDataList()
|
||||
} catch {
|
||||
// 用户取消
|
||||
}
|
||||
}
|
||||
|
||||
// 提交表单
|
||||
const handleSubmit = async () => {
|
||||
if (!formRef.value) return
|
||||
|
||||
await formRef.value.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
submitLoading.value = true
|
||||
try {
|
||||
if (form.id) {
|
||||
await putObj(form)
|
||||
message.success('修改成功')
|
||||
} else {
|
||||
await addObj(form)
|
||||
message.success('添加成功')
|
||||
}
|
||||
dialogVisible.value = false
|
||||
getDataList()
|
||||
} catch (error: any) {
|
||||
message.error(error.msg || '操作失败')
|
||||
} finally {
|
||||
submitLoading.value = false
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getDataList()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
@@ -0,0 +1,225 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="!dataForm.id ? '新增' : '修改'"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="140px">
|
||||
<el-form-item label="年份" prop="year">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="dataForm.year"
|
||||
type="year"
|
||||
format="yyyy"
|
||||
value-format="yyyy"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="招生计划名称" prop="groupName">
|
||||
<el-input v-model="dataForm.groupName" placeholder="招生计划名称"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="报名开始时间" prop="startDate" >
|
||||
<el-date-picker v-model="dataForm.startDate" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss" filterable clearable style="width: 100%"
|
||||
:picker-options="startDatePicker" type="datetime" ></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="报名截止时间" prop="endDate" >
|
||||
<el-date-picker v-model="dataForm.endDate" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss" filterable clearable style="width: 100%"
|
||||
:picker-options="endDatePicker" type="datetime" ></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="维护开始时间" prop="maintenanceStartDate" >
|
||||
<el-date-picker v-model="dataForm.maintenanceStartDate" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss" filterable clearable style="width: 100%"
|
||||
:picker-options="maintenanceStartDatePicker" type="datetime" ></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="维护结束时间" prop="maintenanceEndDate" >
|
||||
<el-date-picker v-model="dataForm.maintenanceEndDate" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss" filterable clearable style="width: 100%"
|
||||
:picker-options="maintenanceEndDatePicker" type="datetime" ></el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="初中生报名" prop="czSignStart" >
|
||||
<el-select v-model="dataForm.czSignStart" placeholder="请选择初中生报名" style=" width: 100%">
|
||||
<el-option
|
||||
v-for="item in yesNoList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="高中生报名" prop="gzSignStart" >
|
||||
<el-select v-model="dataForm.gzSignStart" placeholder="请选择初中生报名" style=" width: 100%">
|
||||
<el-option
|
||||
v-for="item in yesNoList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="技职校报名" prop="jzxSignStart" >
|
||||
<el-select v-model="dataForm.jzxSignStart" placeholder="请选择初中生报名" style=" width: 100%">
|
||||
<el-option
|
||||
v-for="item in yesNoList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()" v-if="canSubmit">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {addObj, getObj, putObj} from '@/api/recruit/recruitstudentplangroup'
|
||||
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
startDatePicker: this.beginDate(),
|
||||
endDatePicker: this.processDate(),
|
||||
maintenanceStartDatePicker: this.mainBeginDate(),
|
||||
maintenanceEndDatePicker: this.mainEndDate(),
|
||||
visible: false,
|
||||
canSubmit: false,
|
||||
dataForm: {
|
||||
year:"",
|
||||
groupName:"",
|
||||
startDate:"",
|
||||
endDate:"",
|
||||
maintenanceStartDate:"",
|
||||
maintenanceEndDate:"",
|
||||
feeAgency:0,
|
||||
czSignStart:"",
|
||||
gzSignStart:"",
|
||||
jzxSignStart:""
|
||||
},
|
||||
yesNoList:[{"label": "否", "value": "0"},{"label": "是", "value": "1"}],
|
||||
dataRule: {
|
||||
year: [
|
||||
{ required: true, message: '年份不能为空', trigger: 'blur' }
|
||||
],
|
||||
groupName: [
|
||||
{ required: true, message: '招生计划名称不能为空', trigger: 'blur' },
|
||||
{ min: 0, max: 30, message: '长度在 0 到 30 个字符', trigger: 'blur'}
|
||||
],
|
||||
startDate: [
|
||||
{ required: true, message: '报名开始时间不能为空', trigger: 'blur' }
|
||||
],
|
||||
endDate: [
|
||||
{ required: true, message: '报名截止时间不能为空', trigger: 'blur' }
|
||||
],
|
||||
maintenanceStartDate: [
|
||||
{ required: true, message: '维护开始时间不能为空', trigger: 'blur' }
|
||||
],
|
||||
maintenanceEndDate: [
|
||||
{ required: true, message: '维护截止时间不能为空', trigger: 'blur' }
|
||||
],
|
||||
feeAgency: [
|
||||
{ required: true, message: '代办费不能为空', trigger: 'blur' }
|
||||
],
|
||||
czSignStart: [
|
||||
{ required: true, message: '初中生不能为空', trigger: 'blur' }
|
||||
],
|
||||
gzSignStart: [
|
||||
{ required: true, message: '高中生不能为空', trigger: 'blur' }
|
||||
],
|
||||
jzxSignStart: [
|
||||
{ required: true, message: '技职校不能为空', trigger: 'blur' }
|
||||
],
|
||||
}
|
||||
}
|
||||
},
|
||||
created () {
|
||||
},
|
||||
methods: {
|
||||
|
||||
beginDate(){
|
||||
const self = this
|
||||
return {
|
||||
disabledDate(time){
|
||||
if (self.dataForm.endDate) { //如果结束时间不为空,则小于结束时间
|
||||
return new Date(self.dataForm.endDate).getTime() < time.getTime()
|
||||
} else {
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
processDate() {
|
||||
const self = this
|
||||
return {
|
||||
disabledDate(time) {
|
||||
if (self.dataForm.startDate) { //如果开始时间不为空,则结束时间大于开始时间
|
||||
return new Date(self.dataForm.startDate).getTime() > time.getTime()
|
||||
} else {
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
mainBeginDate(){
|
||||
const self = this
|
||||
return {
|
||||
disabledDate(time){
|
||||
if (self.dataForm.maintenanceEndDate) { //如果结束时间不为空,则小于结束时间
|
||||
return new Date(self.dataForm.maintenanceEndDate).getTime() < time.getTime()
|
||||
} else {
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
mainEndDate() {
|
||||
const self = this
|
||||
return {
|
||||
disabledDate(time) {
|
||||
if (self.dataForm.maintenanceStartDate) { //如果开始时间不为空,则结束时间大于开始时间
|
||||
return new Date(self.dataForm.maintenanceStartDate).getTime() > time.getTime()
|
||||
} else {
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
init (id) {
|
||||
this.dataForm.id = id || null;
|
||||
this.visible = true;
|
||||
this.canSubmit = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
getObj(this.dataForm.id).then(response => {
|
||||
this.dataForm = response.data.data
|
||||
this.dataForm.year = this.dataForm.year+"";
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit () {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.canSubmit = false;
|
||||
if (this.dataForm.id) {
|
||||
putObj(this.dataForm).then(data => {
|
||||
this.$notify.success('修改成功')
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
} else {
|
||||
addObj(this.dataForm).then(data => {
|
||||
this.$notify.success('添加成功')
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
330
src/views/recruit/recruitstudentplangroup/index.vue
Normal file
330
src/views/recruit/recruitstudentplangroup/index.vue
Normal file
@@ -0,0 +1,330 @@
|
||||
<!--
|
||||
- Copyright (c) 2018-2025, cyweb All rights reserved.
|
||||
-
|
||||
- Redistribution and use in source and binary forms, with or without
|
||||
- modification, are permitted provided that the following conditions are met:
|
||||
-
|
||||
- Redistributions of source code must retain the above copyright notice,
|
||||
- this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
- notice, this list of conditions and the following disclaimer in the
|
||||
- documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of the pig4cloud.com developer nor the names of its
|
||||
- contributors may be used to endorse or promote products derived from
|
||||
- this software without specific prior written permission.
|
||||
-
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<!-- 搜索表单 -->
|
||||
<el-form :model="queryForm" inline class="mb-4" ref="searchFormRef">
|
||||
<el-form-item label="招生计划名称" prop="groupName">
|
||||
<el-input v-model="queryForm.groupName" placeholder="招生计划名称" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="getDataList">查询</el-button>
|
||||
<el-button type="primary" plain icon="Refresh" class="ml10" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<div class="mb15">
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitstudentplangroup_add"
|
||||
type="primary"
|
||||
icon="FolderAdd"
|
||||
@click="addOrUpdateHandle"
|
||||
>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitexampeople_add"
|
||||
type="primary"
|
||||
plain
|
||||
icon="Setting"
|
||||
class="ml10"
|
||||
@click="editExam"
|
||||
>
|
||||
审核人员
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
ref="tableRef"
|
||||
:data="state.dataList"
|
||||
v-loading="state.loading"
|
||||
border
|
||||
stripe
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="groupName" label="招生计划名称" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="startDate" label="报名时间段" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{ dateFormat(scope.row.startDate, 'yyyy-MM-dd') + ' 至 ' + dateFormat(scope.row.endDate, 'yyyy-MM-dd') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="maintenanceStartDate" label="维护时间段" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{ dateFormat(scope.row.maintenanceStartDate, 'yyyy-MM-dd') + ' 至 ' + dateFormat(scope.row.maintenanceEndDate, 'yyyy-MM-dd') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="czSignStart" label="是否开启初中生报名" align="center" width="150">
|
||||
<template #default="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.czSignStart"
|
||||
active-text="是"
|
||||
inactive-text="否"
|
||||
active-value="1"
|
||||
inactive-value="0"
|
||||
@change="changeSm(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="gzSignStart" label="高中生报名" align="center" width="120">
|
||||
<template #default="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.gzSignStart"
|
||||
active-text="是"
|
||||
inactive-text="否"
|
||||
active-value="1"
|
||||
inactive-value="0"
|
||||
@change="changeSm(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="jzxSignStart" label="技职校报名" align="center" width="120">
|
||||
<template #default="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.jzxSignStart"
|
||||
active-text="是"
|
||||
inactive-text="否"
|
||||
active-value="1"
|
||||
inactive-value="0"
|
||||
@change="changeSm(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="isPreStart" label="预登记" align="center" width="100">
|
||||
<template #default="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.isPreStart"
|
||||
active-text="是"
|
||||
inactive-text="否"
|
||||
active-value="1"
|
||||
inactive-value="0"
|
||||
@change="changeSm(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="200" align="center" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitstudentplangroup_edit"
|
||||
type="primary"
|
||||
link
|
||||
icon="EditPen"
|
||||
@click="addOrUpdateHandle(scope.row.id)"
|
||||
>
|
||||
调整
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitstudentplangroup_edit"
|
||||
type="primary"
|
||||
link
|
||||
icon="Setting"
|
||||
@click="majorHandle(scope.row)"
|
||||
>
|
||||
专业调整
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitstudentplangroup_del"
|
||||
type="danger"
|
||||
link
|
||||
icon="Delete"
|
||||
@click="deleteHandle(scope.row.id)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<pagination
|
||||
v-bind="state.pagination"
|
||||
@current-change="currentChangeHandle"
|
||||
@size-change="sizeChangeHandle"
|
||||
/>
|
||||
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<table-form v-if="addOrUpdateVisible" ref="addOrUpdateRef" @refreshDataList="getDataList" />
|
||||
<major-group-by-dept-form v-if="majorGroupByDeptVisible" ref="majorGroupByDeptRef" />
|
||||
<exam-people-index v-if="exitExamVisible" ref="examPeopleIndexRef" />
|
||||
</div>
|
||||
|
||||
<!-- 预登记二维码弹窗 -->
|
||||
<el-dialog v-model="dialogFormVisible" title="预登记二维码" width="10%" height="50%" @close="dialogFormVisible=false">
|
||||
<!-- <vue-qr :text="payQrcode" :size="200"></vue-qr>-->
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="recruitstudentplangroup">
|
||||
import { ref, reactive, computed, onMounted, nextTick, defineAsyncComponent } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useUserInfo } from '/@/stores/userInfo'
|
||||
import { BasicTableProps, useTable } from '/@/hooks/table'
|
||||
import { useMessage, useMessageBox } from '/@/hooks/message'
|
||||
import { delObj, fetchList, putObj } from '/@/api/recruit/recruitstudentplangroup'
|
||||
import { getTypeValue } from '/@/api/admin/dict'
|
||||
// import vueQr from 'vue-qr'
|
||||
|
||||
const TableForm = defineAsyncComponent(() => import('./enrolplantemplate-form.vue'))
|
||||
const MajorGroupByDeptForm = defineAsyncComponent(() => import('/@/views/recruit/recruitplanmajor/majorGroupByDept.vue'))
|
||||
const ExamPeopleIndex = defineAsyncComponent(() => import('/@/views/recruit/recruitexampeople/index.vue'))
|
||||
|
||||
// 使用 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
|
||||
})
|
||||
|
||||
// 消息提示 hooks
|
||||
const message = useMessage()
|
||||
const messageBox = useMessageBox()
|
||||
|
||||
// 表格引用
|
||||
const tableRef = ref()
|
||||
const searchFormRef = ref()
|
||||
const addOrUpdateRef = ref()
|
||||
const majorGroupByDeptRef = ref()
|
||||
const examPeopleIndexRef = ref()
|
||||
|
||||
// 弹窗状态
|
||||
const addOrUpdateVisible = ref(false)
|
||||
const majorGroupByDeptVisible = ref(false)
|
||||
const exitExamVisible = ref(false)
|
||||
const dialogFormVisible = ref(false)
|
||||
|
||||
// 数据
|
||||
const payQrcode = ref('')
|
||||
const yesNoList = ref<any[]>([])
|
||||
|
||||
// 查询表单
|
||||
const queryForm = reactive({
|
||||
groupName: ''
|
||||
})
|
||||
|
||||
// 日期格式化
|
||||
const dateFormat = (date: string, format: string) => {
|
||||
// return formatDate(date, format)
|
||||
}
|
||||
|
||||
// 表格状态
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
queryForm: queryForm,
|
||||
pageList: async (params: any) => {
|
||||
const response = await fetchList(params)
|
||||
return {
|
||||
data: {
|
||||
records: response.data.data.records,
|
||||
total: response.data.data.total
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
// 使用 table hook
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, tableStyle } = useTable(state)
|
||||
|
||||
// 初始化
|
||||
const init = async () => {
|
||||
try {
|
||||
const res = await getTypeValue('yes_no')
|
||||
yesNoList.value = res.data || []
|
||||
} catch (error) {
|
||||
console.error('获取字典失败', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 显示二维码
|
||||
const showQrCode = (row: any) => {
|
||||
payQrcode.value = '123'
|
||||
dialogFormVisible.value = true
|
||||
}
|
||||
|
||||
// 修改开关
|
||||
const changeSm = async (row: any) => {
|
||||
try {
|
||||
await putObj(row)
|
||||
message.success('修改成功')
|
||||
} catch (error: any) {
|
||||
message.error(error.msg || '修改失败')
|
||||
}
|
||||
}
|
||||
|
||||
// 新增 / 修改
|
||||
const addOrUpdateHandle = (id?: string) => {
|
||||
addOrUpdateVisible.value = true
|
||||
nextTick(() => {
|
||||
addOrUpdateRef.value?.init(id)
|
||||
})
|
||||
}
|
||||
|
||||
// 编辑审核人员
|
||||
const editExam = () => {
|
||||
exitExamVisible.value = true
|
||||
nextTick(() => {
|
||||
examPeopleIndexRef.value?.init()
|
||||
})
|
||||
}
|
||||
|
||||
// 专业调整
|
||||
const majorHandle = (row: any) => {
|
||||
majorGroupByDeptVisible.value = true
|
||||
nextTick(() => {
|
||||
majorGroupByDeptRef.value?.init(row)
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
const deleteHandle = async (id: string) => {
|
||||
try {
|
||||
await messageBox.confirm('是否确认删除本条数据?请谨慎操作')
|
||||
await delObj(id)
|
||||
message.success('删除成功')
|
||||
getDataList()
|
||||
} catch {
|
||||
// 用户取消
|
||||
}
|
||||
}
|
||||
|
||||
// 重置查询
|
||||
const resetQuery = () => {
|
||||
searchFormRef.value?.resetFields()
|
||||
Object.keys(queryForm).forEach(key => {
|
||||
queryForm[key] = ''
|
||||
})
|
||||
getDataList()
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
init()
|
||||
getDataList()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
150
src/views/recruit/recruitstudentschool/detaiform.vue
Normal file
150
src/views/recruit/recruitstudentschool/detaiform.vue
Normal file
@@ -0,0 +1,150 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="!dataForm.id ? '新增' : '修改'"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="140px">
|
||||
|
||||
<el-form-item label="招生计划" prop="groupId">
|
||||
<el-select v-model="dataForm.groupId" filterable :disabled="!dataForm.id ? false : true" placeholder="请选择招生计划" size="small" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in planList"
|
||||
:key="item.id"
|
||||
:label="item.groupName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="学校名称" prop="schoolName">
|
||||
<el-input v-model="dataForm.schoolName" placeholder="学校名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="对接学院" prop="xy">
|
||||
<el-select v-model="dataForm.xy" filterable clearable placeholder="请选择对接学院" size="small" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in deptList"
|
||||
:key="item.deptCode"
|
||||
:label="item.deptName"
|
||||
:value="item.deptCode">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="地区" prop="area">
|
||||
<el-select v-model="dataForm.area" filterable placeholder="请选择地区" size="small" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in areaList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()" v-if="canSubmit">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {addObj, areaList, getObj, putObj} from '@/api/recruit/recruitstudentschool'
|
||||
import {getDeptList} from "@/api/basic/basicclass";
|
||||
import {list} from "@/api/recruit/recruitstudentplangroup";
|
||||
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
canSubmit: false,
|
||||
dataForm: {
|
||||
id:"",
|
||||
groupId:"",
|
||||
area:"",
|
||||
xy:"",
|
||||
schoolName:"",
|
||||
},
|
||||
disabled:false,
|
||||
planList: [],
|
||||
areaList:[],
|
||||
deptList:[],
|
||||
dataRule: {
|
||||
groupId: [
|
||||
{ required: true, message: '招生计划不能为空', trigger: 'blur' },
|
||||
],
|
||||
schoolName: [
|
||||
{ required: true, message: '学校名称不能为空', trigger: 'blur' },
|
||||
{ min: 1, max: 20, message: '学校名称长度不大于20个字符', trigger: 'blur' }
|
||||
],
|
||||
|
||||
area: [
|
||||
{ required: true, message: '地区不能为空', trigger: 'blur' },
|
||||
],
|
||||
}
|
||||
}
|
||||
},
|
||||
created () {
|
||||
},
|
||||
methods: {
|
||||
init (id) {
|
||||
this.dataForm.id = id || null;
|
||||
this.visible = true;
|
||||
this.canSubmit = true;
|
||||
this.initData();
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
getObj(this.dataForm.id).then(response => {
|
||||
this.dataForm = response.data.data
|
||||
this.dataForm.area = this.dataForm.area+"";
|
||||
})
|
||||
}else{
|
||||
this.disabled = true;
|
||||
}
|
||||
})
|
||||
},
|
||||
initData() {
|
||||
//查询二级学院信息
|
||||
getDeptList().then(data => {
|
||||
this.deptList = data.data.data
|
||||
this.deptList.push({deptCode:"190",deptName:"招生就业处"})
|
||||
})
|
||||
list().then(data =>{
|
||||
this.planList = data.data.data
|
||||
if(!this.dataForm.id){
|
||||
this.dataForm.groupId=this.planList[0].id
|
||||
}
|
||||
});
|
||||
//获取所有省
|
||||
areaList({type:"0",parentId:112}).then(res=>{
|
||||
this.areaList = res.data.data;
|
||||
});
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit () {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.canSubmit = false;
|
||||
if (this.dataForm.id) {
|
||||
putObj(this.dataForm).then(data => {
|
||||
this.$notify.success('修改成功')
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
} else {
|
||||
addObj(this.dataForm).then(data => {
|
||||
this.$notify.success('添加成功')
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
265
src/views/recruit/recruitstudentschool/index.vue
Normal file
265
src/views/recruit/recruitstudentschool/index.vue
Normal file
@@ -0,0 +1,265 @@
|
||||
<!--
|
||||
- Copyright (c) 2018-2025, cyweb All rights reserved.
|
||||
-
|
||||
- Redistribution and use in source and binary forms, with or without
|
||||
- modification, are permitted provided that the following conditions are met:
|
||||
-
|
||||
- Redistributions of source code must retain the above copyright notice,
|
||||
- this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
- notice, this list of conditions and the following disclaimer in the
|
||||
- documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of the pig4cloud.com developer nor the names of its
|
||||
- contributors may be used to endorse or promote products derived from
|
||||
- this software without specific prior written permission.
|
||||
-
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<!-- 搜索表单 -->
|
||||
<el-form :model="queryForm" inline class="mb-4" ref="searchFormRef">
|
||||
<el-form-item label="招生计划" prop="groupId">
|
||||
<el-select v-model="queryForm.groupId" filterable clearable placeholder="请选择招生计划">
|
||||
<el-option
|
||||
v-for="item in planList"
|
||||
:key="item.id"
|
||||
:label="item.groupName"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="学校名称" prop="schoolName">
|
||||
<el-input v-model="queryForm.schoolName" clearable placeholder="学校名称" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="getDataList">查询</el-button>
|
||||
<el-button type="primary" plain icon="Refresh" class="ml10" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<div class="mb15">
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitstudentplangroup_add"
|
||||
type="primary"
|
||||
icon="FolderAdd"
|
||||
@click="addOrUpdateHandle"
|
||||
>
|
||||
新增
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
ref="tableRef"
|
||||
:data="state.dataList"
|
||||
v-loading="state.loading"
|
||||
border
|
||||
stripe
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="schoolName" label="学校名称" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="xy" label="对接学院" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{ getDeptName(scope.row.xy) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="area" label="所在区" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{ getAreaName(scope.row.area) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="150" align="center" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitstudentschool_edit"
|
||||
type="primary"
|
||||
link
|
||||
icon="EditPen"
|
||||
@click="addOrUpdateHandle(scope.row.id)"
|
||||
>
|
||||
修改
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitstudentschool_del"
|
||||
type="danger"
|
||||
link
|
||||
icon="Delete"
|
||||
@click="deleteHandle(scope.row.id)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<pagination
|
||||
v-bind="state.pagination"
|
||||
@current-change="currentChangeHandle"
|
||||
@size-change="sizeChangeHandle"
|
||||
/>
|
||||
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<table-form v-if="addOrUpdateVisible" ref="addOrUpdateRef" @refreshDataList="getDataList" />
|
||||
<major-group-by-dept-form v-if="majorGroupByDeptVisible" ref="majorGroupByDeptRef" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="recruitstudentschool">
|
||||
import { ref, reactive, computed, onMounted, nextTick, defineAsyncComponent } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useUserInfo } from '/@/stores/userInfo'
|
||||
import { BasicTableProps, useTable } from '/@/hooks/table'
|
||||
import { useMessage, useMessageBox } from '/@/hooks/message'
|
||||
import { list } from '/@/api/recruit/recruitstudentplangroup'
|
||||
import { delObj, fetchList, areaList } from '/@/api/recruit/recruitstudentschool'
|
||||
import { getDeptList } from '/@/api/basic/basicclass'
|
||||
|
||||
const TableForm = defineAsyncComponent(() => import('./detaiform.vue'))
|
||||
const MajorGroupByDeptForm = defineAsyncComponent(() => import('/@/views/recruit/recruitplanmajor/majorGroupByDept.vue'))
|
||||
|
||||
// 使用 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
|
||||
})
|
||||
|
||||
// 消息提示 hooks
|
||||
const message = useMessage()
|
||||
const messageBox = useMessageBox()
|
||||
|
||||
// 表格引用
|
||||
const tableRef = ref()
|
||||
const searchFormRef = ref()
|
||||
const addOrUpdateRef = ref()
|
||||
const majorGroupByDeptRef = ref()
|
||||
|
||||
// 弹窗状态
|
||||
const addOrUpdateVisible = ref(false)
|
||||
const majorGroupByDeptVisible = ref(false)
|
||||
|
||||
// 数据
|
||||
const planList = ref<any[]>([])
|
||||
const deptList = ref<any[]>([])
|
||||
const provinceList = ref<any[]>([])
|
||||
|
||||
// 查询表单
|
||||
const queryForm = reactive({
|
||||
groupId: '',
|
||||
schoolName: ''
|
||||
})
|
||||
|
||||
// 获取学院名称
|
||||
const getDeptName = (deptCode: string) => {
|
||||
const item = deptList.value.find(item => item.deptCode === deptCode)
|
||||
return item ? item.deptName : ''
|
||||
}
|
||||
|
||||
// 获取地区名称
|
||||
const getAreaName = (areaCode: string) => {
|
||||
const item = provinceList.value.find(item => item.code === areaCode)
|
||||
return item ? item.name : ''
|
||||
}
|
||||
|
||||
// 表格状态
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
queryForm: queryForm,
|
||||
pageList: async (params: any) => {
|
||||
const response = await fetchList(params)
|
||||
return {
|
||||
data: {
|
||||
records: response.data.data.records,
|
||||
total: response.data.data.total
|
||||
}
|
||||
}
|
||||
},
|
||||
createdIsNeed: false
|
||||
})
|
||||
|
||||
// 使用 table hook
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, tableStyle } = useTable(state)
|
||||
|
||||
// 初始化
|
||||
const init = async () => {
|
||||
try {
|
||||
// 查询二级学院信息
|
||||
const deptData = await getDeptList()
|
||||
deptList.value = deptData.data.data || []
|
||||
deptList.value.push({ deptCode: '190', deptName: '招生就业处' })
|
||||
|
||||
// 获取所有省
|
||||
const areaData = await areaList({ type: '0', parentId: 112 })
|
||||
provinceList.value = areaData.data.data || []
|
||||
|
||||
// 获取招生计划列表
|
||||
const planData = await list()
|
||||
planList.value = planData.data.data || []
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
}
|
||||
getDataList()
|
||||
} catch (error) {
|
||||
console.error('初始化失败', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 新增 / 修改
|
||||
const addOrUpdateHandle = (id?: string) => {
|
||||
addOrUpdateVisible.value = true
|
||||
nextTick(() => {
|
||||
addOrUpdateRef.value?.init(id)
|
||||
})
|
||||
}
|
||||
|
||||
// 专业调整
|
||||
const majorHandle = (row: any) => {
|
||||
majorGroupByDeptVisible.value = true
|
||||
nextTick(() => {
|
||||
majorGroupByDeptRef.value?.init(row)
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
const deleteHandle = async (id: string) => {
|
||||
try {
|
||||
await messageBox.confirm('是否确认删除本条数据?请谨慎操作')
|
||||
await delObj(id)
|
||||
message.success('删除成功')
|
||||
getDataList()
|
||||
} catch {
|
||||
// 用户取消
|
||||
}
|
||||
}
|
||||
|
||||
// 重置查询
|
||||
const resetQuery = () => {
|
||||
searchFormRef.value?.resetFields()
|
||||
Object.keys(queryForm).forEach(key => {
|
||||
queryForm[key] = ''
|
||||
})
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
}
|
||||
getDataList()
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
init()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
31
src/views/recruit/recruitstudentsignup/areaStatic.vue
Normal file
31
src/views/recruit/recruitstudentsignup/areaStatic.vue
Normal file
@@ -0,0 +1,31 @@
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-tabs v-model="activeName" @tab-click="handleTabClick">
|
||||
<el-tab-pane label="初中生" name="tab">
|
||||
<AreaStaticByCZ ref="tabIndexRef" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="recruitstudentsignup-areaStatic">
|
||||
import { ref, defineAsyncComponent, nextTick } from 'vue'
|
||||
|
||||
const AreaStaticByCZ = defineAsyncComponent(() => import('./areaStaticByCZ.vue'))
|
||||
|
||||
// 状态
|
||||
const activeName = ref('tab')
|
||||
const tabIndexRef = ref()
|
||||
|
||||
// Tab 切换
|
||||
const handleTabClick = (tab: any) => {
|
||||
if (tab.paneName === 'tab') {
|
||||
nextTick(() => {
|
||||
tabIndexRef.value?.init()
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
152
src/views/recruit/recruitstudentsignup/areaStaticByCZ.vue
Normal file
152
src/views/recruit/recruitstudentsignup/areaStaticByCZ.vue
Normal file
@@ -0,0 +1,152 @@
|
||||
<template>
|
||||
<div class="mod-config">
|
||||
<basic-container>
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="init()" ref="searchForm">
|
||||
<el-form-item label="招生计划" prop="groupId">
|
||||
<el-select v-model="dataForm.groupId" filterable placeholder="请选择招生计划" size="small" >
|
||||
<el-option
|
||||
v-for="item in planList"
|
||||
:key="item.id"
|
||||
:label="item.groupName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button icon="el-icon-search" type="primary" size="small"
|
||||
@click="handleFilter()">查询
|
||||
</el-button>
|
||||
<el-button icon="el-icon-delete" type="normal" plain size="small"
|
||||
@click="resetForm('searchForm')">清空
|
||||
</el-button>
|
||||
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-form>
|
||||
<el-form-item>
|
||||
<el-button icon="el-icon-download" type="warning" size="small" @click="dataExportHandle()">导出</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="avue-crud">
|
||||
<el-table :data="list" border stripe v-loading="dataListLoading"
|
||||
:summary-method="getSummaries" show-summary
|
||||
>
|
||||
<el-table-column align="center" header-align="center" prop="provinceName" label="省市" />
|
||||
<el-table-column align="center" header-align="center" prop="peopleNum" label="人数" />
|
||||
<el-table-column align="center" header-align="center" prop="peopleRate" label="占比" />
|
||||
</el-table>
|
||||
|
||||
<chart ref="typeEchartBar" style="width:100%;margin-top:80px" :options="chartOption" theme="macarons" ></chart>
|
||||
|
||||
</div>
|
||||
</basic-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getAreaStatic} from "@/api/recruit/recruitstudentsignup";
|
||||
import {list} from "@/api/recruit/recruitstudentplangroup";
|
||||
require('echarts/lib/chart/bar');
|
||||
require('echarts/lib/chart/line');
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dataForm: {groupId:""},
|
||||
list: [],
|
||||
planList:[],
|
||||
dataListLoading: false,
|
||||
chartOption: {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
created () {
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
init(){
|
||||
let _this = this;
|
||||
list().then(data =>{
|
||||
_this.planList = data.data.data
|
||||
_this.dataForm.groupId=_this.planList[0].id;
|
||||
this.getDataList();
|
||||
});
|
||||
},
|
||||
getDataList(){
|
||||
this.list = [];
|
||||
this.indexArray=[];
|
||||
this.dataForm.degreeOfEducation='1';
|
||||
getAreaStatic(this.dataForm).then(response =>{
|
||||
this.list = response.data.data.data;
|
||||
this.chartOption = response.data.data.option
|
||||
})
|
||||
},
|
||||
exportExcel: function(form,url) {
|
||||
return axios({ // 用axios发送post请求
|
||||
method: 'post',
|
||||
url: url, // 请求地址
|
||||
data: form, // 参数
|
||||
responseType: 'blob', // 表明返回服务器返回的数据类型
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 导出表格
|
||||
*/
|
||||
dataExportHandle() {
|
||||
this.exportLoading = true
|
||||
this.exportExcel(this.dataForm,'/recruit/recruitstudentsignup/getAreaStaticExport').then(res => { // 处理返回的文件流
|
||||
console.log(res)
|
||||
const blob = new Blob([res.data]);
|
||||
const fileName = '按地区导出.xls';
|
||||
const elink = document.createElement('a');
|
||||
elink.download = fileName;
|
||||
elink.style.display = 'none';
|
||||
elink.href = URL.createObjectURL(blob);
|
||||
document.body.appendChild(elink);
|
||||
elink.click();
|
||||
URL.revokeObjectURL(elink.href); // 释放URL 对象
|
||||
document.body.removeChild(elink);
|
||||
})
|
||||
},
|
||||
getSummaries(param) {
|
||||
const { columns, data } = param
|
||||
const sums = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '总计'
|
||||
} else if (index != 0 ) {
|
||||
const values = data.map(item => Number(item[column.property]))
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value) ) {
|
||||
let value = prev + curr;
|
||||
return value
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0);
|
||||
} else {
|
||||
sums[index] = '--'
|
||||
}
|
||||
} else {
|
||||
sums[index] = '--'
|
||||
}
|
||||
})
|
||||
return sums
|
||||
},
|
||||
|
||||
handleFilter(){
|
||||
this.getDataList();
|
||||
},
|
||||
|
||||
resetForm(formName) {
|
||||
this.$refs[formName].resetFields();
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
155
src/views/recruit/recruitstudentsignup/areaStaticByOther.vue
Normal file
155
src/views/recruit/recruitstudentsignup/areaStaticByOther.vue
Normal file
@@ -0,0 +1,155 @@
|
||||
<template>
|
||||
<div class="mod-config">
|
||||
<basic-container>
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="init()" ref="searchForm">
|
||||
<el-form-item label="招生计划" prop="groupId">
|
||||
<el-select v-model="dataForm.groupId" filterable placeholder="请选择招生计划" size="small" >
|
||||
<el-option
|
||||
v-for="item in planList"
|
||||
:key="item.id"
|
||||
:label="item.groupName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button icon="el-icon-search" type="primary" size="small"
|
||||
@click="handleFilter()">查询
|
||||
</el-button>
|
||||
<el-button icon="el-icon-delete" type="normal" plain size="small"
|
||||
@click="resetForm('searchForm')">清空
|
||||
</el-button>
|
||||
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="avue-crud">
|
||||
<el-table :data="list" border stripe :span-method="objectSpanMethod" v-loading="dataListLoading"
|
||||
:summary-method="getSummaries" show-summary :row-style="changeRowColor"
|
||||
>
|
||||
<el-table-column align="center" header-align="center" prop="deptName" label="部门" />
|
||||
<el-table-column align="center" header-align="center" prop="contantName" label="联系人" />
|
||||
<el-table-column align="center" header-align="center" prop="peopleNum" label="招生人数" />
|
||||
<el-table-column align="center" header-align="center" prop="czNum" label="初中生" />
|
||||
<el-table-column align="center" header-align="center" prop="gzNum" label="高中生" />
|
||||
<el-table-column align="center" header-align="center" prop="jzxNum" label="技职校" />
|
||||
<el-table-column align="center" header-align="center" prop="allNum" label="高中+技职校" />
|
||||
</el-table>
|
||||
</div>
|
||||
</basic-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getContantByUserStatic} from "@/api/recruit/recruitstudentsignup";
|
||||
import {list} from "@/api/recruit/recruitstudentplangroup";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dataForm: {groupId:""},
|
||||
list: [],
|
||||
planList:[],
|
||||
indexArray: [],
|
||||
dataListLoading: false,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
created () {
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
init(){
|
||||
let _this = this;
|
||||
list().then(data =>{
|
||||
_this.planList = data.data.data
|
||||
_this.dataForm.groupId=_this.planList[0].id;
|
||||
this.getDataList();
|
||||
});
|
||||
},
|
||||
getDataList(){
|
||||
this.list = [];
|
||||
this.indexArray=[];
|
||||
getContantByUserStatic(this.dataForm).then(response =>{
|
||||
this.list = response.data.data;
|
||||
let count = 0
|
||||
for (let rowIndex = 0; rowIndex < this.list.length; ) {
|
||||
this.indexArray.push(rowIndex)
|
||||
count = this.getRows(rowIndex, this.list[rowIndex].deptName)
|
||||
rowIndex += count
|
||||
}
|
||||
})
|
||||
},
|
||||
changeRowColor ({ row }) {
|
||||
if (row.contantName === "小记") { // 变颜色的条件
|
||||
return {
|
||||
color: "red"
|
||||
}
|
||||
}
|
||||
},
|
||||
getSummaries(param) {
|
||||
const { columns, data } = param
|
||||
const sums = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '总计'
|
||||
} else if (index != 0 && index !=1) {
|
||||
const values = data.map(item => Number(item[column.property]))
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value) ) {
|
||||
let value = prev + curr;
|
||||
return value
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0)/2;
|
||||
} else {
|
||||
sums[index] = '--'
|
||||
}
|
||||
} else {
|
||||
sums[index] = '--'
|
||||
}
|
||||
})
|
||||
return sums
|
||||
},
|
||||
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
if (columnIndex === 0) {
|
||||
let rowCount = 0
|
||||
if (this.indexArray.includes(rowIndex)) {
|
||||
rowCount = this.getRows(rowIndex, row.deptName)
|
||||
return {
|
||||
rowspan: rowCount,
|
||||
colspan: 1
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
rowspan: 0,
|
||||
colspan: 0
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
getRows(rowIndex, name) {
|
||||
let count = 0
|
||||
for (let i = rowIndex; i < this.list.length; i++) {
|
||||
if (this.list[i].deptName === name) {
|
||||
count++
|
||||
} else {
|
||||
break
|
||||
}
|
||||
}
|
||||
return count
|
||||
},
|
||||
handleFilter(){
|
||||
this.getDataList();
|
||||
},
|
||||
|
||||
resetForm(formName) {
|
||||
this.$refs[formName].resetFields();
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
147
src/views/recruit/recruitstudentsignup/contanctByDeptStatic.vue
Normal file
147
src/views/recruit/recruitstudentsignup/contanctByDeptStatic.vue
Normal file
@@ -0,0 +1,147 @@
|
||||
<template>
|
||||
<div class="mod-config">
|
||||
<basic-container>
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="init()" ref="searchForm">
|
||||
<el-form-item label="招生计划" prop="groupId">
|
||||
<el-select v-model="dataForm.groupId" filterable placeholder="请选择招生计划" size="small" >
|
||||
<el-option
|
||||
v-for="item in planList"
|
||||
:key="item.id"
|
||||
:label="item.groupName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button icon="el-icon-search" type="primary" size="small"
|
||||
@click="handleFilter()">查询
|
||||
</el-button>
|
||||
<el-button icon="el-icon-delete" type="normal" plain size="small"
|
||||
@click="resetForm('searchForm')">清空
|
||||
</el-button>
|
||||
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-form>
|
||||
<el-form-item>
|
||||
<el-button icon="el-icon-download" type="warning" size="small" @click="dataExportHandle()">导出</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="avue-crud">
|
||||
<el-table :data="list" border stripe v-loading="dataListLoading"
|
||||
:summary-method="getSummaries" show-summary
|
||||
>
|
||||
<el-table-column align="center" header-align="center" prop="deptName" label="部门" />
|
||||
<el-table-column align="center" header-align="center" prop="allNum" label="合计" />
|
||||
<el-table-column align="center" header-align="center" prop="schoolNum" label="学校推荐" />
|
||||
<el-table-column align="center" header-align="center" prop="contantNum" label="联系人" />
|
||||
</el-table>
|
||||
</div>
|
||||
</basic-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getContantByDeptStatic} from "@/api/recruit/recruitstudentsignup";
|
||||
import {list} from "@/api/recruit/recruitstudentplangroup";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dataForm: {groupId:""},
|
||||
list: [],
|
||||
planList:[],
|
||||
dataListLoading: false,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
created () {
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
init(){
|
||||
let _this = this;
|
||||
list().then(data =>{
|
||||
_this.planList = data.data.data
|
||||
_this.dataForm.groupId=_this.planList[0].id;
|
||||
this.getDataList();
|
||||
});
|
||||
},
|
||||
getDataList(){
|
||||
this.list = [];
|
||||
this.indexArray=[];
|
||||
getContantByDeptStatic(this.dataForm).then(response =>{
|
||||
this.list = response.data.data;
|
||||
})
|
||||
},
|
||||
exportExcel: function(form,url) {
|
||||
return axios({ // 用axios发送post请求
|
||||
method: 'post',
|
||||
url: url, // 请求地址
|
||||
data: form, // 参数
|
||||
responseType: 'blob', // 表明返回服务器返回的数据类型
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 导出表格
|
||||
*/
|
||||
dataExportHandle() {
|
||||
this.exportLoading = true
|
||||
this.exportExcel(this.dataForm,'/recruit/recruitstudentsignup/getContantByDeptStaticExport').then(res => { // 处理返回的文件流
|
||||
console.log(res)
|
||||
const blob = new Blob([res.data]);
|
||||
const fileName = '按部门导出.xls';
|
||||
const elink = document.createElement('a');
|
||||
elink.download = fileName;
|
||||
elink.style.display = 'none';
|
||||
elink.href = URL.createObjectURL(blob);
|
||||
document.body.appendChild(elink);
|
||||
elink.click();
|
||||
URL.revokeObjectURL(elink.href); // 释放URL 对象
|
||||
document.body.removeChild(elink);
|
||||
})
|
||||
},
|
||||
getSummaries(param) {
|
||||
const { columns, data } = param
|
||||
const sums = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '总计'
|
||||
} else if (index != 0) {
|
||||
const values = data.map(item => Number(item[column.property]))
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value) ) {
|
||||
let value = prev + curr;
|
||||
return value
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0);
|
||||
} else {
|
||||
sums[index] = '--'
|
||||
}
|
||||
} else {
|
||||
sums[index] = '--'
|
||||
}
|
||||
})
|
||||
return sums
|
||||
},
|
||||
|
||||
|
||||
handleFilter(){
|
||||
this.getDataList();
|
||||
},
|
||||
|
||||
resetForm(formName) {
|
||||
this.$refs[formName].resetFields();
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
190
src/views/recruit/recruitstudentsignup/contanctByUserStatic.vue
Normal file
190
src/views/recruit/recruitstudentsignup/contanctByUserStatic.vue
Normal file
@@ -0,0 +1,190 @@
|
||||
<template>
|
||||
<div class="mod-config">
|
||||
<basic-container>
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="init()" ref="searchForm">
|
||||
<el-form-item label="招生计划" prop="groupId">
|
||||
<el-select v-model="dataForm.groupId" filterable placeholder="请选择招生计划" size="small" >
|
||||
<el-option
|
||||
v-for="item in planList"
|
||||
:key="item.id"
|
||||
:label="item.groupName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button icon="el-icon-search" type="primary" size="small"
|
||||
@click="handleFilter()">查询
|
||||
</el-button>
|
||||
<el-button icon="el-icon-delete" type="normal" plain size="small"
|
||||
@click="resetForm('searchForm')">清空
|
||||
</el-button>
|
||||
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-form>
|
||||
<el-form-item>
|
||||
<el-button icon="el-icon-download" type="warning" size="small" @click="dataExportHandle()">导出</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="avue-crud">
|
||||
<el-table :data="list" border stripe :span-method="objectSpanMethod" v-loading="dataListLoading"
|
||||
:summary-method="getSummaries" show-summary :row-style="changeRowColor"
|
||||
>
|
||||
<el-table-column align="center" header-align="center" prop="deptName" label="部门" />
|
||||
<el-table-column align="center" header-align="center" prop="contantName" label="联系人" />
|
||||
<el-table-column align="center" header-align="center" prop="peopleNum" label="招生人数" />
|
||||
<el-table-column align="center" header-align="center" prop="czNum" label="初中生" />
|
||||
<el-table-column align="center" header-align="center" prop="gzNum" label="高中生" />
|
||||
<el-table-column align="center" header-align="center" prop="jzxNum" label="技职校" />
|
||||
<el-table-column align="center" header-align="center" prop="allNum" label="高中+技职校" />
|
||||
</el-table>
|
||||
</div>
|
||||
</basic-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getContantByUserStatic} from "@/api/recruit/recruitstudentsignup";
|
||||
import {list} from "@/api/recruit/recruitstudentplangroup";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dataForm: {groupId:""},
|
||||
list: [],
|
||||
planList:[],
|
||||
indexArray: [],
|
||||
dataListLoading: false,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
created () {
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
init(){
|
||||
let _this = this;
|
||||
list().then(data =>{
|
||||
_this.planList = data.data.data
|
||||
_this.dataForm.groupId=_this.planList[0].id;
|
||||
this.getDataList();
|
||||
});
|
||||
},
|
||||
getDataList(){
|
||||
this.list = [];
|
||||
this.indexArray=[];
|
||||
getContantByUserStatic(this.dataForm).then(response =>{
|
||||
this.list = response.data.data;
|
||||
let count = 0
|
||||
for (let rowIndex = 0; rowIndex < this.list.length; ) {
|
||||
this.indexArray.push(rowIndex)
|
||||
count = this.getRows(rowIndex, this.list[rowIndex].deptName)
|
||||
rowIndex += count
|
||||
}
|
||||
})
|
||||
},
|
||||
exportExcel: function(form,url) {
|
||||
return axios({ // 用axios发送post请求
|
||||
method: 'post',
|
||||
url: url, // 请求地址
|
||||
data: form, // 参数
|
||||
responseType: 'blob', // 表明返回服务器返回的数据类型
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 导出表格
|
||||
*/
|
||||
dataExportHandle() {
|
||||
this.exportLoading = true
|
||||
this.exportExcel(this.dataForm,'/recruit/recruitstudentsignup/getContantByUserStaticExport').then(res => { // 处理返回的文件流
|
||||
console.log(res)
|
||||
const blob = new Blob([res.data]);
|
||||
const fileName = '按联系人导出.xls';
|
||||
const elink = document.createElement('a');
|
||||
elink.download = fileName;
|
||||
elink.style.display = 'none';
|
||||
elink.href = URL.createObjectURL(blob);
|
||||
document.body.appendChild(elink);
|
||||
elink.click();
|
||||
URL.revokeObjectURL(elink.href); // 释放URL 对象
|
||||
document.body.removeChild(elink);
|
||||
})
|
||||
},
|
||||
changeRowColor ({ row }) {
|
||||
if (row.contantName === "小记") { // 变颜色的条件
|
||||
return {
|
||||
color: "red"
|
||||
}
|
||||
}
|
||||
},
|
||||
getSummaries(param) {
|
||||
const { columns, data } = param
|
||||
const sums = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '总计'
|
||||
} else if (index != 0 && index !=1) {
|
||||
const values = data.map(item => Number(item[column.property]))
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value) ) {
|
||||
let value = prev + curr;
|
||||
return value
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0)/2;
|
||||
} else {
|
||||
sums[index] = '--'
|
||||
}
|
||||
} else {
|
||||
sums[index] = '--'
|
||||
}
|
||||
})
|
||||
return sums
|
||||
},
|
||||
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
if (columnIndex === 0) {
|
||||
let rowCount = 0
|
||||
if (this.indexArray.includes(rowIndex)) {
|
||||
rowCount = this.getRows(rowIndex, row.deptName)
|
||||
return {
|
||||
rowspan: rowCount,
|
||||
colspan: 1
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
rowspan: 0,
|
||||
colspan: 0
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
getRows(rowIndex, name) {
|
||||
let count = 0
|
||||
for (let i = rowIndex; i < this.list.length; i++) {
|
||||
if (this.list[i].deptName === name) {
|
||||
count++
|
||||
} else {
|
||||
break
|
||||
}
|
||||
}
|
||||
return count
|
||||
},
|
||||
handleFilter(){
|
||||
this.getDataList();
|
||||
},
|
||||
|
||||
resetForm(formName) {
|
||||
this.$refs[formName].resetFields();
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
40
src/views/recruit/recruitstudentsignup/contanctStatic.vue
Normal file
40
src/views/recruit/recruitstudentsignup/contanctStatic.vue
Normal file
@@ -0,0 +1,40 @@
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-tabs v-model="activeName" @tab-click="handleTabClick">
|
||||
<el-tab-pane label="按联系人统计" name="tab">
|
||||
<ContanctByUserStatic ref="tabIndexRef" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="按部门统计" name="static">
|
||||
<ContanctByDeptStatic ref="staticIndexRef" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="recruitstudentsignup-contanctStatic">
|
||||
import { ref, defineAsyncComponent, nextTick } from 'vue'
|
||||
|
||||
const ContanctByUserStatic = defineAsyncComponent(() => import('./contanctByUserStatic.vue'))
|
||||
const ContanctByDeptStatic = defineAsyncComponent(() => import('./contanctByDeptStatic.vue'))
|
||||
|
||||
// 状态
|
||||
const activeName = ref('tab')
|
||||
const tabIndexRef = ref()
|
||||
const staticIndexRef = ref()
|
||||
|
||||
// Tab 切换
|
||||
const handleTabClick = (tab: any) => {
|
||||
if (tab.paneName === 'tab') {
|
||||
nextTick(() => {
|
||||
tabIndexRef.value?.init()
|
||||
})
|
||||
} else {
|
||||
nextTick(() => {
|
||||
staticIndexRef.value?.init()
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
1283
src/views/recruit/recruitstudentsignup/detaiform.vue
Normal file
1283
src/views/recruit/recruitstudentsignup/detaiform.vue
Normal file
File diff suppressed because it is too large
Load Diff
154
src/views/recruit/recruitstudentsignup/dormFW.vue
Normal file
154
src/views/recruit/recruitstudentsignup/dormFW.vue
Normal file
@@ -0,0 +1,154 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="请设置住宿范围"
|
||||
append-to-body
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="visible"
|
||||
width="90%" heigth="90%"
|
||||
>
|
||||
<div style="height: 100%;width:100%">
|
||||
<el-form :model="form" :rules="rules" ref="form" label-width="120px"
|
||||
class="demo-ruleForm">
|
||||
|
||||
<el-form-item label="住宿半径(米)" prop="raidus">
|
||||
<el-input-number v-model="form.raidus" :min="0" style="width: 100%"></el-input-number>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div id="container"></div>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="dataFormSubmit">确定</el-button>
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import {BMPGL, changeMajor} from "@/api/recruit/recruitstudentsignup";
|
||||
import {putItemObj} from "@/api/admin/dict";
|
||||
import {getTypeValue} from "@/api/admin/dict";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
ak: "V0ooaf2RZyEGOkD8UzZB3gvw7pCb0Kx7", // 百度的地图密钥
|
||||
visible:false,
|
||||
canSubmit:false,
|
||||
circleShow:false,
|
||||
circle:"",
|
||||
// 地址信息
|
||||
address: null,
|
||||
center: { lng: 0, lat: 0 },
|
||||
form:{
|
||||
raidus:0,
|
||||
},
|
||||
dictId:"",
|
||||
rules: {
|
||||
raidus: [
|
||||
{required: true, message: '住宿半径不能为空', trigger: ["blur", "change"]}
|
||||
],
|
||||
},
|
||||
circleArr : [],
|
||||
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'form.raidus': {
|
||||
handler(newVal) {
|
||||
if(newVal !='' && newVal !=undefined){
|
||||
this.circle.setRadius(newVal); //设置圆形覆盖物的半径
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(){
|
||||
let _this = this;
|
||||
this.visible = true;
|
||||
this.canSubmit = true;
|
||||
this.circleShow = true;
|
||||
this.$nextTick(() => {
|
||||
getTypeValue("dorm_jw").then(data=>{
|
||||
let arr = data.data.data;
|
||||
arr.forEach(e=>{
|
||||
if(e.label=='bj'){
|
||||
_this.form.raidus=e.value;
|
||||
_this.dictId = e.id;
|
||||
}else if(e.label=='lng'){
|
||||
_this.center.lng=e.value;
|
||||
}else if(e.label=='lat'){
|
||||
_this.center.lat=e.value;
|
||||
}
|
||||
});
|
||||
BMPGL(_this.ak).then((BMapGL) => {
|
||||
// 创建地图实例
|
||||
let map = new BMapGL.Map("container");
|
||||
// 创建点坐标 axios => res 获取的初始化定位坐标
|
||||
let point = new BMapGL.Point(_this.center.lng, _this.center.lat)
|
||||
// 初始化地图,设置中心点坐标和地图级别
|
||||
map.centerAndZoom(point, 13)
|
||||
//开启鼠标滚轮缩放
|
||||
map.enableScrollWheelZoom(true)
|
||||
|
||||
// 绘制圆
|
||||
this.circle = new BMapGL.Circle(new BMapGL.Point(_this.center.lng, _this.center.lat), this.form.raidus, {
|
||||
strokeColor: 'blue',
|
||||
strokeWeight: 2,
|
||||
strokeOpacity: 0.5,
|
||||
enableEditing:false
|
||||
});
|
||||
map.addOverlay(this.circle);
|
||||
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
let _this = this;
|
||||
this.$confirm("是否确认保存住宿半径" , '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(function() {
|
||||
_this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
_this.canSubmit = false;
|
||||
putItemObj({id:_this.dictId,value:_this.form.raidus}).then(() => {
|
||||
_this.$message({
|
||||
showClose: true,
|
||||
message: '修改成功',
|
||||
type: 'success'
|
||||
})
|
||||
_this.visible = false
|
||||
_this.canSubmit = true;
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
}).then(data => {
|
||||
|
||||
}).catch(function(err) { })
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
#container {
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
height: 700px;
|
||||
margin: 0;
|
||||
font-family: "微软雅黑";
|
||||
}
|
||||
ul li {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
</style>
|
||||
157
src/views/recruit/recruitstudentsignup/dorm_analysis.vue
Normal file
157
src/views/recruit/recruitstudentsignup/dorm_analysis.vue
Normal file
@@ -0,0 +1,157 @@
|
||||
<template>
|
||||
<div class="mod-config">
|
||||
|
||||
<basic-container>
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()" ref="searchForm">
|
||||
<el-form-item label="招生计划" prop="groupId">
|
||||
<el-select v-model="dataForm.groupId" filterable clearable placeholder="请选择招生计划" size="small"
|
||||
style="width: 150px;">
|
||||
<el-option
|
||||
v-for="item in planList"
|
||||
:key="item.id"
|
||||
:label="item.groupName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="warning"
|
||||
icon="el-icon-download"
|
||||
size="small"
|
||||
@click="handleExport()">汇总导出</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
:data="dataList"
|
||||
border
|
||||
stripe
|
||||
show-summary
|
||||
v-loading="dataListLoading">
|
||||
|
||||
<el-table-column
|
||||
prop="xy"
|
||||
header-align="center"
|
||||
align="center"
|
||||
width="120"
|
||||
label="学院">
|
||||
<template slot-scope="scope">
|
||||
<span>{{
|
||||
global.getLabelValueByPropes(deptList, scope.row.xy, {
|
||||
'key': 'deptCode',
|
||||
'value': 'deptName'
|
||||
})
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="total"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="申请人数(范围外)">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="man"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="男生数">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="woman"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="女生数">
|
||||
</el-table-column>
|
||||
|
||||
|
||||
</el-table>
|
||||
|
||||
</basic-container>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
import {mapGetters} from 'vuex'
|
||||
import {getDeptList} from "@/api/basic/basicclass";
|
||||
import {dormApplyAnalysis} from "@/api/recruit/recruitstudentsignup";
|
||||
import {list} from '@/api/recruit/recruitstudentplangroup'
|
||||
import global from '@/components/tools/commondict'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
deptList: [],
|
||||
dataList: [],
|
||||
planList: [],
|
||||
dataListLoading: false,
|
||||
global:global,
|
||||
dataForm: {
|
||||
groupId: ''
|
||||
},
|
||||
}
|
||||
},
|
||||
components: {},
|
||||
created() {
|
||||
this.initDept()
|
||||
this.initPlanGroup()
|
||||
},
|
||||
watch:{
|
||||
"dataForm.groupId":{
|
||||
handler(val){
|
||||
this.getTableList(val)
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['permissions'])
|
||||
},
|
||||
methods: {
|
||||
initDept() {
|
||||
getDeptList().then(data => {
|
||||
this.deptList = data.data.data
|
||||
})
|
||||
|
||||
},
|
||||
exportExcel: function(form,url) {
|
||||
return axios({ // 用axios发送post请求
|
||||
method: 'post',
|
||||
url: url, // 请求地址
|
||||
data: form, // 参数
|
||||
responseType: 'blob', // 表明返回服务器返回的数据类型
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
},
|
||||
handleExport(){
|
||||
this.exportExcel(this.dataForm,'/recruit/recruitstudentsignup/dormApplyAnalysisExport').then(res => { // 处理返回的文件流
|
||||
const blob = new Blob([res.data]);
|
||||
const elink = document.createElement('a');
|
||||
elink.download = "新生住宿申请汇总.xls";
|
||||
elink.style.display = 'none';
|
||||
elink.href = URL.createObjectURL(blob);
|
||||
document.body.appendChild(elink);
|
||||
elink.click();
|
||||
URL.revokeObjectURL(elink.href); // 释放URL 对象
|
||||
document.body.removeChild(elink);
|
||||
}).catch(function(err){
|
||||
})
|
||||
},
|
||||
initPlanGroup(){
|
||||
list().then(data =>{
|
||||
this.planList = data.data.data
|
||||
this.dataForm.groupId=this.planList[0].id;
|
||||
});
|
||||
},
|
||||
getTableList(groupId){
|
||||
dormApplyAnalysis({"groupId":groupId}).then(response => {
|
||||
this.dataList = response.data.data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
127
src/views/recruit/recruitstudentsignup/inSchoolSocreStatic.vue
Normal file
127
src/views/recruit/recruitstudentsignup/inSchoolSocreStatic.vue
Normal file
@@ -0,0 +1,127 @@
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<header style="font-size: 40px; text-align: center; margin-bottom: 20px;">
|
||||
历年常州地区初中生分数段人数统计(本省本市、初中生源)
|
||||
</header>
|
||||
|
||||
<div class="mb15">
|
||||
<el-button type="warning" plain icon="Download" :loading="exportLoading" @click="dataExportHandle">导出</el-button>
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
:data="dataList"
|
||||
border
|
||||
stripe
|
||||
v-loading="dataListLoading"
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
>
|
||||
<el-table-column prop="socre" header-align="center" align="center" label="分数段" />
|
||||
<el-table-column
|
||||
v-for="(item, index) in headList"
|
||||
:key="index"
|
||||
:prop="item.year"
|
||||
:label="item.year"
|
||||
header-align="center"
|
||||
>
|
||||
<el-table-column
|
||||
:prop="item.propOne"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="人数"
|
||||
/>
|
||||
<el-table-column
|
||||
:prop="item.propTwo"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="占比"
|
||||
/>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="recruitstudentsignup-inSchoolSocreStatic">
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { useTable } from '/@/hooks/table'
|
||||
import { useMessage } from '/@/hooks/message'
|
||||
import { inSchoolSocreStatic } from '/@/api/recruit/recruitstudentsignup'
|
||||
import { list } from '/@/api/recruit/recruitstudentplangroup'
|
||||
import { getDeptListByLevelTwo } from '/@/api/basic/basicdept'
|
||||
|
||||
// 消息提示 hooks
|
||||
const message = useMessage()
|
||||
|
||||
// 状态
|
||||
const headList = ref<any[]>([])
|
||||
const deptCodes = ref<any[]>([])
|
||||
const planList = ref<any[]>([])
|
||||
const dataList = ref<any[]>([])
|
||||
const dataListLoading = ref(false)
|
||||
const exportLoading = ref(false)
|
||||
|
||||
// 查询表单
|
||||
const queryForm = reactive({
|
||||
groupId: ''
|
||||
})
|
||||
|
||||
// 使用 table hook 获取样式
|
||||
const { tableStyle, downBlobFile } = useTable()
|
||||
|
||||
// 初始化
|
||||
const init = async () => {
|
||||
try {
|
||||
const [deptResponse, planData] = await Promise.all([
|
||||
getDeptListByLevelTwo(),
|
||||
list()
|
||||
])
|
||||
|
||||
deptCodes.value = deptResponse.data.data || []
|
||||
planList.value = planData.data.data || []
|
||||
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
getDataList()
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('初始化失败', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 获取数据列表
|
||||
const getDataList = async () => {
|
||||
try {
|
||||
dataListLoading.value = true
|
||||
dataList.value = []
|
||||
const response = await inSchoolSocreStatic(queryForm)
|
||||
if (response.data.data && response.data.data.length > 0) {
|
||||
response.data.data.forEach((e: any) => {
|
||||
dataList.value.push(e.map)
|
||||
})
|
||||
headList.value = response.data.data[0].list || []
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取数据失败', error)
|
||||
} finally {
|
||||
dataListLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 导出
|
||||
const dataExportHandle = async () => {
|
||||
try {
|
||||
exportLoading.value = true
|
||||
await downBlobFile('/recruit/recruitstudentsignup/inSchoolSocreStaticExport', queryForm, '历年常州地区初中生分数段统计.xls')
|
||||
} catch (error: any) {
|
||||
message.error(error.msg || '导出失败')
|
||||
} finally {
|
||||
exportLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
init()
|
||||
})
|
||||
</script>
|
||||
1192
src/views/recruit/recruitstudentsignup/index.vue
Normal file
1192
src/views/recruit/recruitstudentsignup/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
1075
src/views/recruit/recruitstudentsignup/indexClass.vue
Normal file
1075
src/views/recruit/recruitstudentsignup/indexClass.vue
Normal file
File diff suppressed because it is too large
Load Diff
62
src/views/recruit/recruitstudentsignup/interviewForm.vue
Normal file
62
src/views/recruit/recruitstudentsignup/interviewForm.vue
Normal file
@@ -0,0 +1,62 @@
|
||||
<template>
|
||||
<el-dialog :visible.sync="visible" width="60%" :title="`面试审核(${row.name})`">
|
||||
<el-row>
|
||||
<el-radio v-model="status" label="1">通过</el-radio>
|
||||
<el-radio v-model="status" label="-1">未通过</el-radio>
|
||||
</el-row>
|
||||
<el-row v-if="status == '-1'">
|
||||
<br />
|
||||
<el-input type="textarea" v-model="reason" placeholder="请输入未通过的原因"></el-input>
|
||||
</el-row>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="confirm"><span>确认</span></el-button>
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
</span>
|
||||
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import global from "@/components/tools/commondict"
|
||||
import {interview} from "@/api/recruit/recruitstudentsignup";
|
||||
export default {
|
||||
name: "interviewForm",
|
||||
data:function() {
|
||||
return {
|
||||
visible: false,
|
||||
row:{},
|
||||
status: '1',
|
||||
reason:''
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
init(row){
|
||||
this.visible = true
|
||||
this.row = row
|
||||
this.status = row.interview
|
||||
this.reason = row.interviewReason
|
||||
},
|
||||
confirm(){
|
||||
if(!this.status || (this.status == '-1' && !this.reason)){
|
||||
|
||||
global.showWarningInfo(this,"请选择通过还是未通过,未通过请输入原因",2000)
|
||||
return
|
||||
}else{
|
||||
interview({"id":this.row.id,"interview":this.status,"interviewReason":this.reason}).then(resp=>{
|
||||
global.showSuccessInfo(this,"操作成功",2000)
|
||||
this.visible = false
|
||||
this.$emit('refresh')
|
||||
}).catch(e =>{
|
||||
global.showWarningInfo(this,"操作失败",2000)
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
189
src/views/recruit/recruitstudentsignup/juniorlneStatic.vue
Normal file
189
src/views/recruit/recruitstudentsignup/juniorlneStatic.vue
Normal file
@@ -0,0 +1,189 @@
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-form :model="queryForm" inline class="mb-4" ref="searchFormRef">
|
||||
<el-form-item label="招生计划" prop="groupId">
|
||||
<el-select v-model="queryForm.groupId" filterable placeholder="请选择招生计划">
|
||||
<el-option
|
||||
v-for="item in planList"
|
||||
:key="item.id"
|
||||
:label="item.groupName"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="学制" prop="xz">
|
||||
<el-select v-model="queryForm.xz" filterable placeholder="请选择学制" clearable>
|
||||
<el-option
|
||||
v-for="item in majorYears"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否联院" prop="isUnion">
|
||||
<el-select v-model="queryForm.isUnion" filterable placeholder="请选择是否联院" clearable>
|
||||
<el-option key="0" label="否" value="0" />
|
||||
<el-option key="1" label="是" value="1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleFilter">查询</el-button>
|
||||
<el-button type="primary" plain icon="Refresh" class="ml10" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div class="mb15">
|
||||
<el-button type="warning" plain icon="Download" :loading="exportLoading" @click="dataExportHandle">导出</el-button>
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
:data="dataList"
|
||||
border
|
||||
stripe
|
||||
:row-style="changeRowColor"
|
||||
v-loading="dataListLoading"
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
>
|
||||
<el-table-column prop="indexNum" header-align="center" align="center" label="序号">
|
||||
<template #default="scope">
|
||||
{{ scope.row.indexNum }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="deptCode" header-align="center" align="center" label="系部">
|
||||
<template #default="scope">
|
||||
{{ getDeptType(scope.row.deptCode) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="zymc" header-align="center" align="center" label="所报专业" />
|
||||
<el-table-column prop="maxScore" header-align="center" align="center" label="最高分" />
|
||||
<el-table-column prop="minScore" header-align="center" align="center" label="最低分" />
|
||||
<el-table-column prop="avgScore" header-align="center" align="center" label="平均分" />
|
||||
<el-table-column prop="majorPeopleNum" header-align="center" align="center" label="专业人数" />
|
||||
<el-table-column prop="avgScoreDB" header-align="center" align="center" label="均分对比" />
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="recruitstudentsignup-juniorlneStatic">
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { useTable } from '/@/hooks/table'
|
||||
import { useMessage } from '/@/hooks/message'
|
||||
import { useDict } from '/@/hooks/dict'
|
||||
import { juniorlneStatic } from '/@/api/recruit/recruitstudentsignup'
|
||||
import { list } from '/@/api/recruit/recruitstudentplangroup'
|
||||
import { getDeptListByLevelTwo } from '/@/api/basic/basicdept'
|
||||
|
||||
// 消息提示 hooks
|
||||
const message = useMessage()
|
||||
|
||||
// 字典
|
||||
const { getTypeValue } = useDict()
|
||||
|
||||
// 引用
|
||||
const searchFormRef = ref()
|
||||
|
||||
// 状态
|
||||
const deptCodes = ref<any[]>([])
|
||||
const planList = ref<any[]>([])
|
||||
const dataList = ref<any[]>([])
|
||||
const majorYears = ref<any[]>([])
|
||||
const dataListLoading = ref(false)
|
||||
const exportLoading = ref(false)
|
||||
|
||||
// 查询表单
|
||||
const queryForm = reactive({
|
||||
groupId: '',
|
||||
xz: '',
|
||||
isUnion: ''
|
||||
})
|
||||
|
||||
// 使用 table hook 获取样式
|
||||
const { tableStyle, downBlobFile } = useTable()
|
||||
|
||||
// 初始化
|
||||
const init = async () => {
|
||||
try {
|
||||
const [deptResponse, majorYearsRes, planData] = await Promise.all([
|
||||
getDeptListByLevelTwo(),
|
||||
getTypeValue('basic_major_years'),
|
||||
list()
|
||||
])
|
||||
|
||||
deptCodes.value = deptResponse.data.data || []
|
||||
majorYears.value = majorYearsRes.data.data || []
|
||||
planList.value = planData.data.data || []
|
||||
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
getDataList()
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('初始化失败', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 获取数据列表
|
||||
const getDataList = async () => {
|
||||
try {
|
||||
dataListLoading.value = true
|
||||
dataList.value = []
|
||||
const response = await juniorlneStatic(queryForm)
|
||||
dataList.value = response.data.data || []
|
||||
} catch (error) {
|
||||
console.error('获取数据失败', error)
|
||||
} finally {
|
||||
dataListLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 导出
|
||||
const dataExportHandle = async () => {
|
||||
try {
|
||||
exportLoading.value = true
|
||||
await downBlobFile('/recruit/recruitstudentsignup/juniorlneStaticExport', queryForm, '初中分数统计.xls')
|
||||
} catch (error: any) {
|
||||
message.error(error.msg || '导出失败')
|
||||
} finally {
|
||||
exportLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 改变行颜色
|
||||
const changeRowColor = ({ row }: { row: any }) => {
|
||||
if (row.zymc === '合计') {
|
||||
return {
|
||||
color: 'red'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 获取系部名称
|
||||
const getDeptType = (type: string) => {
|
||||
const dept = deptCodes.value.find((item: any) => item.deptCode === type)
|
||||
return dept ? dept.deptName : ''
|
||||
}
|
||||
|
||||
// 查询
|
||||
const handleFilter = () => {
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 重置查询
|
||||
const resetQuery = () => {
|
||||
searchFormRef.value?.resetFields()
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
}
|
||||
queryForm.xz = ''
|
||||
queryForm.isUnion = ''
|
||||
getDataList()
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
init()
|
||||
})
|
||||
</script>
|
||||
511
src/views/recruit/recruitstudentsignup/list.vue
Normal file
511
src/views/recruit/recruitstudentsignup/list.vue
Normal file
@@ -0,0 +1,511 @@
|
||||
<!--
|
||||
- Copyright (c) 2018-2025, cyweb All rights reserved.
|
||||
-
|
||||
- Redistribution and use in source and binary forms, with or without
|
||||
- modification, are permitted provided that the following conditions are met:
|
||||
-
|
||||
- Redistributions of source code must retain the above copyright notice,
|
||||
- this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
- notice, this list of conditions and the following disclaimer in the
|
||||
- documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of the pig4cloud.com developer nor the names of its
|
||||
- contributors may be used to endorse or promote products derived from
|
||||
- this software without specific prior written permission.
|
||||
-
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<!-- 搜索表单 -->
|
||||
<el-form :model="queryForm" inline class="mb-4" ref="searchFormRef">
|
||||
<el-form-item label="招生计划" prop="groupId">
|
||||
<el-select v-model="queryForm.groupId" filterable clearable placeholder="请选择招生计划" style="width: 150px;">
|
||||
<el-option
|
||||
v-for="item in planList"
|
||||
:key="item.id"
|
||||
:label="item.groupName"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="学院" prop="xy">
|
||||
<el-select v-model="queryForm.xy" filterable clearable placeholder="请选择学院" style="width: 130px;">
|
||||
<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="confirmedMajor">
|
||||
<el-select v-model="queryForm.confirmedMajor" filterable clearable placeholder="请选择录取专业">
|
||||
<el-option
|
||||
v-for="item in planMajorList"
|
||||
:key="item.zydm"
|
||||
:label="item.zymc + '(' + item.xz + '年制)'"
|
||||
:value="item.zydm"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="唯一号/姓名/身份证号" prop="search">
|
||||
<el-input v-model="queryForm.search" clearable placeholder="唯一号/姓名/身份证号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="住宿范围" prop="isOutFw">
|
||||
<el-select v-model="queryForm.isOutFw" filterable clearable placeholder="请选择住宿范围" style="width: 100px;">
|
||||
<el-option
|
||||
v-for="item in isOutFwList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否发送短信" prop="isSend">
|
||||
<el-select v-model="queryForm.isSend" filterable clearable placeholder="请选择是否发送短信" style="width: 100px;">
|
||||
<el-option
|
||||
v-for="item in isSendList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" prop="gender">
|
||||
<el-select v-model="queryForm.gender" filterable clearable placeholder="请选择性别" style="width: 120px;">
|
||||
<el-option
|
||||
v-for="item in genderList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="getDataList">查询</el-button>
|
||||
<el-button type="primary" plain icon="Refresh" class="ml10" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<div class="mb15">
|
||||
<el-button
|
||||
v-if="permissions.recruitStuDorm"
|
||||
type="primary"
|
||||
icon="Setting"
|
||||
@click="setDormFW"
|
||||
>
|
||||
住宿范围
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="permissions.recruitStuDorm"
|
||||
type="danger"
|
||||
plain
|
||||
icon="Location"
|
||||
class="ml10"
|
||||
@click="yjOut"
|
||||
>
|
||||
一键判断住宿范围
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="permissions.recruitStuDormMess"
|
||||
type="danger"
|
||||
plain
|
||||
icon="Message"
|
||||
class="ml10"
|
||||
@click="yjSend"
|
||||
>
|
||||
批量发送短信
|
||||
</el-button>
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
class="ml10"
|
||||
@click="handleExport"
|
||||
>
|
||||
名单导出
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
ref="tableRef"
|
||||
:data="state.dataList"
|
||||
v-loading="state.loading"
|
||||
border
|
||||
stripe
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="serialNumber" label="唯一号" width="100" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="name" label="姓名" width="100" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="gender" label="性别" width="80" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{ getGender(scope.row.gender) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="idNumber" label="身份证号" width="180" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="xy" label="学院" width="120" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{ getDeptName(scope.row.xy) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="homeAddressDetail" label="家庭地址" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="isOutFw" label="范围" width="100" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.isOutFw == 0">待确认</span>
|
||||
<span v-if="scope.row.isOutFw == 1">范围内</span>
|
||||
<span v-if="scope.row.isOutFw == 2">范围外</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="isSd" label="手动设置" width="100" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.isSd == 0">未设置</span>
|
||||
<span v-if="scope.row.isSd == 1">已设置</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="isSend" label="发送短信" width="100" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.isSend == 0">未发送</span>
|
||||
<span v-if="scope.row.isSend == 1">已发送</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="300" align="center" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
v-if="permissions.recruitStuDormSd && scope.row.isOutFw != '1'"
|
||||
type="success"
|
||||
link
|
||||
icon="CircleCheck"
|
||||
@click="setFw(scope.row, 1)"
|
||||
>
|
||||
设为范围内
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="permissions.recruitStuDormSd && scope.row.isOutFw != '2'"
|
||||
type="warning"
|
||||
link
|
||||
icon="Close"
|
||||
@click="setFw(scope.row, 2)"
|
||||
>
|
||||
设为范围外
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
icon="Location"
|
||||
@click="baiduMap(scope.row)"
|
||||
>
|
||||
家庭地址
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="permissions.recruitStuDormDel"
|
||||
type="danger"
|
||||
link
|
||||
icon="Delete"
|
||||
@click="deleteHandle(scope.row.id)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<pagination
|
||||
v-bind="state.pagination"
|
||||
@current-change="currentChangeHandle"
|
||||
@size-change="sizeChangeHandle"
|
||||
/>
|
||||
|
||||
<!-- 支付二维码弹窗 -->
|
||||
<el-dialog v-model="dialogFormVisible" title="支付二维码" width="800px" @close="dialogFormVisible = false">
|
||||
<el-table :data="tableData" border>
|
||||
<el-table-column label="唯一号" prop="serialNumber" align="center" />
|
||||
<el-table-column label="姓名" prop="name" align="center" />
|
||||
<el-table-column label="家长手机号" prop="parentTelOne" align="center" />
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-button type="danger" icon="Search" @click="updateFS">立即查询</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div style="padding-top: 20px;">
|
||||
<div id="payQrcode1" style="display: inline-block;">
|
||||
{{ payQrcode1Msg }}
|
||||
</div>
|
||||
<!-- <vue-qr :text="payQrcode1" :size="200" v-if="showPrise1" style="display: inline-block"></vue-qr> -->
|
||||
|
||||
<div id="payQrcode2" style="display: inline-block">
|
||||
{{ payQrcode2Msg }}
|
||||
</div>
|
||||
<!-- <vue-qr :text="payQrcode2" :size="200" v-if="showPrise2" style="display: inline-block"></vue-qr> -->
|
||||
|
||||
<div id="payQrcode3" style="display: inline-block">
|
||||
{{ payQrcode3Msg }}
|
||||
</div>
|
||||
<!-- <vue-qr :text="payQrcode3" :size="200" v-if="showPrise3" style="display: inline-block"></vue-qr> -->
|
||||
</div>
|
||||
<span style="color: red;padding-top: 20px;">** 此界面为查询学生缴款二维码,如有收不到微信推送,或手机号填错的,可直接在此扫码支付,支付成功后,请手动点击"立即查询"按钮,查询该生的缴费情况;因财政收费系统有一定的滞后性,如点击"立即查询"后任显示未交费,请稍后再继续查询,或重新点击"立即查询"按钮 **</span>
|
||||
</el-dialog>
|
||||
|
||||
<dorm-f-w v-if="dormFWRefVisible" ref="dormFWRef" />
|
||||
<show-map v-if="baiduMapVisible" ref="baiduMapRef" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="recruitstudentsignupList">
|
||||
import { ref, reactive, computed, onMounted, nextTick, defineAsyncComponent } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useUserInfo } from '/@/stores/userInfo'
|
||||
import { BasicTableProps, useTable } from '/@/hooks/table'
|
||||
import { useMessage, useMessageBox } from '/@/hooks/message'
|
||||
import { list } from '/@/api/recruit/recruitstudentplangroup'
|
||||
import { fetchListStuDorm, yjOut, setFw, delFw, yjSend } from '/@/api/recruit/recruitstudentsignup'
|
||||
import { getDeptList } from '/@/api/basic/basicclass'
|
||||
import { list as planMajor } from '/@/api/recruit/recruitplanmajor'
|
||||
// @ts-ignore
|
||||
import global from '@/components/tools/commondict'
|
||||
|
||||
const DormFW = defineAsyncComponent(() => import('./dormFW.vue'))
|
||||
const ShowMap = defineAsyncComponent(() => import('./showMap.vue'))
|
||||
|
||||
// 使用 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
|
||||
})
|
||||
|
||||
// 消息提示 hooks
|
||||
const message = useMessage()
|
||||
const messageBox = useMessageBox()
|
||||
|
||||
// 表格引用
|
||||
const tableRef = ref()
|
||||
const searchFormRef = ref()
|
||||
const dormFWRef = ref()
|
||||
const baiduMapRef = ref()
|
||||
|
||||
// 数据
|
||||
const planList = ref<any[]>([])
|
||||
const planMajorList = ref<any[]>([])
|
||||
const deptList = ref<any[]>([])
|
||||
const genderList = ref([{ label: '男', value: '1' }, { label: '女', value: '2' }])
|
||||
const isOutFwList = ref([{ label: '待确认', value: '0' }, { label: '范围内', value: '1' }, { label: '范围外', value: '2' }])
|
||||
const isSendList = ref([{ label: '未发送', value: 0 }, { label: '已发送', value: 1 }])
|
||||
|
||||
// 查询表单
|
||||
const queryForm = reactive({
|
||||
groupId: '',
|
||||
xy: '',
|
||||
confirmedMajor: '',
|
||||
search: '',
|
||||
isOutFw: '',
|
||||
isSend: null,
|
||||
gender: ''
|
||||
})
|
||||
|
||||
// 弹窗状态
|
||||
const dialogFormVisible = ref(false)
|
||||
const dormFWRefVisible = ref(false)
|
||||
const baiduMapVisible = ref(false)
|
||||
const tableData = ref<any[]>([])
|
||||
const payQrcode1 = ref('')
|
||||
const showPrise1 = ref(false)
|
||||
const payQrcode1Msg = ref('')
|
||||
const payQrcode2 = ref('')
|
||||
const payQrcode2Msg = ref('')
|
||||
const showPrise2 = ref(false)
|
||||
const payQrcode3 = ref('')
|
||||
const payQrcode3Msg = ref('')
|
||||
const showPrise3 = ref(false)
|
||||
|
||||
// 获取学院名称
|
||||
const getDeptName = (deptCode: string) => {
|
||||
const item = deptList.value.find(item => item.deptCode === deptCode)
|
||||
return item ? item.deptName : ''
|
||||
}
|
||||
|
||||
// 获取性别
|
||||
const getGender = (gender: string) => {
|
||||
if (gender == '2') {
|
||||
return '女'
|
||||
}
|
||||
if (gender == '1') {
|
||||
return '男'
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
// 表格状态
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
queryForm: queryForm,
|
||||
pageList: async (params: any) => {
|
||||
const response = await fetchListStuDorm(params)
|
||||
return {
|
||||
data: {
|
||||
records: response.data.data.records,
|
||||
total: response.data.data.total
|
||||
}
|
||||
}
|
||||
},
|
||||
createdIsNeed: false
|
||||
})
|
||||
|
||||
// 使用 table hook
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, tableStyle, downBlobFile } = useTable(state)
|
||||
|
||||
// 初始化
|
||||
const init = async () => {
|
||||
try {
|
||||
// 查询二级学院信息
|
||||
const deptData = await getDeptList()
|
||||
deptList.value = deptData.data.data || []
|
||||
|
||||
// 获取招生计划列表
|
||||
const planData = await list()
|
||||
planList.value = planData.data.data || []
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
}
|
||||
|
||||
getDataList()
|
||||
} catch (error) {
|
||||
console.error('初始化失败', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 设置住宿范围
|
||||
const setFw = async (row: any, type: number) => {
|
||||
const title = type == 1 ? '范围内' : '范围外'
|
||||
try {
|
||||
await messageBox.confirm(`是否确认设置${title}?请谨慎操作`)
|
||||
await setFw({ id: row.id, isOutFw: type })
|
||||
message.success('操作成功')
|
||||
getDataList()
|
||||
} catch {
|
||||
// 用户取消
|
||||
}
|
||||
}
|
||||
|
||||
// 设置住宿范围窗口
|
||||
const setDormFW = () => {
|
||||
dormFWRefVisible.value = true
|
||||
nextTick(() => {
|
||||
dormFWRef.value?.init()
|
||||
})
|
||||
}
|
||||
|
||||
// 一键判断住宿范围
|
||||
const yjOut = async () => {
|
||||
if (!queryForm.groupId) {
|
||||
message.warning('招生计划不能为空')
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
await messageBox.confirm('是否确认一键判断是否超出住宿范围?请谨慎操作')
|
||||
await yjOut({ groupId: queryForm.groupId })
|
||||
message.success('操作成功')
|
||||
getDataList()
|
||||
} catch {
|
||||
// 用户取消
|
||||
}
|
||||
}
|
||||
|
||||
// 批量发送短信
|
||||
const yjSend = async () => {
|
||||
if (!queryForm.groupId) {
|
||||
message.warning('招生计划不能为空')
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
await messageBox.confirm('是否确认批量发送短信通知?请谨慎操作')
|
||||
await yjSend({ groupId: queryForm.groupId })
|
||||
message.success('操作成功')
|
||||
getDataList()
|
||||
} catch {
|
||||
// 用户取消
|
||||
}
|
||||
}
|
||||
|
||||
// 百度地图
|
||||
const baiduMap = (row: any) => {
|
||||
baiduMapVisible.value = true
|
||||
nextTick(() => {
|
||||
baiduMapRef.value?.init(row)
|
||||
})
|
||||
}
|
||||
|
||||
// 导出
|
||||
const handleExport = async () => {
|
||||
if (!queryForm.groupId) {
|
||||
message.warning('招生计划不能为空')
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
await downBlobFile(
|
||||
'/recruit/recruitstudentsignup/stuDormExport',
|
||||
queryForm,
|
||||
'新生住宿名单导出.xls'
|
||||
)
|
||||
} catch (error: any) {
|
||||
message.error(error.msg || '导出失败')
|
||||
}
|
||||
}
|
||||
|
||||
// 立即查询
|
||||
const updateFS = async () => {
|
||||
// 这个方法需要根据实际API调整
|
||||
message.info('功能待实现')
|
||||
}
|
||||
|
||||
// 重置查询
|
||||
const resetQuery = () => {
|
||||
searchFormRef.value?.resetFields()
|
||||
queryForm.groupId = ''
|
||||
queryForm.xy = ''
|
||||
queryForm.confirmedMajor = ''
|
||||
queryForm.search = ''
|
||||
queryForm.isOutFw = ''
|
||||
queryForm.isSend = null
|
||||
queryForm.gender = ''
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
}
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 删除
|
||||
const deleteHandle = async (id: string) => {
|
||||
try {
|
||||
await messageBox.confirm('是否确认删除本条数据?请谨慎操作')
|
||||
await delFw(id)
|
||||
message.success('删除成功')
|
||||
getDataList()
|
||||
} catch {
|
||||
// 用户取消
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
init()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
370
src/views/recruit/recruitstudentsignup/majorChange.vue
Normal file
370
src/views/recruit/recruitstudentsignup/majorChange.vue
Normal file
@@ -0,0 +1,370 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="visible"
|
||||
append-to-body
|
||||
width="90%"
|
||||
>
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()"
|
||||
label-width="170px" size="mini">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="招生计划" prop="groupId">
|
||||
<el-select v-model="dataForm.groupId" filterable :disabled="!dataForm.id ? false : true"
|
||||
placeholder="请选择招生计划" size="small" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in planList"
|
||||
:key="item.id"
|
||||
:label="item.groupName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="姓名" prop="name" >
|
||||
<el-input type="text" v-model="dataForm.name" :disabled="type==1 ? false : true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="身份证号" prop="idNumber">
|
||||
<el-input type="text" v-model="dataForm.idNumber" :disabled="type==2 ? false : true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="成绩折算分" prop="correctedScore">
|
||||
<el-input-number v-model="dataForm.correctedScore" controls-position="right" :min="0" :max="999" :step-strictly="true"style="width:100%;" ></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="原录取专业" prop="confirmedMajor">
|
||||
<el-select v-model="dataForm.confirmedMajor" filterable clearable placeholder="" size="small" style="width: 100%" :disabled="type==1 ? false : true" @change="changeM(dataForm.confirmedMajor)">
|
||||
<el-option
|
||||
v-for="item in planMajorList"
|
||||
:key="item.zydm"
|
||||
:label="item.zymc"
|
||||
:value="item.zydm">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="新录取专业" prop="newConfirmedMajor">
|
||||
<el-select v-model="dataForm.newConfirmedMajor" filterable placeholder="" size="small" style="width: 100%" @change="changeCM(dataForm.newConfirmedMajor)">
|
||||
<el-option
|
||||
v-for="item in planMajorList"
|
||||
:key="item.zydm"
|
||||
:label="item.zymc+' || '+item.xyNum"
|
||||
:value="item.zydm">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="学费" prop="feeTuition">
|
||||
<el-input-number v-model="dataForm.feeTuition" controls-position="right" :min="0" :max="999999" :step-strictly="true" style="width:100%;" :disabled="type==2?false:true"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="代办费" prop="feeAgency">
|
||||
<el-input-number v-model="dataForm.feeAgency" controls-position="right" :min="0" :max="999999" :step-strictly="true" style="width:100%;" :disabled="type==2?false:true"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="总费用" prop="allMoney">
|
||||
<span style="color: red">{{dataForm.feeTuition+dataForm.feeAgency}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="审核备注" prop="auditRemarks">
|
||||
<el-input type="textarea" v-model="dataForm.auditRemarks" placeholder="审核备注" :rows="2" ></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer" >
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="success" @click="dataFormSubmit()" v-if="canSubmit">确认修改</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getObj,changeMajor} from '@/api/recruit/recruitstudentsignup'
|
||||
import {list} from "@/api/recruit/recruitstudentplangroup";
|
||||
import {listByEdu} from "@/api/recruit/recruitplanmajor";
|
||||
import {getDictByType} from "@/api/contract/contract";
|
||||
import {list as scoreList} from "@/api/recruit/recruitstudentplancorrectscoreconfig";
|
||||
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
canSubmit: false,
|
||||
title: "",
|
||||
eduList: [],
|
||||
type:null,
|
||||
dataForm: {
|
||||
id: "",
|
||||
groupId: "",
|
||||
name: "",
|
||||
oldName: "",
|
||||
gender: "",
|
||||
nationality: "",
|
||||
degreeOfEducation: "",
|
||||
isLeagueMember: "",
|
||||
schoolOfGraduation: "",
|
||||
isAccommodation: "",
|
||||
examRegistrationNumbers: "",
|
||||
isMinimumLivingSecurity: "",
|
||||
score: "",
|
||||
postcode: "",
|
||||
residenceType: "",
|
||||
correctedScore: "",
|
||||
placeScore: "",
|
||||
schoolFrom: "",
|
||||
idNumber: "",
|
||||
residenceProvince: "",
|
||||
residenceCity: "",
|
||||
residenceArea: "",
|
||||
residenceDetail: "",
|
||||
homeAddressProvince: "",
|
||||
homeAddressCity: "",
|
||||
homeAddressArea: "",
|
||||
homeAddressDetail: "",
|
||||
parentName: "",
|
||||
parentTelOne: "",
|
||||
parentTelTwo: "",
|
||||
selfTel: "",
|
||||
wishMajorOne: "",
|
||||
wishMajorTwo: "",
|
||||
wishMajorThree: "",
|
||||
confirmedMajor: "",
|
||||
sevenMajor:"",
|
||||
sixMajor:"",
|
||||
fiveMajor:"",
|
||||
fourMajor: "",
|
||||
threeMajor: "",
|
||||
twoMajor: "",
|
||||
feeContribute: 0,
|
||||
scorePhoto: "",
|
||||
graPic: "",
|
||||
yyPic: "",
|
||||
housePic: "",
|
||||
sbPic: "",
|
||||
contactName: "",
|
||||
oldSerialNumber: "",
|
||||
colorDiscrimination: "",
|
||||
nutrition: "",
|
||||
height: "",
|
||||
weight: "",
|
||||
pastMedicalHistory: "",
|
||||
eyesightLeft: "",
|
||||
eyesightRight: "",
|
||||
correctEyesightLeft: "",
|
||||
correctEyesightRight: "",
|
||||
remarks: "",
|
||||
auditRemarks: "",
|
||||
serialNumber: "",
|
||||
auditStatus:"",
|
||||
schoolCode:"",
|
||||
newConfirmedMajor: "",
|
||||
householdPic:""
|
||||
},
|
||||
disabled: false,
|
||||
schoolFromList:[{label:"本省外市",value:"1"},{label:"外省外市",value:"2"}],
|
||||
planList: [],
|
||||
planMajorList:[],
|
||||
|
||||
deptList: [],
|
||||
|
||||
dialogImageUrl:"",
|
||||
dialogUploadVisible:false,
|
||||
|
||||
|
||||
dataRule: {
|
||||
groupId: [
|
||||
{required: true, message: '招生计划不能为空', trigger: 'change'}
|
||||
],
|
||||
name: [
|
||||
{required: true, message: '姓名不能为空', trigger: 'change'}
|
||||
],
|
||||
idNumber: [
|
||||
{required: true, message: '身份证不能为空', trigger: 'change'}
|
||||
],
|
||||
correctedScore: [
|
||||
{required: true, message: '成绩折算分不能为空', trigger: 'change'}
|
||||
],
|
||||
confirmedMajor:[
|
||||
{required: true, message: '原录取专业不能为空', trigger: 'change'}
|
||||
],
|
||||
newConfirmedMajor:[
|
||||
{required: true, message: '新录取专业不能为空', trigger: 'change'}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
let _this = this;
|
||||
this.dataForm.id = id || null;
|
||||
this.visible = true;
|
||||
this.canSubmit = true;
|
||||
this.initData();
|
||||
this.isShow = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
//获取数据字典代办费
|
||||
getDictByType("agency_fee").then(res => {
|
||||
_this.agencyFeeList = res.data.data
|
||||
//获取数据字典学费
|
||||
getDictByType("tuition_fee").then(res => {
|
||||
_this.tuitionFeeList = res.data.data
|
||||
getObj(this.dataForm.id).then(response => {
|
||||
this.dataForm = response.data.data
|
||||
this.title = this.dataForm.serialNumber
|
||||
//获取文化程度对应的专业
|
||||
this.planMajorList=[];
|
||||
|
||||
this.agencyFeeList.forEach(e=>{
|
||||
if(this.dataForm.degreeOfEducation == e.label){
|
||||
this.dataForm.feeAgency = e.value;
|
||||
}
|
||||
});
|
||||
this.tuitionFeeList.forEach(e=>{
|
||||
if(this.dataForm.degreeOfEducation == e.label && (this.dataForm.degreeOfEducation !=1) ){
|
||||
this.dataForm.feeTuition = e.value;
|
||||
}
|
||||
});
|
||||
listByEdu({groupId: this.dataForm.groupId,degreeOfEducation:this.dataForm.degreeOfEducation}).then(e=>{
|
||||
_this.planMajorList = e.data.data;
|
||||
});
|
||||
//获取招生计划下的学校和分数线
|
||||
scoreList({groupId:_this.dataForm.groupId}).then(data =>{
|
||||
_this.schoolCodeList = data.data.data;
|
||||
});
|
||||
|
||||
if ("1" == this.dataForm.degreeOfEducation) {
|
||||
this.title = "C" + this.title;
|
||||
} else if ("2" == this.dataForm.degreeOfEducation) {
|
||||
this.title = "G" + this.title;
|
||||
} else if ("3" == this.dataForm.degreeOfEducation) {
|
||||
this.title = "J" + this.title;
|
||||
}
|
||||
|
||||
if("-20" == this.dataForm.auditStatus){
|
||||
this.title ="未录取 "+this.title;
|
||||
}else if("0" == this.dataForm.auditStatus){
|
||||
this.title ="待审核 "+this.title;
|
||||
}else if("20" == this.dataForm.auditStatus){
|
||||
this.title ="已录取 "+this.title;
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
initData() {
|
||||
let _this = this;
|
||||
list().then(data => {
|
||||
_this.planList = data.data.data
|
||||
});
|
||||
},
|
||||
changeCM(id){
|
||||
if(id){
|
||||
let _this = this;
|
||||
let flag = false;
|
||||
_this.planMajorList.forEach(e=>{
|
||||
if(_this.dataForm.newConfirmedMajor == e.zydm && e.isZd=="1" &&_this.dataForm.degreeOfEducation==1){
|
||||
flag = true;
|
||||
}
|
||||
});
|
||||
if(_this.dataForm.degreeOfEducation==1){
|
||||
_this.dataForm.feeTuition=0;
|
||||
_this.tuitionFeeList.forEach(e=>{
|
||||
if(e.label=="0" && flag){
|
||||
_this.dataForm.feeTuition = e.value;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
changeM(id){
|
||||
if(id){
|
||||
let _this = this;
|
||||
let flag = false;
|
||||
_this.dataForm.confirmedMajor = id;
|
||||
//是初中生并且是中德班
|
||||
_this.planMajorList.forEach(e=>{
|
||||
if(_this.dataForm.confirmedMajor == e.zydm && e.isZd=="1" &&_this.dataForm.degreeOfEducation==1){
|
||||
flag = true;
|
||||
}
|
||||
});
|
||||
if(_this.dataForm.degreeOfEducation==1){
|
||||
_this.dataForm.feeTuition=0;
|
||||
_this.tuitionFeeList.forEach(e=>{
|
||||
if(e.label=="0" && flag){
|
||||
_this.dataForm.feeTuition = e.value;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
let _this = this;
|
||||
let title = "确认调整录取专业么?";
|
||||
if(this.dataForm.confirmedMajor == this.dataForm.newConfirmedMajor){
|
||||
_this.$notify.error('新专业不能和原专业相同');
|
||||
return
|
||||
}
|
||||
this.$confirm(title , '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(function() {
|
||||
_this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
_this.canSubmit = false;
|
||||
if (_this.dataForm.id) {
|
||||
changeMajor(_this.dataForm).then(data => {
|
||||
_this.$notify.success('操作成功')
|
||||
_this.visible = false
|
||||
_this.$emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
_this.canSubmit = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
}).then(data => {
|
||||
|
||||
}).catch(function(err) { })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
389
src/views/recruit/recruitstudentsignup/schoolAreaStatic.vue
Normal file
389
src/views/recruit/recruitstudentsignup/schoolAreaStatic.vue
Normal file
@@ -0,0 +1,389 @@
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<header style="font-size: 40px; text-align: center; margin-bottom: 20px;">
|
||||
招生地区分布统计(本省本市、普通招生、自主招生)
|
||||
</header>
|
||||
|
||||
<el-form :model="queryForm" inline class="mb-4" ref="searchFormRef">
|
||||
<el-form-item label="是否联院" prop="isUnion">
|
||||
<el-select v-model="queryForm.isUnion" filterable placeholder="请选择是否联院">
|
||||
<el-option
|
||||
v-for="item in isUnionList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleFilter">查询</el-button>
|
||||
<el-button type="primary" plain icon="Refresh" class="ml10" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div class="mb15">
|
||||
<el-button type="warning" plain icon="Download" :loading="exportLoading" @click="dataExportHandle">导出</el-button>
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
:data="dataList"
|
||||
border
|
||||
stripe
|
||||
:span-method="objectSpanMethod"
|
||||
v-loading="dataListLoading"
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
>
|
||||
|
||||
<el-table-column
|
||||
prop="year"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="年份">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="type"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="类别">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="peopleNum"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="招生总数">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="peopleRate"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="占比">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop=""
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="天宁区">
|
||||
<el-table-column
|
||||
prop="tnNum"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="人数">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="tnRate"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="占比">
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop=""
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="新北区">
|
||||
<el-table-column
|
||||
prop="xbNum"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="人数">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="xbRate"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="占比">
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop=""
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="武进区">
|
||||
<el-table-column
|
||||
prop="wjNum"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="人数">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="wjRate"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="占比">
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop=""
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="钟楼区">
|
||||
<el-table-column
|
||||
prop="zlNum"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="人数">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="zlRate"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="占比">
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop=""
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="金坛">
|
||||
<el-table-column
|
||||
prop="jtNum"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="人数">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="jtRate"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="占比">
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop=""
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="溧阳">
|
||||
<el-table-column
|
||||
prop="lyNum"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="人数">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="lyRate"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="占比">
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop=""
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="武进区(含 戚墅堰)">
|
||||
<el-table-column
|
||||
prop="wjjNum"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="人数">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="wjjRate"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="占比">
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop=""
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="经开区">
|
||||
<el-table-column
|
||||
prop="jkqNum"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="人数">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="jkqRate"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="占比">
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop=""
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="市辖区">
|
||||
<el-table-column
|
||||
prop="cityNum"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="人数">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="cityRate"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="占比">
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop=""
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="本省外市">
|
||||
<el-table-column
|
||||
prop="bswNum"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="人数">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="bswRate"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="占比">
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop=""
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="外省">
|
||||
<el-table-column
|
||||
prop="wsNum"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="人数">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="wsRate"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="占比">
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="recruitstudentsignup-schoolAreaStatic">
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { useTable } from '/@/hooks/table'
|
||||
import { useMessage } from '/@/hooks/message'
|
||||
import { schoolAreaStatic } from '/@/api/recruit/recruitstudentsignup'
|
||||
|
||||
// 消息提示 hooks
|
||||
const message = useMessage()
|
||||
|
||||
// 引用
|
||||
const searchFormRef = ref()
|
||||
|
||||
// 状态
|
||||
const isUnionList = [
|
||||
{ value: '0', label: '否' },
|
||||
{ value: '1', label: '是' }
|
||||
]
|
||||
const dataList = ref<any[]>([])
|
||||
const indexArray = ref<number[]>([])
|
||||
const dataListLoading = ref(false)
|
||||
const exportLoading = ref(false)
|
||||
|
||||
// 查询表单
|
||||
const queryForm = reactive({
|
||||
isUnion: '0'
|
||||
})
|
||||
|
||||
// 使用 table hook 获取样式
|
||||
const { tableStyle, downBlobFile } = useTable()
|
||||
|
||||
// 初始化
|
||||
const init = () => {
|
||||
queryForm.isUnion = '0'
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 获取行数
|
||||
const getRows = (rowIndex: number, name: string) => {
|
||||
let count = 0
|
||||
for (let i = rowIndex; i < dataList.value.length; i++) {
|
||||
if (dataList.value[i].year === name) {
|
||||
count++
|
||||
} else {
|
||||
break
|
||||
}
|
||||
}
|
||||
return count
|
||||
}
|
||||
|
||||
// 合并单元格方法
|
||||
const objectSpanMethod = ({ row, column, rowIndex, columnIndex }: any) => {
|
||||
if (columnIndex === 0) {
|
||||
if (indexArray.value.includes(rowIndex)) {
|
||||
const rowCount = getRows(rowIndex, row.year)
|
||||
return {
|
||||
rowspan: rowCount,
|
||||
colspan: 1
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
rowspan: 0,
|
||||
colspan: 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 获取数据列表
|
||||
const getDataList = async () => {
|
||||
try {
|
||||
dataListLoading.value = true
|
||||
dataList.value = []
|
||||
indexArray.value = []
|
||||
const response = await schoolAreaStatic(queryForm)
|
||||
dataList.value = response.data.data || []
|
||||
|
||||
// 计算合并单元格的索引
|
||||
let count = 0
|
||||
for (let rowIndex = 0; rowIndex < dataList.value.length; ) {
|
||||
indexArray.value.push(rowIndex)
|
||||
count = getRows(rowIndex, dataList.value[rowIndex].year)
|
||||
rowIndex += count
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取数据失败', error)
|
||||
} finally {
|
||||
dataListLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 导出
|
||||
const dataExportHandle = async () => {
|
||||
try {
|
||||
exportLoading.value = true
|
||||
await downBlobFile(
|
||||
'/recruit/recruitstudentsignup/schoolAreaStaticExport',
|
||||
queryForm,
|
||||
'招生地区分布统计(本省本市、普通招生、自主招生).xls'
|
||||
)
|
||||
} catch (error: any) {
|
||||
message.error(error.msg || '导出失败')
|
||||
} finally {
|
||||
exportLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 查询
|
||||
const handleFilter = () => {
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 重置查询
|
||||
const resetQuery = () => {
|
||||
searchFormRef.value?.resetFields()
|
||||
queryForm.isUnion = '0'
|
||||
getDataList()
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
init()
|
||||
})
|
||||
</script>
|
||||
175
src/views/recruit/recruitstudentsignup/schoolStatic.vue
Normal file
175
src/views/recruit/recruitstudentsignup/schoolStatic.vue
Normal file
@@ -0,0 +1,175 @@
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-form :model="queryForm" inline class="mb-4" ref="searchFormRef">
|
||||
<el-form-item label="招生计划" prop="groupId">
|
||||
<el-select v-model="queryForm.groupId" filterable placeholder="请选择招生计划">
|
||||
<el-option
|
||||
v-for="item in planList"
|
||||
:key="item.id"
|
||||
:label="item.groupName"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleFilter">查询</el-button>
|
||||
<el-button type="primary" plain icon="Refresh" class="ml10" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div class="mb15">
|
||||
<el-button type="warning" plain icon="Download" :loading="exportLoading" @click="dataExportHandle">导出</el-button>
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
:data="dataList"
|
||||
border
|
||||
stripe
|
||||
v-loading="dataListLoading"
|
||||
:summary-method="getSummaries"
|
||||
show-summary
|
||||
:row-style="changeRowColor"
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
>
|
||||
<el-table-column align="center" header-align="center" prop="schoolName" label="学校名称" />
|
||||
<el-table-column align="center" header-align="center" prop="peopleNum" label="人数" />
|
||||
<el-table-column align="center" header-align="center" prop="peopleRate" label="占比" />
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="recruitstudentsignup-schoolStatic">
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { useTable } from '/@/hooks/table'
|
||||
import { useMessage } from '/@/hooks/message'
|
||||
import { getSchoolStatic } from '/@/api/recruit/recruitstudentsignup'
|
||||
import { list } from '/@/api/recruit/recruitstudentplangroup'
|
||||
|
||||
// 消息提示 hooks
|
||||
const message = useMessage()
|
||||
|
||||
// 引用
|
||||
const searchFormRef = ref()
|
||||
|
||||
// 状态
|
||||
const dataList = ref<any[]>([])
|
||||
const planList = ref<any[]>([])
|
||||
const indexArray = ref<any[]>([])
|
||||
const dataListLoading = ref(false)
|
||||
const exportLoading = ref(false)
|
||||
|
||||
// 查询表单
|
||||
const queryForm = reactive({
|
||||
groupId: ''
|
||||
})
|
||||
|
||||
// 使用 table hook 获取样式
|
||||
const { tableStyle, downBlobFile } = useTable()
|
||||
|
||||
// 初始化
|
||||
const init = async () => {
|
||||
try {
|
||||
const data = await list()
|
||||
planList.value = data.data.data || []
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
getDataList()
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('初始化失败', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 获取数据列表
|
||||
const getDataList = async () => {
|
||||
try {
|
||||
dataListLoading.value = true
|
||||
dataList.value = []
|
||||
indexArray.value = []
|
||||
const response = await getSchoolStatic(queryForm)
|
||||
dataList.value = response.data.data || []
|
||||
} catch (error) {
|
||||
console.error('获取数据失败', error)
|
||||
} finally {
|
||||
dataListLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 导出
|
||||
const dataExportHandle = async () => {
|
||||
try {
|
||||
exportLoading.value = true
|
||||
await downBlobFile('/recruit/recruitstudentsignup/getSchoolStaticExport', queryForm, '按学校导出.xls')
|
||||
} catch (error: any) {
|
||||
message.error(error.msg || '导出失败')
|
||||
} finally {
|
||||
exportLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 改变行颜色
|
||||
const changeRowColor = ({ row }: { row: any }) => {
|
||||
const specialSchools = [
|
||||
'智能装备学院',
|
||||
'智能制造学院',
|
||||
'信息服务学院',
|
||||
'交通运输学院',
|
||||
'医药康养学院',
|
||||
'招生就业处'
|
||||
]
|
||||
if (specialSchools.includes(row.schoolName)) {
|
||||
return {
|
||||
color: 'red'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 合计方法
|
||||
const getSummaries = (param: any) => {
|
||||
const { columns, data } = param
|
||||
const sums: any[] = []
|
||||
columns.forEach((column: any, index: number) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '总计'
|
||||
} else if (index === 1) {
|
||||
const values = data.map((item: any) => Number(item[column.property]))
|
||||
if (!values.every((value: any) => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev: number, curr: any) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0) / 2
|
||||
} else {
|
||||
sums[index] = '--'
|
||||
}
|
||||
} else {
|
||||
sums[index] = '--'
|
||||
}
|
||||
})
|
||||
return sums
|
||||
}
|
||||
|
||||
// 查询
|
||||
const handleFilter = () => {
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 重置查询
|
||||
const resetQuery = () => {
|
||||
searchFormRef.value?.resetFields()
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
}
|
||||
getDataList()
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
init()
|
||||
})
|
||||
</script>
|
||||
151
src/views/recruit/recruitstudentsignup/showMap.vue
Normal file
151
src/views/recruit/recruitstudentsignup/showMap.vue
Normal file
@@ -0,0 +1,151 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="家庭地址地图选点"
|
||||
append-to-body
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="visible"
|
||||
width="90%" heigth="90%"
|
||||
>
|
||||
<div style="height: 100%;width:100%">
|
||||
<el-form :model="form" :rules="rules" ref="form" label-width="120px"
|
||||
class="demo-ruleForm">
|
||||
|
||||
<el-form-item label="家庭地址" prop="homeAddressDetail">
|
||||
<el-input v-model="form.homeAddressDetail" style="width: 100%"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div id="container2"></div>
|
||||
</div>
|
||||
<!-- <span slot="footer" class="dialog-footer">-->
|
||||
<!-- <el-button type="primary" @click="dataFormSubmit">确定</el-button>-->
|
||||
<!-- <el-button @click="visible = false">取消</el-button>-->
|
||||
<!-- </span>-->
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import {BMPGL, changeMajor} from "@/api/recruit/recruitstudentsignup";
|
||||
import {putItemObj} from "@/api/admin/dict";
|
||||
import {getTypeValue} from "@/api/admin/dict";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
ak: "V0ooaf2RZyEGOkD8UzZB3gvw7pCb0Kx7", // 百度的地图密钥
|
||||
visible: false,
|
||||
canSubmit: false,
|
||||
circleShow: false,
|
||||
circle: "",
|
||||
// 地址信息
|
||||
address: null,
|
||||
center: {lng: 0, lat: 0},
|
||||
form: {
|
||||
id: "",
|
||||
homeAddressDetail: "",
|
||||
},
|
||||
dictId: "",
|
||||
rules: {
|
||||
homeAddressDetail: [
|
||||
{required: true, message: '家庭地址不能为空', trigger: ["blur", "change"]}
|
||||
],
|
||||
},
|
||||
circleArr: [],
|
||||
|
||||
};
|
||||
},
|
||||
watch: {},
|
||||
methods: {
|
||||
init(row) {
|
||||
let _this = this;
|
||||
this.visible = true;
|
||||
this.canSubmit = true;
|
||||
this.circleShow = true;
|
||||
this.form.id = row.id;
|
||||
this.form.homeAddressDetail = row.homeAddressDetail;
|
||||
this.$nextTick(() => {
|
||||
getTypeValue("dorm_jw").then(data => {
|
||||
let arr = data.data.data;
|
||||
arr.forEach(e => {
|
||||
if (e.label == 'bj') {
|
||||
_this.form.raidus = e.value;
|
||||
_this.dictId = e.id;
|
||||
} else if (e.label == 'lng') {
|
||||
_this.center.lng = e.value;
|
||||
} else if (e.label == 'lat') {
|
||||
_this.center.lat = e.value;
|
||||
}
|
||||
});
|
||||
BMPGL(_this.ak).then((BMapGL) => {
|
||||
// 创建地图实例
|
||||
let map = new BMapGL.Map("container2");
|
||||
// 创建点坐标 axios => res 获取的初始化定位坐标
|
||||
let point = new BMapGL.Point(_this.center.lng, _this.center.lat)
|
||||
// 初始化地图,设置中心点坐标和地图级别
|
||||
map.centerAndZoom(point, 13)
|
||||
//开启鼠标滚轮缩放
|
||||
map.enableScrollWheelZoom(true)
|
||||
//创建地址解析器实例
|
||||
var myGeo = new BMapGL.Geocoder();
|
||||
myGeo.getPoint(_this.form.homeAddressDetail, function(point){
|
||||
if(point){
|
||||
map.centerAndZoom(point, 16);
|
||||
map.addOverlay(new BMapGL.Marker(point, {title: _this.form.homeAddressDetail}))
|
||||
}else{
|
||||
alert('您选择的地址没有解析到结果!');
|
||||
}
|
||||
}, '北京市')
|
||||
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
let _this = this;
|
||||
this.$confirm("是否确认保存住宿半径", '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(function () {
|
||||
_this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
_this.canSubmit = false;
|
||||
putItemObj({id: _this.dictId, value: _this.form.raidus}).then(() => {
|
||||
_this.$message({
|
||||
showClose: true,
|
||||
message: '修改成功',
|
||||
type: 'success'
|
||||
})
|
||||
_this.visible = false
|
||||
_this.canSubmit = true;
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
}).then(data => {
|
||||
|
||||
}).catch(function (err) {
|
||||
})
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
#container2 {
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
height: 700px;
|
||||
margin: 0;
|
||||
font-family: "微软雅黑";
|
||||
}
|
||||
|
||||
ul li {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
</style>
|
||||
176
src/views/recruit/recruitstudentsignup/static.vue
Normal file
176
src/views/recruit/recruitstudentsignup/static.vue
Normal file
@@ -0,0 +1,176 @@
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-form :model="queryForm" inline class="mb-4" ref="searchFormRef">
|
||||
<el-form-item label="招生计划" prop="groupId">
|
||||
<el-select v-model="queryForm.groupId" filterable clearable placeholder="请选择招生计划" @change="chanMajor">
|
||||
<el-option
|
||||
v-for="item in planList"
|
||||
:key="item.id"
|
||||
:label="item.groupName"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleFilter">查询</el-button>
|
||||
<el-button type="primary" plain icon="Refresh" class="ml10" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div class="mb15">
|
||||
<el-button type="warning" plain icon="Download" :loading="exportLoading" @click="handleExport">导出</el-button>
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
:data="state.dataList"
|
||||
border
|
||||
stripe
|
||||
height="700px"
|
||||
v-loading="state.loading"
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
>
|
||||
<el-table-column width="150" prop="deptCode" header-align="center" align="center" label="学院">
|
||||
<template #default="scope">
|
||||
{{ global.getLabelValueByPropes(deptList, scope.row.deptCode, { key: 'deptCode', value: 'deptName' }) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="150" prop="zydm" header-align="center" align="center" label="专业代码" />
|
||||
<el-table-column prop="zymc" header-align="center" align="center" label="专业名称" />
|
||||
<el-table-column width="80" prop="scoreLine" header-align="center" align="center" label="分数线" />
|
||||
<el-table-column width="80" prop="planNum" header-align="center" align="center" label="计划总数" />
|
||||
<el-table-column width="80" prop="recruitmentNum" header-align="center" align="center" label="拟招人数" />
|
||||
<el-table-column width="80" prop="hasNum" header-align="center" align="center" label="已招人数" />
|
||||
<el-table-column width="80" prop="boyNum" header-align="center" align="center" label="已招(男)" />
|
||||
<el-table-column width="80" prop="girlNum" header-align="center" align="center" label="已招(女)" />
|
||||
<el-table-column width="80" prop="cityFrom" header-align="center" align="center" label="市平台" />
|
||||
<el-table-column width="80" prop="schoolFrom" header-align="center" align="center" label="校平台" />
|
||||
<el-table-column width="80" prop="xyNum" header-align="center" align="center" label="剩余人数" />
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="recruitstudentsignup-static">
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { BasicTableProps, useTable } from '/@/hooks/table'
|
||||
import { useMessage } from '/@/hooks/message'
|
||||
import { useDict } from '/@/hooks/dict'
|
||||
import { list } from '/@/api/recruit/recruitstudentplangroup'
|
||||
import { fetchListByStatic, list as planMajor } from '/@/api/recruit/recruitplanmajor'
|
||||
import { getDeptList } from '/@/api/basic/basicclass'
|
||||
// @ts-ignore
|
||||
import global from '/@/components/tools/commondict.vue'
|
||||
|
||||
// 消息提示 hooks
|
||||
const message = useMessage()
|
||||
|
||||
// 字典
|
||||
const { getTypeValue } = useDict()
|
||||
|
||||
// 引用
|
||||
const searchFormRef = ref()
|
||||
|
||||
// 状态
|
||||
const planList = ref<any[]>([])
|
||||
const eduList = ref<any[]>([])
|
||||
const planMajorList = ref<any[]>([])
|
||||
const deptList = ref<any[]>([])
|
||||
const exportLoading = ref(false)
|
||||
|
||||
// 查询表单
|
||||
const queryForm = reactive({
|
||||
groupId: '',
|
||||
auditStatus: 20
|
||||
})
|
||||
|
||||
// 表格状态
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
queryForm: queryForm,
|
||||
pageList: async (params: any) => {
|
||||
const response = await fetchListByStatic(params)
|
||||
return {
|
||||
data: {
|
||||
records: response.data.data || [],
|
||||
total: response.data.data?.length || 0
|
||||
}
|
||||
}
|
||||
},
|
||||
createdIsNeed: false
|
||||
})
|
||||
|
||||
// 使用 table hook
|
||||
const { getDataList, tableStyle, downBlobFile } = useTable(state)
|
||||
|
||||
// 初始化
|
||||
const init = async () => {
|
||||
try {
|
||||
// 查询二级学院信息
|
||||
const deptData = await getDeptList()
|
||||
deptList.value = deptData.data.data || []
|
||||
deptList.value.push({ deptCode: '小计(高中/职技校)', deptName: '小计(高中/职技校)' })
|
||||
deptList.value.push({ deptCode: '小计(初中)', deptName: '小计(初中)' })
|
||||
deptList.value.push({ deptCode: '小计(初中_联院大专)', deptName: '小计(初中_联院大专)' })
|
||||
deptList.value.push({ deptCode: '合计', deptName: '合计' })
|
||||
|
||||
// 获取招生计划列表
|
||||
const planData = await list()
|
||||
planList.value = planData.data.data || []
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
getDataList()
|
||||
chanMajor()
|
||||
}
|
||||
|
||||
// 获取字典数据
|
||||
const eduRes = await getTypeValue('education_type')
|
||||
eduList.value = eduRes.data.data || []
|
||||
} catch (error) {
|
||||
console.error('初始化失败', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 导出
|
||||
const handleExport = async () => {
|
||||
try {
|
||||
exportLoading.value = true
|
||||
await downBlobFile('/recruit/recruitplanmajor/exportExcel', queryForm, '招生统计.xls')
|
||||
} catch (error: any) {
|
||||
message.error(error.msg || '导出失败')
|
||||
} finally {
|
||||
exportLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 切换专业
|
||||
const chanMajor = async () => {
|
||||
try {
|
||||
planMajorList.value = []
|
||||
if (queryForm.groupId) {
|
||||
const data = await planMajor({ groupId: queryForm.groupId })
|
||||
planMajorList.value = data.data.data || []
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取专业列表失败', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 查询
|
||||
const handleFilter = () => {
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 重置查询
|
||||
const resetQuery = () => {
|
||||
searchFormRef.value?.resetFields()
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
}
|
||||
getDataList()
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
init()
|
||||
})
|
||||
</script>
|
||||
43
src/views/recruit/recruitstudentsignup/studorm.vue
Normal file
43
src/views/recruit/recruitstudentsignup/studorm.vue
Normal file
@@ -0,0 +1,43 @@
|
||||
<template>
|
||||
<div class="mod-config">
|
||||
<basic-container>
|
||||
<el-tabs v-model="activeName">
|
||||
<el-tab-pane label="申请列表" name="first">
|
||||
<List></List>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="申请汇总" name="second">
|
||||
<DormAnalysis></DormAnalysis>
|
||||
</el-tab-pane>
|
||||
|
||||
</el-tabs>
|
||||
|
||||
</basic-container>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
import {mapGetters} from 'vuex'
|
||||
import List from './list.vue'
|
||||
import DormAnalysis from './dorm_analysis.vue'
|
||||
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
activeName: 'first'
|
||||
}
|
||||
},
|
||||
components: {
|
||||
List,DormAnalysis
|
||||
},
|
||||
created () {
|
||||
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['permissions'])
|
||||
},
|
||||
methods: {}
|
||||
}
|
||||
</script>
|
||||
577
src/views/recruit/recruitstudentsignup/update.vue
Normal file
577
src/views/recruit/recruitstudentsignup/update.vue
Normal file
@@ -0,0 +1,577 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="visible"
|
||||
append-to-body
|
||||
width="90%"
|
||||
>
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()"
|
||||
label-width="170px" size="mini">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="招生计划" prop="groupId">
|
||||
<el-select v-model="dataForm.groupId" filterable :disabled="!dataForm.id ? false : true"
|
||||
placeholder="请选择招生计划" size="small" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in planList"
|
||||
:key="item.id"
|
||||
:label="item.groupName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="姓名" prop="name" >
|
||||
<el-input type="text" v-model="dataForm.name" :disabled="type==1 ? false : true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
|
||||
<el-form-item label="联系人" prop="contactName" >
|
||||
<el-select v-model="dataForm.contactName" filterable clearable placeholder="" size="small" style="width: 100%" :disabled="!(permissions.recruit_recruitprestudent_dj_sure || dataForm.auditStatus != '20')">
|
||||
<el-option
|
||||
v-for="item in contactNameList"
|
||||
:key="item.teacherNo"
|
||||
:label="item.realName+'-'+item.deptCode"
|
||||
:value="item.teacherNo">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<el-row >
|
||||
<el-col :span="8">
|
||||
<el-form-item label="成绩单" prop="scorePhoto">
|
||||
<el-upload
|
||||
action="/recruit/file/uploadAttachment"
|
||||
list-type="picture-card"
|
||||
name="file"
|
||||
:headers="headers"
|
||||
:limit="1"
|
||||
:data="uploadData"
|
||||
:file-list="fileList"
|
||||
:before-upload="beforeUpload"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:on-remove="removeHandler"
|
||||
:http-request="httpRequest"
|
||||
:on-success="uploadSuccess">
|
||||
<i class="el-icon-plus" style="width: 100px;height: 100px;"></i>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="毕业证" prop="graPic">
|
||||
<el-upload
|
||||
action="/recruit/file/uploadAttachment"
|
||||
list-type="picture-card"
|
||||
name="file"
|
||||
:headers="headers"
|
||||
:limit="1"
|
||||
:data="uploadData"
|
||||
:file-list="graPicList"
|
||||
:before-upload="beforeUpload"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:on-remove="remove2Handler"
|
||||
:http-request="httpRequest"
|
||||
:on-success="upload2Success">
|
||||
<i class="el-icon-plus" style="width: 100px;height: 100px;"></i>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="在常营业执照" prop="yyPic">
|
||||
<el-upload
|
||||
action="/recruit/file/uploadAttachment"
|
||||
list-type="picture-card"
|
||||
name="file"
|
||||
:headers="headers"
|
||||
:limit="1"
|
||||
:data="uploadData"
|
||||
:file-list="yyPicList"
|
||||
:before-upload="beforeUpload"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:on-remove="remove3Handler"
|
||||
:http-request="httpRequest"
|
||||
:on-success="upload3Success">
|
||||
<i class="el-icon-plus" style="width: 100px;height: 100px;"></i>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row >
|
||||
<el-col :span="8">
|
||||
<el-form-item label="在常租赁合同/房产证明" prop="housePic">
|
||||
<el-upload
|
||||
action="/recruit/file/uploadAttachment"
|
||||
list-type="picture-card"
|
||||
name="file"
|
||||
:headers="headers"
|
||||
:limit="5"
|
||||
:data="uploadData"
|
||||
:file-list="houseList"
|
||||
:before-upload="beforeUpload"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:on-remove="remove4Handler"
|
||||
:http-request="httpRequest"
|
||||
:on-success="upload4Success">
|
||||
<i class="el-icon-plus" style="width: 100px;height: 100px;"></i>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="在常就业社保证明" prop="sbPic" >
|
||||
<el-upload
|
||||
action="/recruit/file/uploadAttachment"
|
||||
list-type="picture-card"
|
||||
name="file"
|
||||
:headers="headers"
|
||||
:limit="1"
|
||||
:data="uploadData"
|
||||
:file-list="sbPicList"
|
||||
:before-upload="beforeUpload"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:on-remove="remove5Handler"
|
||||
:http-request="httpRequest"
|
||||
:on-success="upload5Success">
|
||||
<i class="el-icon-plus" style="width: 100px;height: 100px;"></i>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="户口本" prop="householdPic" >
|
||||
<el-upload
|
||||
action="/recruit/file/uploadAttachment"
|
||||
list-type="picture-card"
|
||||
name="file"
|
||||
:headers="headers"
|
||||
:limit="5"
|
||||
:data="uploadData"
|
||||
:file-list="hkPicList"
|
||||
:before-upload="beforeUpload"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:on-remove="remove6Handler"
|
||||
:http-request="httpRequest"
|
||||
:on-success="upload6Success">
|
||||
<i class="el-icon-plus" style="width: 100px;height: 100px;"></i>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="材料审核意见" prop="zlshRemark" >
|
||||
<el-input v-model="dataForm.zlshRemark" placeholder="请输入审核意见" type="textarea" :rows="2" style=" width: 80%;text-align:center;margin-top: 10px "></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
|
||||
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer" >
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit('1')" v-if="canSubmit">保存</el-button>
|
||||
<el-button type="success" @click="dataFormSubmit('2')" v-if="canSubmit">通过</el-button>
|
||||
<el-button type="danger" @click="dataFormSubmit('3')" v-if="canSubmit">驳回</el-button>
|
||||
</span>
|
||||
|
||||
<el-dialog title="图片预览" :visible.sync="dialogUploadVisible" append-to-body>
|
||||
<img width="100%" :src="dialogImageUrl" alt="">
|
||||
</el-dialog>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getObj, updateInfo} from '@/api/recruit/recruitstudentsignup'
|
||||
import {list} from "@/api/recruit/recruitstudentplangroup";
|
||||
import {queryAllTeacher} from "@/api/professional/teacherbase";
|
||||
import store from "@/store";
|
||||
import {mapGetters} from "vuex";
|
||||
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
uploadData:{
|
||||
},
|
||||
visible: false,
|
||||
canSubmit: false,
|
||||
title: "",
|
||||
contactNameflag:false,
|
||||
form:{
|
||||
attachment:'',
|
||||
graPic:"",
|
||||
yyPic:"",
|
||||
housePic:"",
|
||||
sbPic:"",
|
||||
hkPic:""
|
||||
},
|
||||
fileList: [],
|
||||
graPicList:[],
|
||||
yyPicList:[],
|
||||
houseList:[],
|
||||
sbPicList:[],
|
||||
hkPicList:[],
|
||||
|
||||
fileReader: '',
|
||||
type:null,
|
||||
contactNameList:[],
|
||||
dataForm: {
|
||||
id: "",
|
||||
zlshRemark:"",
|
||||
groupId: "",
|
||||
name: "",
|
||||
oldName: "",
|
||||
gender: "",
|
||||
nationality: "",
|
||||
degreeOfEducation: "",
|
||||
isLeagueMember: "",
|
||||
schoolOfGraduation: "",
|
||||
isAccommodation: "",
|
||||
examRegistrationNumbers: "",
|
||||
isMinimumLivingSecurity: "",
|
||||
score: "",
|
||||
postcode: "",
|
||||
residenceType: "",
|
||||
correctedScore: "",
|
||||
placeScore: "",
|
||||
schoolFrom: "",
|
||||
idNumber: "",
|
||||
residenceProvince: "",
|
||||
residenceCity: "",
|
||||
residenceArea: "",
|
||||
residenceDetail: "",
|
||||
homeAddressProvince: "",
|
||||
homeAddressCity: "",
|
||||
homeAddressArea: "",
|
||||
homeAddressDetail: "",
|
||||
parentName: "",
|
||||
parentTelOne: "",
|
||||
parentTelTwo: "",
|
||||
selfTel: "",
|
||||
wishMajorOne: "",
|
||||
wishMajorTwo: "",
|
||||
wishMajorThree: "",
|
||||
confirmedMajor: "",
|
||||
sevenMajor:"",
|
||||
sixMajor:"",
|
||||
fiveMajor:"",
|
||||
fourMajor: "",
|
||||
threeMajor: "",
|
||||
twoMajor: "",
|
||||
feeContribute: 0,
|
||||
scorePhoto: "",
|
||||
graPic: "",
|
||||
yyPic: "",
|
||||
housePic: "",
|
||||
sbPic: "",
|
||||
contactName: "",
|
||||
oldSerialNumber: "",
|
||||
colorDiscrimination: "",
|
||||
nutrition: "",
|
||||
height: "",
|
||||
weight: "",
|
||||
pastMedicalHistory: "",
|
||||
eyesightLeft: "",
|
||||
eyesightRight: "",
|
||||
correctEyesightLeft: "",
|
||||
correctEyesightRight: "",
|
||||
remarks: "",
|
||||
auditRemarks: "",
|
||||
serialNumber: "",
|
||||
auditStatus:"",
|
||||
schoolCode:"",
|
||||
newConfirmedMajor: "",
|
||||
householdPic:""
|
||||
},
|
||||
disabled: false,
|
||||
planList: [],
|
||||
|
||||
deptList: [],
|
||||
|
||||
dialogImageUrl:"",
|
||||
dialogUploadVisible:false,
|
||||
|
||||
|
||||
dataRule: {
|
||||
groupId: [
|
||||
{required: true, message: '招生计划不能为空', trigger: 'change'}
|
||||
],
|
||||
name: [
|
||||
{required: true, message: '姓名不能为空', trigger: 'change'}
|
||||
],
|
||||
idNumber: [
|
||||
{required: true, message: '身份证不能为空', trigger: 'change'}
|
||||
],
|
||||
correctedScore: [
|
||||
{required: true, message: '成绩折算分不能为空', trigger: 'change'}
|
||||
],
|
||||
confirmedMajor:[
|
||||
{required: true, message: '原录取专业不能为空', trigger: 'change'}
|
||||
],
|
||||
newConfirmedMajor:[
|
||||
{required: true, message: '新录取专业不能为空', trigger: 'change'}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
|
||||
mounted: function() {
|
||||
if (!window.FileReader) {
|
||||
console.error('Your browser does not support FileReader API!')
|
||||
}
|
||||
this.fileReader = new FileReader()
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['permissions']),
|
||||
headers() {
|
||||
return {
|
||||
"Authorization": 'Bearer ' + store.getters.access_token
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
let _this = this;
|
||||
this.dataForm.id = id || null;
|
||||
this.visible = true;
|
||||
this.canSubmit = true;
|
||||
this.initData();
|
||||
this.isShow = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
getObj(this.dataForm.id).then(response => {
|
||||
this.fileList=[];
|
||||
this.graPicList=[];
|
||||
this.yyPicList=[];
|
||||
this.houseList=[];
|
||||
this.sbPicList=[];
|
||||
this.hkPicList=[];
|
||||
this.dataForm = response.data.data
|
||||
this.title = this.dataForm.serialNumber
|
||||
if(this.dataForm.scorePhoto !=''){
|
||||
let obj={url:this.dataForm.scorePhoto,name:""};
|
||||
this.fileList.push(obj);
|
||||
}
|
||||
if(this.dataForm.graPic !=''){
|
||||
let obj2 ={url:this.dataForm.graPic,name:""};
|
||||
this.graPicList.push(obj2);
|
||||
}
|
||||
if(this.dataForm.yyPic !=''){
|
||||
let obj3 ={url:this.dataForm.yyPic,name:""};
|
||||
this.yyPicList.push(obj3);
|
||||
}
|
||||
if(this.dataForm.housePic !=''){
|
||||
let arr = this.dataForm.housePic.split(",");
|
||||
arr.forEach(e=>{
|
||||
this.houseList.push({url:e});
|
||||
});
|
||||
}
|
||||
if(this.dataForm.sbPic !=''){
|
||||
let obj4 ={url:this.dataForm.sbPic,name:""};
|
||||
this.sbPicList.push(obj4);
|
||||
}
|
||||
if(this.dataForm.householdPic !=''){
|
||||
let arr2 = this.dataForm.householdPic.split(",");
|
||||
arr2.forEach(e=>{
|
||||
this.hkPicList.push({url:e});
|
||||
});
|
||||
}
|
||||
|
||||
if ("1" == this.dataForm.degreeOfEducation) {
|
||||
this.title = "C" + this.title;
|
||||
} else if ("2" == this.dataForm.degreeOfEducation) {
|
||||
this.title = "G" + this.title;
|
||||
} else if ("3" == this.dataForm.degreeOfEducation) {
|
||||
this.title = "J" + this.title;
|
||||
}
|
||||
this.contactNameflag= false;
|
||||
if("-20" == this.dataForm.auditStatus){
|
||||
this.title ="未录取 "+this.title;
|
||||
}else if("0" == this.dataForm.auditStatus){
|
||||
this.title ="待审核 "+this.title;
|
||||
}else if("20" == this.dataForm.auditStatus){
|
||||
this.title ="已录取 "+this.title;
|
||||
this.contactNameflag= true;
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
beforeUpload (file) {
|
||||
const isLt5M = file.size < 10 * 1024 * 1024
|
||||
if (!isLt5M) {
|
||||
alert('文件大小不能超过10M')
|
||||
return false
|
||||
}
|
||||
},
|
||||
//图片预览
|
||||
handlePictureCardPreview(file) {
|
||||
this.dialogImageUrl = file.url;
|
||||
this.dialogUploadVisible = true;
|
||||
},
|
||||
handlePicCardPreview(file) {
|
||||
this.dialogImageUrl = file;
|
||||
this.dialogUploadVisible = true;
|
||||
},
|
||||
removeHandler (file, fileList) {
|
||||
let index = this.fileList.indexOf(file.key)
|
||||
this.fileList.splice(index, 1)
|
||||
this.form.attachment=""
|
||||
this.dataForm.scorePhoto="";
|
||||
},
|
||||
remove2Handler(file, fileList) {
|
||||
let index = this.graPicList.indexOf(file.key)
|
||||
this.graPicList.splice(index, 1)
|
||||
this.form.graPic=""
|
||||
this.dataForm.graPic=""
|
||||
},
|
||||
remove3Handler(file, fileList) {
|
||||
let index = this.yyPicList.indexOf(file.key)
|
||||
this.yyPicList.splice(index, 1)
|
||||
this.form.yyPic=""
|
||||
this.dataForm.yyPic=""
|
||||
},
|
||||
remove4Handler(file, fileList) {
|
||||
let arr = [];
|
||||
let strArr=[];
|
||||
this.houseList.forEach(e=>{
|
||||
if(e.url != file.url){
|
||||
arr.push(e);
|
||||
strArr.push(e.url);
|
||||
}
|
||||
})
|
||||
this.houseList=arr;
|
||||
this.dataForm.housePic=strArr.join(",");
|
||||
},
|
||||
remove5Handler(file, fileList) {
|
||||
alert(file.key);
|
||||
let index = this.sbPicList.indexOf(file.key)
|
||||
this.sbPicList.splice(index, 1)
|
||||
this.form.sbPic=""
|
||||
this.dataForm.sbPic="";
|
||||
},
|
||||
remove6Handler(file, fileList) {
|
||||
let arr = [];
|
||||
let strArr=[];
|
||||
this.hkPicList.forEach(e=>{
|
||||
if(e.url != file.url){
|
||||
arr.push(e);
|
||||
strArr.push(e.url);
|
||||
}
|
||||
})
|
||||
this.hkPicList=arr;
|
||||
this.dataForm.householdPic=strArr.join(",");
|
||||
},
|
||||
|
||||
httpRequest (options) {
|
||||
let _that = this;
|
||||
let file = options.file
|
||||
let filename = file.name
|
||||
if (file) {
|
||||
this.fileReader.readAsDataURL(file)
|
||||
}
|
||||
this.fileReader.onload = () => {
|
||||
let base64Str = this.fileReader.result
|
||||
let config = {
|
||||
url: '/recruit/file/uploadAttachment',
|
||||
method: 'post',
|
||||
data: {
|
||||
base64Str: base64Str.split(',')[1]
|
||||
},
|
||||
timeout: 10000,
|
||||
onUploadProgress: function (progressEvent) {
|
||||
|
||||
progressEvent.percent = progressEvent.loaded / progressEvent.total * 100
|
||||
options.onProgress(progressEvent, file)
|
||||
},
|
||||
}
|
||||
axios(config)
|
||||
.then(res => {
|
||||
options.onSuccess(res, file)
|
||||
})
|
||||
.catch(err => {
|
||||
options.onError(err)
|
||||
})
|
||||
}
|
||||
},
|
||||
uploadSuccess (res, file, fileList) {
|
||||
this.form.attachment = res.data.fileUrl;
|
||||
this.fileList[0] = this.form.attachment;
|
||||
this.dataForm.scorePhoto = this.form.attachment;
|
||||
},
|
||||
upload2Success (res, file, fileList) {
|
||||
this.form.graPic = res.data.fileUrl;
|
||||
this.graPicList[0] = this.form.graPic;
|
||||
this.dataForm.graPic = this.form.graPic;
|
||||
},
|
||||
upload3Success (res, file, fileList) {
|
||||
this.form.yyPic = res.data.fileUrl;
|
||||
this.yyPicList[0] = this.form.yyPic;
|
||||
this.dataForm.yyPic = this.form.yyPic;
|
||||
},
|
||||
upload4Success (res, file, fileList) {
|
||||
this.form.housePic = res.data.fileUrl;
|
||||
this.houseList.push({url:this.form.housePic});
|
||||
let arr =[];
|
||||
this.houseList.forEach(e=>{
|
||||
arr.push(e.url);
|
||||
})
|
||||
this.dataForm.housePic = arr.join(",");
|
||||
},
|
||||
upload5Success (res, file, fileList) {
|
||||
this.form.sbPic = res.data.fileUrl;
|
||||
this.sbPicList.push(this.form.sbPic);
|
||||
this.dataForm.sbPic = this.sbPicList.join(",");
|
||||
},
|
||||
upload6Success(res, file, fileList) {
|
||||
this.form.hkPic = res.data.fileUrl;
|
||||
this.hkPicList.push({url:this.form.hkPic});
|
||||
let arr =[];
|
||||
this.hkPicList.forEach(e=>{
|
||||
arr.push(e.url);
|
||||
})
|
||||
this.dataForm.householdPic = arr.join(",");
|
||||
},
|
||||
|
||||
initData() {
|
||||
let _this = this;
|
||||
list().then(data => {
|
||||
_this.planList = data.data.data
|
||||
});
|
||||
//联系人(教职工)
|
||||
queryAllTeacher().then(res =>{
|
||||
_this.contactNameList = res.data.data
|
||||
});
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit(type) {
|
||||
let _this = this;
|
||||
if(this.dataForm.zlshRemark=='' && type=='3'){
|
||||
_this.$notify.error('请填写驳回理由')
|
||||
return
|
||||
}
|
||||
_this.dataForm.zlsh=type;
|
||||
updateInfo(_this.dataForm).then(data => {
|
||||
_this.$notify.success('操作成功')
|
||||
_this.visible = false
|
||||
_this.$emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
_this.canSubmit = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
308
src/views/recruit/recruitstudentsignupturnover/index.vue
Normal file
308
src/views/recruit/recruitstudentsignupturnover/index.vue
Normal file
@@ -0,0 +1,308 @@
|
||||
<!--
|
||||
- Copyright (c) 2018-2025, cyweb All rights reserved.
|
||||
-
|
||||
- Redistribution and use in source and binary forms, with or without
|
||||
- modification, are permitted provided that the following conditions are met:
|
||||
-
|
||||
- Redistributions of source code must retain the above copyright notice,
|
||||
- this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
- notice, this list of conditions and the following disclaimer in the
|
||||
- documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of the pig4cloud.com developer nor the names of its
|
||||
- contributors may be used to endorse or promote products derived from
|
||||
- this software without specific prior written permission.
|
||||
-
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<!-- 搜索表单 -->
|
||||
<el-form :model="queryForm" inline class="mb-4" ref="searchFormRef">
|
||||
<el-form-item label="招生计划" prop="groupId">
|
||||
<el-select v-model="queryForm.groupId" filterable clearable placeholder="请选择招生计划">
|
||||
<el-option
|
||||
v-for="item in planList"
|
||||
:key="item.id"
|
||||
:label="item.groupName"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="唯一号/姓名/身份证号" prop="search">
|
||||
<el-input v-model="queryForm.search" clearable placeholder="唯一号/姓名/身份证号/学校名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="异动审核" prop="isMajorChange">
|
||||
<el-select v-model="queryForm.isMajorChange" filterable clearable placeholder="请选择异动审核">
|
||||
<el-option
|
||||
v-for="item in majorChangeList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="getDataList">查询</el-button>
|
||||
<el-button type="primary" plain icon="Refresh" class="ml10" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
ref="tableRef"
|
||||
:data="state.dataList"
|
||||
v-loading="state.loading"
|
||||
border
|
||||
stripe
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="type" label="异动类型" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{ getTypeLabel(scope.row.type) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="姓名[唯一号]" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="majorChangeInfo" label="专业变更情况" align="center" show-overflow-tooltip />
|
||||
<el-table-column label="学费变更情况" align="center">
|
||||
<el-table-column prop="dbName" label="费用类型" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="dbOldValue" label="原费用" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="dbNewValue" label="新费用" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="dbType" label="变更类型" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="dbChangeValue" label="变更金额" align="center" show-overflow-tooltip />
|
||||
</el-table-column>
|
||||
<el-table-column label="分数变更情况" align="center">
|
||||
<el-table-column prop="scoreName" label="分数类型" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="scoreOldValue" label="原分值" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="scoreNewValue" label="新分值" align="center" show-overflow-tooltip />
|
||||
</el-table-column>
|
||||
<el-table-column prop="createBy" label="异动发起人" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="createDate" label="异动时间" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="remarks" label="备注信息" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="isMajorChange" label="异动审核" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.isMajorChange == '0'" style="color: green">{{ getMajor(scope.row.isMajorChange) }}</span>
|
||||
<span v-if="scope.row.isMajorChange != '0'" style="color: red">{{ getMajor(scope.row.isMajorChange) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100" align="center" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitstudentsignupturnover_edit && scope.row.isMajorChange == '1'"
|
||||
type="primary"
|
||||
link
|
||||
icon="EditPen"
|
||||
@click="majorchange(scope.row.id, scope.row.groupId)"
|
||||
>
|
||||
审核
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<pagination
|
||||
v-bind="state.pagination"
|
||||
@current-change="currentChangeHandle"
|
||||
@size-change="sizeChangeHandle"
|
||||
/>
|
||||
|
||||
<!-- 异动审核弹窗 -->
|
||||
<el-dialog v-model="majorChangeVisible" title="异动审核">
|
||||
<el-form :model="exarmForm" ref="exarmFormRef" label-width="80px" :rules="dataRule">
|
||||
<el-form-item label="审核结果" prop="isMajorChange">
|
||||
<el-select v-model="exarmForm.isMajorChange" filterable clearable placeholder="请选择审核结果" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in isMajorChangeList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核意见" prop="remarks">
|
||||
<el-input
|
||||
type="textarea"
|
||||
placeholder="请输入审核内容"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
style="width: 100%"
|
||||
v-model="exarmForm.remarks"
|
||||
maxlength="20"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="update">保存</el-button>
|
||||
<el-button @click="cancelPlace">关闭</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="recruitstudentsignupturnover">
|
||||
import { ref, reactive, computed, onMounted, defineAsyncComponent } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useUserInfo } from '/@/stores/userInfo'
|
||||
import { BasicTableProps, useTable } from '/@/hooks/table'
|
||||
import { useMessage, useMessageBox } from '/@/hooks/message'
|
||||
import { fetchList, putObj } from '/@/api/recruit/recruitstudentsignupturnover'
|
||||
import { list } from '/@/api/recruit/recruitstudentplangroup'
|
||||
|
||||
// 使用 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
|
||||
})
|
||||
|
||||
// 消息提示 hooks
|
||||
const message = useMessage()
|
||||
const messageBox = useMessageBox()
|
||||
|
||||
// 表格引用
|
||||
const tableRef = ref()
|
||||
const searchFormRef = ref()
|
||||
const exarmFormRef = ref()
|
||||
|
||||
// 弹窗状态
|
||||
const majorChangeVisible = ref(false)
|
||||
|
||||
// 数据
|
||||
const planList = ref<any[]>([])
|
||||
const typeList = ref([{ label: '专业变更', value: '1' }, { label: '退学', value: '2' }])
|
||||
const isMajorChangeList = ref([{ label: '通过', value: '3' }, { label: '驳回', value: '2' }])
|
||||
const majorChangeList = ref([{ label: '通过', value: '3' }, { label: '驳回', value: '2' }, { label: '待审核', value: '1' }])
|
||||
|
||||
// 查询表单
|
||||
const queryForm = reactive({
|
||||
groupId: '',
|
||||
search: '',
|
||||
isMajorChange: ''
|
||||
})
|
||||
|
||||
// 审核表单
|
||||
const exarmForm = reactive({
|
||||
id: '',
|
||||
isMajorChange: '',
|
||||
examRemark: '',
|
||||
groupId: '',
|
||||
remarks: ''
|
||||
})
|
||||
|
||||
// 表单验证规则
|
||||
const dataRule = {
|
||||
isMajorChange: [
|
||||
{ required: true, message: '请选择审核结果', trigger: 'change' }
|
||||
]
|
||||
}
|
||||
|
||||
// 获取异动类型标签
|
||||
const getTypeLabel = (type: string) => {
|
||||
const item = typeList.value.find(item => item.value === type)
|
||||
return item ? item.label : ''
|
||||
}
|
||||
|
||||
// 获取审核状态
|
||||
const getMajor = (type: string) => {
|
||||
if (type == '1') {
|
||||
return '待审核'
|
||||
} else if (type == '2') {
|
||||
return '驳回'
|
||||
} else if (type == '3') {
|
||||
return '已通过'
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
// 表格状态
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
queryForm: queryForm,
|
||||
pageList: async (params: any) => {
|
||||
const response = await fetchList(params)
|
||||
return {
|
||||
data: {
|
||||
records: response.data.data.records,
|
||||
total: response.data.data.total
|
||||
}
|
||||
}
|
||||
},
|
||||
createdIsNeed: false
|
||||
})
|
||||
|
||||
// 使用 table hook
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, tableStyle } = useTable(state)
|
||||
|
||||
// 初始化
|
||||
const init = async () => {
|
||||
try {
|
||||
const data = await list()
|
||||
planList.value = data.data.data || []
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
}
|
||||
getDataList()
|
||||
} catch (error) {
|
||||
console.error('初始化失败', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 打开审核弹窗
|
||||
const majorchange = (id: string, groupId: string) => {
|
||||
exarmForm.id = id
|
||||
exarmForm.groupId = groupId
|
||||
exarmForm.isMajorChange = ''
|
||||
exarmForm.remarks = ''
|
||||
majorChangeVisible.value = true
|
||||
}
|
||||
|
||||
// 取消审核
|
||||
const cancelPlace = () => {
|
||||
majorChangeVisible.value = false
|
||||
}
|
||||
|
||||
// 保存审核
|
||||
const update = async () => {
|
||||
try {
|
||||
const valid = await exarmFormRef.value?.validate().catch(() => {})
|
||||
if (!valid) return
|
||||
|
||||
await putObj(exarmForm)
|
||||
message.success('审核成功')
|
||||
majorChangeVisible.value = false
|
||||
getDataList()
|
||||
} catch (error: any) {
|
||||
message.error(error.msg || '审核失败')
|
||||
}
|
||||
}
|
||||
|
||||
// 重置查询
|
||||
const resetQuery = () => {
|
||||
searchFormRef.value?.resetFields()
|
||||
Object.keys(queryForm).forEach(key => {
|
||||
queryForm[key] = ''
|
||||
})
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
}
|
||||
getDataList()
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
init()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
160
src/views/recruit/recruitstudentsignupturnover/indexOld.vue
Normal file
160
src/views/recruit/recruitstudentsignupturnover/indexOld.vue
Normal file
@@ -0,0 +1,160 @@
|
||||
<!--
|
||||
- Copyright (c) 2018-2025, cyweb All rights reserved.
|
||||
-
|
||||
- Redistribution and use in source and binary forms, with or without
|
||||
- modification, are permitted provided that the following conditions are met:
|
||||
-
|
||||
- Redistributions of source code must retain the above copyright notice,
|
||||
- this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
- notice, this list of conditions and the following disclaimer in the
|
||||
- documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of the pig4cloud.com developer nor the names of its
|
||||
- contributors may be used to endorse or promote products derived from
|
||||
- this software without specific prior written permission.
|
||||
-
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="execution">
|
||||
<basic-container>
|
||||
<avue-crud ref="crud"
|
||||
:page="page"
|
||||
:data="tableData"
|
||||
:table-loading="tableLoading"
|
||||
:option="tableOption"
|
||||
@on-load="getList"
|
||||
@search-change="handleFilter"
|
||||
@refresh-change="refreshChange"
|
||||
@row-update="handleUpdate"
|
||||
@row-save="handleSave"
|
||||
@row-del="rowDel">
|
||||
</avue-crud>
|
||||
</basic-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {addObj, delObj, fetchList, putObj} from '@/api/recruit/recruitstudentsignupturnover'
|
||||
import {tableOption} from '@/const/crud/recruit/recruitstudentsignupturnover'
|
||||
import {mapGetters} from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'recruitstudentsignupturnover',
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
page: {
|
||||
total: 0, // 总页数
|
||||
currentPage: 1, // 当前页数
|
||||
pageSize: 10 // 每页显示多少条
|
||||
},
|
||||
tableLoading: false,
|
||||
tableOption: tableOption,
|
||||
params:{}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
mounted: function() { },
|
||||
computed: {
|
||||
...mapGetters(['permissions'])
|
||||
},
|
||||
methods: {
|
||||
getList(page) {
|
||||
this.tableLoading = true
|
||||
fetchList(Object.assign({
|
||||
current: page.currentPage,
|
||||
size: page.pageSize
|
||||
}, this.params)).then(response => {
|
||||
this.tableData = response.data.data.records
|
||||
this.page.total = response.data.data.total
|
||||
this.tableLoading = false
|
||||
})
|
||||
},
|
||||
/**
|
||||
* @title 打开新增窗口
|
||||
* @detail 调用crud的handleadd方法即可
|
||||
*
|
||||
**/
|
||||
handleAdd: function() {
|
||||
this.$refs.crud.rowAdd()
|
||||
},
|
||||
handleEdit(row, index) {
|
||||
this.$refs.crud.rowEdit(row, index)
|
||||
},
|
||||
handleDel(row, index) {
|
||||
this.$refs.crud.rowDel(row, index)
|
||||
},
|
||||
rowDel: function(row, index) {
|
||||
var _this = this
|
||||
this.$confirm('是否确认删除ID为' + row.id, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(function() {
|
||||
return delObj(row.id)
|
||||
}).then(data => {
|
||||
_this.tableData.splice(index, 1)
|
||||
_this.$message({
|
||||
showClose: true,
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.getList(this.page)
|
||||
}).catch(function(err) { })
|
||||
},
|
||||
/**
|
||||
* @title 数据更新
|
||||
* @param row 为当前的数据
|
||||
* @param index 为当前更新数据的行数
|
||||
* @param done 为表单关闭函数
|
||||
*
|
||||
**/
|
||||
handleUpdate: function(row, index, done) {
|
||||
putObj(row).then(data => {
|
||||
this.tableData.splice(index, 1, Object.assign({}, row))
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: '修改成功',
|
||||
type: 'success'
|
||||
})
|
||||
done()
|
||||
this.getList(this.page)
|
||||
})
|
||||
},
|
||||
/**
|
||||
* @title 数据添加
|
||||
* @param row 为当前的数据
|
||||
* @param done 为表单关闭函数
|
||||
*
|
||||
**/
|
||||
handleSave: function(row, done) {
|
||||
addObj(row).then(data => {
|
||||
this.tableData.push(Object.assign({}, row))
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: '添加成功',
|
||||
type: 'success'
|
||||
})
|
||||
done()
|
||||
this.getList(this.page)
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 刷新回调
|
||||
*/
|
||||
refreshChange() {
|
||||
this.getList(this.page)
|
||||
},
|
||||
handleFilter(param){
|
||||
this.params = param;
|
||||
this.page.currentPage = 1;
|
||||
this.getList(this.page);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
@@ -0,0 +1,288 @@
|
||||
<!--
|
||||
- Copyright (c) 2018-2025, cyweb All rights reserved.
|
||||
-
|
||||
- Redistribution and use in source and binary forms, with or without
|
||||
- modification, are permitted provided that the following conditions are met:
|
||||
-
|
||||
- Redistributions of source code must retain the above copyright notice,
|
||||
- this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
- notice, this list of conditions and the following disclaimer in the
|
||||
- documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of the pig4cloud.com developer nor the names of its
|
||||
- contributors may be used to endorse or promote products derived from
|
||||
- this software without specific prior written permission.
|
||||
-
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<!-- 搜索表单 -->
|
||||
<el-form :model="queryForm" inline class="mb-4">
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="getDataList">查询</el-button>
|
||||
<el-button type="primary" plain icon="Refresh" class="ml10" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="permissions.recruit_recruitstudentsignupturnovermoneychange_add">
|
||||
<el-button type="primary" icon="FolderAdd" class="ml10" @click="handleAdd">新增</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
ref="tableRef"
|
||||
:data="state.dataList"
|
||||
v-loading="state.loading"
|
||||
border
|
||||
stripe
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="turnOverId" label="异动ID" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="type" label="退补类型 1:学费 2:代办费 3:捐资费" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="oldFee" label="原费用" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="newFee" label="变更后费用" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="fee" label="变更费用" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="incOrDec" label="补还是退 1:补 2:退" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="pushed" label="是否推送,预留字段,单项推送则需要该字段" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="pushFailReason" label="推送失败原因" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="createBy" label="创建者" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="createDate" label="创建时间" align="center" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="150" align="center" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitstudentsignupturnovermoneychange_edit"
|
||||
type="primary"
|
||||
link
|
||||
icon="EditPen"
|
||||
@click="handleEdit(scope.row)"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitstudentsignupturnovermoneychange_del"
|
||||
type="danger"
|
||||
link
|
||||
icon="Delete"
|
||||
@click="handleDel(scope.row)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<pagination
|
||||
v-bind="state.pagination"
|
||||
@current-change="currentChangeHandle"
|
||||
@size-change="sizeChangeHandle"
|
||||
/>
|
||||
|
||||
<!-- 新增/编辑弹窗 -->
|
||||
<el-dialog
|
||||
v-model="dialogVisible"
|
||||
:title="form.id ? '编辑' : '新增'"
|
||||
width="600px"
|
||||
:close-on-click-modal="false"
|
||||
destroy-on-close
|
||||
>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="form"
|
||||
:rules="formRules"
|
||||
label-width="200px"
|
||||
>
|
||||
<el-form-item label="异动ID" prop="turnOverId">
|
||||
<el-input v-model="form.turnOverId" placeholder="请输入异动ID" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="退补类型" prop="type">
|
||||
<el-select v-model="form.type" placeholder="请选择退补类型" clearable style="width: 100%">
|
||||
<el-option label="学费" value="1" />
|
||||
<el-option label="代办费" value="2" />
|
||||
<el-option label="捐资费" value="3" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="原费用" prop="oldFee">
|
||||
<el-input-number v-model="form.oldFee" :min="0" :precision="2" placeholder="请输入原费用" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="变更后费用" prop="newFee">
|
||||
<el-input-number v-model="form.newFee" :min="0" :precision="2" placeholder="请输入变更后费用" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="变更费用" prop="fee">
|
||||
<el-input-number v-model="form.fee" :precision="2" placeholder="请输入变更费用" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="补还是退" prop="incOrDec">
|
||||
<el-select v-model="form.incOrDec" placeholder="请选择补还是退" clearable style="width: 100%">
|
||||
<el-option label="补" value="1" />
|
||||
<el-option label="退" value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否推送" prop="pushed">
|
||||
<el-select v-model="form.pushed" placeholder="请选择是否推送" clearable style="width: 100%">
|
||||
<el-option label="是" value="1" />
|
||||
<el-option label="否" value="0" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="推送失败原因" prop="pushFailReason">
|
||||
<el-input v-model="form.pushFailReason" type="textarea" :rows="3" placeholder="请输入推送失败原因" clearable />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="handleSubmit" :loading="submitLoading">确定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="recruitstudentsignupturnovermoneychange">
|
||||
import { ref, reactive, computed, onMounted } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useUserInfo } from '/@/stores/userInfo'
|
||||
import { BasicTableProps, useTable } from '/@/hooks/table'
|
||||
import { useMessage, useMessageBox } from '/@/hooks/message'
|
||||
import { addObj, delObj, fetchList, putObj } from '/@/api/recruit/recruitstudentsignupturnovermoneychange'
|
||||
|
||||
// 使用 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
|
||||
})
|
||||
|
||||
// 消息提示 hooks
|
||||
const message = useMessage()
|
||||
const messageBox = useMessageBox()
|
||||
|
||||
// 表格引用
|
||||
const tableRef = ref()
|
||||
const formRef = ref()
|
||||
|
||||
// 弹窗状态
|
||||
const dialogVisible = ref(false)
|
||||
const submitLoading = ref(false)
|
||||
|
||||
// 查询表单
|
||||
const queryForm = reactive({})
|
||||
|
||||
// 表单数据
|
||||
const form = reactive({
|
||||
id: '',
|
||||
turnOverId: '',
|
||||
type: '',
|
||||
oldFee: undefined,
|
||||
newFee: undefined,
|
||||
fee: undefined,
|
||||
incOrDec: '',
|
||||
pushed: '',
|
||||
pushFailReason: ''
|
||||
})
|
||||
|
||||
// 表单验证规则
|
||||
const formRules = {}
|
||||
|
||||
// 表格状态
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
queryForm: queryForm,
|
||||
pageList: async (params: any) => {
|
||||
const response = await fetchList(params)
|
||||
return {
|
||||
data: {
|
||||
records: response.data.data.records,
|
||||
total: response.data.data.total
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
// 使用 table hook
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, tableStyle } = useTable(state)
|
||||
|
||||
// 重置查询
|
||||
const resetQuery = () => {
|
||||
Object.keys(queryForm).forEach(key => {
|
||||
queryForm[key] = ''
|
||||
})
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 新增
|
||||
const handleAdd = () => {
|
||||
Object.keys(form).forEach(key => {
|
||||
if (key === 'id') {
|
||||
form[key] = ''
|
||||
} else if (typeof form[key] === 'number') {
|
||||
form[key] = undefined
|
||||
} else {
|
||||
form[key] = ''
|
||||
}
|
||||
})
|
||||
dialogVisible.value = true
|
||||
}
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (row: any) => {
|
||||
Object.keys(form).forEach(key => {
|
||||
form[key] = row[key]
|
||||
})
|
||||
dialogVisible.value = true
|
||||
}
|
||||
|
||||
// 删除
|
||||
const handleDel = async (row: any) => {
|
||||
try {
|
||||
await messageBox.confirm(`是否确认删除ID为${row.id}的记录?`)
|
||||
await delObj(row.id)
|
||||
message.success('删除成功')
|
||||
getDataList()
|
||||
} catch {
|
||||
// 用户取消
|
||||
}
|
||||
}
|
||||
|
||||
// 提交表单
|
||||
const handleSubmit = async () => {
|
||||
if (!formRef.value) return
|
||||
|
||||
await formRef.value.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
submitLoading.value = true
|
||||
try {
|
||||
if (form.id) {
|
||||
await putObj(form)
|
||||
message.success('修改成功')
|
||||
} else {
|
||||
await addObj(form)
|
||||
message.success('添加成功')
|
||||
}
|
||||
dialogVisible.value = false
|
||||
getDataList()
|
||||
} catch (error: any) {
|
||||
message.error(error.msg || '操作失败')
|
||||
} finally {
|
||||
submitLoading.value = false
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getDataList()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
30
src/views/recruit/zizhu/index.vue
Normal file
30
src/views/recruit/zizhu/index.vue
Normal file
@@ -0,0 +1,30 @@
|
||||
<!--
|
||||
- Copyright (c) 2018-2025, cyweb All rights reserved.
|
||||
-
|
||||
- Redistribution and use in source and binary forms, with or without
|
||||
- modification, are permitted provided that the following conditions are met:
|
||||
-
|
||||
- Redistributions of source code must retain the above copyright notice,
|
||||
- this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
- notice, this list of conditions and the following disclaimer in the
|
||||
- documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of the pig4cloud.com developer nor the names of its
|
||||
- contributors may be used to endorse or promote products derived from
|
||||
- this software without specific prior written permission.
|
||||
-
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<iframe style="width:100%;height:700px;" src="https://zhxy.czjsy.com/2023zzzc.pdf"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="zizhu">
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
Reference in New Issue
Block a user