zhou zhou
7 小时以前 7c2bffa1a495cc4a3a263f654c08c231009c5c4e
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
import { h } from 'vue'
import { $t } from '@/locales'
import ArtButtonMore from '@/components/core/forms/art-button-more/index.vue'
import { getTaskActionList } from './taskPage.helpers'
 
export function createTaskTableColumns({ handleActionClick, createExpandContent }) {
  return [
    ...(createExpandContent
      ? [
          {
            type: 'expand',
            width: 56,
            formatter: (row) => createExpandContent(row)
          }
        ]
      : []),
    {
      prop: 'taskCode',
      label: $t('pages.task.search.taskCode'),
      minWidth: 170,
      showOverflowTooltip: true
    },
    {
      prop: 'taskStatusLabel',
      label: $t('table.status'),
      minWidth: 140,
      showOverflowTooltip: true
    },
    {
      prop: 'taskTypeLabel',
      label: $t('table.type'),
      minWidth: 140,
      showOverflowTooltip: true
    },
    {
      prop: 'warehTypeLabel',
      label: $t('pages.task.detail.warehType'),
      minWidth: 120,
      showOverflowTooltip: true
    },
    {
      prop: 'orgLoc',
      label: $t('pages.task.search.orgLoc'),
      minWidth: 140,
      showOverflowTooltip: true
    },
    {
      prop: 'orgSiteLabel',
      label: $t('pages.task.detail.orgSite'),
      minWidth: 160,
      showOverflowTooltip: true
    },
    {
      prop: 'targLoc',
      label: $t('pages.task.search.targLoc'),
      minWidth: 140,
      showOverflowTooltip: true
    },
    {
      prop: 'targSiteLabel',
      label: $t('pages.task.detail.targSite'),
      minWidth: 160,
      showOverflowTooltip: true
    },
    {
      prop: 'barcode',
      label: $t('pages.task.search.barcode'),
      minWidth: 150,
      showOverflowTooltip: true
    },
    {
      prop: 'robotCode',
      label: $t('pages.task.detail.robotCode'),
      minWidth: 150,
      showOverflowTooltip: true
    },
    {
      prop: 'sort',
      label: $t('pages.task.detail.priority'),
      width: 100,
      align: 'right'
    },
    {
      prop: 'updateTimeText',
      label: $t('table.updateTime'),
      minWidth: 180,
      showOverflowTooltip: true
    },
    {
      prop: 'operation',
      label: $t('table.operation'),
      width: 120,
      align: 'center',
      fixed: 'right',
      formatter: (row) =>
        h('div', [
          h(ArtButtonMore, {
            list: getTaskActionList(row),
            onClick: (item) => handleActionClick(item, row)
          })
        ])
    }
  ]
}