🐞 fix: 修改一些小问题

This commit is contained in:
砂糖
2025-12-30 17:49:45 +08:00
parent a623c5673f
commit d193f43f30
11 changed files with 179 additions and 99 deletions

View File

@@ -72,7 +72,7 @@
>
<el-table-column label="申请类型" min-width="100">
<template slot-scope="scope">
<el-tag :type="getTypeTagType(scope.row.procDefKey)">{{ getTypeText(scope.row.procDefKey) }}</el-tag>
<el-tag :type="getTypeTagType(scope.row.bizType)">{{ getTypeText(scope.row.bizType) }}</el-tag>
</template>
</el-table-column>
<el-table-column label="申请人" min-width="120">
@@ -96,7 +96,7 @@
</el-table-column>
<el-table-column label="状态" prop="status" min-width="110">
<template slot-scope="scope">
<el-tag :type="statusType(scope.row.procStatus)">{{ statusText(scope.row.procStatus) }}</el-tag>
<el-tag :type="statusType(scope.row.status)">{{ statusText(scope.row.status) }}</el-tag>
</template>
</el-table-column>
<el-table-column label="申请时间" prop="createTime" min-width="160">
@@ -202,12 +202,12 @@ export default {
return '-'
},
statusText(status) {
const map = { pending: '审批中', draft: '草稿', approved: '已通过', rejected: '已驳回', finished: '已完成' }
const map = { running: '审批中', draft: '草稿', approved: '已通过', rejected: '已驳回', finished: '已完成' }
return map[status] || status || '-'
},
statusType(status) {
if (!status) return 'info'
const map = { pending: 'warning', draft: 'info', approved: 'success', rejected: 'danger', finished: 'success' }
const map = { running: 'warning', draft: 'info', approved: 'success', rejected: 'danger', finished: 'success' }
return map[status] || 'info'
},
formatDate(val) {
@@ -244,11 +244,11 @@ export default {
}
},
goDetail(row) {
if (!row || !row.businessKey) {
if (!row || !row.bizId || !row.bizType) {
this.$message.warning('缺少businessKey无法打开详情')
return
}
const [type, bizId] = row.businessKey.split(':')
const { bizId, bizType: type } = row
if (!bizId) {
this.$message.warning('businessKey格式不正确无法解析业务ID')
return