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
| import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
| import { DICT_TYPE } from '..\..\..\..\..\packages\constants\src';
|
| /** 升级记录的列表字段 */
| export function useGridColumns(): VxeTableGridOptions['columns'] {
| return [
| {
| field: 'deviceName',
| title: '设备名称',
| minWidth: 150,
| align: 'center',
| },
| {
| field: 'fromFirmwareVersion',
| title: '当前版本',
| width: 120,
| align: 'center',
| },
| {
| field: 'status',
| title: '升级状态',
| width: 120,
| align: 'center',
| cellRender: {
| name: 'CellDict',
| props: { type: DICT_TYPE.IOT_OTA_TASK_RECORD_STATUS },
| },
| },
| {
| field: 'progress',
| title: '升级进度',
| width: 120,
| align: 'center',
| formatter: ({ row }) => `${row.progress || 0}%`,
| },
| {
| field: 'description',
| title: '状态描述',
| minWidth: 150,
| align: 'center',
| showOverflow: 'tooltip',
| },
| {
| field: 'updateTime',
| title: '更新时间',
| width: 180,
| align: 'center',
| formatter: 'formatDateTime',
| },
| {
| title: '操作',
| width: 80,
| fixed: 'right',
| align: 'center',
| slots: { default: 'actions' },
| },
| ];
| }
|
|