审批
This commit is contained in:
parent
58c7c3c323
commit
03f7618115
|
|
@ -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'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user