Files
hzdyjs/docs/变更管理/code-adjust-record-2025-07-30-weizzzz-frontend-update.md
T
2025-08-05 12:28:58 +08:00

4.3 KiB

招聘管理前端代码调整记录

日期: 2025-07-30 10:30:00
开发人员: weizzzz
变更类型: 代码优化

变更内容摘要

根据后端实体类和数据库表结构的更新,对招聘管理模块的前端代码进行了相应调整,确保前端与后端字段定义保持一致,并增强了应聘者信息的展示功能。

详细变更内容

1. 前端API定义更新

在web/src/api/rs/job.ts文件中:

  • 完善了ApplicationVO接口的字段注释,明确各字段的用途:
    // 申请记录类型
    export interface ApplicationVO {
      applicationId: number | string;
      jobId: number | string;
      jobTitle: string;
      applicantId: number | string;
      applicantName: string;
      status: string;
      applyTime: string;
      resumePath: string;  // 简历路径
      selfDescription: string;  // 自我介绍
      hrNotes: string;  // HR备注
      contactPhone: string;  // 联系电话
      contactEmail: string;  // 联系邮箱
      education: string;  // 教育背景
      experience: string;  // 工作经验
      remark: string;
      createBy: string;
      createTime: string;
      updateBy: string;
      updateTime: string;
    }
    

2. 前端页面功能增强

在web/src/views/rs/index.vue文件中:

  1. 添加了应聘者详情对话框,用于展示完整的应聘者信息:

    <!-- 应聘者详情对话框 -->
    <el-dialog v-model="applicantViewOpen" title="应聘者详情" width="700px" append-to-body>
      <el-descriptions :column="2" border>
        <el-descriptions-item label="应聘者姓名">{{ currentApplication?.applicantName }}</el-descriptions-item>
        <el-descriptions-item label="应聘职位">{{ currentApplication?.jobTitle }}</el-descriptions-item>
        <el-descriptions-item label="联系电话">{{ currentApplication?.contactPhone }}</el-descriptions-item>
        <el-descriptions-item label="联系邮箱">{{ currentApplication?.contactEmail }}</el-descriptions-item>
        <el-descriptions-item label="教育背景">{{ currentApplication?.education || '未提供' }}</el-descriptions-item>
        <el-descriptions-item label="工作经验">{{ currentApplication?.experience || '未提供' }}</el-descriptions-item>
        <el-descriptions-item label="申请状态">
          <el-tag :type="currentApplication?.status === '0' ? 'warning' : currentApplication?.status === '1' ? 'success' : currentApplication?.status === '2' ? 'danger' : 'info'">
            {{ getStatusLabel(currentApplication?.status) }}
          </el-tag>
        </el-descriptions-item>
        <el-descriptions-item label="申请时间">{{ parseTime(currentApplication?.applyTime) }}</el-descriptions-item>
        <el-descriptions-item label="自我介绍" :span="2">
          <div class="view-description">{{ currentApplication?.selfDescription || '未提供自我介绍' }}</div>
        </el-descriptions-item>
        <el-descriptions-item label="HR备注" :span="2">
          <div class="view-description">{{ currentApplication?.hrNotes || '暂无备注' }}</div>
        </el-descriptions-item>
      </el-descriptions>
      <template #footer>
        <div class="dialog-footer">
          <el-button @click="applicantViewOpen = false">关 闭</el-button>
        </div>
      </template>
    </el-dialog>
    
  2. 添加了相关状态变量:

    const applicantViewOpen = ref(false); // 应聘者详情对话框
    const currentApplication = ref<ApplicationVO | null>(null); // 当前查看的应聘者
    
  3. 添加了查看应聘者详情的处理函数:

    /** 查看应聘者详情 */
    function handleViewApplicant(row: ApplicationVO) {
      currentApplication.value = row;
      applicantViewOpen.value = true;
    }
    

解决的问题

  1. 确保前端与后端实体类字段定义保持一致,避免数据传输过程中的字段不匹配问题
  2. 增强了应聘者信息的展示功能,提供更完整的应聘者信息查看界面
  3. 通过明确的字段注释,提高代码可读性和可维护性

后续建议

  1. 考虑添加简历预览功能,直接在页面中展示上传的简历文件
  2. 优化应聘者筛选功能,增加更多筛选条件如教育背景、工作经验等
  3. 添加批量处理应聘申请的功能,提高HR工作效率
  4. 考虑增加应聘者评价和面试记录功能,完善招聘流程管理