修改bbug
This commit is contained in:
@@ -138,7 +138,28 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
getRowTitle (row) {
|
||||
return row.title || row.remark || '-'
|
||||
const t = (row.title || row.remark || '').trim()
|
||||
if (t) return t
|
||||
return this.summarizeBiz(row) || '-'
|
||||
},
|
||||
summarizeBiz (row) {
|
||||
const b = row.bizData || {}
|
||||
switch (row.bizType) {
|
||||
case 'leave': {
|
||||
const dur = b.hours ? `${b.hours}h` : ''
|
||||
return [b.leaveType || '请假', dur, b.reason].filter(Boolean).join(' · ')
|
||||
}
|
||||
case 'travel':
|
||||
return [b.travelType || '出差', b.destination, b.reason].filter(Boolean).join(' · ')
|
||||
case 'seal':
|
||||
return [b.sealType || '用印', b.purpose].filter(Boolean).join(' · ')
|
||||
case 'reimburse':
|
||||
return [b.reimburseType || '报销', b.totalAmount != null ? '¥' + b.totalAmount : null, b.reason].filter(Boolean).join(' · ')
|
||||
case 'appropriation':
|
||||
return [b.appropriationType || '拨款', b.amount != null ? '¥' + b.amount : null, b.reason].filter(Boolean).join(' · ')
|
||||
default:
|
||||
return ''
|
||||
}
|
||||
},
|
||||
isTravelCompleted (row) {
|
||||
if (!row || row.bizType !== 'travel') return false
|
||||
|
||||
Reference in New Issue
Block a user