config.data.ts
2.3 KB
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
import { BasicColumn, FormSchema } from '/@/components/Table';
import { getOrganizationList } from '/@/api/system/system';
import { copyTransFun } from '/@/utils/fnUtils';
// 表格列数据
export const columns: BasicColumn[] = [
{
title: '封面',
dataIndex: 'avatar',
width: 80,
slots: { customRender: 'img' },
},
{
title: '名字',
dataIndex: 'name',
width: 120,
},
{
title: '厂家',
dataIndex: 'brand',
width: 120,
},
{
title: '摄像头编号',
dataIndex: 'sn',
width: 120,
},
{
title: '视频流',
dataIndex: 'videoUrl',
width: 120,
},
{
title: '所属组织',
dataIndex: 'organizationDTO.name',
width: 160,
},
{
title: '添加时间',
dataIndex: 'createTime',
width: 180,
},
{
title: '更新时间',
dataIndex: 'updateTime',
width: 180,
},
];
// 查询字段
export const searchFormSchema: FormSchema[] = [
{
field: 'name',
label: '摄像头名字',
component: 'Input',
colProps: { span: 8 },
componentProps: {
maxLength: 36,
placeholder: '请输入摄像头名字',
},
},
];
// 弹框配置项
export const formSchema: FormSchema[] = [
{
field: 'avatar',
label: '视频封面',
slot: 'iconSelect',
component: 'Input',
},
{
field: 'name',
label: '视频名字',
required: true,
component: 'Input',
componentProps: {
placeholder: '请输入视频名字',
maxLength: 30,
},
},
{
field: 'organizationId',
label: '所属组织',
required: true,
component: 'ApiTreeSelect',
componentProps: {
api: async () => {
const data = await getOrganizationList();
copyTransFun(data as any as any[]);
return data;
},
},
},
{
field: 'brand',
label: '视频厂家',
component: 'Input',
required: true,
componentProps: {
placeholder: '请输入视频厂家',
},
},
{
field: 'sn',
label: '摄像头编号',
component: 'Input',
required: true,
componentProps: {
placeholder: '请输入摄像头编号',
},
},
{
field: 'videoUrl',
label: '视频流',
required: true,
component: 'Input',
componentProps: {
placeholder: '请输入视频流',
maxLength: 255,
},
},
];