mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-01 05:30:45 +00:00
perf: 我的工作汇报列表显示汇报对象
This commit is contained in:
parent
b7ac923d36
commit
d96e9f4daa
@ -79,20 +79,51 @@ export default {
|
||||
columns: [{
|
||||
title: this.$L("名称"),
|
||||
key: 'title',
|
||||
sortable: true,
|
||||
minWidth: 120,
|
||||
}, {
|
||||
title: this.$L("类型"),
|
||||
key: 'type',
|
||||
align: 'center',
|
||||
sortable: true,
|
||||
width: 90,
|
||||
}, {
|
||||
title: this.$L("汇报时间"),
|
||||
key: 'created_at',
|
||||
align: 'center',
|
||||
sortable: true,
|
||||
width: 180,
|
||||
}, {
|
||||
title: this.$L("汇报对象"),
|
||||
key: 'receives',
|
||||
align: 'center',
|
||||
width: 90,
|
||||
render: (h, {row}) => {
|
||||
if (row.receives.length === 0) {
|
||||
return h('div', '-')
|
||||
}
|
||||
const array = [];
|
||||
if (row.receives.length <= 2) {
|
||||
row.receives.some(userid => {
|
||||
array.push(h('UserAvatar', {
|
||||
props: {
|
||||
size: 22,
|
||||
userid: userid,
|
||||
}
|
||||
}))
|
||||
})
|
||||
} else {
|
||||
array.push(h('UserAvatar', {
|
||||
props: {
|
||||
size: 22,
|
||||
userid: row.receives[0],
|
||||
}
|
||||
}))
|
||||
array.push(h('div', {
|
||||
class: "more-avatar"
|
||||
}, `+${row.receives.length - 1}`))
|
||||
}
|
||||
return h('div', {
|
||||
class: "report-table-avatar"
|
||||
}, array)
|
||||
}
|
||||
}, {
|
||||
title: this.$L("操作"),
|
||||
align: 'center',
|
||||
|
||||
17
resources/assets/sass/components/report.scss
vendored
17
resources/assets/sass/components/report.scss
vendored
@ -42,6 +42,21 @@
|
||||
}
|
||||
}
|
||||
|
||||
.report-table-avatar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.common-avatar {
|
||||
margin: 0 1px;
|
||||
}
|
||||
|
||||
.more-avatar {
|
||||
padding-left: 3px;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.report-detail {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@ -152,6 +167,8 @@
|
||||
|
||||
.report-user-link {
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
> i {
|
||||
font-size: 16px;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user