wuzhen update
This commit is contained in:
1 parent
b8da4c17bf
commit
8c41101de8
7 files changed
+248
-67
No files matched your search
@@ -30,7 +30,7 @@ export interface WorkStudyApplicationQuery extends PageQuery {
|
||||
/** 工作地点 */
|
||||
workLocation?: string;
|
||||
/** 申请状态 */
|
||||
applicationStatus?: string;
|
||||
status?: string;
|
||||
/** 学院审核状态 */
|
||||
collegeReviewStatus?: string;
|
||||
/** 学生处审核状态 */
|
||||
@@ -135,7 +135,7 @@ export interface WorkStudyApplicationVO {
|
||||
/** 备注 */
|
||||
remark?: string;
|
||||
/** 申请状态 */
|
||||
applicationStatus: string;
|
||||
status: string;
|
||||
/** 学院审核状态 */
|
||||
collegeReviewStatus?: string;
|
||||
/** 学院审核时间 */
|
||||
|
||||
@@ -21,18 +21,28 @@ export interface WorkStudyApplicationVO {
|
||||
status?: string;
|
||||
statusName?: string;
|
||||
applicationDate?: string;
|
||||
collegeReviewBy?: string | number;
|
||||
collegeReviewByName?: string;
|
||||
// 学院审核相关字段
|
||||
collegeReviewStatus?: string;
|
||||
collegeReviewTime?: string;
|
||||
collegeReviewerId?: string | number;
|
||||
collegeReviewerName?: string;
|
||||
collegeReviewComment?: string;
|
||||
finalReviewBy?: string | number;
|
||||
finalReviewByName?: string;
|
||||
// 最终审核相关字段
|
||||
finalReviewStatus?: string;
|
||||
finalReviewTime?: string;
|
||||
finalReviewerId?: string | number;
|
||||
finalReviewerName?: string;
|
||||
finalReviewComment?: string;
|
||||
// 基础字段
|
||||
createBy?: string | number;
|
||||
createTime?: string;
|
||||
updateBy?: string | number;
|
||||
updateTime?: string;
|
||||
// 兼容旧字段名(保持向后兼容)
|
||||
collegeReviewBy?: string | number;
|
||||
collegeReviewByName?: string;
|
||||
finalReviewBy?: string | number;
|
||||
finalReviewByName?: string;
|
||||
}
|
||||
|
||||
// 查询参数
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
<el-icon><User /></el-icon>
|
||||
申请信息
|
||||
</span>
|
||||
<el-tag :type="getStatusType(applicationData.applicationStatus)" size="large">
|
||||
{{ getStatusText(applicationData.applicationStatus) }}
|
||||
<el-tag :type="getStatusType(applicationData.status)" size="large">
|
||||
{{ getStatusText(applicationData.status) }}
|
||||
</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
@@ -242,7 +242,7 @@ const getEconomicStatusType = (status: string) => {
|
||||
const getStepActive = () => {
|
||||
if (!applicationData.value) return 0;
|
||||
|
||||
const status = applicationData.value.applicationStatus;
|
||||
const status = applicationData.value.status;
|
||||
switch (status) {
|
||||
case 'DRAFT':
|
||||
case 'SUBMITTED':
|
||||
@@ -262,7 +262,7 @@ const getStepActive = () => {
|
||||
const getStepStatus = (step: 'college' | 'final') => {
|
||||
if (!applicationData.value) return 'wait';
|
||||
|
||||
const status = applicationData.value.applicationStatus;
|
||||
const status = applicationData.value.status;
|
||||
|
||||
if (step === 'college') {
|
||||
if (status === 'COLLEGE_APPROVED') return 'finish';
|
||||
@@ -289,7 +289,7 @@ const getStepDescription = (step: 'college' | 'final') => {
|
||||
if (applicationData.value.collegeReviewTime) {
|
||||
return applicationData.value.collegeReviewTime;
|
||||
}
|
||||
if (['SUBMITTED'].includes(applicationData.value.applicationStatus)) {
|
||||
if (['SUBMITTED'].includes(applicationData.value.status)) {
|
||||
return '待审核';
|
||||
}
|
||||
}
|
||||
@@ -298,7 +298,7 @@ const getStepDescription = (step: 'college' | 'final') => {
|
||||
if (applicationData.value.finalReviewTime) {
|
||||
return applicationData.value.finalReviewTime;
|
||||
}
|
||||
if (applicationData.value.applicationStatus === 'COLLEGE_APPROVED') {
|
||||
if (applicationData.value.status === 'COLLEGE_APPROVED') {
|
||||
return '待审核';
|
||||
}
|
||||
}
|
||||
@@ -323,7 +323,7 @@ const getStepIconClass = (step: 'college' | 'final') => {
|
||||
const getFinalStatus = () => {
|
||||
if (!applicationData.value) return 'wait';
|
||||
|
||||
const status = applicationData.value.applicationStatus;
|
||||
const status = applicationData.value.status;
|
||||
if (status === 'FINAL_APPROVED') return 'finish';
|
||||
if (['FINAL_REJECTED', 'COLLEGE_REJECTED'].includes(status)) return 'error';
|
||||
return 'wait';
|
||||
@@ -333,7 +333,7 @@ const getFinalStatus = () => {
|
||||
const getFinalDescription = () => {
|
||||
if (!applicationData.value) return '';
|
||||
|
||||
const status = applicationData.value.applicationStatus;
|
||||
const status = applicationData.value.status;
|
||||
if (status === 'FINAL_APPROVED') return '申请通过';
|
||||
if (status === 'FINAL_REJECTED') return '申请被拒绝';
|
||||
if (status === 'COLLEGE_REJECTED') return '申请被拒绝';
|
||||
@@ -372,7 +372,7 @@ const handleDetail = async (id: string | number, mode: 'application' | 'position
|
||||
// 将岗位信息转换为申请信息格式用于显示
|
||||
applicationData.value = {
|
||||
...res.data,
|
||||
applicationStatus: 'NOT_APPLIED'
|
||||
status: 'NOT_APPLIED'
|
||||
// 其他字段根据需要添加
|
||||
} as WorkStudyApplicationVO;
|
||||
}
|
||||
|
||||
@@ -57,27 +57,41 @@
|
||||
</template>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="当前状态">
|
||||
<el-tag :type="getStatusType(applicationData.status)">
|
||||
{{ applicationData.statusName }}
|
||||
<el-tag :type="getStatusType(applicationData.status || '')">
|
||||
{{ applicationData.statusName || applicationData.status }}
|
||||
</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="申请时间">{{ applicationData.applicationDate }}</el-descriptions-item>
|
||||
<el-descriptions-item label="学院审核人" v-if="applicationData.collegeReviewByName">
|
||||
{{ applicationData.collegeReviewByName }}
|
||||
|
||||
<!-- 学院审核信息 -->
|
||||
<el-descriptions-item label="学院审核状态" v-if="applicationData.collegeReviewStatus">
|
||||
<el-tag :type="getReviewStatusType(applicationData.collegeReviewStatus)">
|
||||
{{ getReviewStatusText(applicationData.collegeReviewStatus) }}
|
||||
</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="学院审核人" v-if="applicationData.collegeReviewerName">
|
||||
{{ applicationData.collegeReviewerName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="学院审核时间" v-if="applicationData.collegeReviewTime">
|
||||
{{ applicationData.collegeReviewTime }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="学院审核意见" v-if="applicationData.collegeReviewComment" span="2">
|
||||
<el-descriptions-item label="学院审核意见" v-if="applicationData.collegeReviewComment" :span="2">
|
||||
<div class="content-text">{{ applicationData.collegeReviewComment }}</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="最终审核人" v-if="applicationData.finalReviewByName">
|
||||
{{ applicationData.finalReviewByName }}
|
||||
|
||||
<!-- 最终审核信息 -->
|
||||
<el-descriptions-item label="最终审核状态" v-if="applicationData.finalReviewStatus">
|
||||
<el-tag :type="getReviewStatusType(applicationData.finalReviewStatus)">
|
||||
{{ getReviewStatusText(applicationData.finalReviewStatus) }}
|
||||
</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="最终审核人" v-if="applicationData.finalReviewerName">
|
||||
{{ applicationData.finalReviewerName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="最终审核时间" v-if="applicationData.finalReviewTime">
|
||||
{{ applicationData.finalReviewTime }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="最终审核意见" v-if="applicationData.finalReviewComment" span="2">
|
||||
<el-descriptions-item label="最终审核意见" v-if="applicationData.finalReviewComment" :span="2">
|
||||
<div class="content-text">{{ applicationData.finalReviewComment }}</div>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
@@ -137,19 +151,16 @@ const getDetail = async () => {
|
||||
const response = await getCollegeApplication(props.applicationId);
|
||||
console.log('详情API响应:', response);
|
||||
|
||||
// 处理不同的响应格式
|
||||
if (response.data) {
|
||||
if (response.data.data) {
|
||||
applicationData.value = response.data.data;
|
||||
} else {
|
||||
applicationData.value = response.data;
|
||||
}
|
||||
// 处理响应格式
|
||||
if (response && response.data) {
|
||||
applicationData.value = response.data;
|
||||
}
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
console.error('获取申请详情失败:', error);
|
||||
if (error.message.includes('404')) {
|
||||
const errorMessage = error?.message || '';
|
||||
if (errorMessage.includes('404')) {
|
||||
ElMessage.error('申请不存在或您无权查看此申请');
|
||||
} else if (error.message.includes('403')) {
|
||||
} else if (errorMessage.includes('403')) {
|
||||
ElMessage.error('权限不足,无法查看申请详情');
|
||||
} else {
|
||||
ElMessage.error('获取申请详情失败,请稍后重试');
|
||||
@@ -167,7 +178,7 @@ const handleClose = () => {
|
||||
|
||||
// 获取状态类型
|
||||
const getStatusType = (status: string) => {
|
||||
const statusMap = {
|
||||
const statusMap: Record<string, string> = {
|
||||
'DRAFT': 'info',
|
||||
'SUBMITTED': 'warning',
|
||||
'COLLEGE_APPROVED': 'success',
|
||||
@@ -178,6 +189,26 @@ const getStatusType = (status: string) => {
|
||||
};
|
||||
return statusMap[status] || 'info';
|
||||
};
|
||||
|
||||
// 获取审核状态类型
|
||||
const getReviewStatusType = (status: string) => {
|
||||
const statusMap: Record<string, string> = {
|
||||
'PENDING': 'warning',
|
||||
'APPROVED': 'success',
|
||||
'REJECTED': 'danger'
|
||||
};
|
||||
return statusMap[status] || 'info';
|
||||
};
|
||||
|
||||
// 获取审核状态文本
|
||||
const getReviewStatusText = (status: string) => {
|
||||
const statusMap: Record<string, string> = {
|
||||
'PENDING': '待审核',
|
||||
'APPROVED': '已通过',
|
||||
'REJECTED': '已拒绝'
|
||||
};
|
||||
return statusMap[status] || status;
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
@@ -64,11 +64,44 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="申请理由" prop="applicationReason" min-width="200" show-overflow-tooltip />
|
||||
<el-table-column label="申请时间" prop="applicationDate" width="110" align="center" />
|
||||
<el-table-column label="操作" fixed="right" width="200" align="center">
|
||||
<el-table-column label="操作" fixed="right" width="240" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" size="small" icon="View" @click="handleDetail(row)"> 详情 </el-button>
|
||||
<el-button type="success" size="small" icon="Check" @click="handleReview(row, 'approved')"> 通过 </el-button>
|
||||
<el-button type="danger" size="small" icon="Close" @click="handleReview(row, 'rejected')"> 拒绝 </el-button>
|
||||
<div class="operation-buttons">
|
||||
<el-tooltip content="查看详情" placement="top">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
size="small"
|
||||
@click="handleDetail(row)"
|
||||
|
||||
>
|
||||
详情
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="审核通过" placement="top">
|
||||
<el-button
|
||||
link
|
||||
type="success"
|
||||
icon="Check"
|
||||
size="small"
|
||||
@click="handleReview(row, 'approved')"
|
||||
>
|
||||
通过
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="审核拒绝" placement="top">
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
icon="Close"
|
||||
size="small"
|
||||
@click="handleReview(row, 'rejected')"
|
||||
>
|
||||
拒绝
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -150,7 +183,7 @@ const reviewDialog = reactive({
|
||||
// 详情对话框
|
||||
const detailDialog = reactive({
|
||||
visible: false,
|
||||
applicationId: ''
|
||||
applicationId: '' as string | number
|
||||
});
|
||||
|
||||
// 表单验证规则
|
||||
@@ -343,5 +376,36 @@ onMounted(() => {
|
||||
.mb-8 {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.operation-buttons {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.el-button {
|
||||
margin: 0;
|
||||
padding: 4px 8px;
|
||||
font-size: 12px;
|
||||
|
||||
&.is-link {
|
||||
&:hover {
|
||||
background-color: rgba(var(--el-color-primary-rgb), 0.1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 确保操作列的样式
|
||||
:deep(.el-table .small-padding .cell) {
|
||||
padding: 8px 4px;
|
||||
}
|
||||
|
||||
:deep(.el-table .fixed-width) {
|
||||
.el-button + .el-button {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user