代码提交

This commit is contained in:
lixiaobang 2023-05-22 15:40:49 +08:00
parent a722270b89
commit e455026e22
19 changed files with 24933 additions and 504 deletions

BIN
public/flv/._flvjs Normal file

Binary file not shown.

108
public/flv/demo.css Normal file
View File

@ -0,0 +1,108 @@
.mainContainer {
display: block;
width: 100%;
margin-left: auto;
margin-right: auto;
}
@media screen and (min-width: 1152px) {
.mainContainer {
display: block;
width: 1152px;
margin-left: auto;
margin-right: auto;
}
}
.video-container {
position: relative;
margin-top: 8px;
}
.video-container:before {
display: block;
content: "";
width: 100%;
padding-bottom: 56.25%;
}
.video-container > div {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.video-container video {
width: 100%;
height: 100%;
}
.urlInput {
display: block;
width: 100%;
margin-left: auto;
margin-right: auto;
margin-top: 8px;
margin-bottom: 8px;
}
.centeredVideo {
display: block;
width: 100%;
height: 100%;
margin-left: auto;
margin-right: auto;
margin-bottom: auto;
}
.controls {
display: block;
width: 100%;
text-align: left;
margin-left: auto;
margin-right: auto;
margin-top: 8px;
margin-bottom: 10px;
}
.logcatBox {
border-color: #CCCCCC;
font-size: 11px;
font-family: Menlo, Consolas, monospace;
display: block;
width: 100%;
text-align: left;
margin-left: auto;
margin-right: auto;
}
.url-input , .options {
font-size: 13px;
}
.url-input {
display: flex;
}
.url-input label {
flex: initial;
}
.url-input input {
flex: auto;
margin-left: 8px;
}
.url-input button {
flex: initial;
margin-left: 8px;
}
.options {
margin-top: 5px;
}
.hidden {
display: none;
}

12056
public/flv/flv.js Normal file

File diff suppressed because it is too large Load Diff

47
public/flv/flv.min.js vendored Normal file

File diff suppressed because one or more lines are too long

BIN
public/flv/flvjs/._flv.js Normal file

Binary file not shown.

BIN
public/flv/flvjs/._flv.min.js vendored Normal file

Binary file not shown.

12056
public/flv/flvjs/flv.js Normal file

File diff suppressed because it is too large Load Diff

7
public/flv/flvjs/flv.min.js vendored Normal file

File diff suppressed because one or more lines are too long

49
public/flv/index.html Normal file
View File

@ -0,0 +1,49 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>视频监控</title>
</head>
<body style="margin:0px;width: 1000px;;height: 582px;overflow: hidden;z-index: 99;">
<script src="flv.min.js"></script>
<video id="videoElement" style="width: 1000px;height: 582px;" muted></video>
<script>
var a=getParam('name')
console.log(a,'sssss');
if (flvjs.isSupported()) {
var videoElement = document.getElementById('videoElement');
var flvPlayer = flvjs.createPlayer({
type: 'flv',
isLive: true,
// url: 'ws://172.16.1.209:8998/rtsp/1/channel=1&subtype=0/?url=rtsp://admin:5Gpmlabs@172.16.1.242:554/cam/realmonitor?channel=1&subtype=0'
// url: 'ws://223.112.17.26:12309/rtsp/1/channel=1&subtype=0/?url=rtsp://admin:5Gpmlabs@10.16.1.1:10086/cam/realmonitor'
// url: 'ws://172.16.1.21:12309/rtsp/1/a/?url=rtsp://127.0.0.1:12310/live/'+a
// url: 'ws://223.112.17.26:12309/rtsp/1/a/?url=rtsp://127.0.0.1:12310/live/'+a
// url: 'ws://223.112.17.26:12309/rtsp/1/channel=1&subtype=0/?url=rtsp://127.0.0.1:12310/live/'+a
url: 'ws://119.45.94.212:12309/rtsp/1/a/?url=rtsp://127.0.0.1:12310/live/'+a
});
flvPlayer.attachMediaElement(videoElement);
flvPlayer.load();
flvPlayer.play();
}
function getParam(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
//search,查询?后面的参数,并匹配正则
var r = location.search.substr(1).match(reg);
let val = 'videoPlayer'
window.parent.postMessage({
val
}, '*')
if (r != null) return decodeURI(decodeURI(r[2]));
}
</script>
</body>
</html>

45
public/flv/test.html Normal file
View File

@ -0,0 +1,45 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>video</title>
</head>
<body>
</body>
</html>
<script>
let socket;
function startWebsocket() {
toUserId = document.getElementById('toUserId').value;
let webSocketUrl = 'ws://172.17.2.42:71';
if ('WebSocket' in window) {
// console.log(1)
socket = new WebSocket(webSocketUrl);
} else if ('MozWebSocket' in window) {
// console.log(2)
socket = new MozWebSocket(webSocketUrl);
}
// socket = new SockJS('https://' + location.host + '/websocket/' + userId);
//连接成功
socket.onopen = function (e) {
console.log('连接服务器成功!')
};
//server端请求关闭
socket.onclose = function (e) {
console.log('close')
alert(JSON.stringify(e))
};
//error
socket.onerror = function (e) {
console.error(e)
alert(JSON.stringify(e))
};
socket.onmessage = onmessage;
}
//连接服务器
startWebsocket();
</script>

View File

@ -138,9 +138,9 @@
if (this.modulesFiles.length == 8) {
this.getData()
}
} else if(getQueryString('src') == 3){
this.modulesFiles = ['10kV_CXX_1_hwg','10kV_JSX_4_hwg', 'BJ', 'DL', 'JG', '1_UPS','2_UPS', 'XG', 'YJDY_Car', 'BackGround','Human','Camera_01','Camera_02',
'BS_che','BS_hwg1','BS_hwg2','BS_ups1','BS_ups2']
} else if (getQueryString('src') == 3) {
this.modulesFiles = ['10kV_CXX_1_hwg', '10kV_JSX_4_hwg', 'BJ', 'DL', 'JG', '1_UPS', '2_UPS', 'XG', 'YJDY_Car', 'BackGround', 'Human', 'Camera_01', 'Camera_02',
'BS_che', 'BS_hwg1', 'BS_hwg2', 'BS_ups1', 'BS_ups2']
this.modulesFiles.forEach((item, index) => {
var obj = {
cId: 1,
@ -170,9 +170,9 @@
this.getData()
}
}
else if(getQueryString('src') == 4){
this.modulesFiles = ['10kV_CXX_1_hwg','10kV_JSX_4_hwg', 'BJ', 'DL', 'JG', '1_UPS','2_UPS', 'XG', 'YJDY_Car', 'BackGround','Human','Camera_01','Camera_02',
'BS_che','BS_hwg1','BS_hwg2','BS_ups1','BS_ups2']
else if (getQueryString('src') == 4) {
this.modulesFiles = ['10kV_CXX_1_hwg', '10kV_JSX_4_hwg', 'BJ', 'DL', 'JG', '1_UPS', '2_UPS', 'XG', 'YJDY_Car', 'BackGround', 'Human', 'Camera_01', 'Camera_02',
'BS_che', 'BS_hwg1', 'BS_hwg2', 'BS_ups1', 'BS_ups2']
this.modulesFiles.forEach((item, index) => {
var obj = {
cId: 1,
@ -430,9 +430,9 @@
// ratio: 0.9, // [0, 1],越大相机越近
// });
// console.log(e.data.cName,'e.data.cName');
// if (e.data.cName.indexOf('monitor')!= -1) {
// window.parent.openVideo()
// }
// // if (e.data.cName.indexOf('monitor')!= -1) {
// // window.parent.openVideo()
// // }
// }
// 双击实体
if (e.kind === "doubleClickData") {
@ -442,6 +442,7 @@
// animation: true,
// ratio: 0.9, // [0, 1],越大相机越近
// })
window.setTimeout(() => {
if (e.data.cName == 'XG') {
let val = 'XG'
window.parent.postMessage({
@ -452,47 +453,49 @@
window.parent.postMessage({
val
}, '*');
}else if (e.data.cName =='Camera_02') {
} else if (e.data.cName == 'Camera_02') {
let val = 'Camera_02'
window.parent.postMessage({
val
}, '*');
}else if (e.data.cName =='Camera_01') {
} else if (e.data.cName == 'Camera_01') {
let val = 'Camera_01'
window.parent.postMessage({
val
}, '*');
}else if (e.data.cName =='Human') {
} else if (e.data.cName == 'Human') {
let val = 'Human'
window.parent.postMessage({
val
}, '*');
}else if(e.data.cName == '1_UPS'){
} else if (e.data.cName == '1_UPS') {
let val = '1_UPS'
window.parent.postMessage({
val
},'*')
}else if(e.data.cName == '2_UPS'){
}, '*')
} else if (e.data.cName == '2_UPS') {
let val = '2_UPS'
window.parent.postMessage({
val
},'*')
}else if(e.data.cName == 'YJDY_Car'){
}, '*')
} else if (e.data.cName == 'YJDY_Car') {
let val = 'YJDY_Car'
window.parent.postMessage({
val
},'*')
}else if(e.data.cName=='10kV_CXX_1_hwg'){
}, '*')
} else if (e.data.cName == '10kV_CXX_1_hwg') {
let val = '10kV_CXX_1_hwg'
window.parent.postMessage({
val
},'*')
}else if(e.data.cName=='10kV_JSX_4_hwg'){
}, '*')
} else if (e.data.cName == '10kV_JSX_4_hwg') {
let val = '10kV_JSX_4_hwg'
window.parent.postMessage({
val
},'*')
}, '*')
}
}, 200)
}
// 开始旋转镜头
// if (e.kind === 'beginRotate') {
@ -503,7 +506,7 @@
// 结束旋转镜头
// if (e.kind === 'endRotate') {
// this.g3d.setVisibleFunc(function(data) { // 设置图元可见性,内部循环
// return data.cVisible
// return data
// });
// }
});
@ -601,7 +604,7 @@
this.models[5].setToolTip('名称监控1');
this.models[6].setToolTip('名称监控2');
this.models[7].setToolTip('名称监控3');
} else if(getQueryString('src') == 3){
} else if (getQueryString('src') == 3) {
this.models[3].cVisible = false
// this.createNewIcon()
// this.createOldIcon()

View File

@ -47,7 +47,8 @@ export const getEnvironmentInfo = (data) => {
};
export const getSiteInfo = (params) => {
return axios.get('electric_interface/gk/info/getSiteInfo', {
params
params,
timeout:1000
})
};
export const getSwitchInfo = (params) => {

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
src/assets/videoBtn/up.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -48,7 +48,7 @@ const routes = [
name: 'landChildren',
meta: {
title: '侵华日军南京大屠杀遇难同胞纪念馆',
requireLogin: true
// requireLogin: true
},
component: () =>
import ('../views/land/child/index.vue'),

File diff suppressed because it is too large Load Diff

View File

@ -500,6 +500,7 @@ export default {
searchShow: true,
leftNum: [],
cityId: "",
mqttClient: undefined
};
},
@ -894,7 +895,7 @@ export default {
console.log("[MQTT-TEST] 连接回调....");
});
//
this.mqttClient.on("message", (topic, message, packet) => {
this.mqttClient.on("message", (topic, message) => {
console.log(
`[MQTT-TEST] 从主题 "${topic}" 收到的内容: ${message.toString()}`
);
@ -903,8 +904,15 @@ export default {
// this.infodata[4].num = dataReceived.realTimeLoad
console.log(dataReceived.realTimeLoad, "dataReceived");
});
// this.mqttClient.publish('my-topic','hello,MQTT')
}
},
//
mqttPublish() {
let topic = "my-topic"; //
message = 'hello,MQTT'
this.mqttClient.publish(topic, JSON.stringify(message));
},
show: function () {
this.leftOpen = true;
this.rightOpen = true;