|
@@ -3,6 +3,7 @@ import { h } from 'vue';
|
|
|
import connectedIcon from '@/assets/images/table/camera-netConnect.png';
|
|
import connectedIcon from '@/assets/images/table/camera-netConnect.png';
|
|
|
import unConnectedIcon from '@/assets/images/table/camera-netUnconnect.png';
|
|
import unConnectedIcon from '@/assets/images/table/camera-netUnconnect.png';
|
|
|
import { ElTag } from 'element-plus';
|
|
import { ElTag } from 'element-plus';
|
|
|
|
|
+import { VideoServiceType, VideoStandardType } from './type';
|
|
|
|
|
|
|
|
export const queryTypeSelect = [
|
|
export const queryTypeSelect = [
|
|
|
{
|
|
{
|
|
@@ -39,6 +40,10 @@ export const cameraAddType = [
|
|
|
value: 'ip',
|
|
value: 'ip',
|
|
|
label: 'IP/域名',
|
|
label: 'IP/域名',
|
|
|
},
|
|
},
|
|
|
|
|
+ {
|
|
|
|
|
+ value: 'nvr',
|
|
|
|
|
+ label: 'NVR平台添加',
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
value: 'srs',
|
|
value: 'srs',
|
|
|
label: '流媒体地址',
|
|
label: '流媒体地址',
|
|
@@ -49,6 +54,38 @@ export const cameraAddType = [
|
|
|
// },
|
|
// },
|
|
|
];
|
|
];
|
|
|
|
|
|
|
|
|
|
+export enum AddType {
|
|
|
|
|
+ ip = 'IP地址/域名',
|
|
|
|
|
+ nvr = 'NVR平台添加',
|
|
|
|
|
+ srs = '流媒体地址',
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+export const serviceTypeSelect = [
|
|
|
|
|
+ {
|
|
|
|
|
+ value: VideoServiceType.UDP,
|
|
|
|
|
+ label: 'UDP',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ value: VideoServiceType.TCP,
|
|
|
|
|
+ label: 'TCP',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ value: VideoServiceType.AUTO,
|
|
|
|
|
+ label: '自动',
|
|
|
|
|
+ },
|
|
|
|
|
+];
|
|
|
|
|
+
|
|
|
|
|
+export const standardTypeSelect = [
|
|
|
|
|
+ {
|
|
|
|
|
+ value: VideoStandardType.H264,
|
|
|
|
|
+ label: 'H264',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ value: VideoStandardType.H265,
|
|
|
|
|
+ label: 'H265',
|
|
|
|
|
+ },
|
|
|
|
|
+];
|
|
|
|
|
+
|
|
|
type CameraAddFormItem = {
|
|
type CameraAddFormItem = {
|
|
|
label: string;
|
|
label: string;
|
|
|
prop: string;
|
|
prop: string;
|
|
@@ -141,6 +178,132 @@ export const cameraIPAddForm: CameraAddFormItem[] = [
|
|
|
type: 'input',
|
|
type: 'input',
|
|
|
required: false,
|
|
required: false,
|
|
|
},
|
|
},
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '服务类型:',
|
|
|
|
|
+ prop: 'videoServiceType',
|
|
|
|
|
+ placeholder: '请输入服务类型',
|
|
|
|
|
+ type: 'select',
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ option: serviceTypeSelect,
|
|
|
|
|
+ rule: [{ required: true, message: '请输入服务类型', trigger: 'blur' }],
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '视频编码标准:',
|
|
|
|
|
+ prop: 'videoStandard',
|
|
|
|
|
+ placeholder: '请输入视频编码标准',
|
|
|
|
|
+ type: 'select',
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ option: standardTypeSelect,
|
|
|
|
|
+ rule: [{ required: true, message: '请输入视频编码标准', trigger: 'blur' }],
|
|
|
|
|
+ },
|
|
|
|
|
+];
|
|
|
|
|
+
|
|
|
|
|
+export const cameraNVRAddForm: CameraAddFormItem[] = [
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '名称:',
|
|
|
|
|
+ prop: 'name',
|
|
|
|
|
+ placeholder: '请输入名称',
|
|
|
|
|
+ type: 'input',
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ rule: [{ required: true, message: '请输入名称', trigger: 'blur' }],
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: 'NVR平台IP地址:',
|
|
|
|
|
+ prop: 'nvrIp',
|
|
|
|
|
+ placeholder: '请输入NVR平台地址',
|
|
|
|
|
+ type: 'input',
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ rule: [{ required: true, message: '请输入NVR平台地址', trigger: 'blur' }],
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '端口:',
|
|
|
|
|
+ prop: 'cameraPort',
|
|
|
|
|
+ placeholder: '请输入端口号',
|
|
|
|
|
+ type: 'input',
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ rule: [{ required: true, message: '请输入端口号', trigger: 'blur' }],
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '协议类型:',
|
|
|
|
|
+ prop: 'cameraType',
|
|
|
|
|
+ placeholder: '请输入协议类型',
|
|
|
|
|
+ type: 'select',
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ option: protocalTypeSelect,
|
|
|
|
|
+ rule: [{ required: true, message: '请输入协议类型', trigger: 'blur' }],
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: 'NVR平台用户名:',
|
|
|
|
|
+ prop: 'nvrUsername',
|
|
|
|
|
+ placeholder: '请输入NVR平台用户名',
|
|
|
|
|
+ type: 'input',
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ rule: [{ required: true, message: '请输入NVR平台用户名', trigger: 'blur' }],
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '场景:',
|
|
|
|
|
+ prop: 'workspaceCode',
|
|
|
|
|
+ placeholder: '请输入场景名称',
|
|
|
|
|
+ type: 'tree-select',
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ rule: [{ required: true, message: '请输入场景名称', trigger: 'blur' }],
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: 'NVR平台密码:',
|
|
|
|
|
+ prop: 'nvrPassword',
|
|
|
|
|
+ placeholder: '请输入NVR平台密码',
|
|
|
|
|
+ type: 'input',
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ rule: [{ required: true, message: '请输入NVR平台密码', trigger: 'blur' }],
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '工位负责人:',
|
|
|
|
|
+ prop: 'principal',
|
|
|
|
|
+ placeholder: '请输入工位负责人',
|
|
|
|
|
+ type: 'input',
|
|
|
|
|
+ required: false,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '设备ID号:',
|
|
|
|
|
+ prop: 'code',
|
|
|
|
|
+ placeholder: '自定义ID,不能重复',
|
|
|
|
|
+ type: 'input',
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ rule: [{ required: true, message: '请输入设备ID号', trigger: 'blur' }],
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '备注:',
|
|
|
|
|
+ prop: 'remark',
|
|
|
|
|
+ placeholder: '请输入备注',
|
|
|
|
|
+ type: 'input',
|
|
|
|
|
+ required: false,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: 'NVR平台通道号:',
|
|
|
|
|
+ prop: 'nvrChannel',
|
|
|
|
|
+ placeholder: '请输入NVR平台通道号',
|
|
|
|
|
+ type: 'input',
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ rule: [{ required: true, message: '请输入NVR平台通道号', trigger: 'blur' }],
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '服务类型:',
|
|
|
|
|
+ prop: 'videoServiceType',
|
|
|
|
|
+ placeholder: '请输入服务类型',
|
|
|
|
|
+ type: 'select',
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ option: serviceTypeSelect,
|
|
|
|
|
+ rule: [{ required: true, message: '请输入服务类型', trigger: 'blur' }],
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '视频编码标准:',
|
|
|
|
|
+ prop: 'videoStandard',
|
|
|
|
|
+ placeholder: '请输入视频编码标准',
|
|
|
|
|
+ type: 'select',
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ option: standardTypeSelect,
|
|
|
|
|
+ rule: [{ required: true, message: '请输入视频编码标准', trigger: 'blur' }],
|
|
|
|
|
+ },
|
|
|
];
|
|
];
|
|
|
|
|
|
|
|
export const cameraRangeAddForm: CameraAddFormItem[] = [
|
|
export const cameraRangeAddForm: CameraAddFormItem[] = [
|