From a9e5e2b3683532b286aa1263853bee62e0236d3b Mon Sep 17 00:00:00 2001 From: zhoutianchi <1305666981@qq.com> Date: Thu, 26 Feb 2026 16:08:25 +0800 Subject: [PATCH] 1 --- src/api/recruit/recruitPreexamPeople.ts | 56 +++++ src/api/recruit/recruitSchoolHistory.ts | 89 ------- .../recruit/common/import-recruit-info.vue | 3 +- src/views/recruit/recruitPolicyFile/form.vue | 127 +++++----- src/views/recruit/recruitPolicyFile/index.vue | 37 ++- .../recruit/recruitPreexamPeople/add-form.vue | 129 ++++++++++ .../recruit/recruitPreexamPeople/index.vue | 225 ++++++++++++++++++ src/views/recruit/recruitprestudent/index.vue | 25 ++ .../recruit/recruitstudentschool/index.vue | 36 ++- .../recruitstudentschool/school-history.vue | 63 +++++ 10 files changed, 619 insertions(+), 171 deletions(-) create mode 100644 src/api/recruit/recruitPreexamPeople.ts create mode 100644 src/views/recruit/recruitPreexamPeople/add-form.vue create mode 100644 src/views/recruit/recruitPreexamPeople/index.vue create mode 100644 src/views/recruit/recruitstudentschool/school-history.vue diff --git a/src/api/recruit/recruitPreexamPeople.ts b/src/api/recruit/recruitPreexamPeople.ts new file mode 100644 index 0000000..134832f --- /dev/null +++ b/src/api/recruit/recruitPreexamPeople.ts @@ -0,0 +1,56 @@ +import request from "/@/utils/request" + +// ========== 基础CRUD接口 ========== + +/** + * 分页查询列表数据 + * @param query - 查询参数对象 + * @returns Promise<分页数据> + */ +export function fetchList(query?: Object) { + return request({ + url: '/recruit/recruitPreexamPeople/page', + method: 'get', + params: query + }) +} + +/** + * 新增数据 + * @param obj - 要新增的数据对象 + * @returns Promise - 操作结果 + */ +export function addObj(obj?: Object) { + return request({ + url: '/recruit/recruitPreexamPeople', + method: 'post', + data: obj + }) +} + +/** + * 获取详情数据 + * @param obj - 查询参数对象(包含ID等) + * @returns Promise<数据详情> + */ +export function getObj(obj?: Object) { + return request({ + url: '/recruit/recruitPreexamPeople/details', + method: 'get', + params: obj + }) +} + +/** + * 删除 + * @param id + */ +export const delObj = (id: string | number) => { + return request({ + url: `/recruit/recruitPreexamPeople/delete`, + method: 'post', + data: { id: id } + }); +}; + + diff --git a/src/api/recruit/recruitSchoolHistory.ts b/src/api/recruit/recruitSchoolHistory.ts index 3e1c2a2..113e0eb 100644 --- a/src/api/recruit/recruitSchoolHistory.ts +++ b/src/api/recruit/recruitSchoolHistory.ts @@ -15,92 +15,3 @@ export function fetchList(query?: Object) { }) } -/** - * 新增数据 - * @param obj - 要新增的数据对象 - * @returns Promise - 操作结果 - */ -export function addObj(obj?: Object) { - return request({ - url: '/recruit/recruitSchoolHistory', - method: 'post', - data: obj - }) -} - -/** - * 获取详情数据 - * @param obj - 查询参数对象(包含ID等) - * @returns Promise<数据详情> - */ -export function getObj(obj?: Object) { - return request({ - url: '/recruit/recruitSchoolHistory/details', - method: 'get', - params: obj - }) -} - -/** - * 批量删除数据 - * @param ids - 要删除的ID数组 - * @returns Promise<操作结果> - */ -export function delObjs(ids?: Object) { - return request({ - url: '/recruit/recruitSchoolHistory', - method: 'delete', - data: ids - }) -} - -/** - * 更新数据 - * @param obj - 要更新的数据对象 - * @returns Promise<操作结果> - */ -export function putObj(obj?: Object) { - return request({ - url: '/recruit/recruitSchoolHistory', - method: 'put', - data: obj - }) -} - -// ========== 工具函数 ========== - -/** - * 验证字段值唯一性 - * @param rule - 验证规则对象 - * @param value - 要验证的值 - * @param callback - 验证回调函数 - * @param isEdit - 是否为编辑模式 - * - * @example - * // 在表单验证规则中使用 - * fieldName: [ - * { - * validator: (rule, value, callback) => { - * validateExist(rule, value, callback, form.id !== ''); - * }, - * trigger: 'blur', - * }, - * ] - */ -export function validateExist(rule: any, value: any, callback: any, isEdit: boolean) { - // 编辑模式下跳过验证 - if (isEdit) { - return callback(); - } - - // 查询是否存在相同值 - getObj({ [rule.field]: value }).then((response) => { - const result = response.data; - if (result !== null && result.length > 0) { - callback(new Error('数据已经存在')); - } else { - callback(); - } - }); -} - diff --git a/src/views/recruit/common/import-recruit-info.vue b/src/views/recruit/common/import-recruit-info.vue index b7a35ff..83e2fd2 100644 --- a/src/views/recruit/common/import-recruit-info.vue +++ b/src/views/recruit/common/import-recruit-info.vue @@ -61,7 +61,8 @@ const uploadRef = ref<{ clearFiles?: () => void }>() const titleMap: Record = { R10001: '计划专业导入', R10002: '地区分数导入', - R10003: '中招平台数据导入' + R10003: '中招平台数据导入', + R10004: '学校维护导入', } // 方法 const init = (type: any) => { diff --git a/src/views/recruit/recruitPolicyFile/form.vue b/src/views/recruit/recruitPolicyFile/form.vue index b895578..6562f78 100644 --- a/src/views/recruit/recruitPolicyFile/form.vue +++ b/src/views/recruit/recruitPolicyFile/form.vue @@ -10,23 +10,42 @@ + -
- -
- + :action="uploadUrl" + :file-list="fileList" + :on-success="handleUploadSuccess" + :accept="'.pdf'" + > + 点击上传 +
+ + + + + + + + + + + + + + + + + + + +
@@ -54,6 +73,7 @@ import {Plus} from "@element-plus/icons-vue"; import {reactive, ref} from "vue"; import axios from "axios"; import { Session } from '/@/utils/storage' +const fileList = ref([]) // ========== 2. 组件定义 ========== // 定义组件事件 @@ -74,7 +94,7 @@ const form = reactive({ type: '', // 1 资助政策文件 }); -const uploadUrl = baseUrl + '/recruit/file/uploadAttachment' +const uploadUrl = baseUrl + '/recruit/file/uploadPdf' // 请求头 const headers = computed(() => { return { @@ -84,35 +104,6 @@ const headers = computed(() => { const uploadData = reactive({}) const fileReader = ref(null) -const httpRequest = (options: any) => { - const file = options.file - if (file && fileReader.value) { - fileReader.value.readAsDataURL(file) - fileReader.value.onload = () => { - const base64Str = fileReader.value?.result as string - const config = { - url: uploadUrl, - method: 'post', - headers: headers.value, - data: { - base64Str: base64Str.split(',')[1] - }, - timeout: 10000, - onUploadProgress: function (progressEvent: any) { - progressEvent.percent = progressEvent.loaded / progressEvent.total * 100 - options.onProgress(progressEvent, file) - }, - } - axios(config) - .then((res: any) => { - options.onSuccess(res, file) - }) - .catch((err: any) => { - options.onError(err) - }) - } - } -} // 上传前验证 @@ -126,7 +117,7 @@ const beforeUpload = (file: File) => { } // 通用上传成功回调(单文件 - avatar模式) const handleUploadSuccess = (res:any) => { - const fileUrl = res.data.fileUrl + const fileUrl = res.fileUrl form['fileUrl'] = fileUrl } // ========== 4. 字典数据处理 ========== @@ -213,30 +204,30 @@ defineExpose({ + diff --git a/src/views/recruit/recruitPreexamPeople/index.vue b/src/views/recruit/recruitPreexamPeople/index.vue new file mode 100644 index 0000000..c98bd02 --- /dev/null +++ b/src/views/recruit/recruitPreexamPeople/index.vue @@ -0,0 +1,225 @@ + + + + + + + diff --git a/src/views/recruit/recruitprestudent/index.vue b/src/views/recruit/recruitprestudent/index.vue index 31f9a4e..8c6d691 100644 --- a/src/views/recruit/recruitprestudent/index.vue +++ b/src/views/recruit/recruitprestudent/index.vue @@ -102,6 +102,10 @@ > 导出 + + + 审核人员管理 + @@ -191,6 +195,8 @@ :planMajorList="planMajorList" :schoolList="schoolList" /> + + @@ -208,6 +214,9 @@ import { listcz } from '/@/api/recruit/recruitstudentplan' import { queryByGroupId as schoolListApi} from '/@/api/recruit/recruitstudentschool' import { getDeptListByLevelTwo } from '/@/api/basic/basicdept' +const PreExamPeopleIndex = defineAsyncComponent(() => import('@/views/recruit/recruitPreexamPeople/index.vue')); + +const PreExamPeopleIndexRef=ref() const TableForm = defineAsyncComponent(() => import('./enrolplantemplate-form.vue')) const { hasAuth } = useAuth() // 消息提示 hooks @@ -380,6 +389,22 @@ const dataExportHandle = async () => { } } + +// 编辑审核人员 +const editExam = () => { + // 如果组件已经加载,立即初始化 + if (PreExamPeopleIndexRef.value && typeof PreExamPeopleIndexRef.value.init === 'function') { + nextTick(() => { + try { + PreExamPeopleIndexRef.value.init(); + } catch (error: any) { + message.error('初始化预登记人员弹窗失败:' + (error.message || '未知错误')); + } + }); + } + // 否则等待 watch 监听器处理 +}; + onMounted(() => { init() }) diff --git a/src/views/recruit/recruitstudentschool/index.vue b/src/views/recruit/recruitstudentschool/index.vue index 9dae770..ab57971 100644 --- a/src/views/recruit/recruitstudentschool/index.vue +++ b/src/views/recruit/recruitstudentschool/index.vue @@ -42,13 +42,29 @@
新 增 + 导入信息 + + + 变更历史 +
@@ -109,6 +125,11 @@ + + + + + @@ -124,11 +145,16 @@ import { getDeptList } from '/@/api/basic/basicclass' const TableForm = defineAsyncComponent(() => import('./detaiform.vue')) const MajorGroupByDeptForm = defineAsyncComponent(() => import('/@/views/recruit/recruitplanmajor/majorGroupByDept.vue')) +const ImportRecruitInfo = defineAsyncComponent(() => import('/@/views/recruit/common/import-recruit-info.vue')); +const SchoolHistory = defineAsyncComponent(() => import('/@/views/recruit/recruitstudentschool/school-history.vue')) + const { hasAuth } = useAuth() // 消息提示 hooks const message = useMessage() const messageBox = useMessageBox() +const ImportRecruitInfoRef=ref(); +const SchoolHistoryRef=ref() // 表格引用 const tableRef = ref() const searchFormRef = ref() @@ -236,6 +262,14 @@ const resetQuery = () => { getDataList() } +const handleShowHistory=()=>{ + SchoolHistoryRef.value?.init() +} + +const handleImportDialog = () => { + ImportRecruitInfoRef.value?.init("R10004"); +}; + onMounted(() => { init() }) diff --git a/src/views/recruit/recruitstudentschool/school-history.vue b/src/views/recruit/recruitstudentschool/school-history.vue new file mode 100644 index 0000000..4e071b2 --- /dev/null +++ b/src/views/recruit/recruitstudentschool/school-history.vue @@ -0,0 +1,63 @@ + + + + + + \ No newline at end of file