1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
| import { h } from 'vue'
| import { ElTag } from 'element-plus'
| import ArtButtonTable from '@/components/core/forms/art-button-table/index.vue'
|
| export function createDeptTableColumns({ t, handleEdit, handleDelete }) {
| return [
| {
| prop: 'name',
| label: t('pages.system.dept.table.name'),
| minWidth: 220,
| showOverflowTooltip: true
| },
| {
| prop: 'fullName',
| label: t('pages.system.dept.table.fullName'),
| minWidth: 220,
| showOverflowTooltip: true,
| formatter: (row) => row.fullName || t('common.placeholder.empty')
| },
| {
| prop: 'leader',
| label: t('pages.system.dept.table.leader'),
| minWidth: 140,
| formatter: (row) => row.leader || t('common.placeholder.empty')
| },
| {
| prop: 'sort',
| label: t('table.sort'),
| width: 90
| },
| {
| prop: 'status',
| label: t('table.status'),
| width: 100,
| formatter: (row) =>
| h(ElTag, { type: row.statusType, effect: 'light' }, () =>
| t(row.statusTextKey || 'common.placeholder.empty')
| )
| },
| {
| prop: 'updateTimeText',
| label: t('table.updateTime'),
| minWidth: 180,
| formatter: (row) => row.updateTimeText || t('common.placeholder.empty')
| },
| {
| prop: 'memo',
| label: t('table.memo'),
| minWidth: 180,
| showOverflowTooltip: true,
| formatter: (row) => row.memo || t('common.placeholder.empty')
| },
| {
| prop: 'operation',
| label: t('table.operation'),
| width: 140,
| align: 'right',
| formatter: (row) =>
| h('div', { class: 'flex justify-end' }, [
| h(ArtButtonTable, {
| type: 'edit',
| onClick: () => handleEdit(row)
| }),
| h(ArtButtonTable, {
| type: 'delete',
| onClick: () => handleDelete(row)
| })
| ])
| }
| ]
| }
|
|