diff --git a/resources/assets/js/pages/manage/components/ReportMy.vue b/resources/assets/js/pages/manage/components/ReportMy.vue index 517b3258d..5118b3a42 100644 --- a/resources/assets/js/pages/manage/components/ReportMy.vue +++ b/resources/assets/js/pages/manage/components/ReportMy.vue @@ -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', diff --git a/resources/assets/sass/components/report.scss b/resources/assets/sass/components/report.scss index ea6313a8a..b36242863 100644 --- a/resources/assets/sass/components/report.scss +++ b/resources/assets/sass/components/report.scss @@ -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;