fix: BUG修改
This commit is contained in:
parent
f1222b510c
commit
8420debd27
@ -4,7 +4,7 @@ NODE_ENV = 'development'
|
|||||||
# 本地环境接口地址(/api/index.ts文件中使用)
|
# 本地环境接口地址(/api/index.ts文件中使用)
|
||||||
# 后端本地
|
# 后端本地
|
||||||
# VITE_API_URL = 'http://192.168.34.221:19111'
|
# VITE_API_URL = 'http://192.168.34.221:19111'
|
||||||
# VITE_API_URL = 'http://192.168.34.221:9111'
|
VITE_API_URL = 'http://192.168.34.221:9111'
|
||||||
# VITE_API_URL = 'http://192.168.34.221:28888'
|
# VITE_API_URL = 'http://192.168.34.221:28888'
|
||||||
# VITE_API_URL = 'http://121.196.214.246/api'
|
# VITE_API_URL = 'http://121.196.214.246/api'
|
||||||
# VITE_API_URL = 'http://jxj.zhgdyun.com:100'
|
# VITE_API_URL = 'http://jxj.zhgdyun.com:100'
|
||||||
@ -23,7 +23,7 @@ NODE_ENV = 'development'
|
|||||||
# VITE_API_URL = 'http://182.90.224.237:15551'
|
# VITE_API_URL = 'http://182.90.224.237:15551'
|
||||||
# agjt
|
# agjt
|
||||||
# VITE_API_URL = 'http://42.180.188.17:9809' #生产环境
|
# VITE_API_URL = 'http://42.180.188.17:9809' #生产环境
|
||||||
VITE_API_URL = 'http://42.180.188.17:11211' #测试环境
|
# VITE_API_URL = 'http://42.180.188.17:11211' #测试环境
|
||||||
# VITE_API_URL = 'http://jxj.zhgdyun.com:19812'
|
# VITE_API_URL = 'http://jxj.zhgdyun.com:19812'
|
||||||
# 苏立信
|
# 苏立信
|
||||||
# VITE_API_URL = 'http://101.43.164.214:11111'
|
# VITE_API_URL = 'http://101.43.164.214:11111'
|
||||||
|
|||||||
@ -5,6 +5,10 @@ const BASEURL = import.meta.env.VITE_API_URL;
|
|||||||
export const selectProjectVideoListApi = (params: {}) => {
|
export const selectProjectVideoListApi = (params: {}) => {
|
||||||
return http.post(BASEURL + `/xmgl/videoItem/selectProjectVideoList`, params);
|
return http.post(BASEURL + `/xmgl/videoItem/selectProjectVideoList`, params);
|
||||||
};
|
};
|
||||||
|
// 根据分组查询分组视频树形列表
|
||||||
|
export const selectProjectVideoGroupApi = (params: {}) => {
|
||||||
|
return http.post(BASEURL + `/xmgl/videoItem/selectProjectVideoTreeList`, params);
|
||||||
|
};
|
||||||
// 查询子账号视频列表
|
// 查询子账号视频列表
|
||||||
export const selectUserVideoListApi = (params: {}) => {
|
export const selectUserVideoListApi = (params: {}) => {
|
||||||
return http.post(BASEURL + `/xmgl/videoItem/selectUserVideoList`, params);
|
return http.post(BASEURL + `/xmgl/videoItem/selectUserVideoList`, params);
|
||||||
|
|||||||
BIN
src/assets/images/icon-video-blue.png
Normal file
BIN
src/assets/images/icon-video-blue.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 235 B |
@ -789,7 +789,7 @@ export const AGJTMenu: Array<any> = [
|
|||||||
// ]
|
// ]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
moduleName: "车辆定位",
|
moduleName: "机械设备定位",
|
||||||
modulePath: "/equipmentPosition"
|
modulePath: "/equipmentPosition"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -4,16 +4,15 @@
|
|||||||
<div class="videoListBig">
|
<div class="videoListBig">
|
||||||
<Card title="监控设备列表">
|
<Card title="监控设备列表">
|
||||||
<el-scrollbar style="height: 100%">
|
<el-scrollbar style="height: 100%">
|
||||||
<el-tree
|
<!-- default-expand-all -->
|
||||||
ref="treeRef"
|
<el-tree ref="treeRef" icon="ArrowRight" :data="shipinList" node-key="id" @node-click="checkVideo" empty-text="">
|
||||||
default-expand-all
|
<template #default="{ node, data }">
|
||||||
icon="ArrowRight"
|
<span class="custom-tree-node">
|
||||||
:data="shipinList"
|
<img v-if="data.deviceType == 2 && data.videoId" src="@/assets/images/icon-video-blue.png" />
|
||||||
node-key="name"
|
<img v-else-if="data.deviceType != 2 && data.videoId" src="@/assets/images/icon-video-blue.png" />
|
||||||
:props="defaultProps"
|
<span :title="data.name">{{ data.name }}</span>
|
||||||
@node-click="checkVideo"
|
</span>
|
||||||
empty-text=""
|
</template>
|
||||||
>
|
|
||||||
</el-tree>
|
</el-tree>
|
||||||
<!-- <div class="decivList">
|
<!-- <div class="decivList">
|
||||||
<div
|
<div
|
||||||
@ -68,10 +67,10 @@ import ysyPlayAndPlayback from "@/components/ysyPlayAndPlayback.vue";
|
|||||||
import { ref, onMounted, onBeforeUnmount, getCurrentInstance, nextTick, Ref, onBeforeMount } from "vue";
|
import { ref, onMounted, onBeforeUnmount, getCurrentInstance, nextTick, Ref, onBeforeMount } from "vue";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { GlobalStore } from "@/stores";
|
import { GlobalStore } from "@/stores";
|
||||||
import { selectProjectVideoListApi, getSafeHatSessionApi } from "@/api/modules/video";
|
import { selectProjectVideoListApi, selectProjectVideoGroupApi, getSafeHatSessionApi } from "@/api/modules/video";
|
||||||
import { COMPANY } from "@/config/config";
|
import { COMPANY } from "@/config/config";
|
||||||
const defaultProps = {
|
const defaultProps = {
|
||||||
children: "list",
|
children: "children",
|
||||||
label: (data: any, node: any) => node.data.name
|
label: (data: any, node: any) => node.data.name
|
||||||
};
|
};
|
||||||
let videoType = ref("") as any;
|
let videoType = ref("") as any;
|
||||||
@ -154,25 +153,25 @@ const checkVideo = async (item: any) => {
|
|||||||
// let firstVideoId = ref("" as any);
|
// let firstVideoId = ref("" as any);
|
||||||
//获取视频列表
|
//获取视频列表
|
||||||
const getVideoList = async () => {
|
const getVideoList = async () => {
|
||||||
let res: any = await selectProjectVideoListApi({
|
let res: any = await selectProjectVideoGroupApi({
|
||||||
projectSn: store.sn
|
projectSn: store.sn
|
||||||
// all: 1
|
// all: 1
|
||||||
// all=1查全部
|
// all=1查全部
|
||||||
});
|
});
|
||||||
shipinList.value = res.result.videoList;
|
shipinList.value = res.result.videoList;
|
||||||
if(res.result.videoList[0].list){
|
if (res.result.videoList[0].list) {
|
||||||
if(!res.result.videoList[0].list[0]?.outip){
|
if (!res.result.videoList[0].list[0]?.outip) {
|
||||||
objData.value.appkey = res.result.videoList[0].list[0].appId;
|
objData.value.appkey = res.result.videoList[0].list[0].appId;
|
||||||
objData.value.ip = res.result.videoList[0].list[0].account;
|
objData.value.ip = res.result.videoList[0].list[0].account;
|
||||||
objData.value.secret = res.result.videoList[0].list[0].appSecret;
|
objData.value.secret = res.result.videoList[0].list[0].appSecret;
|
||||||
objData.value.port = +res.result.videoList[0].list[0].password;
|
objData.value.port = +res.result.videoList[0].list[0].password;
|
||||||
}else{
|
} else {
|
||||||
objData.value.appkey = res.result.videoList[0].list[0].appId;
|
objData.value.appkey = res.result.videoList[0].list[0].appId;
|
||||||
objData.value.ip = res.result.videoList[0].list[0].outip;
|
objData.value.ip = res.result.videoList[0].list[0].outip;
|
||||||
objData.value.secret = res.result.videoList[0].list[0].appSecret;
|
objData.value.secret = res.result.videoList[0].list[0].appSecret;
|
||||||
objData.value.port = +res.result.videoList[0].list[0].outport;
|
objData.value.port = +res.result.videoList[0].list[0].outport;
|
||||||
}
|
}
|
||||||
|
|
||||||
cameraIndexCode.value = res.result.videoList[0].list[0].serialNumber;
|
cameraIndexCode.value = res.result.videoList[0].list[0].serialNumber;
|
||||||
// firstVideoId.value = res.result.videoList[0].serialNumber;
|
// firstVideoId.value = res.result.videoList[0].serialNumber;
|
||||||
// previewVideo(res.result.videoList[0].list[0].serialNumber);
|
// previewVideo(res.result.videoList[0].list[0].serialNumber);
|
||||||
@ -188,18 +187,18 @@ const getVideoList = async () => {
|
|||||||
oWebControl.JS_Disconnect();
|
oWebControl.JS_Disconnect();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(!res.result.videoList[0].list[0]?.outip){
|
if (!res.result.videoList[0].list[0]?.outip) {
|
||||||
objData.value.appkey = res.result.videoList[0].appId;
|
objData.value.appkey = res.result.videoList[0].appId;
|
||||||
objData.value.ip = res.result.videoList[0].account;
|
objData.value.ip = res.result.videoList[0].account;
|
||||||
objData.value.secret = res.result.videoList[0].appSecret;
|
objData.value.secret = res.result.videoList[0].appSecret;
|
||||||
objData.value.port = +res.result.videoList[0].password;
|
objData.value.port = +res.result.videoList[0].password;
|
||||||
}else{
|
} else {
|
||||||
objData.value.appkey = res.result.videoList[0].appId;
|
objData.value.appkey = res.result.videoList[0].appId;
|
||||||
objData.value.ip = res.result.videoList[0].outip;
|
objData.value.ip = res.result.videoList[0].outip;
|
||||||
objData.value.secret = res.result.videoList[0].appSecret;
|
objData.value.secret = res.result.videoList[0].appSecret;
|
||||||
objData.value.port = +res.result.videoList[0].outport;
|
objData.value.port = +res.result.videoList[0].outport;
|
||||||
}
|
}
|
||||||
|
|
||||||
cameraIndexCode.value = res.result.videoList[0].serialNumber;
|
cameraIndexCode.value = res.result.videoList[0].serialNumber;
|
||||||
// firstVideoId.value = res.result.videoList[0].serialNumber;
|
// firstVideoId.value = res.result.videoList[0].serialNumber;
|
||||||
// previewVideo(res.result.videoList[0].list[0].serialNumber);
|
// previewVideo(res.result.videoList[0].list[0].serialNumber);
|
||||||
@ -215,11 +214,74 @@ const getVideoList = async () => {
|
|||||||
oWebControl.JS_Disconnect();
|
oWebControl.JS_Disconnect();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
// const getVideoList = async () => {
|
||||||
|
// let res: any = await selectProjectVideoListApi({
|
||||||
|
// projectSn: store.sn
|
||||||
|
// // all: 1
|
||||||
|
// // all=1查全部
|
||||||
|
// });
|
||||||
|
// shipinList.value = res.result.videoList;
|
||||||
|
// if(res.result.videoList[0].list){
|
||||||
|
// if(!res.result.videoList[0].list[0]?.outip){
|
||||||
|
// objData.value.appkey = res.result.videoList[0].list[0].appId;
|
||||||
|
// objData.value.ip = res.result.videoList[0].list[0].account;
|
||||||
|
// objData.value.secret = res.result.videoList[0].list[0].appSecret;
|
||||||
|
// objData.value.port = +res.result.videoList[0].list[0].password;
|
||||||
|
// }else{
|
||||||
|
// objData.value.appkey = res.result.videoList[0].list[0].appId;
|
||||||
|
// objData.value.ip = res.result.videoList[0].list[0].outip;
|
||||||
|
// objData.value.secret = res.result.videoList[0].list[0].appSecret;
|
||||||
|
// objData.value.port = +res.result.videoList[0].list[0].outport;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// cameraIndexCode.value = res.result.videoList[0].list[0].serialNumber;
|
||||||
|
// // firstVideoId.value = res.result.videoList[0].serialNumber;
|
||||||
|
// // previewVideo(res.result.videoList[0].list[0].serialNumber);
|
||||||
|
// console.log(objData.value);
|
||||||
|
// console.log("视频列表", res);
|
||||||
|
// ysyParams.value = res.result.videoList[0].list[0];
|
||||||
|
// videoType.value = res.result.videoList[0].list[0].videoType;
|
||||||
|
// if (res.result.videoList[0].list[0].videoType === 1) {
|
||||||
|
// oWebControl.JS_HideWnd();
|
||||||
|
// // 销毁当前播放的视频
|
||||||
|
// oWebControl.JS_RequestInterface({ funcName: "destroyWnd" });
|
||||||
|
// // 断开与插件服务连接
|
||||||
|
// oWebControl.JS_Disconnect();
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// if(!res.result.videoList[0].list[0]?.outip){
|
||||||
|
// objData.value.appkey = res.result.videoList[0].appId;
|
||||||
|
// objData.value.ip = res.result.videoList[0].account;
|
||||||
|
// objData.value.secret = res.result.videoList[0].appSecret;
|
||||||
|
// objData.value.port = +res.result.videoList[0].password;
|
||||||
|
// }else{
|
||||||
|
// objData.value.appkey = res.result.videoList[0].appId;
|
||||||
|
// objData.value.ip = res.result.videoList[0].outip;
|
||||||
|
// objData.value.secret = res.result.videoList[0].appSecret;
|
||||||
|
// objData.value.port = +res.result.videoList[0].outport;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// cameraIndexCode.value = res.result.videoList[0].serialNumber;
|
||||||
|
// // firstVideoId.value = res.result.videoList[0].serialNumber;
|
||||||
|
// // previewVideo(res.result.videoList[0].list[0].serialNumber);
|
||||||
|
// console.log(objData.value);
|
||||||
|
// console.log("视频列表", res);
|
||||||
|
// ysyParams.value = res.result.videoList[0];
|
||||||
|
// videoType.value = res.result.videoList[0].videoType;
|
||||||
|
// if (res.result.videoList[0].videoType === 1) {
|
||||||
|
// oWebControl.JS_HideWnd();
|
||||||
|
// // 销毁当前播放的视频
|
||||||
|
// oWebControl.JS_RequestInterface({ funcName: "destroyWnd" });
|
||||||
|
// // 断开与插件服务连接
|
||||||
|
// oWebControl.JS_Disconnect();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// };
|
||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
getVideoList();
|
getVideoList();
|
||||||
})
|
});
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
initPlugin();
|
initPlugin();
|
||||||
// setTimeout(() => {
|
// setTimeout(() => {
|
||||||
@ -350,7 +412,7 @@ const initPlugin = () => {
|
|||||||
|
|
||||||
// 初始化
|
// 初始化
|
||||||
const init = (callback: (() => void) | undefined) => {
|
const init = (callback: (() => void) | undefined) => {
|
||||||
console.log(objData.value,'我的视频服务器')
|
console.log(objData.value, "我的视频服务器");
|
||||||
getPubKey(() => {
|
getPubKey(() => {
|
||||||
let appkey = objData.value.appkey; //综合安防管理平台提供的appkey,必填
|
let appkey = objData.value.appkey; //综合安防管理平台提供的appkey,必填
|
||||||
let secret = setEncrypt(objData.value.secret); //综合安防管理平台提供的secret,必填
|
let secret = setEncrypt(objData.value.secret); //综合安防管理平台提供的secret,必填
|
||||||
@ -596,4 +658,18 @@ const previewVideo = (data: string | null) => {
|
|||||||
top: 0;
|
top: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 树形样式
|
||||||
|
.custom-tree-node {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
span {
|
||||||
|
margin-left: 8%;
|
||||||
|
color: white;
|
||||||
|
font-size: 16px;
|
||||||
|
margin-bottom: 1px;
|
||||||
|
}
|
||||||
|
img {
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user