mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-12 02:45:55 +00:00
perf: 我的工作汇报列表显示汇报对象
This commit is contained in:
parent
b7ac923d36
commit
d96e9f4daa
@ -79,20 +79,51 @@ export default {
|
|||||||
columns: [{
|
columns: [{
|
||||||
title: this.$L("名称"),
|
title: this.$L("名称"),
|
||||||
key: 'title',
|
key: 'title',
|
||||||
sortable: true,
|
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
}, {
|
}, {
|
||||||
title: this.$L("类型"),
|
title: this.$L("类型"),
|
||||||
key: 'type',
|
key: 'type',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
sortable: true,
|
|
||||||
width: 90,
|
width: 90,
|
||||||
}, {
|
}, {
|
||||||
title: this.$L("汇报时间"),
|
title: this.$L("汇报时间"),
|
||||||
key: 'created_at',
|
key: 'created_at',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
sortable: true,
|
|
||||||
width: 180,
|
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("操作"),
|
title: this.$L("操作"),
|
||||||
align: 'center',
|
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 {
|
.report-detail {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@ -152,6 +167,8 @@
|
|||||||
|
|
||||||
.report-user-link {
|
.report-user-link {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
> i {
|
> i {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user