Merge branch 'master' of http://47.99.164.66:3000/hzdyjs-xg/all-project
This commit is contained in:
commit
6c90a8e173
44 files changed
+1088
-1077
No files matched your search
@@ -98,12 +98,13 @@ export const submitAssessmentScore = (data: AssessmentSubmitVO): AxiosPromise<vo
|
||||
/**
|
||||
* 查询班级学生违纪记录和奖励记录
|
||||
* @param classId 班级ID
|
||||
* @param planId 考核计划ID
|
||||
*/
|
||||
export const getClassStudentRecords = (classId: string | number): AxiosPromise<any> => {
|
||||
export const getClassStudentRecords = (classId: string | number, planId: string | number): AxiosPromise<any> => {
|
||||
return request({
|
||||
url: '/bzrkh/teacherAssessment/classStudentRecords',
|
||||
method: 'get',
|
||||
params: { classId }
|
||||
params: { classId, planId }
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ export interface ApplicationQuery {
|
||||
pageSize: number;
|
||||
courseId?: number | string;
|
||||
courseName?: string;
|
||||
location?: string; // 培训地点
|
||||
userId?: number | string;
|
||||
userName?: string;
|
||||
department?: string;
|
||||
@@ -175,6 +176,15 @@ export function listTrainingApplication(query: ApplicationQuery) {
|
||||
});
|
||||
}
|
||||
|
||||
// 查询待审批的培训申请列表(供审批人使用)
|
||||
export function listPendingTrainingApplication(query: ApplicationQuery) {
|
||||
return request({
|
||||
url: '/rs/training/application/pending/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 获取培训申请详情
|
||||
export function getTrainingApplication(applicationId: string | number) {
|
||||
return request({
|
||||
@@ -245,6 +255,15 @@ export function listTrainingRecord(query: RecordQuery) {
|
||||
});
|
||||
}
|
||||
|
||||
// 获取我的培训记录列表
|
||||
export function listMyTrainingRecord(query: RecordQuery) {
|
||||
return request({
|
||||
url: '/rs/training/record/my',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 获取培训记录详情
|
||||
export function getTrainingRecord(recordId: string | number) {
|
||||
return request({
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 1.2 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 1.3 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 359 KiB |
@@ -7,7 +7,7 @@
|
||||
<!-- 左侧Logo和系统名称 -->
|
||||
<div class="left-menu flex align-center">
|
||||
<div class="logo-container">
|
||||
<img src="@/assets/logo/logo.svg" alt="学校Logo" class="school-logo" />
|
||||
<img src="@/assets/logo/logo.png" alt="学校Logo" class="school-logo" />
|
||||
</div>
|
||||
<div class="system-title">
|
||||
<span class="title-text">杭州第一技师学院智慧校园管理系统</span>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="计划名称" prop="planName">
|
||||
<el-input v-model="queryParams.planName" placeholder="请输入计划名称" clearable @keyup.enter="handleQuery" />
|
||||
<el-input v-model="queryParams.planName" placeholder="请输入计划名称(支持模糊搜索)" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@@ -31,12 +31,12 @@
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="班级名称" prop="className">
|
||||
<el-input v-model="queryParams.className" placeholder="请输入班级名称" clearable @keyup.enter="handleQuery" />
|
||||
<el-input v-model="queryParams.className" placeholder="请输入班级名称(支持模糊搜索)" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="班主任姓名" prop="teacherName">
|
||||
<el-input v-model="queryParams.teacherName" placeholder="请输入班主任姓名" clearable @keyup.enter="handleQuery" />
|
||||
<el-input v-model="queryParams.teacherName" placeholder="请输入班主任姓名(支持模糊搜索)" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -71,7 +71,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="班级名称" align="center" prop="className" min-width="120" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="班主任姓名" align="center" prop="evaluatedUserName" min-width="120" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="班主任姓名" align="center" prop="teacherName" min-width="120" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="申请时间" align="center" min-width="180" sortable="custom" prop="submitTime">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.submitTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="指标编码" prop="indicatorCode">
|
||||
<el-input v-model="queryParams.indicatorCode" placeholder="请输入指标编码" clearable @keyup.enter="handleQuery" />
|
||||
<el-input v-model="queryParams.indicatorCode" placeholder="请输入指标编码(支持模糊搜索)" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="指标类型编码" prop="indicatorTypeCode">
|
||||
<el-input v-model="queryParams.indicatorTypeCode" placeholder="请输入指标类型编码" clearable @keyup.enter="handleQuery" />
|
||||
<el-input v-model="queryParams.indicatorTypeCode" placeholder="请输入指标类型编码(支持模糊搜索)" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="指标类型名称" prop="indicatorTypeName">
|
||||
<el-input v-model="queryParams.indicatorTypeName" placeholder="请输入指标类型名称" clearable @keyup.enter="handleQuery" />
|
||||
<el-input v-model="queryParams.indicatorTypeName" placeholder="请输入指标类型名称(支持模糊搜索)" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@@ -203,16 +203,22 @@ const handleQuery = () => {
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
|
||||
// 构建查询参数,过滤掉undefined和null值
|
||||
// 构建查询参数,正确处理空字符串和undefined/null值
|
||||
const queryData = {
|
||||
pageNum: queryParams.value.pageNum,
|
||||
pageSize: queryParams.value.pageSize,
|
||||
...(queryParams.value.indicatorTypeCode && { indicatorTypeCode: queryParams.value.indicatorTypeCode }),
|
||||
...(queryParams.value.indicatorTypeName && { indicatorTypeName: queryParams.value.indicatorTypeName }),
|
||||
...(queryParams.value.status && { status: queryParams.value.status })
|
||||
// 修复:正确处理空字符串,只过滤undefined和null
|
||||
...(queryParams.value.indicatorTypeCode !== undefined && queryParams.value.indicatorTypeCode !== null && { indicatorTypeCode: queryParams.value.indicatorTypeCode }),
|
||||
...(queryParams.value.indicatorTypeName !== undefined && queryParams.value.indicatorTypeName !== null && { indicatorTypeName: queryParams.value.indicatorTypeName }),
|
||||
...(queryParams.value.status !== undefined && queryParams.value.status !== null && { status: queryParams.value.status })
|
||||
};
|
||||
|
||||
console.log('📋 发送查询请求,参数:', queryData);
|
||||
console.log('🔍 原始查询参数:', {
|
||||
indicatorTypeCode: `"${queryParams.value.indicatorTypeCode}"`,
|
||||
indicatorTypeName: `"${queryParams.value.indicatorTypeName}"`,
|
||||
status: `"${queryParams.value.status}"`
|
||||
});
|
||||
|
||||
try {
|
||||
const res = await listAssessmentIndicatorType(queryData);
|
||||
@@ -251,7 +257,7 @@ const resetQuery = () => {
|
||||
// 重置表单字段
|
||||
queryFormRef.value?.resetFields();
|
||||
|
||||
// 手动重置查询参数对象
|
||||
// 手动重置查询参数对象,确保清空所有搜索条件
|
||||
queryParams.value.indicatorTypeCode = undefined;
|
||||
queryParams.value.indicatorTypeName = undefined;
|
||||
queryParams.value.status = undefined;
|
||||
|
||||
@@ -24,11 +24,6 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="学年" prop="academicYear">
|
||||
<el-input v-model="queryParams.academicYear" placeholder="请输入学年" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="学期" prop="semester">
|
||||
<el-select v-model="queryParams.semester" placeholder="请选择学期" clearable style="width: 100%">
|
||||
@@ -44,22 +39,6 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="创建时间">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
value-format="YYYY-MM-DD"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 100%"
|
||||
@change="handleQuery"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24" class="search-btn-container">
|
||||
<el-form-item>
|
||||
@@ -312,7 +291,6 @@ const ids = ref<Array<string | number>>([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const dateRange = ref<[DateModelType, DateModelType]>(['', '']);
|
||||
const schemeOptions = ref<BmzrAssessmentSchemeVO[]>([]);
|
||||
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
@@ -347,7 +325,6 @@ const data = reactive<PageData<AssessmentPlanForm, AssessmentPlanQuery>>({
|
||||
planName: undefined,
|
||||
planCode: undefined,
|
||||
schemeId: undefined,
|
||||
academicYear: undefined,
|
||||
semester: undefined,
|
||||
planStatus: undefined,
|
||||
params: {}
|
||||
@@ -370,11 +347,6 @@ const { queryParams, form, rules } = toRefs(data);
|
||||
/** 查询考核计划列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
queryParams.value.params = {};
|
||||
if (dateRange.value && dateRange.value.length === 2 && dateRange.value[0] && dateRange.value[1]) {
|
||||
queryParams.value.params['beginCreateTime'] = dateRange.value[0] as string;
|
||||
queryParams.value.params['endCreateTime'] = dateRange.value[1] as string;
|
||||
}
|
||||
const res = await listAssessmentPlan(queryParams.value);
|
||||
assessmentPlanList.value = res.rows;
|
||||
total.value = res.total;
|
||||
@@ -411,7 +383,6 @@ const handleQuery = () => {
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
dateRange.value = ['', ''];
|
||||
queryFormRef.value?.resetFields();
|
||||
handleQuery();
|
||||
};
|
||||
|
||||
@@ -12,12 +12,12 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="方案编码" prop="schemeCode">
|
||||
<el-input v-model="queryParams.schemeCode" placeholder="请输入方案编码" clearable @keyup.enter="handleQuery" />
|
||||
<el-input v-model="queryParams.schemeCode" placeholder="请输入方案编码(支持模糊搜索)" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="学年" prop="academicYear">
|
||||
<el-input v-model="queryParams.academicYear" placeholder="请输入学年" clearable @keyup.enter="handleQuery" />
|
||||
<el-input v-model="queryParams.academicYear" placeholder="请输入学年(支持模糊搜索)" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
@@ -337,7 +337,7 @@
|
||||
</el-card>
|
||||
|
||||
<!-- Tab切换 -->
|
||||
<el-tabs type="border-card" style="margin-top: 16px">
|
||||
<el-tabs v-model="studentRecordsActiveTab" type="border-card" style="margin-top: 16px">
|
||||
<!-- 违纪记录Tab -->
|
||||
<el-tab-pane label="违纪记录" name="discipline">
|
||||
<el-table :data="studentRecordsData?.disciplineRecords || []" border style="width: 100%" max-height="400" empty-text="暂无违纪记录">
|
||||
@@ -464,6 +464,7 @@ const monthlyScoreForm = reactive({
|
||||
const studentRecordsVisible = ref(false);
|
||||
const studentRecordsLoading = ref(false);
|
||||
const studentRecordsData = ref<ClassStudentRecordsVO>();
|
||||
const studentRecordsActiveTab = ref('discipline'); // 默认激活违纪记录标签页
|
||||
|
||||
const dialogTitle = computed(() => {
|
||||
const className = assessmentDetail.value?.classDetail?.className || '';
|
||||
@@ -654,14 +655,17 @@ const loadAssessmentDetail = async () => {
|
||||
|
||||
/** 查看学生违规处分信息 */
|
||||
const handleViewStudentViolations = async () => {
|
||||
if (!props.classId) {
|
||||
proxy?.$modal.msgError('缺少班级ID参数');
|
||||
if (!props.classId || !props.planId) {
|
||||
proxy?.$modal.msgError('缺少必要参数(班级ID或计划ID)');
|
||||
return;
|
||||
}
|
||||
|
||||
// 重置为默认激活的违纪记录标签页
|
||||
studentRecordsActiveTab.value = 'discipline';
|
||||
|
||||
studentRecordsLoading.value = true;
|
||||
try {
|
||||
const res = await getClassStudentRecords(props.classId);
|
||||
const res = await getClassStudentRecords(props.classId, props.planId);
|
||||
studentRecordsData.value = res.data;
|
||||
studentRecordsVisible.value = true;
|
||||
} catch (error) {
|
||||
|
||||
@@ -362,7 +362,7 @@
|
||||
</el-card>
|
||||
|
||||
<!-- Tab切换 -->
|
||||
<el-tabs type="border-card" style="margin-top: 16px">
|
||||
<el-tabs v-model="studentRecordsActiveTab" type="border-card" style="margin-top: 16px">
|
||||
<!-- 违纪记录Tab -->
|
||||
<el-tab-pane label="违纪记录" name="discipline">
|
||||
<el-table :data="studentRecordsData?.disciplineRecords || []" border style="width: 100%" max-height="400" empty-text="暂无违纪记录">
|
||||
@@ -571,6 +571,7 @@ const specialWorkForm = reactive({
|
||||
const studentRecordsVisible = ref(false);
|
||||
const studentRecordsLoading = ref(false);
|
||||
const studentRecordsData = ref<ClassStudentRecordsVO>();
|
||||
const studentRecordsActiveTab = ref('discipline'); // 默认激活违纪记录标签页
|
||||
|
||||
const dialogTitle = computed(() => {
|
||||
const className = getCurrentClassDetail()?.className || '';
|
||||
@@ -992,14 +993,17 @@ const loadAssessmentDetail = async () => {
|
||||
|
||||
/** 查看学生违规处分信息 */
|
||||
const handleViewStudentViolations = async () => {
|
||||
if (!props.classId) {
|
||||
proxy?.$modal.msgError('缺少班级ID参数');
|
||||
if (!props.classId || !props.planId) {
|
||||
proxy?.$modal.msgError('缺少必要参数(班级ID或计划ID)');
|
||||
return;
|
||||
}
|
||||
|
||||
// 重置为默认激活的违纪记录标签页
|
||||
studentRecordsActiveTab.value = 'discipline';
|
||||
|
||||
studentRecordsLoading.value = true;
|
||||
try {
|
||||
const res = await getClassStudentRecords(props.classId);
|
||||
const res = await getClassStudentRecords(props.classId, props.planId);
|
||||
studentRecordsData.value = res.data;
|
||||
studentRecordsVisible.value = true;
|
||||
} catch (error) {
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<el-table-column label="报告厅图片" align="center" prop="hallImage" width="200">
|
||||
<template #default="scope">
|
||||
<div v-if="scope.row.hallImage" class="table-image">
|
||||
<image-preview :src="scope.row.hallImage" :width="50" :height="50" />
|
||||
<image-preview :src="getFirstImage(scope.row.hallImage)" :width="50" :height="50" />
|
||||
</div>
|
||||
<div v-else class="table-no-image">
|
||||
<span class="table-no-image-text">暂无图片</span>
|
||||
@@ -382,6 +382,14 @@ const cancelView = () => {
|
||||
viewDialog.visible = false;
|
||||
};
|
||||
|
||||
/** 获取第一张图片 */
|
||||
const getFirstImage = (hallImage: string) => {
|
||||
if (!hallImage) return '';
|
||||
// 如果有多个图片用逗号分隔,只取第一张
|
||||
const images = hallImage.split(',').filter((img) => img.trim() !== '');
|
||||
return images.length > 0 ? images[0].trim() : '';
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
|
||||
+25
-8
@@ -136,6 +136,7 @@ interface MenuAction {
|
||||
status?: string;
|
||||
moduleOrder?: number; // 新增:用于模块排序
|
||||
menuOrder?: number; // 新增:用于菜单项排序
|
||||
orderNum?: number; // 新增:用于存储菜单的原始排序号
|
||||
logoUrl?: string; // 新增:用于存储随机logo图片路径
|
||||
}
|
||||
|
||||
@@ -379,10 +380,11 @@ const flattenMenus = (menus: any[], parentChain: string[] = [], parentPath = '',
|
||||
// 1. 组件为Layout或ParentView字符串
|
||||
// 2. 组件为Vue对象且没有子菜单(可能是目录)
|
||||
// 3. menuType为'M'(目录类型)
|
||||
const isDirectoryMenu = menu.component === 'Layout' ||
|
||||
menu.component === 'ParentView' ||
|
||||
(typeof menu.component === 'object' && !hasVisibleChildren) ||
|
||||
menu.menuType === 'M';
|
||||
const isDirectoryMenu =
|
||||
menu.component === 'Layout' ||
|
||||
menu.component === 'ParentView' ||
|
||||
(typeof menu.component === 'object' && !hasVisibleChildren) ||
|
||||
menu.menuType === 'M';
|
||||
|
||||
// 添加工作流菜单的详细调试信息
|
||||
if (menu.meta?.title === '工作流' || menu.name === 'Workflow11616') {
|
||||
@@ -424,12 +426,13 @@ const flattenMenus = (menus: any[], parentChain: string[] = [], parentPath = '',
|
||||
status: menu.status || '0',
|
||||
moduleOrder: moduleOrder, // 添加模块顺序
|
||||
menuOrder: menuIndex, // 添加菜单在当前层级的顺序
|
||||
orderNum: menu.orderNum || 0, // 添加菜单的原始排序号
|
||||
logoUrl: getIconPath(iconKey) // 根据icon名称获取对应图标
|
||||
};
|
||||
|
||||
// 添加调试日志来验证路径构建
|
||||
// 添加调试日志来验证路径构建和排序
|
||||
console.log(
|
||||
`菜单项路径构建: ${menu.meta.title} - 原始path: ${menu.path}, 构建后fullPath: ${fullPath}, parentPath: ${parentPath}, level: ${level}`
|
||||
`菜单项路径构建: ${menu.meta.title} - 原始path: ${menu.path}, 构建后fullPath: ${fullPath}, orderNum: ${menu.orderNum}, parentPath: ${parentPath}, level: ${level}`
|
||||
);
|
||||
|
||||
result.push(menuAction);
|
||||
@@ -498,13 +501,27 @@ const groupMenusByModule = (menus: MenuAction[]): MenuModule[] => {
|
||||
return;
|
||||
}
|
||||
|
||||
// 按orderNum排序前的日志
|
||||
console.log(
|
||||
`${moduleName}模块排序前:`,
|
||||
moduleMenus.map((m) => `${m.title}(${m.orderNum})`)
|
||||
);
|
||||
|
||||
const sortedMenus = moduleMenus.sort((a, b) => (a.orderNum || 0) - (b.orderNum || 0));
|
||||
|
||||
// 按orderNum排序后的日志
|
||||
console.log(
|
||||
`${moduleName}模块排序后:`,
|
||||
sortedMenus.map((m) => `${m.title}(${m.orderNum})`)
|
||||
);
|
||||
|
||||
const module: MenuModule = {
|
||||
id: `module-${moduleName}`,
|
||||
title: moduleName,
|
||||
description: `${moduleName}模块包含${moduleMenus.length}个功能`,
|
||||
color: moduleColors[colorIndex % moduleColors.length],
|
||||
// 菜单项按原始顺序排序,而不是按名称排序
|
||||
menus: moduleMenus.sort((a, b) => (a.menuOrder || 0) - (b.menuOrder || 0))
|
||||
// 菜单项按原始orderNum排序,确保显示顺序正确
|
||||
menus: sortedMenus
|
||||
};
|
||||
modules.push(module);
|
||||
colorIndex++;
|
||||
|
||||
+160
-24
@@ -403,36 +403,47 @@
|
||||
</el-dialog>
|
||||
|
||||
<!-- 简历记录对话框 -->
|
||||
<el-dialog title="简历记录" v-model="applicationOpen" width="900px" append-to-body>
|
||||
<el-dialog title="简历记录" v-model="applicationOpen" width="1200px" append-to-body>
|
||||
<div v-if="currentJob">
|
||||
<div class="job-info-header">
|
||||
<el-descriptions :column="3" border size="small">
|
||||
<el-descriptions-item label="职位名称">{{ currentJob.title }}</el-descriptions-item>
|
||||
<el-descriptions-item label="部门">{{ getDepartmentLabel(currentJob.department) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请人数">{{ currentJob.applicantCount }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<div class="job-info-compact">
|
||||
<div class="info-item">
|
||||
<span class="info-label">职位名称:</span>
|
||||
<span class="info-value">{{ currentJob.title }}</span>
|
||||
</div>
|
||||
<div class="info-divider">|</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">部门:</span>
|
||||
<span class="info-value">{{ getDepartmentLabel(currentJob.department) }}</span>
|
||||
</div>
|
||||
<div class="info-divider">|</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">申请人数:</span>
|
||||
<span class="info-value highlight">{{ currentJob.applicantCount }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="application-table mt-4">
|
||||
<el-table v-loading="applicationLoading" :data="applicationList" border>
|
||||
<el-table-column label="应聘者" align="center" prop="applicantName" />
|
||||
<el-table-column label="申请状态" align="center" prop="status" width="120">
|
||||
<div class="application-table mt-4">
|
||||
<el-table v-loading="applicationLoading" :data="applicationList" border size="small" class="compact-table" :row-style="{ height: '32px' }" :cell-style="{ padding: '2px 0' }">
|
||||
<el-table-column label="应聘者" align="center" prop="applicantName" width="110" />
|
||||
<el-table-column label="申请状态" align="center" prop="status" width="110">
|
||||
<template #default="scope">
|
||||
<el-tag :type="getStatusType(scope.row.status)">
|
||||
<el-tag :type="getStatusType(scope.row.status)" size="small">
|
||||
{{ getStatusLabel(scope.row.status) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="联系电话" align="center" prop="contactPhone" />
|
||||
<el-table-column label="联系邮箱" align="center" prop="contactEmail" />
|
||||
<el-table-column label="自我介绍" align="center" prop="selfDescription" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="HR备注" align="center" prop="hrNotes" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="申请时间" align="center" prop="applyTime" width="180">
|
||||
<el-table-column label="联系电话" align="center" prop="contactPhone" width="130" />
|
||||
<el-table-column label="联系邮箱" align="center" prop="contactEmail" width="200" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="自我介绍" align="center" prop="selfDescription" width="180" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="申请时间" align="center" prop="applyTime" width="170">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.applyTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300">
|
||||
<el-table-column label="HR备注" align="center" prop="hrNotes" width="150" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="130" fixed="right">
|
||||
<template #default="scope">
|
||||
<div class="action-buttons">
|
||||
<el-tooltip content="查看详情" placement="top">
|
||||
@@ -442,8 +453,8 @@
|
||||
<el-button link type="primary" icon="Download" size="small" @click="downloadResume(scope.row.resumePath)"></el-button>
|
||||
</el-tooltip>
|
||||
|
||||
<!-- 状态选择器 -->
|
||||
<div class="status-selector" v-hasPermi="['rs:application:edit']">
|
||||
<!-- 状态选择器已隐藏 -->
|
||||
<!-- <div class="status-selector" v-hasPermi="['rs:application:edit']">
|
||||
<el-select
|
||||
:model-value="scope.row.status"
|
||||
@change="(newStatus: string) => handleStatusChange(scope.row, newStatus)"
|
||||
@@ -452,7 +463,7 @@
|
||||
>
|
||||
<el-option v-for="option in applicationStatusOptions" :key="option.value" :label="option.label" :value="option.value" />
|
||||
</el-select>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -465,6 +476,9 @@
|
||||
v-model:page="applicationQueryParams.pageNum"
|
||||
v-model:limit="applicationQueryParams.pageSize"
|
||||
@pagination="getApplicationList"
|
||||
:page-sizes="[5, 10, 15, 20]"
|
||||
layout="sizes, prev, pager, next, jumper"
|
||||
:small="true"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1839,11 +1853,24 @@ onMounted(() => {
|
||||
.pagination-container {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding: 16px 20px 0 0 !important;
|
||||
padding: 8px 20px 0 0 !important;
|
||||
background-color: #fff;
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.pagination-container :deep(.el-pagination) {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.pagination-container :deep(.el-pagination .btn-prev),
|
||||
.pagination-container :deep(.el-pagination .btn-next),
|
||||
.pagination-container :deep(.el-pagination .el-pager li) {
|
||||
min-width: 28px;
|
||||
height: 28px;
|
||||
line-height: 28px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* 搜索按钮容器样式 */
|
||||
.search-btn-container {
|
||||
display: flex;
|
||||
@@ -1857,11 +1884,76 @@ onMounted(() => {
|
||||
|
||||
/* 申请记录样式 */
|
||||
.job-info-header {
|
||||
margin-bottom: 16px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
/* 紧凑型职位信息样式 */
|
||||
.job-info-compact {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 6px 10px;
|
||||
background: #f8f9fa;
|
||||
border: 1px solid #e1e8ed;
|
||||
border-radius: 4px;
|
||||
gap: 8px;
|
||||
flex-wrap: wrap;
|
||||
min-height: 36px;
|
||||
}
|
||||
|
||||
.info-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 3px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.info-label {
|
||||
font-size: 13px;
|
||||
color: #606266;
|
||||
font-weight: 500;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.info-value {
|
||||
font-size: 13px;
|
||||
color: #303133;
|
||||
font-weight: 600;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.info-value.highlight {
|
||||
color: #409eff;
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.info-divider {
|
||||
color: #dcdfe6;
|
||||
font-size: 13px;
|
||||
margin: 0 4px;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.application-table {
|
||||
margin-top: 16px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.application-table .el-table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.application-table .el-table__body-wrapper {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
/* 弹窗内容区域优化 */
|
||||
.el-dialog__body {
|
||||
padding: 15px 20px 0 20px !important;
|
||||
}
|
||||
|
||||
.el-dialog__footer {
|
||||
padding: 10px 20px 15px 20px !important;
|
||||
}
|
||||
|
||||
.mt-4 {
|
||||
@@ -1872,12 +1964,15 @@ onMounted(() => {
|
||||
.action-buttons {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
gap: 2px;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
|
||||
.el-button {
|
||||
margin: 0;
|
||||
padding: 2px 6px;
|
||||
font-size: 11px;
|
||||
min-height: 20px;
|
||||
}
|
||||
|
||||
.status-selector {
|
||||
@@ -1897,4 +1992,45 @@ onMounted(() => {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 紧凑表格样式 */
|
||||
.compact-table {
|
||||
font-size: 13px;
|
||||
|
||||
:deep(.el-table__header) {
|
||||
th {
|
||||
padding: 4px 0;
|
||||
font-size: 13px;
|
||||
height: 32px;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.el-table__body) {
|
||||
td {
|
||||
padding: 4px 0;
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.cell) {
|
||||
padding: 0 4px;
|
||||
line-height: 1.3;
|
||||
word-break: keep-all;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* 固定列样式优化 */
|
||||
:deep(.el-table__fixed-right) {
|
||||
box-shadow: -2px 0 6px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
:deep(.el-table__fixed-right-patch) {
|
||||
background-color: #f5f7fa;
|
||||
}
|
||||
|
||||
/* 确保固定列正常显示 */
|
||||
:deep(.el-table__fixed-right .el-table__fixed-body-wrapper) {
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -3,8 +3,8 @@
|
||||
<el-card class="box-card">
|
||||
<!-- 审批管理选项卡 -->
|
||||
<el-tabs v-model="activeTab" type="border-card" @tab-click="handleTabClick">
|
||||
<!-- 待审批申请 -->
|
||||
<el-tab-pane label="待审批申请" name="pending">
|
||||
<!-- 出国审批 -->
|
||||
<el-tab-pane label="出国审批" name="pending">
|
||||
<div class="tab-content">
|
||||
<!-- 搜索区域 -->
|
||||
<transition :enter-active-class="animate.searchAnimate.enter" :leave-active-class="animate.searchAnimate.leave">
|
||||
@@ -42,20 +42,6 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="9">
|
||||
<el-form-item label="出国时间">
|
||||
<el-date-picker
|
||||
v-model="pendingDateRange"
|
||||
style="width: 100%"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
value-format="YYYY-MM-DD"
|
||||
@change="handlePendingDateRangeChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
@@ -185,20 +171,6 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="9">
|
||||
<el-form-item label="审批时间">
|
||||
<el-date-picker
|
||||
v-model="recordDateRange"
|
||||
style="width: 100%"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
value-format="YYYY-MM-DD"
|
||||
@change="handleRecordDateRangeChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
@@ -228,9 +200,9 @@
|
||||
<!-- 审批记录表格 -->
|
||||
<el-table v-loading="recordLoading" border :data="recordList" @row-dblclick="handleViewRecord" 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" prop="department" width="140" :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>
|
||||
@@ -246,15 +218,7 @@
|
||||
<el-tooltip content="查看详情" placement="top">
|
||||
<el-button link type="primary" icon="View" @click="handleViewRecord(scope.row)" v-hasPermi="['rs:overseas:query']"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="查看审批历史" placement="top">
|
||||
<el-button
|
||||
link
|
||||
type="info"
|
||||
icon="List"
|
||||
@click.stop="handleViewApprovalHistory(scope.row)"
|
||||
v-hasPermi="['rs:overseas:query']"
|
||||
></el-button>
|
||||
</el-tooltip>
|
||||
<!-- 查看审批历史按钮已隐藏 -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -435,16 +399,13 @@ const state = reactive({
|
||||
pendingList: [] as OverseasApplicationVO[],
|
||||
pendingTotal: 0,
|
||||
showPendingSearch: true,
|
||||
pendingDateRange: [] as string[],
|
||||
pendingQueryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
applicantName: '',
|
||||
department: '',
|
||||
destination: '',
|
||||
status: '0', // 只查询待审核状态
|
||||
startDateBegin: '',
|
||||
startDateEnd: ''
|
||||
status: '0' // 只查询待审核状态
|
||||
} as OverseasApplicationQuery,
|
||||
|
||||
// 审批记录列表相关
|
||||
@@ -452,7 +413,6 @@ const state = reactive({
|
||||
recordList: [] as OverseasApprovalVO[],
|
||||
recordTotal: 0,
|
||||
showRecordSearch: true,
|
||||
recordDateRange: [] as string[],
|
||||
recordQueryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
@@ -461,9 +421,7 @@ const state = reactive({
|
||||
approvalStatus: '',
|
||||
applicantName: '',
|
||||
department: '',
|
||||
destination: '',
|
||||
approvalTimeBegin: '',
|
||||
approvalTimeEnd: ''
|
||||
destination: ''
|
||||
} as OverseasApprovalQuery,
|
||||
|
||||
// 查看详情
|
||||
@@ -520,13 +478,11 @@ const {
|
||||
pendingList,
|
||||
pendingTotal,
|
||||
showPendingSearch,
|
||||
pendingDateRange,
|
||||
pendingQueryParams,
|
||||
recordLoading,
|
||||
recordList,
|
||||
recordTotal,
|
||||
showRecordSearch,
|
||||
recordDateRange,
|
||||
recordQueryParams,
|
||||
viewDialog,
|
||||
viewData,
|
||||
@@ -631,28 +587,54 @@ const handleRecordQuery = () => {
|
||||
|
||||
// 重置搜索
|
||||
const resetPendingQuery = () => {
|
||||
proxy.resetForm('pendingQueryForm');
|
||||
state.pendingDateRange = [];
|
||||
state.pendingQueryParams.status = '0'; // 保持查询待审核状态
|
||||
handlePendingQuery();
|
||||
try {
|
||||
// 重置查询参数
|
||||
Object.assign(state.pendingQueryParams, {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
applicantName: '',
|
||||
department: '',
|
||||
destination: '',
|
||||
status: '0' // 保持查询待审核状态
|
||||
});
|
||||
// 重置表单字段
|
||||
const form = proxy.$refs.pendingQueryForm;
|
||||
if (form && typeof form.resetFields === 'function') {
|
||||
form.resetFields();
|
||||
}
|
||||
handlePendingQuery();
|
||||
} catch (error) {
|
||||
console.error('重置查询条件时发生错误:', error);
|
||||
handlePendingQuery();
|
||||
}
|
||||
};
|
||||
|
||||
const resetRecordQuery = () => {
|
||||
proxy.resetForm('recordQueryForm');
|
||||
handleRecordQuery();
|
||||
};
|
||||
|
||||
// 处理日期范围变化
|
||||
const handlePendingDateRangeChange = (dates: string[] | null) => {
|
||||
if (dates && dates.length === 2) {
|
||||
state.pendingQueryParams.startDateBegin = dates[0];
|
||||
state.pendingQueryParams.startDateEnd = dates[1];
|
||||
} else {
|
||||
state.pendingQueryParams.startDateBegin = '';
|
||||
state.pendingQueryParams.startDateEnd = '';
|
||||
try {
|
||||
// 重置查询参数
|
||||
Object.assign(state.recordQueryParams, {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
applicationId: undefined,
|
||||
approvalLevel: '',
|
||||
approvalStatus: '',
|
||||
applicantName: '',
|
||||
department: '',
|
||||
destination: ''
|
||||
});
|
||||
// 重置表单字段
|
||||
const form = proxy.$refs.recordQueryForm;
|
||||
if (form && typeof form.resetFields === 'function') {
|
||||
form.resetFields();
|
||||
}
|
||||
handleRecordQuery();
|
||||
} catch (error) {
|
||||
console.error('重置查询条件时发生错误:', error);
|
||||
handleRecordQuery();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// 查看申请详情
|
||||
const handleViewApplication = async (row: OverseasApplicationVO) => {
|
||||
try {
|
||||
@@ -840,16 +822,7 @@ const getApprovalStatusTagType = (status: string): 'success' | 'warning' | 'dang
|
||||
return typeMap[status] || 'info';
|
||||
};
|
||||
|
||||
// 审批记录日期范围变化处理
|
||||
const handleRecordDateRangeChange = (dates: [string, string] | null) => {
|
||||
if (dates && dates.length === 2) {
|
||||
state.recordQueryParams.approvalTimeBegin = dates[0];
|
||||
state.recordQueryParams.approvalTimeEnd = dates[1];
|
||||
} else {
|
||||
state.recordQueryParams.approvalTimeBegin = '';
|
||||
state.recordQueryParams.approvalTimeEnd = '';
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -31,19 +31,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="9">
|
||||
<el-form-item label="申请时间">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
style="width: 100%"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
@change="handleDateRangeChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
@@ -483,6 +471,8 @@ const userStore = useUserStore();
|
||||
|
||||
// 表单引用
|
||||
const applicationFormRef = ref<any>(null);
|
||||
const applicationQueryForm = ref<any>(null);
|
||||
const recordQueryForm = ref<any>(null);
|
||||
|
||||
const state = reactive({
|
||||
// 选项卡相关
|
||||
@@ -498,9 +488,7 @@ const state = reactive({
|
||||
pageSize: 10,
|
||||
destination: '',
|
||||
status: '',
|
||||
purpose: '',
|
||||
applyTimeBegin: '',
|
||||
applyTimeEnd: ''
|
||||
purpose: ''
|
||||
} as OverseasApplicationQuery,
|
||||
|
||||
// 记录列表相关
|
||||
@@ -555,8 +543,7 @@ const state = reactive({
|
||||
status: '0'
|
||||
},
|
||||
|
||||
// 时间范围
|
||||
dateRange: [],
|
||||
|
||||
|
||||
// 字典数据
|
||||
statusOptions: [
|
||||
@@ -603,7 +590,6 @@ const {
|
||||
approvalHistoryLoading,
|
||||
approvalHistoryList,
|
||||
currentApplication,
|
||||
dateRange,
|
||||
statusOptions,
|
||||
purposeOptions,
|
||||
completionStatusOptions
|
||||
@@ -706,30 +692,38 @@ const handleRecordQuery = () => {
|
||||
getRecordList();
|
||||
};
|
||||
|
||||
// 重置搜索
|
||||
// 重置搜索(参考培训审批的正确实现)
|
||||
const resetApplicationQuery = () => {
|
||||
proxy.resetForm('applicationQueryForm');
|
||||
state.dateRange = [];
|
||||
state.applicationQueryParams.applyTimeBegin = '';
|
||||
state.applicationQueryParams.applyTimeEnd = '';
|
||||
handleApplicationQuery();
|
||||
// 重置表单字段显示
|
||||
applicationQueryForm.value?.resetFields();
|
||||
// 重置查询参数
|
||||
Object.assign(state.applicationQueryParams, {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
destination: '',
|
||||
status: '',
|
||||
purpose: '',
|
||||
params: {}
|
||||
});
|
||||
getApplicationList();
|
||||
};
|
||||
|
||||
const resetRecordQuery = () => {
|
||||
proxy.resetForm('recordQueryForm');
|
||||
handleRecordQuery();
|
||||
// 重置表单字段显示
|
||||
recordQueryForm.value?.resetFields();
|
||||
// 重置查询参数
|
||||
Object.assign(state.recordQueryParams, {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
applicantName: '',
|
||||
destination: '',
|
||||
completionStatus: '',
|
||||
params: {}
|
||||
});
|
||||
getRecordList();
|
||||
};
|
||||
|
||||
// 时间范围改变
|
||||
const handleDateRangeChange = (dates: any) => {
|
||||
if (dates && dates.length === 2) {
|
||||
state.applicationQueryParams.applyTimeBegin = dates[0];
|
||||
state.applicationQueryParams.applyTimeEnd = dates[1];
|
||||
} else {
|
||||
state.applicationQueryParams.applyTimeBegin = '';
|
||||
state.applicationQueryParams.applyTimeEnd = '';
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// 新增申请
|
||||
const handleAddApplication = () => {
|
||||
|
||||
@@ -32,9 +32,9 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="9">
|
||||
<el-form-item label="审批时间">
|
||||
<el-form-item label="审批时间" prop="dateRange">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
v-model="queryParams.dateRange"
|
||||
style="width: 100%"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
@@ -369,6 +369,11 @@ const { rs_approval_status, rs_approval_level, rs_overseas_purpose } = proxy.use
|
||||
// 选项卡相关
|
||||
const activeTab = ref('approval');
|
||||
|
||||
// 表单ref
|
||||
const queryFormRef = ref();
|
||||
const recordQueryForm = ref();
|
||||
const approvalRef = ref();
|
||||
|
||||
// 出国审批相关
|
||||
const approvalList = ref([]);
|
||||
const open = ref(false);
|
||||
@@ -381,7 +386,6 @@ const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref('');
|
||||
const detailData = ref({});
|
||||
const dateRange = ref([]);
|
||||
|
||||
// 审批记录相关
|
||||
const recordList = ref([]);
|
||||
@@ -404,7 +408,8 @@ const data = reactive({
|
||||
approvalTimeBegin: null,
|
||||
approvalTimeEnd: null,
|
||||
applicantName: null, // 申请人姓名搜索
|
||||
purpose: null // 出国目的搜索
|
||||
purpose: null, // 出国目的搜索
|
||||
dateRange: [] // 日期范围
|
||||
},
|
||||
recordQueryParams: {
|
||||
pageNum: 1,
|
||||
@@ -505,11 +510,32 @@ function handleQuery() {
|
||||
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
dateRange.value = [];
|
||||
queryParams.value.approvalTimeBegin = null;
|
||||
queryParams.value.approvalTimeEnd = null;
|
||||
proxy.resetForm('queryFormRef');
|
||||
try {
|
||||
// 先手动清空查询参数
|
||||
queryParams.value = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
applicationId: null,
|
||||
approverId: null,
|
||||
approverName: null,
|
||||
approvalLevel: null,
|
||||
approvalStatus: null,
|
||||
approvalTimeBegin: null,
|
||||
approvalTimeEnd: null,
|
||||
applicantName: null,
|
||||
purpose: null,
|
||||
dateRange: []
|
||||
};
|
||||
// 再重置表单
|
||||
if (queryFormRef.value && typeof queryFormRef.value.resetFields === 'function') {
|
||||
queryFormRef.value.resetFields();
|
||||
}
|
||||
handleQuery();
|
||||
} catch (error) {
|
||||
console.error('重置查询条件时发生错误:', error);
|
||||
// 即使出错也要重新查询
|
||||
handleQuery();
|
||||
}
|
||||
}
|
||||
|
||||
/** 审批记录搜索按钮操作 */
|
||||
@@ -520,8 +546,27 @@ function handleRecordQuery() {
|
||||
|
||||
/** 审批记录重置按钮操作 */
|
||||
function resetRecordQuery() {
|
||||
proxy.resetForm('recordQueryForm');
|
||||
try {
|
||||
// 先手动清空查询参数
|
||||
recordQueryParams.value = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
applicantName: null,
|
||||
approverName: null,
|
||||
approvalStatus: null,
|
||||
approvalTimeBegin: null,
|
||||
approvalTimeEnd: null
|
||||
};
|
||||
// 再重置表单
|
||||
if (recordQueryForm.value && typeof recordQueryForm.value.resetFields === 'function') {
|
||||
recordQueryForm.value.resetFields();
|
||||
}
|
||||
handleRecordQuery();
|
||||
} catch (error) {
|
||||
console.error('重置查询条件时发生错误:', error);
|
||||
// 即使出错也要重新查询
|
||||
handleRecordQuery();
|
||||
}
|
||||
}
|
||||
|
||||
// 取消按钮
|
||||
@@ -542,7 +587,7 @@ function reset() {
|
||||
approvalOpinion: null,
|
||||
approvalTime: null
|
||||
};
|
||||
proxy.resetForm('approvalRef');
|
||||
approvalRef.value?.resetFields();
|
||||
}
|
||||
|
||||
// 多选框选中数据
|
||||
@@ -596,7 +641,7 @@ function handleViewRecord(row) {
|
||||
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
proxy.$refs['approvalRef'].validate((valid) => {
|
||||
approvalRef.value?.validate((valid) => {
|
||||
if (valid) {
|
||||
if (form.value.approvalId != null) {
|
||||
updateOverseasApproval(form.value).then((response) => {
|
||||
|
||||
@@ -994,6 +994,7 @@ const showRecordSearch = ref(true);
|
||||
courseName: '',
|
||||
userId: undefined as string | number | undefined,
|
||||
userName: '',
|
||||
location: '',
|
||||
department: '',
|
||||
completionStatus: '',
|
||||
includeApprovedApplications: true, // 包含已通过审批的申请数据
|
||||
|
||||
@@ -147,14 +147,6 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="审批结果" prop="status">
|
||||
<el-select v-model="approvalRecordQueryParams.status" placeholder="请选择审批结果" clearable style="width: 100%">
|
||||
<el-option label="已通过" value="1" />
|
||||
<el-option label="已拒绝" value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
@@ -206,14 +198,11 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批意见" align="center" prop="opinion" :show-overflow-tooltip="true" min-width="150" />
|
||||
<el-table-column label="操作" align="center" width="160">
|
||||
<el-table-column label="操作" align="center" width="80">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="查看详情" placement="top">
|
||||
<el-button link type="primary" icon="View" @click="handleViewApprovalRecord(scope.row)"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="查看审批历史" placement="top">
|
||||
<el-button link type="info" icon="List" @click.stop="handleViewApprovalHistory(scope.row)"></el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -600,7 +589,6 @@ const approvalRecordQueryParams = reactive({
|
||||
pageSize: 10,
|
||||
courseName: '',
|
||||
userName: '',
|
||||
status: '',
|
||||
includeApprovedApplications: true, // 包含已通过审批的申请数据
|
||||
params: {}
|
||||
});
|
||||
@@ -794,7 +782,7 @@ const getApprovalRecordList = async () => {
|
||||
// 获取所有审批记录(不限于当前用户审批过的)
|
||||
const queryParams = {
|
||||
...approvalRecordQueryParams,
|
||||
status: approvalRecordQueryParams.status || '1,2', // 默认获取已通过和已拒绝的记录
|
||||
status: '1,2', // 获取已通过和已拒绝的记录
|
||||
includeApprovedApplications: true // 确保包含已通过状态的培训申请数据
|
||||
};
|
||||
const response = await listAllApprovalRecords(queryParams);
|
||||
@@ -823,7 +811,6 @@ const resetApprovalRecordQuery = () => {
|
||||
pageSize: 10,
|
||||
courseName: '',
|
||||
userName: '',
|
||||
status: '',
|
||||
includeApprovedApplications: true, // 保持包含已通过审批的申请数据
|
||||
params: {}
|
||||
});
|
||||
@@ -874,7 +861,7 @@ const handleExportApprovalRecord = async () => {
|
||||
try {
|
||||
const queryParams = {
|
||||
...approvalRecordQueryParams,
|
||||
status: approvalRecordQueryParams.status || '1,2', // 默认导出已通过和已拒绝的记录
|
||||
status: '1,2', // 导出已通过和已拒绝的记录
|
||||
includeApprovedApplications: true // 确保包含已通过状态的培训申请数据
|
||||
};
|
||||
const response = await exportApprovalRecord(queryParams);
|
||||
@@ -916,10 +903,11 @@ const handleViewApprovalHistory = async (row: any) => {
|
||||
}
|
||||
|
||||
// 设置当前应用信息
|
||||
// 兼容两种数据结构:培训申请(courseName, userName) 和 培训记录(courseTitle, applicationUserName)
|
||||
Object.assign(currentApplication, {
|
||||
applicationId: applicationId,
|
||||
courseName: row.courseName || '未知课程',
|
||||
userName: row.userName || '未知用户',
|
||||
courseName: row.courseName || row.courseTitle || '未知课程',
|
||||
userName: row.userName || row.applicationUserName || '未知用户',
|
||||
applyTime: row.applyTime || '',
|
||||
status: row.status || '0'
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user