监控恢复

main
徐景良 2 months ago
parent c13a4b0e5f
commit f705693f25

@ -18,6 +18,8 @@
<script src="/turf/turf-7.0.0.min.js"></script>
<script src="/monitor/imouPlayer.js"></script>
<!-- <script src="https://cdn.jsdelivr.net/npm/@turf/turf@7.0.0/turf.min.js"></script> -->
<!-- 腾讯云视频直播 -->

File diff suppressed because one or more lines are too long

@ -47,9 +47,9 @@
<div class="TC-videoi-container" v-if="showTCLPlayer" v-drag>
<div class="close-button" @click="showTCLPlayer = false;">
<CloseOutlined></CloseOutlined>
</div>
<TCVideo v-if="showTCLPlayer" :play-url="'12334344'"></TCVideo>
<!-- <TCVideo v-if="showTCLPlayer" :play-url="'12334344'"></TCVideo> -->
<LCMonitor v-if="showTCLPlayer" :monitorInfo="monitorInfo" :play-url="'12334344'"></LCMonitor>
</div>
</div>
@ -96,6 +96,7 @@ import {PlayCircleOutlined,EnvironmentOutlined,CloseOutlined,DownOutlined,Shrink
import { PageEnum } from '@/enums/pageEnum';
import Monitor from './VideoSupervision/monitor/Monitor.vue';
import TCVideo from './VideoSupervision/monitor/index.vue';
import LCMonitor from './VideoSupervision/monitor/LCMonitor.vue'
import { useModal } from '@/components/Modal';
import { useI18n } from '@/hooks/web/useI18n';
import { useMessage } from '@/hooks/web/useMessage';
@ -145,8 +146,9 @@ import LayerCenter from './VideoSupervision/layers/index.vue';
// }
const showTCLPlayer = ref(false);
function showMonitorFunction(val){
function showMonitorFunction(info){
monitorInfo.value = info;
showTCLPlayer.value = true;
}

@ -1,14 +1,82 @@
{
"type": "FeatureCollection",
"features": [
{
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [118.429056,35.387537]
"coordinates": [118.3875705725158,35.534226097373036]
},
"properties": {
"name":"沂南县砖埠镇东岳庄村北可见光",
"name":"沂南县界湖街道朱家岭大顶子可见光",
"number":"8H03AA1PAGDC8C3",
"channel":"0",
"token":"Kt_hz67eea9efb0ba4621bc98f3b4571760",
"playUrl":"http://221.2.83.254:7012/live/37130100181328000001.m3u8"
}
},{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [118.28783396344205,35.45410256356406]
},
"properties": {
"name":"沂南县双堠镇丁家沟村村北可见光",
"number":"8H03AA1PAG8D9BF",
"channel":"0",
"token":"Kt_hz64314d98871b4abe8e1374d5a325cd",
"playUrl":"http://221.2.83.254:7012/live/37130100181328000001.m3u8"
}
},{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [118.76788530370064,36.17385046518329]
},
"properties": {
"name":"沂水县圈里乡增山后黄连书顶子可见光",
"number":"8H03AA1PAGF203B",
"channel":"0",
"token":"Kt_hz4b622b46e88849b4930adf4b0d40b7",
"playUrl":"http://221.2.83.254:7012/live/37130100181328000001.m3u8"
}
},{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [118.09757535115543,35.413931707674166]
},
"properties": {
"name":"费县薛庄镇火山后村村南斜坡可见光",
"number":"8H03AA1PAG08E39",
"channel":"0",
"token":"Kt_hzd0e3d563740943af938639a05690ac",
"playUrl":"http://221.2.83.254:7012/live/37130100181328000001.m3u8"
}
},{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [117.90782092067974,35.51461871648252]
},
"properties": {
"name":"平邑县柏林镇后白岩东南大洼林场可见光",
"number":"8L0995DPAG11E58",
"channel":"0",
"token":"Kt_hze033cc89ad47430a80a9ddd8e7e73c",
"playUrl":"http://221.2.83.254:7012/live/37130100181328000001.m3u8"
}
},{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [118.10749998880061,35.973856344287995]
},
"properties": {
"name":"蒙阴县岱崮镇三宝山山顶可见光",
"number":"8H03AA1PAG97234",
"channel":"0",
"token":"Kt_hzd4be03b743044d21b52968a1da7ef8",
"playUrl":"http://221.2.83.254:7012/live/37130100181328000001.m3u8"
}
}

@ -16,12 +16,12 @@
</div>
</div>
</div>
</div>s
</template>
<script lang="ts" setup>
import MonitoringData from './MonitoringData.json';
import MonitoringData from './MonitoringData.json';
import { TableOutlined, GlobalOutlined,HomeOutlined} from '@ant-design/icons-vue';
import { TableOutlined, GlobalOutlined,HomeOutlined} from '@ant-design/icons-vue';
import { ref, onMounted, defineExpose, defineEmits } from 'vue';
import { generateUUID } from '@/components/MapboxMaps/src/tool';
import { WktToGeojson } from '@/components/MapboxMaps/src/WktGeojsonTransform';
@ -752,6 +752,7 @@ import { TableOutlined, GlobalOutlined,HomeOutlined} from '@ant-design/icons-vue
});
//
function loadMonitorLayer() {
axios({
method: 'get',
// url: 'http://123.132.248.154:9302/api/DeviceInfo/GetDeviceInfo',

@ -0,0 +1,186 @@
<template>
<div class="uav-container">
<div class="title">
视频监控
</div>
<div class="monitor-container">
<div id="root" style="width:235px;height:178px"></div>
</div>
</div>
</template>
<script lang="ts" setup>
import {ref,onMounted,onBeforeUnmount,defineProps,watch} from 'vue';
// import EasyPlayer from '@easydarwin/easyplayer'
import axios from 'axios'
const isShowPlayer = ref(false);
const props = defineProps(["monitorInfo"])
const isFirstLoad = ref(false);
watch(
()=>props.monitorInfo,
(newVal,oldVal)=>{
if(isFirstLoad.value){
getPlayToken();
}else{
isFirstLoad.value = true;
}
}
)
let monitorPlayer = null;
const getPlayToken = ()=>{
let params = {
deviceId:props.monitorInfo.number,
channelId:props.monitorInfo.channel,
type:0,
}
axios({
method:"post",
url:"http://111.17.207.220:9001/api/Camera/getKitToken?deviceId="+params.deviceId+"&channelId="+params.channelId+"&type=0",
}).then(res=>{
let kitToken = res.data.result.data.kitToken;
loadMonitorVideo(kitToken);
})
}
const loadMonitorVideo = (token) => {
monitorPlayer && monitorPlayer.destroy()
monitorPlayer = null
monitorPlayer = new imouPlayer({
id: 'root',
width: 388,
height: 230,
deviceId: props.monitorInfo.number,
token:token,
channelId:props.monitorInfo.channel,
type:1,
streamId:0,
recordType: 'cloud',
code:""
})
}
onMounted(()=>{
getPlayToken();
})
onBeforeUnmount(()=>{
monitorPlayer && monitorPlayer.destroy()
monitorPlayer = null
})
</script>
<style type="less" scoped>
.uav-container{
width: 418px;
height: 300px;
background:#041B36;
position: relative;
.title{
width:100%;
height:40px;
background-image:url("/videosupervision/title.png");
background-size:100% 100%;
line-height:40px;
text-indent:18px;
font-size:18px;
font-weight:bold;
color:#fff;
}
.switch-button{
float:right;
margin-right:20px;
}
.uav-list-container{
width:100%;
height: calc( 100% - 60px);
overflow:auto;
padding:20px 20px;
position:relative;
z-index:999;
.uav-empty{
width:100%;
height:100%;
text-align:center;
color:#999;
img{
width:120px;
margin:40px 0px 18px 0px;
}
}
.uav-item{
width:100%;
height:40px;
padding:0px 15px;
line-height:40px;
color:#f1f1f1;
display:flex;
background:rgba(0,0,0,0.2);
&:hover{
background:rgba(0,0,0,0.4);
}
div{
flex:1;
}
.position{
max-width:30px;
cursor:pointer;
}
.play{
max-width:30px;
cursor:pointer;
}
}
}
.TCPlayer-video-contaiiner{
width: calc( 100% - 30px);
height: calc( 100% - 70px);
position:absolute;
margin:15px;
top:40px;
right:0px;
z-index:1000;
background:#041B36;
.video-contain {
width: 100%;
height: 100%;
}
}
.close-video-button{
position:absolute;
top:40px;
right:10px;
background:rgba(0,0,0,0.3);
z-index:100100;
color:#fff;
padding:10px;
cursor:pointer;
&:hover{
color:#408eff;
}
}
}
.monitor-container{
width: calc( 100% - 30px);
height: calc( 100% - 70px);
padding:15px;
}
</style>
Loading…
Cancel
Save