“rs模块新增登记、党籍v0.1版”
This commit is contained in:
1 parent
06731fd6e0
commit
ae3caa26b8
29 files changed
+4247
-263
No files matched your search
+254
-11
@@ -24,29 +24,57 @@ export interface OverseasApplicationQuery {
|
||||
// 出国申请数据类型
|
||||
export interface OverseasApplicationVO {
|
||||
applicationId: number | string;
|
||||
serialNumber?: string; // 编号
|
||||
applicantId: number;
|
||||
applicantName: string;
|
||||
gender?: string; // 性别
|
||||
birthDate?: string; // 出生日期
|
||||
photo?: string; // 照片地址
|
||||
idNumber?: string; // 身份证号
|
||||
politicalStatus?: string; // 政治面貌
|
||||
registeredAddress?: string; // 户籍所在地
|
||||
department: string;
|
||||
position?: string; // 职务
|
||||
professionalTitle?: string; // 职称
|
||||
administrativeLevel?: string; // 行政职级
|
||||
personnelCategory?: string; // 人员类别代码
|
||||
registrationUnit?: string; // 登记备案责任单位
|
||||
unitLeaderSignature?: string; // 单位负责人签名
|
||||
unitContact?: string; // 单位联系人
|
||||
officePhone?: string; // 办公电话
|
||||
mobilePhone?: string; // 移动电话
|
||||
contactPhone: string;
|
||||
documentName?: string; // 申领证件名称
|
||||
documentNumber?: string; // 证件号码
|
||||
destinationCountry?: string; // 前往国家
|
||||
exitReason?: string; // 出境事由
|
||||
visitRelationship?: string; // 探望对象姓名及与申请者关系
|
||||
remarks?: string; // 备注
|
||||
emergencyContact?: string; // 应急联系人及电话
|
||||
signature?: string; // 手写签字
|
||||
stampedRegistrationFilePath?: string; // 登记备案表盖章文件路径
|
||||
stampedRegistrationFileName?: string; // 登记备案表盖章文件名
|
||||
stampedFileUploadTime?: string; // 盖章文件上传时间
|
||||
stampedFileUploadStatus?: string; // 盖章文件上传状态
|
||||
purpose: string;
|
||||
purposeDetail: string;
|
||||
destination: string;
|
||||
destinationCity: string;
|
||||
destinationCity?: string;
|
||||
startDate: string;
|
||||
endDate: string;
|
||||
duration: number;
|
||||
budget: number;
|
||||
invitation: string;
|
||||
invitation?: string;
|
||||
itinerary: string;
|
||||
accommodationPlan: string;
|
||||
transportationPlan: string;
|
||||
accommodationPlan?: string;
|
||||
transportationPlan?: string;
|
||||
status: string;
|
||||
currentApprover: string;
|
||||
currentApprover?: string;
|
||||
approvalLevel: string;
|
||||
applyTime: string;
|
||||
approvalTime: string;
|
||||
adminRemark: string;
|
||||
applicantRemark: string;
|
||||
approvalTime?: string;
|
||||
adminRemark?: string;
|
||||
applicantRemark?: string;
|
||||
createTime: string;
|
||||
updateTime: string;
|
||||
createBy: string;
|
||||
@@ -55,15 +83,50 @@ export interface OverseasApplicationVO {
|
||||
statusText: string;
|
||||
purposeText: string;
|
||||
approvalLevelText: string;
|
||||
genderText?: string;
|
||||
politicalStatusText?: string;
|
||||
administrativeLevelText?: string;
|
||||
personnelCategoryText?: string;
|
||||
}
|
||||
|
||||
// 出国申请表单类型
|
||||
export interface OverseasApplicationForm {
|
||||
applicationId?: number | string;
|
||||
serialNumber?: string; // 编号
|
||||
applicantId?: number;
|
||||
applicantName?: string;
|
||||
department?: string; // 自动匹配,前端不需要输入
|
||||
contactPhone?: string; // 联系电话
|
||||
gender?: string; // 性别
|
||||
birthDate?: string; // 出生日期
|
||||
photo?: string; // 照片地址
|
||||
idNumber?: string; // 身份证号
|
||||
politicalStatus?: string; // 政治面貌
|
||||
registeredAddress?: string; // 户籍所在地
|
||||
department?: string; // 所属部门/现工作部门
|
||||
position?: string; // 职务
|
||||
professionalTitle?: string; // 职称
|
||||
administrativeLevel?: string; // 行政职级
|
||||
personnelCategory?: string; // 人员类别代码
|
||||
unitLeaderSignature?: string; // 单位负责人签名
|
||||
unitContact?: string; // 单位联系人
|
||||
officePhone?: string; // 办公电话
|
||||
mobilePhone?: string; // 移动电话
|
||||
contactPhone?: string; // 联系电话(保留兼容性)
|
||||
documentName?: string; // 申领证件名称
|
||||
documentNumber?: string; // 证件号码
|
||||
destinationCountry?: string; // 前往国家
|
||||
exitReason?: string; // 出境事由
|
||||
visitRelationship?: string; // 探望对象姓名及与申请者关系
|
||||
remarks?: string; // 备注
|
||||
emergencyContact?: string; // 应急联系人及电话
|
||||
signature?: string; // 手写签字(base64格式)
|
||||
stampedRegistrationFilePath?: string; // 登记备案表盖章文件路径
|
||||
stampedRegistrationFileName?: string; // 登记备案表盖章文件名
|
||||
stampedFileUploadTime?: string; // 盖章文件上传时间
|
||||
stampedFileUploadStatus?: string; // 盖章文件上传状态:0-未上传,1-已上传
|
||||
partyRetentionFilePath?: string; // 党籍保留附件文件路径
|
||||
partyRetentionFileName?: string; // 党籍保留附件文件名
|
||||
partyRetentionUploadTime?: string; // 党籍保留附件上传时间
|
||||
partyRetentionUploadStatus?: string; // 党籍保留附件上传状态:0-未上传,1-已上传
|
||||
purpose: string;
|
||||
purposeDetail: string;
|
||||
destination: string;
|
||||
@@ -111,7 +174,9 @@ export interface OverseasRecordVO {
|
||||
applicantId: number;
|
||||
applicantName: string;
|
||||
department: string;
|
||||
position: string;
|
||||
contactPhone: string;
|
||||
contactEmail: string;
|
||||
purpose: string;
|
||||
purposeDetail: string;
|
||||
destination: string;
|
||||
@@ -134,7 +199,23 @@ export interface OverseasRecordVO {
|
||||
updateBy: string;
|
||||
// 显示字段
|
||||
purposeText: string;
|
||||
status?: string; // 申请状态(来自申请表)
|
||||
statusText?: string; // 申请状态文本(来自申请表)
|
||||
completionStatusText: string;
|
||||
// 来自申请表的扩展字段
|
||||
gender?: string;
|
||||
genderText?: string;
|
||||
birthDate?: string;
|
||||
politicalStatus?: string;
|
||||
politicalStatusText?: string;
|
||||
professionalTitle?: string;
|
||||
documentName?: string;
|
||||
documentNumber?: string;
|
||||
mobilePhone?: string;
|
||||
destinationCountry?: string;
|
||||
exitReason?: string;
|
||||
emergencyContact?: string;
|
||||
remarks?: string;
|
||||
}
|
||||
|
||||
// 出国记录表单类型
|
||||
@@ -255,7 +336,7 @@ export function listOverseasApplicationByStatus(status: string) {
|
||||
// 查询出国申请详细
|
||||
export function getOverseasApplication(applicationId: string | number) {
|
||||
return request({
|
||||
url: `/rs/overseas/application/${applicationId}`,
|
||||
url: `/rs/overseas/application/detail/${applicationId}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
@@ -295,6 +376,18 @@ export function resubmitOverseasApplication(applicationId: string | number, data
|
||||
});
|
||||
}
|
||||
|
||||
// 校验出国申请前置条件
|
||||
export function validateApplicationPrerequisites(politicalStatus?: string, duration?: number) {
|
||||
return request({
|
||||
url: '/rs/overseas/application/validatePrerequisites',
|
||||
method: 'get',
|
||||
params: {
|
||||
politicalStatus,
|
||||
duration
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 取消出国申请
|
||||
export function cancelOverseasApplication(applicationId: string | number, reason?: string) {
|
||||
return request({
|
||||
@@ -520,3 +613,153 @@ export function fixApprovedOverseasRecords() {
|
||||
method: 'post'
|
||||
});
|
||||
}
|
||||
|
||||
// ==================== PDF生成相关接口 ====================
|
||||
|
||||
// 生成登记表请求参数类型
|
||||
export interface GenerateRegistrationFormRequest {
|
||||
applicationId: number;
|
||||
documentNumber?: string;
|
||||
format?: string;
|
||||
}
|
||||
|
||||
// 登记表生成响应类型
|
||||
export interface RegistrationFormResponse {
|
||||
documentId: string;
|
||||
fileName: string;
|
||||
downloadUrl: string;
|
||||
previewUrl: string;
|
||||
fileSize: number;
|
||||
generateTime: string;
|
||||
documentNumber: string;
|
||||
applicationId: number;
|
||||
}
|
||||
|
||||
// 生成出国申请登记表PDF
|
||||
export function generateRegistrationForm(data: GenerateRegistrationFormRequest) {
|
||||
return request({
|
||||
url: '/rs/overseas/application/generateRegistrationForm',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 下载生成的PDF文档
|
||||
export function downloadRegistrationFormPdf(documentId: string) {
|
||||
return request({
|
||||
url: `/rs/overseas/application/downloadPdf/${documentId}`,
|
||||
method: 'get',
|
||||
responseType: 'blob'
|
||||
});
|
||||
}
|
||||
|
||||
// 预览生成的PDF文档
|
||||
export function previewRegistrationFormPdf(documentId: string) {
|
||||
return request({
|
||||
url: `/rs/overseas/application/previewPdf/${documentId}`,
|
||||
method: 'get',
|
||||
responseType: 'blob'
|
||||
});
|
||||
}
|
||||
|
||||
// 下载登记备案附件模板
|
||||
export function downloadRegistrationTemplate() {
|
||||
return request({
|
||||
url: '/rs/overseas/application/downloadRegistrationTemplate',
|
||||
method: 'get',
|
||||
responseType: 'blob'
|
||||
});
|
||||
}
|
||||
|
||||
// 下载保留党籍申请模板
|
||||
export function downloadPartyMembershipTemplate() {
|
||||
return request({
|
||||
url: '/rs/overseas/application/downloadPartyMembershipTemplate',
|
||||
method: 'get',
|
||||
responseType: 'blob'
|
||||
});
|
||||
}
|
||||
|
||||
// ==================== 出国申请附件相关API ====================
|
||||
|
||||
// 附件数据类型
|
||||
export interface OverseasAttachmentVO {
|
||||
attachmentId: number | string;
|
||||
applicationId: number;
|
||||
attachmentTitle: string;
|
||||
attachmentContent?: string;
|
||||
fileName: string;
|
||||
fileOriginalName: string;
|
||||
filePath: string;
|
||||
fileSize: number;
|
||||
fileSizeFormatted?: string;
|
||||
fileType?: string;
|
||||
mimeType?: string;
|
||||
uploadTime?: string;
|
||||
uploadUserId?: number;
|
||||
uploadUserName?: string;
|
||||
createTime?: string;
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
// 附件BO
|
||||
export interface OverseasAttachmentBo {
|
||||
attachmentId?: number | string;
|
||||
applicationId: number;
|
||||
attachmentTitle: string;
|
||||
attachmentContent?: string;
|
||||
}
|
||||
|
||||
// 查询出国申请的附件列表
|
||||
export function listOverseasAttachments(applicationId: string | number) {
|
||||
return request({
|
||||
url: `/rs/overseas/attachment/list/${applicationId}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 查询附件详情
|
||||
export function getOverseasAttachment(attachmentId: string | number) {
|
||||
return request({
|
||||
url: `/rs/overseas/attachment/${attachmentId}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 上传附件
|
||||
export function uploadOverseasAttachment(data: FormData) {
|
||||
return request({
|
||||
url: '/rs/overseas/attachment/upload',
|
||||
method: 'post',
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
},
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 更新附件信息(标题和内容)
|
||||
export function updateOverseasAttachment(data: OverseasAttachmentBo) {
|
||||
return request({
|
||||
url: '/rs/overseas/attachment',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除附件
|
||||
export function deleteOverseasAttachment(attachmentId: string | number) {
|
||||
return request({
|
||||
url: `/rs/overseas/attachment/${attachmentId}`,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 批量删除附件
|
||||
export function deleteOverseasAttachments(attachmentIds: Array<string | number>) {
|
||||
return request({
|
||||
url: '/rs/overseas/attachment/batch',
|
||||
method: 'delete',
|
||||
data: attachmentIds
|
||||
});
|
||||
}
|
||||
@@ -75,7 +75,6 @@
|
||||
<el-tag type="info">{{ getDepartmentLabel(scope.row.department) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="薪资范围" align="center" prop="salaryRange" />
|
||||
<el-table-column label="工作地点" align="center" prop="location" />
|
||||
<el-table-column label="状态" align="center" prop="isActive" width="120">
|
||||
<template #default="scope">
|
||||
@@ -316,9 +315,6 @@
|
||||
<el-option v-for="dict in departmentOptions" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="薪资范围" prop="salaryRange">
|
||||
<el-input v-model="form.salaryRange" placeholder="请输入薪资范围,如:15k-25k" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工作地点" prop="location">
|
||||
<el-input v-model="form.location" placeholder="请输入工作地点" />
|
||||
</el-form-item>
|
||||
@@ -376,7 +372,6 @@
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="职位名称">{{ viewForm.title }}</el-descriptions-item>
|
||||
<el-descriptions-item label="部门">{{ getDepartmentLabel(viewForm.department) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="薪资范围">{{ viewForm.salaryRange }}</el-descriptions-item>
|
||||
<el-descriptions-item label="工作地点">{{ viewForm.location }}</el-descriptions-item>
|
||||
<el-descriptions-item label="状态">
|
||||
<el-tag :type="viewForm.isActive === '0' ? 'success' : 'info'">
|
||||
@@ -818,7 +813,6 @@ const rules = reactive<Record<string, any>>({
|
||||
{ min: 2 as number, max: 50 as number, message: '长度在 2 到 50 个字符', trigger: 'blur' }
|
||||
],
|
||||
department: [{ required: true, message: '部门不能为空', trigger: 'change' }],
|
||||
salaryRange: [{ required: true, message: '薪资范围不能为空', trigger: 'blur' }],
|
||||
location: [{ required: true, message: '工作地点不能为空', trigger: 'blur' }]
|
||||
});
|
||||
|
||||
|
||||
@@ -70,20 +70,20 @@
|
||||
|
||||
<!-- 待审批申请表格 -->
|
||||
<el-table v-loading="pendingLoading" border :data="pendingList" @row-dblclick="handleViewApplication" v-hasPermi="['rs:overseas:list']">
|
||||
<el-table-column label="申请人" align="center" prop="applicantName" width="100" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="所属部门" align="center" prop="department" width="140" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="出国目的" align="center" prop="purposeText" width="100" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="目的地" align="center" prop="destination" width="120" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="出国时间" align="center" min-width="220" :show-overflow-tooltip="true">
|
||||
<template #default="scope"> {{ formatDate(scope.row.startDate) }} 至 {{ formatDate(scope.row.endDate) }} </template>
|
||||
<el-table-column label="姓名" align="center" prop="applicantName" min-width="100" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="现工作部门" align="center" prop="department" min-width="140" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="职称" align="center" prop="professionalTitle" min-width="110" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="前往国家" align="center" prop="destination" min-width="110" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="出境事由" align="center" prop="exitReason" min-width="100" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="出国天数" align="center" prop="duration" min-width="90">
|
||||
<template #default="scope">{{ scope.row.duration || '-' }}天</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="天数" align="center" prop="duration" width="60" />
|
||||
<el-table-column label="申请时间" align="center" prop="applyTime" width="160" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="申请状态" align="center" width="100">
|
||||
<el-table-column label="申请状态" align="center" prop="statusText" min-width="100">
|
||||
<template #default="scope">
|
||||
<el-tag :type="getStatusTagType(scope.row.status)">{{ scope.row.statusText }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申请时间" align="center" prop="applyTime" min-width="160" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="操作" align="center" width="180">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="查看详情" placement="top">
|
||||
@@ -237,25 +237,56 @@
|
||||
</el-card>
|
||||
|
||||
<!-- 申请详情对话框 -->
|
||||
<el-dialog title="申请详情" v-model="viewDialog.visible" width="800px" append-to-body>
|
||||
<el-dialog title="出国申请详情" v-model="viewDialog.visible" width="900px" append-to-body>
|
||||
<el-descriptions v-if="viewData" :column="2" border>
|
||||
<el-descriptions-item label="申请人">{{ viewData.applicantName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="所属部门">{{ viewData.department }}</el-descriptions-item>
|
||||
<el-descriptions-item label="联系电话">{{ viewData.contactPhone }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="出国目的">{{ viewData.purposeText }}</el-descriptions-item>
|
||||
<el-descriptions-item label="目的地">{{ viewData.destination }}</el-descriptions-item>
|
||||
<el-descriptions-item label="开始日期">{{ formatDate(viewData.startDate) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="结束日期">{{ formatDate(viewData.endDate) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="出国天数">{{ viewData.duration }}天</el-descriptions-item>
|
||||
<el-descriptions-item label="预算金额">¥{{ formatMoney(viewData.budget) }}</el-descriptions-item>
|
||||
<!-- 基本信息 -->
|
||||
<el-descriptions-item label="姓名">{{ viewData.applicantName || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">{{ viewData.gender === '0' ? '男' : viewData.gender === '1' ? '女' : '-' }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="出生年月">{{ formatDate(viewData.birthDate) || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="政治面貌">{{ viewData.politicalStatusText || '-' }}</el-descriptions-item>
|
||||
|
||||
<!-- 工作信息 -->
|
||||
<el-descriptions-item label="现工作部门">{{ viewData.department || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="职称">{{ viewData.professionalTitle || '-' }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="职务">{{ viewData.position || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="申领证件名称">{{ viewData.documentName || '-' }}</el-descriptions-item>
|
||||
|
||||
<!-- 证件信息 -->
|
||||
<el-descriptions-item label="证件号码">{{ viewData.documentNumber || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="前往国家">{{ viewData.destinationCountry || viewData.destination || '-' }}</el-descriptions-item>
|
||||
|
||||
<!-- 出境信息 -->
|
||||
<el-descriptions-item label="出境事由">{{ viewData.exitReason || '-' }}</el-descriptions-item>
|
||||
<!-- 探亲信息(如果是探亲) -->
|
||||
<el-descriptions-item label="探望对象关系" v-if="viewData.exitReason === '探亲'">
|
||||
{{ viewData.visitRelationship || '-' }}
|
||||
</el-descriptions-item>
|
||||
|
||||
<!-- 行程安排 -->
|
||||
<el-descriptions-item label="行程安排" :span="2">{{ viewData.itinerary || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="出国天数">{{ viewData.duration || 0 }}天</el-descriptions-item>
|
||||
|
||||
<!-- 备注 -->
|
||||
<el-descriptions-item label="备注" v-if="viewData.remarks">{{ viewData.remarks }}</el-descriptions-item>
|
||||
|
||||
<!-- 出国时间 -->
|
||||
<el-descriptions-item label="出发日期">{{ formatDate(viewData.startDate) || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="返回日期">{{ formatDate(viewData.endDate) || '-' }}</el-descriptions-item>
|
||||
|
||||
<!-- 联系信息 -->
|
||||
<el-descriptions-item label="联系电话">{{ viewData.mobilePhone || viewData.contactPhone || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="应急联系人及电话">{{ viewData.emergencyContact || '-' }}</el-descriptions-item>
|
||||
|
||||
<!-- 申请状态 -->
|
||||
<el-descriptions-item label="申请状态">
|
||||
<el-tag :type="getStatusTagType(viewData.status)">{{ viewData.statusText }}</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="申请时间" :span="2">{{ viewData.applyTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="目的详细说明" :span="2">{{ viewData.purposeDetail }}</el-descriptions-item>
|
||||
<el-descriptions-item label="行程安排" :span="2">{{ viewData.itinerary }}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请人备注" :span="2" v-if="viewData.applicantRemark">{{ viewData.applicantRemark }}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请时间">{{ viewData.applyTime || '-' }}</el-descriptions-item>
|
||||
|
||||
<!-- 管理员备注 -->
|
||||
<el-descriptions-item label="管理员备注" :span="2" v-if="viewData.adminRemark">{{ viewData.adminRemark }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<!-- 查看审批记录 -->
|
||||
|
||||
+1962
-130
File diff suppressed because it is too large.
Load diff
@@ -254,7 +254,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" align="center" width="200">
|
||||
<el-table-column label="操作" align="center" width="150">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="查看" placement="top">
|
||||
<el-button
|
||||
@@ -265,15 +265,6 @@
|
||||
v-hasPermi="['rs:trainingrecord:query']"
|
||||
></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="编辑" placement="top">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click.stop="handleUpdateRecord(scope.row)"
|
||||
v-hasPermi="['rs:trainingrecord:edit']"
|
||||
></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-button
|
||||
link
|
||||
@@ -631,14 +622,11 @@
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="同行人" prop="companions">
|
||||
<el-select v-model="applicationForm.companions" multiple placeholder="请选择同行人员" style="width: 100%" clearable filterable>
|
||||
<el-option
|
||||
v-for="teacher in teacherList"
|
||||
:key="teacher.teacherId"
|
||||
:label="teacher.teacherName"
|
||||
:value="teacher.teacherId"
|
||||
/>
|
||||
</el-select>
|
||||
<TeacherMultiSelector
|
||||
v-model="selectedCompanions"
|
||||
placeholder="请选择同行人员"
|
||||
@change="handleCompanionsChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@@ -1035,6 +1023,8 @@ import { getToken } from '@/utils/auth';
|
||||
import { getInfo as getUserInfo } from '@/api/login';
|
||||
import { useUserStore } from '@/store/modules/user';
|
||||
import { listClassTeacherCounselorRel } from '@/api/xg/classTeacherCounselorRel';
|
||||
import TeacherMultiSelector from '@/components/TeacherMultiSelector/index.vue';
|
||||
import { TeacherVO } from '@/api/system/teacher/types';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const userStore = useUserStore();
|
||||
@@ -1392,6 +1382,9 @@ const applicationForm = reactive<{
|
||||
attachmentIds: [] as string[] // 附件ID列表
|
||||
});
|
||||
|
||||
// 同行人选择器相关
|
||||
const selectedCompanions = ref<TeacherVO[]>([]);
|
||||
|
||||
// 培训申请表单校验规则
|
||||
const applicationRules = reactive<any>({
|
||||
// 情况基本信息验证
|
||||
@@ -1863,9 +1856,57 @@ function resetApplicationForm() {
|
||||
applicationForm.reason = '';
|
||||
applicationForm.attachmentIds = [];
|
||||
applicationAttachmentFileList.value = [];
|
||||
selectedCompanions.value = [];
|
||||
applicationFormRef.value?.resetFields();
|
||||
}
|
||||
|
||||
/** 处理同行人变化 */
|
||||
function handleCompanionsChange(teachers: TeacherVO[]) {
|
||||
selectedCompanions.value = teachers;
|
||||
applicationForm.companions = teachers.map(teacher => teacher.userId);
|
||||
}
|
||||
|
||||
/** 加载编辑时的同行人数据 */
|
||||
async function loadCompanionsForEdit() {
|
||||
if (applicationForm.companions && applicationForm.companions.length > 0) {
|
||||
try {
|
||||
// 这里需要根据userId获取教师信息
|
||||
// 由于TeacherMultiSelector组件需要完整的TeacherVO对象
|
||||
// 我们需要调用API获取教师详细信息
|
||||
const teacherPromises = applicationForm.companions.map(async (userId) => {
|
||||
try {
|
||||
// 这里需要调用获取教师详情的API
|
||||
// 暂时使用teacherList中的数据进行匹配
|
||||
const teacher = teacherList.value.find(t => t.teacherId === userId);
|
||||
if (teacher) {
|
||||
return {
|
||||
userId: teacher.teacherId,
|
||||
nickName: teacher.teacherName,
|
||||
userName: teacher.teacherName,
|
||||
phonenumber: '',
|
||||
email: '',
|
||||
sex: '0',
|
||||
deptName: ''
|
||||
} as TeacherVO;
|
||||
}
|
||||
return null;
|
||||
} catch (error) {
|
||||
console.error('获取教师信息失败:', error);
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
||||
const teachers = await Promise.all(teacherPromises);
|
||||
selectedCompanions.value = teachers.filter(t => t !== null) as TeacherVO[];
|
||||
} catch (error) {
|
||||
console.error('加载同行人数据失败:', error);
|
||||
selectedCompanions.value = [];
|
||||
}
|
||||
} else {
|
||||
selectedCompanions.value = [];
|
||||
}
|
||||
}
|
||||
|
||||
/** 取消培训申请对话框 */
|
||||
function cancelApplicationDialog() {
|
||||
applicationDialogVisible.value = false;
|
||||
@@ -2161,6 +2202,9 @@ function handleEditApplication(row: any) {
|
||||
|
||||
// 保存当前编辑的申请ID
|
||||
applicationForm.applicationId = row.applicationId;
|
||||
|
||||
// 加载同行人数据到选择器
|
||||
loadCompanionsForEdit();
|
||||
}
|
||||
|
||||
/** 撤回培训申请 */
|
||||
|
||||
Reference in new issue
Block a user