“rs招聘和培训修改”

This commit is contained in:
weizhong committed 2025-09-22 22:39:59 +08:00
1 parent 465c284d4a
commit e6201af3db
11 files changed
+1966 -354

No files matched your search

+28 -4
View File
@@ -70,16 +70,29 @@ export interface ApplicationVO {
userName: string;
department: string;
position?: string;
currentTitle?: string; // 现职称
currentPosition?: string; // 现岗位
workStartTime?: string; // 参加工作时间
phone?: string; // 联系电话
organizerUnit?: string; // 主办单位
trainingType?: string; // 培训类型
trainingFee?: number; // 培训费用
companions?: string; // 同行人员(JSON字符串)
trainingPurpose?: string; // 培训目的
reason?: string;
status: string;
applyTime: string;
currentApprover?: string;
certificatePath?: string;
certificateNumber?: string;
location?: string;
duration?: number;
startTime?: string;
endTime?: string;
rejectTime?: string; // 拒绝时间
attachmentIds?: string; // 附件ID列表
createTime: string;
updateTime: string;
createBy: string;
updateBy: string;
createBy: number; // 修正类型:string -> number
updateBy: number; // 修正类型:string -> number
remark: string;
}
@@ -92,12 +105,23 @@ export interface ApplicationForm {
userName?: string;
department?: string;
position?: string;
currentTitle?: string; // 现职称
currentPosition?: string; // 现岗位
workStartTime?: string; // 参加工作时间
phone?: string; // 联系电话
organizerUnit?: string; // 主办单位
trainingType?: string; // 培训类型
trainingTypeOther?: string; // 其他培训类型描述
trainingFee?: number; // 培训费用
companions?: (string | number)[]; // 同行人员数组
trainingPurpose?: string; // 培训目的
reason?: string;
status?: string;
location?: string;
duration?: number;
startTime?: string;
endTime?: string;
attachmentIds?: string[]; // 附件ID数组
remark?: string;
}
@@ -157,14 +157,10 @@
</el-col>
<el-col :span="8">
<el-form-item>
<el-button
:type="studentRecordsData ? 'success' : 'info'"
:plain="!studentRecordsData"
@click="handleViewStudentViolations"
>
<i :class="studentRecordsData ? 'el-icon-check' : 'el-icon-view'" style="margin-right: 4px;"></i>
{{ studentRecordsData ? '查看已加载的违规处分信息' : '学生违规处分信息查看' }}
</el-button>
<el-button :type="studentRecordsData ? 'success' : 'info'" :plain="!studentRecordsData" @click="handleViewStudentViolations">
<i :class="studentRecordsData ? 'el-icon-check' : 'el-icon-view'" style="margin-right: 4px"></i>
{{ studentRecordsData ? '查看已加载的违规处分信息' : '学生违规处分信息查看' }}
</el-button>
</el-form-item>
</el-col>
</el-row>
@@ -382,27 +378,22 @@
<!-- 违纪记录Tab -->
<el-tab-pane label="违纪记录" name="discipline">
<!-- 扣分汇总信息 -->
<el-row :gutter="20" style="margin-bottom: 16px;">
<el-row :gutter="20" style="margin-bottom: 16px">
<el-col :span="16">
<el-alert
:title="`违纪记录扣分汇总: ${calculateTotalDeduction()} 分 (生效记录: ${getEffectiveDisciplineRecords().length} 条)`"
type="warning"
<el-alert
:title="`违纪记录扣分汇总: ${calculateTotalDeduction()} 分 (生效记录: ${getEffectiveDisciplineRecords().length} 条)`"
type="warning"
:closable="false"
show-icon
/>
</el-col>
<el-col :span="8" style="text-align: right;">
<el-button
type="primary"
icon="Refresh"
@click="applyDeductionToClassScore"
:disabled="calculateTotalDeduction() === 0"
>
<el-col :span="8" style="text-align: right">
<el-button type="primary" icon="Refresh" @click="applyDeductionToClassScore" :disabled="calculateTotalDeduction() === 0">
重新同步到班级扣分
</el-button>
</el-col>
</el-row>
<el-table :data="studentRecordsData?.disciplineRecords || []" border style="width: 100%" max-height="400" empty-text="暂无违纪记录">
<el-table-column type="index" label="序号" width="60" align="center" />
<el-table-column prop="studentNo" label="学号" min-width="120" align="center" />
@@ -417,10 +408,7 @@
<el-table-column prop="disciplineContent" label="处分内容" min-width="200" :show-overflow-tooltip="true" />
<el-table-column prop="scoreDeduction" label="扣分" min-width="80" align="center">
<template #default="scope">
<el-tag
:type="scope.row.status === '1' ? 'danger' : 'info'"
size="small"
>
<el-tag :type="scope.row.status === '1' ? 'danger' : 'info'" size="small">
{{ scope.row.scoreDeduction || 0 }}
</el-tag>
</template>
@@ -721,7 +709,7 @@ const loadAssessmentDetail = async () => {
overallComment: monthlyScoreForm.overallComment
});
console.log('==================');
// 自动加载学生违规处分信息数据
await autoLoadStudentRecords();
} catch (error) {
@@ -746,7 +734,7 @@ const autoLoadStudentRecords = async () => {
try {
const res = await getClassStudentRecords(props.classId, props.planId);
studentRecordsData.value = res.data;
// 自动同步违纪记录扣分到班级扣分字段(不显示提示消息)
autoSyncDeductionToClassScore(false);
console.log('✅ 学生违规处分数据自动加载完成');
@@ -778,7 +766,7 @@ const handleViewStudentViolations = async () => {
studentRecordsData.value = res.data;
studentRecordsVisible.value = true;
}
// 手动查看时也重新同步一次扣分(显示提示消息)
autoSyncDeductionToClassScore(true);
} catch (error) {
@@ -795,7 +783,7 @@ const getEffectiveDisciplineRecords = () => {
return [];
}
// 只统计状态为'1'(生效)的违纪记录
return studentRecordsData.value.disciplineRecords.filter(record => record.status === '1');
return studentRecordsData.value.disciplineRecords.filter((record) => record.status === '1');
};
/** 计算违纪记录总扣分 */
@@ -810,50 +798,57 @@ const calculateTotalDeduction = () => {
/** 自动同步违纪记录扣分到班级扣分字段 */
const autoSyncDeductionToClassScore = (showMessage = true) => {
const totalDeduction = calculateTotalDeduction();
// 自动将汇总的扣分设置到班级扣分字段
managementEffectivenessForm.classDeduction = totalDeduction;
// 自动计算50%计
calculateDeductionHalf();
if (totalDeduction > 0 && showMessage) {
proxy?.$modal.msgSuccess(`已自动同步违纪记录扣分汇总 ${totalDeduction} 分到班级扣分字段`);
}
};
// 监听学生违纪记录数据变化,自动同步扣分
watch(() => studentRecordsData.value?.disciplineRecords, (newRecords) => {
if (newRecords && studentRecordsVisible.value) {
// 延迟执行,确保数据完全加载,但不显示提示消息
nextTick(() => {
autoSyncDeductionToClassScore(false);
});
}
}, { deep: true });
watch(
() => studentRecordsData.value?.disciplineRecords,
(newRecords) => {
if (newRecords && studentRecordsVisible.value) {
// 延迟执行,确保数据完全加载,但不显示提示消息
nextTick(() => {
autoSyncDeductionToClassScore(false);
});
}
},
{ deep: true }
);
/** 将违纪记录扣分汇总应用到班级扣分字段 */
const applyDeductionToClassScore = () => {
const totalDeduction = calculateTotalDeduction();
if (totalDeduction === 0) {
proxy?.$modal.msgWarning('当前没有生效的违纪记录扣分可以应用');
return;
}
// 确认应用操作
proxy?.$modal.confirm(`确定要将违纪记录扣分汇总 ${totalDeduction} 分重新应用到班级扣分字段吗?`).then(() => {
// 将汇总的扣分设置到班级扣分字段
managementEffectivenessForm.classDeduction = totalDeduction;
// 自动计算50%计
calculateDeductionHalf();
proxy?.$modal.msgSuccess(`已重新应用违纪记录扣分汇总 ${totalDeduction} 分到班级扣分字段`);
// 关闭学生记录弹窗
studentRecordsVisible.value = false;
}).catch(() => {
// 用户取消操作
});
proxy?.$modal
.confirm(`确定要将违纪记录扣分汇总 ${totalDeduction} 分重新应用到班级扣分字段吗?`)
.then(() => {
// 将汇总的扣分设置到班级扣分字段
managementEffectivenessForm.classDeduction = totalDeduction;
// 自动计算50%计
calculateDeductionHalf();
proxy?.$modal.msgSuccess(`已重新应用违纪记录扣分汇总 ${totalDeduction} 分到班级扣分字段`);
// 关闭学生记录弹窗
studentRecordsVisible.value = false;
})
.catch(() => {
// 用户取消操作
});
};
/** 保存考核数据 */
+63 -3
View File
@@ -385,6 +385,18 @@
</el-descriptions-item>
<el-descriptions-item label="申请人数">{{ viewForm.applicantCount }}</el-descriptions-item>
<el-descriptions-item label="浏览次数">{{ viewForm.viewCount }}</el-descriptions-item>
<el-descriptions-item label="应聘链接">
<el-link
:href="`/recruitment-apply?jobId=${viewForm.jobId}`"
target="_blank"
type="primary"
:underline="false"
style="font-size: 14px;"
>
点击前往应聘页面
<el-icon style="margin-left: 4px;"><Link /></el-icon>
</el-link>
</el-descriptions-item>
<el-descriptions-item label="发布时间">
{{ parseTime(viewForm.publishTime) || (viewForm.isActive === '0' ? parseTime(viewForm.createTime) || '长期有效' : '未发布') }}
</el-descriptions-item>
@@ -508,7 +520,21 @@
</el-descriptions-item>
<el-descriptions-item label="申请时间">{{ parseTime(applicationDetail.applyTime) }}</el-descriptions-item>
<el-descriptions-item label="联系电话">{{ applicationDetail.contactPhone }}</el-descriptions-item>
<el-descriptions-item label="联系邮箱">{{ applicationDetail.contactEmail }}</el-descriptions-item>
<el-descriptions-item label="联系邮箱">
<div style="display: flex; align-items: center; gap: 8px;">
<span>{{ applicationDetail.contactEmail }}</span>
<el-button
v-if="applicationDetail.contactEmail"
size="small"
type="primary"
:icon="Message"
@click="sendEmail(applicationDetail.contactEmail, applicationDetail.applicantName)"
style="margin-left: 8px;"
>
发送邮件
</el-button>
</div>
</el-descriptions-item>
<el-descriptions-item label="学历">{{ applicationDetail.education || '暂无信息' }}</el-descriptions-item>
<el-descriptions-item label="教育背景">{{ applicationDetail.educationBackground || '暂无信息' }}</el-descriptions-item>
<el-descriptions-item label="工作经验" :span="2">{{ applicationDetail.experience || '暂无信息' }}</el-descriptions-item>
@@ -544,7 +570,21 @@
<el-descriptions-item label="性别">{{ currentApplication?.gender || '未提供' }}</el-descriptions-item>
<el-descriptions-item label="年龄">{{ currentApplication?.age || '未提供' }}</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="邮箱地址">
<div style="display: flex; align-items: center; gap: 8px;">
<span>{{ currentApplication?.contactEmail }}</span>
<el-button
v-if="currentApplication?.contactEmail"
size="small"
type="primary"
:icon="Message"
@click="sendEmail(currentApplication?.contactEmail, currentApplication?.applicantName)"
style="margin-left: 8px;"
>
发送邮件
</el-button>
</div>
</el-descriptions-item>
<el-descriptions-item label="申请状态">
<el-tag
:type="
@@ -681,7 +721,7 @@ import { parseTime } from '@/utils/ruoyi';
import type { JobVO, JobForm, ApplicationVO } from '@/api/rs/job';
import { listDept } from '@/api/system/dept';
import type { DeptVO } from '@/api/system/dept/types';
import { Document } from '@element-plus/icons-vue';
import { Document, Link, Message } from '@element-plus/icons-vue';
import { getToken } from '@/utils/auth';
import jsPDF from 'jspdf';
import html2canvas from 'html2canvas';
@@ -1484,6 +1524,26 @@ function getStatusType(value: string): 'primary' | 'success' | 'info' | 'warning
return (option?.type as 'primary' | 'success' | 'info' | 'warning' | 'danger') || 'info';
}
/** 发送邮件 */
function sendEmail(email: string, applicantName: string) {
if (!email) {
ElMessage.warning('邮箱地址为空');
return;
}
const subject = encodeURIComponent(`关于您的求职申请 - ${applicantName}`);
const body = encodeURIComponent(`亲爱的 ${applicantName}:\n\n感谢您对我们的关注和求职申请。\n\n我们将仔细审核您的申请材料,如有需要会及时与您联系。\n\n祝您工作顺利!\n\n此致\n敬礼\n\nHR部门`);
const mailtoUrl = `mailto:${email}?subject=${subject}&body=${body}`;
try {
window.open(mailtoUrl);
ElMessage.success('已打开邮件客户端');
} catch (error) {
ElMessage.error('打开邮件客户端失败,请检查系统设置');
}
}
/** 选项卡切换 */
function handleTabClick() {
if (activeTab.value === 'application') {
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff