config.ts
2.91 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
124
125
import { h } from 'vue';
import { BasicColumn, FormSchema } from '/@/components/Table';
import { Tag } from 'ant-design-vue';
import { useI18n } from '/@/hooks/web/useI18n';
import { VideoPlatformEnum } from '/@/views/camera/manage/config.data';
export type VideoCancelModalParamsType = {
canControl?: boolean;
videoPlatformType: VideoPlatformEnum;
isGBT?: boolean;
tbDeviceId?: string;
channelId?: string;
id?: string;
playerProps?: Recordable;
getPlayUrl: () => Promise<Record<'url' | 'type', string> & { withToken?: string }>;
};
//视频通道权限标识枚举
export enum GBT28181_DEVICE_PERMISSION_ENUM {
PLAY_SYNC = 'api:yt:video:control:play', //视频点播/预览和摄像头通道同步
STOP = 'api:yt:video:control:stop', //停止点播
CONTROL = 'api:yt:video:control:control', //云台控制
}
enum ChannelStatusEnum {
ONLINE = 'ONLINE',
}
const { t } = useI18n();
export const configColumns: BasicColumn[] = [
{
title: t('deviceManagement.device.channelCodeText'),
dataIndex: 'channelId',
},
{
title: t('deviceManagement.device.cameraCodeText'),
dataIndex: 'cameraCode',
},
{
title: t('deviceManagement.device.channelNameText'),
dataIndex: 'name',
},
{
title: t('deviceManagement.device.modelNumberText'),
dataIndex: 'model',
},
{
title: t('deviceManagement.device.brandText'),
dataIndex: 'manufacturer',
},
// {
// title: '开启音频',
// dataIndex: 'hasAudio',
// slots: { customRender: 'hasAudio' },
// },
{
title: t('business.deviceStatusText'),
dataIndex: 'status',
customRender: ({ text }: { text: ChannelStatusEnum }) => {
return h(
Tag,
{
color: text === ChannelStatusEnum.ONLINE ? 'green' : 'red',
},
() => text && t(`enum.deviceStatus.${text}`)
);
},
},
{
title: t('common.actionText'),
dataIndex: 'action',
slots: { customRender: 'action' },
},
];
export const searchFormSchema: FormSchema[] = [
{
field: 'name',
label: t('deviceManagement.device.channelNameText'),
component: 'Input',
colProps: { span: 6 },
componentProps: {
maxLength: 255,
},
},
{
field: 'cameraCode',
label: t('deviceManagement.device.cameraCodeText'),
component: 'Input',
colProps: { span: 6 },
componentProps: {},
},
{
field: 'status',
label: t('business.deviceStatusText'),
component: 'Select',
colProps: { span: 6 },
componentProps: {
options: [
{ label: t('enum.deviceStatus.ONLINE'), value: 'ONLINE' },
{ label: t('enum.deviceStatus.OFFLINE'), value: 'OFFLINE' },
],
},
},
];
export enum VideoControlEnum {
Up = 'UP',
Right = 'RIGHT',
Left = 'LEFT',
Down = 'DOWN',
ZoomIn = 'ZOOM_IN',
ZoomOut = 'ZOOM_OUT',
}
export enum EzvizVideoControlEnum {
UP,
DOWN,
LEFT,
RIGHT,
LEFT_UP,
LEFT_DOWN,
RIGHT_UP,
RIGHT_DOWN,
ZOOM_IN,
ZOOM_OUT,
}