This commit is contained in:
18631081161 2026-01-17 00:51:02 +08:00
parent 58c7c3c323
commit 03f7618115

View File

@ -66,10 +66,10 @@
<el-table-column prop="status" label="状态" width="120" align="center"> <el-table-column prop="status" label="状态" width="120" align="center">
<template #default="{ row }"> <template #default="{ row }">
<el-tag v-if="row.pendingUpgradeByUnitId" type="primary" effect="dark" size="small"> <el-tag v-if="row.pendingUpgradeByUnitId" type="primary" effect="dark" size="small">
待上级审批 {{ canApproveUpgrade(row) ? '待审批' : '待上级审批' }}
</el-tag> </el-tag>
<el-tag v-else :type="getStatusTagType(row.status)" effect="dark" size="small"> <el-tag v-else :type="getStatusTagType(row.status)" effect="dark" size="small">
{{ getStatusName(row.status) }} {{ getDisplayStatus(row) }}
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
@ -205,6 +205,19 @@ function getStatusName(status: PersonnelStatus): string {
} }
} }
//
function getDisplayStatus(person: Personnel): string {
if (person.status === PersonnelStatus.Pending) {
//
if (canApprovePersonnel(person)) {
return '待审批'
} else {
return '待上级审批'
}
}
return getStatusName(person.status)
}
function getStatusTagType(status: PersonnelStatus): string { function getStatusTagType(status: PersonnelStatus): string {
switch (status) { switch (status) {
case PersonnelStatus.Pending: return 'warning' case PersonnelStatus.Pending: return 'warning'