flx:提交大华icc
This commit is contained in:
parent
e1115d2c08
commit
c05680fd5b
@ -3,7 +3,7 @@ export default {
|
||||
titleBox: '当前设备类型',
|
||||
error: '入场和出厂时间至少要选择一个',
|
||||
state: '状态',
|
||||
off_line: '离线',//后期这里应该是状态数组
|
||||
off_line: '离线', //后期这里应该是状态数组
|
||||
add: '新增设备',
|
||||
edit: '编辑设备',
|
||||
btn_edit: '编辑',
|
||||
@ -22,35 +22,35 @@ export default {
|
||||
// devTypeList: ['杭州宇泛智能科技', '用jdpush推送', 'mqtt', '芊熠智能'],
|
||||
// devTypeList: [{name:'杭州宇泛智能科技',id:1},{name:'芊熠智能',id:4},{name:'佳信捷第一版',id:5},{name:'佳信捷',id:6}],
|
||||
// devTypeList: [{name:'定制YF',id:1},{name:'定制QY',id:4},{name:'通用V2',id:5},{name:'通用V1',id:6}], //找不到最新版本所以更改了通用v1v2
|
||||
devTypeList: [{name:'定制YF',id:1},{name:'定制QY',id:4},{name:'通用V1',id:5},{name:'通用V2',id:6},{name:'海康门禁',id:7},{name:'弹弓',id:8},{name:'海康门禁isc',id:9}],
|
||||
devGroupTypeList: [{name:'工地区',id:1},{name:'生活区',id:2},{name:'项目部',id:3}],
|
||||
devTypeList: [{ name: '定制YF', id: 1 }, { name: '定制QY', id: 4 }, { name: '通用V1', id: 5 }, { name: '通用V2', id: 6 }, { name: '海康门禁', id: 7 }, { name: '弹弓', id: 8 }, { name: '海康门禁isc', id: 9 }, { name: '大华ICC', id: 10 }],
|
||||
devGroupTypeList: [{ name: '工地区', id: 1 }, { name: '生活区', id: 2 }, { name: '项目部', id: 3 }],
|
||||
devTypeLabel: '设备类型',
|
||||
noData: '暂无数据',
|
||||
//黑名单管理----start
|
||||
blackListNames:'黑名单记录对象',
|
||||
addDate:'加入日期',
|
||||
blackReason:'黑名单原因',
|
||||
add2:'添加',
|
||||
addToBlackReason:'加入黑名单原因',
|
||||
addToBlackTime:'加入黑名单时间',
|
||||
blackListNames: '黑名单记录对象',
|
||||
addDate: '加入日期',
|
||||
blackReason: '黑名单原因',
|
||||
add2: '添加',
|
||||
addToBlackReason: '加入黑名单原因',
|
||||
addToBlackTime: '加入黑名单时间',
|
||||
blackNames: '黑名单人员',
|
||||
isSendToDev:'是否下发到设备',
|
||||
uploadToGover:'上传到住建局',
|
||||
uploadToOuter:'上传外部平台',
|
||||
isSendToDev: '是否下发到设备',
|
||||
uploadToGover: '上传到住建局',
|
||||
uploadToOuter: '上传外部平台',
|
||||
//黑名单管理----end
|
||||
|
||||
//安全培训教育管理----start
|
||||
addSafeTrain:'添加安全教育培训',
|
||||
allType:'全部类型',
|
||||
searchTranTopic:'搜培训主题',
|
||||
trainDate:'培训日期',
|
||||
educateType:'教育类型',
|
||||
trainTopic:'培训主题',
|
||||
trainTime:'培训课时',
|
||||
trainPerson:'培训人',
|
||||
trainPersonNum:'培训人数',
|
||||
remarks:'备注',
|
||||
educateTypeList:[
|
||||
addSafeTrain: '添加安全教育培训',
|
||||
allType: '全部类型',
|
||||
searchTranTopic: '搜培训主题',
|
||||
trainDate: '培训日期',
|
||||
educateType: '教育类型',
|
||||
trainTopic: '培训主题',
|
||||
trainTime: '培训课时',
|
||||
trainPerson: '培训人',
|
||||
trainPersonNum: '培训人数',
|
||||
remarks: '备注',
|
||||
educateTypeList: [
|
||||
'入场安全教育',
|
||||
'日常安全教育',
|
||||
'每日安全交底',
|
||||
@ -61,7 +61,7 @@ export default {
|
||||
'每日交底(安全技术交底)',
|
||||
'每日交底(大工程交底)',
|
||||
],
|
||||
educateTypeList2:[
|
||||
educateTypeList2: [
|
||||
'入场安全教育',
|
||||
'日常安全教育',
|
||||
'每日安全交底',
|
||||
@ -77,16 +77,16 @@ export default {
|
||||
'安全交底(雨季交底)',
|
||||
'安全交底(用电交底)'
|
||||
],
|
||||
signInInfo:'签到信息',
|
||||
trainVideo:'教学视频上传',
|
||||
photo:'培训照片',
|
||||
trainDateTime:'培训时间',
|
||||
signInInfo: '签到信息',
|
||||
trainVideo: '教学视频上传',
|
||||
photo: '培训照片',
|
||||
trainDateTime: '培训时间',
|
||||
selectWorker: '选择工人',
|
||||
allGroup:'全部班组',
|
||||
allCompany:'全部企业',
|
||||
searchWorker:'搜工人',
|
||||
allGroup: '全部班组',
|
||||
allCompany: '全部企业',
|
||||
searchWorker: '搜工人',
|
||||
isQualified: '是否合格',
|
||||
score:'培训得分',
|
||||
score: '培训得分',
|
||||
|
||||
//安全培训教育管理----end
|
||||
|
||||
@ -96,5 +96,4 @@ export default {
|
||||
selectAll: '全选',
|
||||
faceDockingProtocol: 'HTTP人脸设备对接协议',
|
||||
error1: '同一时间段内无法同时选择进出!'
|
||||
}
|
||||
|
||||
}
|
||||
@ -10,7 +10,7 @@ export default {
|
||||
focus: '聚焦',
|
||||
aperture: '光圈',
|
||||
add: '新增',
|
||||
screen:'筛选',
|
||||
screen: '筛选',
|
||||
configAccount: '配置服务器',
|
||||
configPlayMode: '配置播放模式',
|
||||
syncDev: '同步设备',
|
||||
@ -25,7 +25,7 @@ export default {
|
||||
delete: '删除',
|
||||
video_type_tips: '视频类型(以下视频类型同时只可开启一种,如果当前有开启的视频,在选择其他视频类型时,该类型配置及所有信息将归零)',
|
||||
// videoTypeList: ['萤石云', '乐橙', 'ISC', '大华', '宇视', '国标','国密'],
|
||||
videoTypeList: ['萤石云','乐橙','ISC',],//只显示1和3
|
||||
videoTypeList: ['萤石云', '乐橙', 'ISC', '大华'], //只显示1和3
|
||||
playTypeList: ['RTMP(高清)', 'RTMP(流畅)', 'HLS(高清)', 'HLS(流畅)', '高清轻量级插件(高清)', '流畅轻量级插件(流畅)'],
|
||||
deviceType: ['枪机', '球机', '热成像', '单兵', '全景', '无人机'],
|
||||
dialog_video_config: {
|
||||
@ -34,7 +34,7 @@ export default {
|
||||
tips: '注:选择视频类型,配置完成后才可使用其他功能。',
|
||||
},
|
||||
dialog_newVideo: {
|
||||
operation: {add: '新增设备', edit: '编辑设备'},
|
||||
operation: { add: '新增设备', edit: '编辑设备' },
|
||||
equipment_name: '设备名称',
|
||||
serialNumber: '设备序列',
|
||||
cameraCode: '监控点编号',
|
||||
@ -42,7 +42,7 @@ export default {
|
||||
verificationCode: '设备验证码',
|
||||
verificationCode_placeholder: '设备机身上的六位大写字母',
|
||||
deviceType: '设备类型',
|
||||
channelId:'通道号'
|
||||
channelId: '通道号'
|
||||
},
|
||||
dialog_account_config: {
|
||||
title: '配置服务器',
|
||||
@ -102,8 +102,8 @@ export default {
|
||||
aiDeployment: 'AI布防',
|
||||
getOrganId: '获取组织id',
|
||||
uploadThirdParty: '上传第三方平台',
|
||||
nvrDeviceManage:'nvr设备管理',
|
||||
pluginManage:'设备监测插件管理',
|
||||
nvrDeviceManage: 'nvr设备管理',
|
||||
pluginManage: '设备监测插件管理',
|
||||
group: '所属分组',
|
||||
pleaseSelect: '请选择',
|
||||
isAiDistinguish: '是否具有AI识别功能',
|
||||
|
||||
@ -1,55 +1,55 @@
|
||||
/**
|
||||
* api接口统一管理
|
||||
*/
|
||||
import {post,get} from '../../http'
|
||||
import { post, get } from '../../http'
|
||||
|
||||
export const addVideoItemApi = data => post('xmgl/videoItem/add', data); //添加视频设备列表信息
|
||||
export const editVideoItemApi = data => post('xmgl/videoItem/edit', data); //编辑视频设备列表信息
|
||||
export const deleteVideoItemApi = data => post('xmgl/videoItem/delete', data); //删除视频设备列表信息
|
||||
export const selectVideoItemListByTypeApi = data => post('xmgl/videoItem/selectVideoItemListByType', data); //查询指定类型的视频列表
|
||||
export const selectVideoItemListByTypeApi = data => post('xmgl/videoItem/selectVideoItemListByType', data); //查询指定类型的视频列表
|
||||
|
||||
|
||||
export const selectEnableVideoItemListApi = data => post('xmgl/videoItem/selectEnableVideoItemList', data); //根据项目sn查询启用的的视频列表
|
||||
export const selectEnableVideoItemListApi = data => post('xmgl/videoItem/selectEnableVideoItemList', data); //根据项目sn查询启用的的视频列表
|
||||
|
||||
export const selectProjectVideoListApi = data => post('xmgl/videoItem/selectProjectVideoList', data); //根据分组查询视频列表
|
||||
export const selectUserVideoListApi = data => post('xmgl/videoItem/selectUserVideoList', data); //查询子账号视频列表
|
||||
export const selectProjectVideoListApi = data => post('xmgl/videoItem/selectProjectVideoList', data); //根据分组查询视频列表
|
||||
export const selectUserVideoListApi = data => post('xmgl/videoItem/selectUserVideoList', data); //查询子账号视频列表
|
||||
|
||||
export const updateVideoConfigEnableApi = data => post('xmgl/projectVideoConfig/updateVideoConfigEnable', data); //启用指定类型的视频配置
|
||||
export const editProjectVideoConfigApi = data => post('xmgl/projectVideoConfig/edit', data); //编辑视频配置信息
|
||||
export const updateVideoConfigEnableApi = data => post('xmgl/projectVideoConfig/updateVideoConfigEnable', data); //启用指定类型的视频配置
|
||||
export const editProjectVideoConfigApi = data => post('xmgl/projectVideoConfig/edit', data); //编辑视频配置信息
|
||||
// export const projectVideoConfigListApi = data => post('xmgl/projectVideoConfig/list', data); //查询项目各类型的视频配置信息
|
||||
export const projectVideoConfigListApi = data => post('xmgl/projectVideoConfig/getUseProjectVideoConfig', data); //查询项目各类型的视频配置信息
|
||||
export const projectVideoConfigListApi = data => post('xmgl/projectVideoConfig/getUseProjectVideoConfig', data); //查询项目各类型的视频配置信息
|
||||
|
||||
export const getVideoItemInfoApi = data => post('xmgl/videoItem/getVideoItemInfo', data); //根据itemId视频Id查询视频播放url
|
||||
export const getVideoItemInfoApi = data => post('xmgl/videoItem/getVideoItemInfo', data); //根据itemId视频Id查询视频播放url
|
||||
|
||||
export const setHikSubscriptionByEventApi = data => post('xmgl/videoItem/setHikSubscriptionByEvent', data);
|
||||
export const setHikSubscriptionByEventApi = data => post('xmgl/videoItem/setHikSubscriptionByEvent', data);
|
||||
|
||||
export const getHikVideoRegionsApi = data => post('xmgl/videoItem/getHikVideoRegions', data); //查询海康视频组织区域
|
||||
export const saveHikVideoCamerasInfoListApi = data => post('xmgl/videoItem/saveHikVideoCamerasInfoList', data); //同步海康视频监控点列表
|
||||
export const getHikVideoRegionsApi = data => post('xmgl/videoItem/getHikVideoRegions', data); //查询海康视频组织区域
|
||||
export const saveHikVideoCamerasInfoListApi = data => post('xmgl/videoItem/saveHikVideoCamerasInfoList', data); //同步海康视频监控点列表
|
||||
|
||||
|
||||
//视频分组
|
||||
export const addVideoGroupApi = data => post('xmgl/videoGroup/add', data);
|
||||
export const deleteVideoGroupApi = data => post('xmgl/videoGroup/delete', data);
|
||||
export const editVideoGroupApi = data => post('xmgl/videoGroup/edit', data);
|
||||
export const getVideoGroupApi = data => post('xmgl/videoGroup/list', data);
|
||||
export const getVideoTreeGroupApi = data => get('xmgl/videoGroup/tree/list', data);
|
||||
export const getVideoTreeGroupVideoApi = data => post('xmgl/videoItem/selectProjectVideoTreeList', data);
|
||||
export const addVideoGroupApi = data => post('xmgl/videoGroup/add', data);
|
||||
export const deleteVideoGroupApi = data => post('xmgl/videoGroup/delete', data);
|
||||
export const editVideoGroupApi = data => post('xmgl/videoGroup/edit', data);
|
||||
export const getVideoGroupApi = data => post('xmgl/videoGroup/list', data);
|
||||
export const getVideoTreeGroupApi = data => get('xmgl/videoGroup/tree/list', data);
|
||||
export const getVideoTreeGroupVideoApi = data => post('xmgl/videoItem/selectProjectVideoTreeList', data);
|
||||
|
||||
// 上传第三方平台
|
||||
export const sendVideoInfoApi = data => post('xmgl/videoItem/sendVideoInfo', data);
|
||||
export const sendVideoInfoApi = data => post('xmgl/videoItem/sendVideoInfo', data);
|
||||
|
||||
// nvr设备管理
|
||||
export const getvideoNvrApi = data => get('/xmgl/videoNvr/selectPage', data); //获取数据
|
||||
export const addvideoNvrApi = data => post('/xmgl/videoNvr/addVideoNvr', data); //新增设备
|
||||
export const editvideoNvrApi = data => post('/xmgl/videoNvr/updateVideoNvr', data); //编辑设备
|
||||
export const delvideoNvrApi = data => get('/xmgl/videoNvr/deleteById', data); //删除设备
|
||||
export const getAllNvrApi = data => get('/xmgl/videoNvr/list', data); //获取所有视频nvr设备
|
||||
export const delvideoNvrApi = data => get('/xmgl/videoNvr/deleteById', data); //删除设备
|
||||
export const getAllNvrApi = data => get('/xmgl/videoNvr/list', data); //获取所有视频nvr设备
|
||||
|
||||
// 监测插件控制器
|
||||
export const addPluginApi = data => post('/xmgl/devMonitorPlugin/addDevMonitorPlugin', data); //新增监测插件
|
||||
export const getPluginApi = data => get('/xmgl/devMonitorPlugin/selectPage', data); //分页查询监测插件
|
||||
export const editPluginApi = data => post('/xmgl/devMonitorPlugin/updateDevMonitorPlugin', data); //编辑监测插件
|
||||
export const delPluginApi = data => get('/xmgl/devMonitorPlugin/deleteById', data); //删除监测插件
|
||||
export const delPluginApi = data => get('/xmgl/devMonitorPlugin/deleteById', data); //删除监测插件
|
||||
|
||||
// 监控数据分析
|
||||
export const countStatusApi = data => post('xmgl/videoItem/countStatus', data);
|
||||
@ -58,3 +58,30 @@ export const countQualityApi = data => post('xmgl/projectVideoHkVqd/countQuality
|
||||
export const countFullApi = data => post('xmgl/xzHikvisionVideoFull/countFull', data);
|
||||
export const countFullPageApi = data => get('xmgl/projectVideoHkVqd/page', data);
|
||||
|
||||
// 查询启用的ocr配置信息
|
||||
export const getEnableConfigOcrConfigApi = data => get('xmgl/ocrConfig/getEnableConfig', data);
|
||||
// 编辑ocr配置信息
|
||||
export const editOcrConfigApi = data => post('xmgl/ocrConfig/edit', data);
|
||||
// 保存ocr识别模块位置信息
|
||||
export const saveConfigOcrConfigApi = data => post('xmgl/ocrConfig/saveConfig', data);
|
||||
// 启用指定类型的ocr配置
|
||||
export const enableConfigOcrConfigApi = data => post('xmgl/ocrConfig/enableConfig', data);
|
||||
|
||||
// 分页列表查询ocr识别模块位置信息
|
||||
export const getOcrModulePlacePageApi = data => get('xmgl/ocrModulePlace/page', data);
|
||||
// 添加ocr识别模块位置信息
|
||||
export const addOcrModulePlaceApi = data => post('xmgl/ocrModulePlace/add', data);
|
||||
// 编辑ocr识别模块位置信息
|
||||
export const editOcrModulePlaceApi = data => post('xmgl/ocrModulePlace/edit', data);
|
||||
// 删除ocr识别模块位置信息
|
||||
export const deleteOcrModulePlaceApi = data => post('xmgl/ocrModulePlace/delete', data);
|
||||
|
||||
|
||||
// 分页列表查询ocr识别区域位置信息
|
||||
export const getOcrZonePlacePageApi = data => get('xmgl/ocrZonePlace/page', data);
|
||||
// 添加ocr识别区域位置信息
|
||||
export const addOcrZonePlaceApi = data => post('xmgl/ocrZonePlace/add', data);
|
||||
// 编辑ocr识别区域位置信息
|
||||
export const editOcrZonePlaceApi = data => post('xmgl/ocrZonePlace/edit', data);
|
||||
// 删除ocr识别区域位置信息
|
||||
export const deleteOcrZonePlaceApi = data => post('xmgl/ocrZonePlace/delete', data);
|
||||
@ -206,7 +206,6 @@ if (process.env.NODE_ENV == "development") {
|
||||
// axios.defaults.baseURL = "https://zm.zhgdyun.com:11111";
|
||||
// // axios.defaults.baseURL = "http://121.37.106.37:9809";
|
||||
// axios.defaults.baseURL = "http://139.9.66.234:20628";
|
||||
axios.defaults.baseURL = "http://jxj.zhgdyun.com:9500/";
|
||||
|
||||
} else if (process.env.NODE_ENV == "debug") {
|
||||
axios.defaults.baseURL = "https://www.ceshi.com";
|
||||
|
||||
265
src/components/videoModule/DHPlayer/dhPlayer.vue
Normal file
265
src/components/videoModule/DHPlayer/dhPlayer.vue
Normal file
@ -0,0 +1,265 @@
|
||||
<template>
|
||||
<div
|
||||
id="dhplayer-dom"
|
||||
:style="{ width: width, height: height, border: '1px solid #000' }"
|
||||
>
|
||||
<!-- <div class="shield-class" style="width: 100px; height: 100px;">测试遮挡</div> -->
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted, watch } from "vue";
|
||||
import { Message, MessageBox } from "element-ui";
|
||||
import "./videoPlayer";
|
||||
import dayjs from "dayjs";
|
||||
const props = defineProps({
|
||||
width: {
|
||||
type: String,
|
||||
default: "100%",
|
||||
},
|
||||
height: {
|
||||
type: String,
|
||||
default: "100%",
|
||||
},
|
||||
devList: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
|
||||
const emit = defineEmits([
|
||||
"createSuccess",
|
||||
"createError",
|
||||
"realSuccess",
|
||||
"realError",
|
||||
// 可按需添加更多事件
|
||||
]);
|
||||
|
||||
let myVideoPlayer = ref(null);
|
||||
let myVideoPlayer1 = ref(null);
|
||||
|
||||
const pluginLoginInfo = ref({
|
||||
host: "124.160.33.135",
|
||||
port: "4077",
|
||||
username: "TEST",
|
||||
password: "OGR28u6_cc",
|
||||
});
|
||||
const windowType = ref(0);
|
||||
const division = ref(1);
|
||||
const snumType = ref(0);
|
||||
|
||||
// 初始化并登录插件
|
||||
function initDHPlayer() {
|
||||
myVideoPlayer.value = new VideoPlayer({
|
||||
videoId: "dhplayer-dom", // 唯一标识,必填,不能重复
|
||||
windowType: windowType.value, // 播放器类型,必传, 0 - 实时预览,3 - 录像回放,7- 录像回放(支持倒放)
|
||||
usePluginLogin: true, // 采用登录 (请默认传true,插件内部自动拉流)
|
||||
pluginLoginInfo: pluginLoginInfo.value,
|
||||
division: division.value, // 默认展示的窗口数量, 必传
|
||||
draggable: false, // 窗口拖拽 【暂不支持】
|
||||
showBar: true, // 底部操作栏, 选传,【true - 显示, false - 隐藏】
|
||||
shieldClass: ["shield-class", "select"], // 如果DOM元素被插件挡住了,把DOM元素的类名传入。
|
||||
coverShieldClass: [], // 如果插件要在dom内滚动,需要把DOM元素的类名传入,请查看案例-遮挡
|
||||
parentIframeShieldClass: [], // 有 iframe 时,top层 的 dom 元素被插件挡住了,把DOM元素的类名传入。
|
||||
// 创建播放器成功回调
|
||||
createSuccess: (versionInfo) => {
|
||||
myVideoPlayer.value.changeDivision(9);
|
||||
emit("createSuccess", versionInfo);
|
||||
handleRealClick();
|
||||
},
|
||||
// 创建播放器失败回调
|
||||
createError: (err) => {
|
||||
console.log("创建失败!!!" + JSON.stringify(err));
|
||||
emit("createError", err);
|
||||
},
|
||||
// 插件公共回调
|
||||
dhPlayerMessage: (info, err) => {},
|
||||
// 实时预览成功回调
|
||||
realSuccess: (info) => {
|
||||
emit("realSuccess", info);
|
||||
},
|
||||
// 实时预览失败回调
|
||||
realError: (info, err) => {
|
||||
emit("realError", info, err);
|
||||
},
|
||||
// ... 其他回调函数按需添加 emit 触发事件
|
||||
// 抓图成功回调
|
||||
snapshotSuccess: ({ base64Url, path }, info) => {
|
||||
const byteCharacters = atob(
|
||||
base64Url.replace(/^data:image\/(png|jpeg|jpg);base64,/, "")
|
||||
);
|
||||
const byteNumbers = new Array(byteCharacters.length);
|
||||
for (let i = 0; i < byteCharacters.length; i++) {
|
||||
byteNumbers[i] = byteCharacters.charCodeAt(i);
|
||||
}
|
||||
const byteArray = new Uint8Array(byteNumbers);
|
||||
const blob = new Blob([byteArray], {
|
||||
type: undefined,
|
||||
});
|
||||
const aLink = document.createElement("a");
|
||||
aLink.download = "图片名称.jpg";
|
||||
aLink.href = URL.createObjectURL(blob);
|
||||
aLink.click();
|
||||
},
|
||||
// 本地录像下载成功回调
|
||||
videoDownloadSuccess: (path, info) => {
|
||||
hideDHPlayer();
|
||||
MessageBox.alert("本地录像地址:" + path, "", {
|
||||
confirmButtonText: "确定",
|
||||
callback: (action) => {
|
||||
console.log("确定");
|
||||
showDHPlayer();
|
||||
},
|
||||
});
|
||||
},
|
||||
// 鼠标单击窗口回调
|
||||
clickWindow: (snum) => {
|
||||
snumType.value = snum;
|
||||
},
|
||||
// 关闭视频窗口回调
|
||||
closeWindowSuccess: ({ isAll, snum, channelList }) => {
|
||||
console.log("关闭窗口回调", isAll, snum, channelList);
|
||||
snumType.value = snum;
|
||||
dataVideoList.value = channelList.map(item => {
|
||||
return {
|
||||
serialNumber: item.channelId,
|
||||
videoName: item.channelName,
|
||||
}
|
||||
});
|
||||
},
|
||||
// ... 其他回调函数保持不变
|
||||
});
|
||||
}
|
||||
|
||||
// 播放实时预览
|
||||
const handleRealClick = () => {
|
||||
console.log("开始播放实时预览", windowType.value);
|
||||
if (windowType.value == "0") {
|
||||
startReal();
|
||||
} else {
|
||||
startPlayback();
|
||||
}
|
||||
};
|
||||
|
||||
// ... 其他函数按需修改,移除直接的 DOM 操作
|
||||
const dataVideoList = ref([]);
|
||||
// 实时预览
|
||||
function startReal() {
|
||||
if (!myVideoPlayer.value) {
|
||||
console.log("不能播放,请先初始化插件!!!!!");
|
||||
return;
|
||||
}
|
||||
console.log("开始播放实时预览");
|
||||
const resultList = props.devList.map((item) => {
|
||||
return {
|
||||
channelId: item.serialNumber,
|
||||
channelName: item.videoName,
|
||||
snum: snumType.value,
|
||||
streamType: 1,
|
||||
deviceType: 5,
|
||||
cameraType: "1",
|
||||
capability: "00000000000000000000000000000001",
|
||||
};
|
||||
});
|
||||
snumType.value += 1;
|
||||
myVideoPlayer.value.startReal(resultList);
|
||||
}
|
||||
|
||||
// 录像回放
|
||||
function startPlayback() {
|
||||
if (myVideoPlayer.value && date) {
|
||||
const resultList = props.devList.map((item) => {
|
||||
return {
|
||||
channelId: item.serialNumber,
|
||||
channelName: item.videoName,
|
||||
startTime: dayjs().format("YYYY-MM-DD") + " 00:00:00",
|
||||
endTime: dayjs().format("YYYY-MM-DD") + " 23:59:59",
|
||||
recordSource: 3,
|
||||
streamType: 0,
|
||||
snum: snumType.value,
|
||||
};
|
||||
});
|
||||
snumType.value += 1;
|
||||
myVideoPlayer.value.startPlayback(resultList);
|
||||
}
|
||||
}
|
||||
|
||||
// 控制插件的显示,两种方式均试用
|
||||
function showDHPlayer() {
|
||||
console.log("显示");
|
||||
if (myVideoPlayer.value) {
|
||||
// 1.
|
||||
myVideoPlayer.value._update({
|
||||
visible: true,
|
||||
});
|
||||
// 2.
|
||||
// myVideoPlayer.value.show();
|
||||
}
|
||||
}
|
||||
|
||||
// 控制插件的隐藏,两种方式均试用
|
||||
function hideDHPlayer() {
|
||||
console.log("隐藏");
|
||||
if (myVideoPlayer.value) {
|
||||
// 1.
|
||||
myVideoPlayer.value._update({
|
||||
visible: false,
|
||||
});
|
||||
// 2.
|
||||
// myVideoPlayer.value.hide();
|
||||
}
|
||||
}
|
||||
watch(
|
||||
() => props.devList,
|
||||
(newVal) => {
|
||||
console.log(
|
||||
"设备列表变化",
|
||||
newVal[0].serialNumber,
|
||||
dataVideoList.value[0].serialNumber
|
||||
);
|
||||
if (newVal && newVal.length > 0) {
|
||||
const findIndex = dataVideoList.value.findIndex(
|
||||
(item) => item.serialNumber == newVal[0].serialNumber
|
||||
);
|
||||
console.log("设备列表变化", findIndex);
|
||||
if (findIndex > -1) return Message.warning("设备已存在,无需重复添加");
|
||||
dataVideoList.value.push(newVal[0]);
|
||||
handleRealClick();
|
||||
}
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
|
||||
onMounted(() => {
|
||||
console.log("开始初始化插件", props.devList);
|
||||
if (props.devList.length > 0) {
|
||||
pluginLoginInfo.value.host = props.devList[0].account;
|
||||
pluginLoginInfo.value.port = props.devList[0].password;
|
||||
pluginLoginInfo.value.username = props.devList[0].appId;
|
||||
pluginLoginInfo.value.password = props.devList[0].appSecret;
|
||||
dataVideoList.value = props.devList;
|
||||
}
|
||||
initDHPlayer();
|
||||
});
|
||||
// 开启规则线
|
||||
const openivsRuleOutline = () => {
|
||||
if (myVideoPlayer.value) {
|
||||
myVideoPlayer.value.isEnableIvs({
|
||||
snum: snumType.value,
|
||||
isEnableIVS: true,
|
||||
ivsType: 1,
|
||||
});
|
||||
}
|
||||
};
|
||||
// 开启规则线
|
||||
const closeivsRuleOutline = () => {
|
||||
if (myVideoPlayer.value) {
|
||||
myVideoPlayer.value.isEnableIvs({
|
||||
snum: snumType.value,
|
||||
isEnableIVS: false,
|
||||
ivsType: 1,
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
</style>
|
||||
2713
src/components/videoModule/DHPlayer/videoPlayer.js
Normal file
2713
src/components/videoModule/DHPlayer/videoPlayer.js
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -136,6 +136,44 @@
|
||||
{{ $t("message.laborDev.openPlatform") }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<template v-if="beaconForm.supplierType == 10">
|
||||
<el-form-item label="ip">
|
||||
<el-input
|
||||
v-model="beaconForm.iccIp"
|
||||
:placeholder="$t('message.videoManage.placeholder')"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="端口号">
|
||||
<el-input
|
||||
v-model="beaconForm.iccPort"
|
||||
:placeholder="$t('message.videoManage.placeholder')"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="username">
|
||||
<el-input
|
||||
v-model="beaconForm.iccUserName"
|
||||
:placeholder="$t('message.videoManage.placeholder')"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="password">
|
||||
<el-input
|
||||
v-model="beaconForm.iccPassword"
|
||||
:placeholder="$t('message.videoManage.placeholder')"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="clientId">
|
||||
<el-input
|
||||
v-model="beaconForm.iccClientId"
|
||||
:placeholder="$t('message.videoManage.placeholder')"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="clientSecret">
|
||||
<el-input
|
||||
v-model="beaconForm.iccClientSecret"
|
||||
:placeholder="$t('message.videoManage.placeholder')"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<div class="dialog-footer">
|
||||
<!-- 取消按钮 -->
|
||||
<el-button
|
||||
@ -361,6 +399,12 @@ export default {
|
||||
initDialog: false,
|
||||
beaconForm: {
|
||||
supplierType: "",
|
||||
iccIp: "",
|
||||
iccPort: "",
|
||||
iccUserName: "",
|
||||
iccPassword: "",
|
||||
iccClientId: "",
|
||||
iccClientSecret: "",
|
||||
},
|
||||
beaconFormRules: {
|
||||
supplierType: [
|
||||
@ -461,6 +505,12 @@ export default {
|
||||
this.initDialog = false;
|
||||
this.beaconForm = {
|
||||
supplierType: "",
|
||||
iccIp: "",
|
||||
iccPort: "",
|
||||
iccUserName: "",
|
||||
iccPassword: "",
|
||||
iccClientId: "",
|
||||
iccClientSecret: "",
|
||||
};
|
||||
},
|
||||
saveBeaconFn() {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -195,7 +195,7 @@
|
||||
ref="camera"
|
||||
></camera-list>
|
||||
<camera-list-lc
|
||||
v-if="videoType === 2 || videoType === 3 || videoType === 7"
|
||||
v-if="videoType === 2 || videoType === 3 || videoType === 7 || this.videoType === 4"
|
||||
@editDevice="edit"
|
||||
ref="cameralc"
|
||||
></camera-list-lc>
|
||||
@ -574,7 +574,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="videoType == '1'"
|
||||
v-if="videoType == '1' || videoType == '4'"
|
||||
:label="$t('message.videoManage.dialog_newVideo.serialNumber')"
|
||||
>
|
||||
<el-input
|
||||
@ -850,7 +850,7 @@
|
||||
<el-form label-width="100px" class="dialogFormBox" size="medium">
|
||||
<el-form-item
|
||||
:label="
|
||||
videoType == '3'
|
||||
videoType == '3' || videoType == '4'
|
||||
? 'ip'
|
||||
: $t('message.videoManage.dialog_account_config.account')
|
||||
"
|
||||
@ -862,7 +862,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="
|
||||
videoType == '3'
|
||||
videoType == '3' || videoType == '4'
|
||||
? 'port'
|
||||
: $t('message.videoManage.dialog_account_config.password')
|
||||
"
|
||||
@ -884,6 +884,7 @@
|
||||
:label="
|
||||
videoType == '3'
|
||||
? 'APP Key'
|
||||
: videoType == '4' ? 'username'
|
||||
: $t('message.videoManage.dialog_account_config.appId')
|
||||
"
|
||||
>
|
||||
@ -894,7 +895,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="videoType != '7'"
|
||||
:label="$t('message.videoManage.dialog_account_config.appSecret')"
|
||||
:label="videoType == '4' ? 'password' :$t('message.videoManage.dialog_account_config.appSecret')"
|
||||
>
|
||||
<el-input
|
||||
v-model="currentVideoTypeDetail.appSecret"
|
||||
@ -902,6 +903,19 @@
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="videoType == '4'" label="clientId">
|
||||
<el-input
|
||||
v-model="currentVideoTypeDetail.clientId"
|
||||
placeholder="请输入"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="videoType == '4'" label="clientSecret">
|
||||
<el-input
|
||||
v-model="currentVideoTypeDetail.clientSecret"
|
||||
placeholder="请输入"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="videoType == '3'" label="外网IP">
|
||||
<el-input
|
||||
v-model="currentVideoTypeDetail.outip"
|
||||
@ -1338,6 +1352,8 @@ export default {
|
||||
coverUr: "",
|
||||
outip: "",
|
||||
outport: "",
|
||||
clientId: "",
|
||||
clientSecret: "",
|
||||
// appSecret: '0a5836c68a7edabcc78e6a18f05bb317'
|
||||
},
|
||||
isCreateNewUser: [
|
||||
@ -2047,7 +2063,7 @@ export default {
|
||||
if (
|
||||
this.videoType === 2 ||
|
||||
this.videoType === 3 ||
|
||||
this.videoType === 7
|
||||
this.videoType === 7 || this.videoType === 4
|
||||
) {
|
||||
//乐橙云、isc
|
||||
this.$refs.cameralc.getSelectVideoItemListByTypeApi(id);
|
||||
@ -2092,7 +2108,8 @@ export default {
|
||||
if (
|
||||
this.videoType === 2 ||
|
||||
this.videoType === 3 ||
|
||||
this.videoType === 7
|
||||
this.videoType === 7 || this.videoType === 4
|
||||
|
||||
) {
|
||||
//乐橙云、isc 、xiongmai
|
||||
this.$refs.cameralc.setVideoInfo(res.result);
|
||||
@ -2139,6 +2156,8 @@ export default {
|
||||
this.currentVideoTypeDetail.monitoringPointLocation,
|
||||
latitude: this.currentVideoTypeDetail.latitude,
|
||||
longitude: this.currentVideoTypeDetail.longitude,
|
||||
clientId: this.currentVideoTypeDetail.clientId,
|
||||
clientSecret: this.currentVideoTypeDetail.clientSecret,
|
||||
};
|
||||
console.log("传入的参数", params);
|
||||
console.log(this.currentVideoTypeDetail.aiFunctionType);
|
||||
|
||||
@ -2703,43 +2703,15 @@ export default {
|
||||
if (data.workerInfo.ufaceDevId) {
|
||||
arr = data.workerInfo.ufaceDevId.split(",");
|
||||
}
|
||||
console.log("arr", arr);
|
||||
// if(type == 2) {
|
||||
// let arr2 = [];
|
||||
// this.ufaceDevAllList.forEach(item2=>{
|
||||
// arr2.push(item2.id);
|
||||
// })
|
||||
// arr = arr.map(item=>{
|
||||
// console.log('this.ufaceDevAllList',this.ufaceDevAllList);
|
||||
// if(arr2.indexOf(item) != -1){
|
||||
// console.log('item',item)
|
||||
// return item
|
||||
// }
|
||||
// }).filter(item=>item);
|
||||
// console.log('arr2',arr)
|
||||
|
||||
// this.$forceUpdate();
|
||||
// }
|
||||
|
||||
// console.log("arr", arr);
|
||||
// this.workerInfo.ufaceDevId = [];
|
||||
console.log("arr111", arr);
|
||||
this.workerInfo.ufaceDevId = arr;
|
||||
let id = "";
|
||||
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
//fixed 改成字符串
|
||||
// this.workerInfo.ufaceDevId.push(arr[i]);
|
||||
// console.log(this.workerInfo.ufaceDevId)
|
||||
id = parseInt(arr[i]);
|
||||
for (let j = 0; j < this.ufaceDevAllList.length; j++) {
|
||||
// console.log(this.ufaceDevAllList[j].id, id)
|
||||
if (this.ufaceDevAllList[j].id == id) {
|
||||
// console.log(this.ufaceDevAllList)
|
||||
this.ufaceDevNameList.push(this.ufaceDevAllList[j].devName);
|
||||
this.ufaceDevAllList[j].disabled = false;
|
||||
}
|
||||
this.ufaceDevAllList.forEach(item => {
|
||||
if(arr.includes(item.id)) {
|
||||
this.ufaceDevNameList.push(item.devName);
|
||||
item.disabled = false;
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
this.ufaceDevIdChange(this.workerInfo?.ufaceDevId);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user