Browse Source

驱鸟项目

master
wangxingyuan 7 months ago
parent
commit
73de38d61c
9 changed files with 946 additions and 173 deletions
  1. +2
    -0
      package.json
  2. +1
    -0
      src/App.vue
  3. +16
    -0
      src/api/quniao/infoStatistics.js
  4. +9
    -0
      src/api/quniao/soundWave.js
  5. +64
    -11
      src/components/FlvPlayer/index.vue
  6. +26
    -15
      src/views/quniao/device/index.vue
  7. +599
    -13
      src/views/quniao/infoStatistics/index.vue
  8. +0
    -84
      src/views/quniao/soundWave/index copy.vue
  9. +229
    -50
      src/views/quniao/soundWave/index.vue

+ 2
- 0
package.json View File

@ -41,12 +41,14 @@
"axios": "0.24.0",
"clipboard": "2.0.8",
"core-js": "3.25.2",
"dayjs": "^1.11.13",
"echarts": "4.9.0",
"element-ui": "2.15.10",
"file-saver": "2.0.5",
"flv.js": "^1.6.2",
"fuse.js": "6.4.3",
"highlight.js": "9.18.5",
"jquery": "^3.7.1",
"js-beautify": "1.13.0",
"js-cookie": "3.0.1",
"jsencrypt": "3.0.0-rc.1",


+ 1
- 0
src/App.vue View File

@ -23,4 +23,5 @@ export default {
background: linear-gradient(to right, rgba(31, 45, 50, 1), rgba(11, 19, 24, 1));
height: calc(100vh - 84px);
}
</style>

+ 16
- 0
src/api/quniao/infoStatistics.js View File

@ -0,0 +1,16 @@
import request from '@/utils/request';
export function intrusionNum(data) {
return request({
url: `/api/brid/intrusionNum`,
method: 'post',
data: data
})
}
// 鸟类入侵警告
export function reportList(data) {
return request({
url: `/api/brid/reportList`,
method: 'post',
data: data
})
}

+ 9
- 0
src/api/quniao/soundWave.js View File

@ -126,4 +126,13 @@ export function videoLogin(data) {
method: 'get',
// data: data
})
}
// 一键开关声波设备
export function openCloseDevice(data) {
return request({
baseUrl: 'VUE_APP_CAMERA_API',
url: '/api/brid/openCloseDevice',
method: 'post',
data: data
})
}

+ 64
- 11
src/components/FlvPlayer/index.vue View File

@ -1,6 +1,6 @@
<template>
<div class="flv-player-container">
<video ref="videoElement" autoplay muted controls></video>
<video ref="videoElement" autoplay muted controls class="videoDom"></video>
</div>
</template>
@ -9,18 +9,35 @@ import flvjs from "flv.js";
export default {
name: "FlvPlayer",
props: {
src: {
type: String,
required: true,
default: "",
// props: {
// src: {
// type: String,
// required: true,
// default: "",
// },
// },
// mounted() {
// this.$nextTick(() => {
// if (this.src) {
// console.log(this.src,'')
// console.log(this.src)
// this.initFlvPlayer();
// }
// });
// },
props: ["src"],
watch: {
src(newVal) {
if (newVal) {
console.log(newVal, "获取到了视频流");
this.initFlvPlayer();
}
},
},
mounted() {
this.initFlvPlayer();
},
methods: {
initFlvPlayer() {
console.log(this.src, "视频播放组件");
const videoElement = this.$refs.videoElement;
if (flvjs.isSupported()) {
const flvPlayer = flvjs.createPlayer({
@ -57,12 +74,48 @@ export default {
<style scoped>
.flv-player-container {
width: 100%;
height: 90%;
/* width: 100%;
height: 90%; */
}
video {
width: 100%;
height: 100%;
object-fit: cover;
}
video::-webkit-media-controls-fullscreen-button {
display: none;
}
video::-webkit-media-controls-play-button {
display: none;
}
video::-webkit-media-controls-timeline {
display: none;
}
video::-webkit-media-controls-current-time-display {
display: none;
}
video::-webkit-media-controls-time-remaining-display {
display: none;
}
video::-webkit-media-controls-mute-button {
display: none;
}
video::-webkit-media-controls-toggle-closed-captions-button {
display: none;
}
video::-webkit-media-controls-enclosure {
display: none;
}
video::-webkit-media-controls-volume-slider {
display: none;
}
</style>

+ 26
- 15
src/views/quniao/device/index.vue View File

@ -260,7 +260,7 @@ import {
appearStatusReq,
loopPlayReq,
musicListReq,
addDeviceTask
addDeviceTask,
} from "@/api/quniao/deviceOption";
import musicList from "./musicList.vue";
export default {
@ -401,7 +401,7 @@ export default {
//
getTaskList() {
getDeviceTaskList().then((res) => {
console.log(res);
console.log(res, "获取任务列表");
if (res.code == 200) {
this.taskListData = res.rows;
}
@ -547,24 +547,35 @@ export default {
taskTimes: [{ taskTime: this.dayData }],
startTimeinfo: this.formatTime(this.startTime),
endTimeinfo: this.formatTime(this.endTime),
taskName:this.taskName
taskName: this.taskName,
};
console.log(data);
addDeviceTask(data).then(res=>{
console.log(res,1111111111)
if(res.code==200){
this.getTaskList()
}
})
if (
data.deviceIds &&
data.taskType &&
data.taskTimes &&
data.startTimeinfo &&
data.endTimeinfo &&
data.taskName
) {
addDeviceTask(data).then((res) => {
console.log(res, 1111111111);
if (res.code == 200) {
this.getTaskList();
}
});
} else {
this.$message.error("请填写完整信息");
}
console.log(data);
},
//
formatTime(chinaStandard) {
var date = new Date(chinaStandard);
// var y = date.getFullYear();
// var m = date.getMonth() + 1;
// m = m < 10 ? "0" + m : m;
// var d = date.getDate();
// d = d < 10 ? "0" + d : d;
// var y = date.getFullYear();
// var m = date.getMonth() + 1;
// m = m < 10 ? "0" + m : m;
// var d = date.getDate();
// d = d < 10 ? "0" + d : d;
var h = date.getHours();
h = h < 10 ? "0" + h : h;
var minute = date.getMinutes();


+ 599
- 13
src/views/quniao/infoStatistics/index.vue View File

@ -1,27 +1,613 @@
<template>
<div class="quniaoApp">
<iframe class="iframe" :src="src" scrolling="yes"></iframe>
</div>
<div class="quniaoApp">
<!-- <iframe class="iframe" :src="src" scrolling="yes"></iframe> -->
<el-row :gutter="20">
<el-col :span="12">
<div class="content-box">
<div class="titleLabel">
<img style="width: 3%" src="@/assets/images/img/left_yuan.png" />
<span>鸟类入侵统计</span>
<img style="width: 73%" src="@/assets/images/img/XianBig.png" />
<img style="width: 5%" src="@/assets/images/img/JianTou.png" />
</div>
<div class="form-box">
<el-form label-width="25%">
<el-form-item label="选择时间:"
><el-date-picker
popper-class="customDatePicker"
v-model="timeData"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="changeDate"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
>
</el-date-picker>
</el-form-item>
</el-form>
</div>
<div class="TiShiShuJu">
<div>
<span class="text"
><img src="@/assets/images/img/acousticdevice1.png" /><span
style="color: rgb(98, 208, 255, 1); margin-left: 15px"
>有声波装置区域</span
></span
>
<span class="text"
><img src="@/assets/images/img/acousticdevice2.png" /><span
style="color: rgb(231, 23, 60, 1); margin-left: 15px"
>无声波装置区域</span
></span
>
</div>
</div>
<div class="echarts_Box" ref="echarts_Box"></div>
</div>
</el-col>
<el-col :span="12">
<div class="content-box">
<div class="titleLabel">
<img style="width: 3%" src="@/assets/images/img/left_yuan.png" />
<span>鸟类入侵警告</span>
<img style="width: 73%" src="@/assets/images/img/XianBig.png" />
<img style="width: 5%" src="@/assets/images/img/JianTou.png" />
</div>
<div class="tableQuray">
<div class="time_screening">
<el-form :model="tableQuray" label-min-width="13%">
<el-form-item label="时间筛选">
<el-radio-group
v-model="tableQuray.reportType"
@change="radioChangeTop"
>
<el-radio :label="1">日报</el-radio>
<el-radio :label="2">周报</el-radio>
<el-radio :label="3">月报</el-radio>
<el-radio :label="4">自定义</el-radio>
</el-radio-group>
<el-date-picker
v-model="tableQurayTime"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
@change="radioTimeChange"
:disabled="tableQuray.reportType != 4"
>
</el-date-picker>
</el-form-item>
<el-form-item label="有无数据筛选">
<el-radio-group
v-model="tableQuray.isHave"
@change="radioChangeBottom"
>
<el-radio :label="2">全部</el-radio>
<el-radio :label="1">有数据</el-radio>
<el-radio :label="0">无数据</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
</div>
</div>
<div class="table_box">
<el-table :data="tableData" style="width: 97%" border>
<el-table-column label="序号" align="center" width="100">
<template slot-scope="{ $index }">
<span>{{ $index + 1 }}</span>
</template>
</el-table-column>
<el-table-column
prop="reportName"
label="报告名称"
align="center"
></el-table-column>
<el-table-column
prop="createTime"
label="创建时间"
align="center"
></el-table-column>
<el-table-column
prop="reportType"
label="报告类型"
align="center"
>
<template slot-scope="scope">
<span v-if="scope.row.reportType == 1">日报</span>
<span v-if="scope.row.reportType == 2">周报</span>
<span v-if="scope.row.reportType == 3">月报</span>
</template>
</el-table-column>
<el-table-column prop="time" label="操作" align="center">
<template slot-scope="scope">
<div class="operation">
<span>预览</span>
<span>下载</span>
</div>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:page-sizes="[3, 4, 5, 6, 7, 10]"
layout="total, sizes,prev, pager, next,jumper"
:total="total"
>
</el-pagination>
</div>
</div>
</el-col>
</el-row>
</div>
</template>
<script>
export default{
data(){
return{
src:'/static/quniaosss.html'
import * as echarts from "echarts";
import { intrusionNum, reportList } from "@/api/quniao/infoStatistics";
import dayjs from "dayjs";
export default {
data() {
return {
timeData: ["2023-10-10 00:00:00", "2025-05-13 14:00:00"],
echartsTime: {
startTime: null,
endTime: null,
},
myChart: null,
tableQuray: {
// reportType: 1,
isHave: 2,
pNum: 1,
pSize: 10,
},
value1: "",
tableQurayTime: [],
tableData: [],
total: 0,
};
},
created() {
this.changeDate();
},
mounted() {
this.initIntrusionNum();
this.initReportList();
this.initTime();
},
methods: {
changeDate() {
this.echartsTime.startTime = this.timeData[0];
this.echartsTime.endTime = this.timeData[1];
},
// echarts
initIntrusionNum() {
intrusionNum(this.echartsTime).then((res) => {
if (res.code == 200) {
let result1 = [];
let result2 = [];
res.rows.forEach((item, index) => {
let result =
item.hour.split(" ")[0] +
" " +
item.hour.split(" ")[1].slice(0, 2) +
"时";
result1.push([result, item.countIsArea]);
result2.push([result, item.countNoArea]);
});
let dataZoomEnd = result1.length > 10 ? 100 : 100;
this.initEcharts(result1, result2, dataZoomEnd);
}
}
}
});
},
initEcharts(result1, result2, dataZoomEnd) {
let that = this;
this.myChart = echarts.init(this.$refs.echarts_Box);
let colorList = [
["#4d76ff", "#80aaff"],
["#FF3838", "#FF6543"],
];
var option = {
dataZoom: [
{
type: "inside",
realtime: true,
start: 0,
end: dataZoomEnd,
zoomOnMouseWheel: true,
},
],
tooltip: {
trigger: "axis",
},
grid: {
bottom: "60px",
left: "40px",
right: "0",
top: "10px",
},
xAxis: {
type: "category",
boundaryGap: false,
boundaryGap: ["20%", "20%"],
splitLine: {
show: false,
},
axisTick: {
show: false,
},
axisLabel: {
interval: 0,
textStyle: {
color: "#C6D3EC",
fontSize: "0.6em",
},
formatter: function (value) {
return that.chulidata(value);
},
lineHeight: 9,
width: 0.4,
height: 6,
},
},
yAxis: {
type: "value",
// 线
splitLine: {
show: true,
lineStyle: {
color: "#40486A",
},
},
//
axisLabel: {
// formatter: '{value} m³ ', // y
textStyle: {
color: "#C6D3EC",
fontSize: "12",
},
},
//
axisLine: {
show: true,
lineStyle: {
color: "#40486A",
},
},
min: 0,
minInterval: 1,
},
series: [
{
name: "有声波装置区域",
type: "bar",
color: "rgba(255, 243, 136, 0.62)",
barWidth: 12,
itemStyle: {
normal: {
color: function (params) {
return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: colorList[0][0] },
{ offset: 1, color: colorList[0][1] },
]);
},
},
},
tooltip: {
title: "2222222",
},
axisLine: {
show: true,
lineStyle: {
color: "#40486A",
},
},
data: result1,
},
{
name: "无声波装置区域",
type: "bar",
color: "rgba(255, 243, 136, 0.62)",
barWidth: 12,
itemStyle: {
normal: {
color: function (params) {
return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: colorList[1][0] },
{ offset: 1, color: colorList[1][1] },
]);
},
},
},
tooltip: {
title: "2222222",
},
axisLine: {
show: true,
lineStyle: {
color: "#40486A",
},
},
data: result2,
},
],
};
this.myChart.setOption(option);
},
//x
chulidata(value) {
let year = value.split(" ")[0].split("-")[0] + "年";
let month = Number(value.split(" ")[0].split("-")[1]) + "月";
let day = Number(value.split(" ")[0].split("-")[2]) + "日";
let time = value.split(" ")[1].slice(0, 2) + "时";
return year + "\n" + month + day + "\n" + time;
},
//
initReportList() {
let data = {};
if (this.tableQuray.reportType && this.tableQuray.reportType == 4) {
data = this.tableQuray;
} else {
data = {
reportType: this.tableQuray.reportType,
isHave: this.tableQuray.isHave,
pNum: this.tableQuray.pNum,
pSize: this.tableQuray.pSize,
};
}
reportList(data).then((res) => {
console.log(res, "表格数据");
this.tableData = res.reportList;
this.total = res.allNum;
});
},
radioChangeTop() {
console.log(this.tableQuray);
this.initReportList();
},
radioChangeBottom() {
this.initReportList();
},
radioTimeChange() {
this.tableQuray.startTime = this.tableQurayTime[0];
this.tableQuray.endTime = this.tableQurayTime[1];
},
//
initTime() {
let now = dayjs();
let last24Hours = now.subtract(24, "hour");
let startTimeDate = last24Hours.format("YYYY-MM-DD");
let endTimeDate = now.format("YYYY-MM-DD");
this.tableQurayTime = [startTimeDate, endTimeDate];
this.tableQuray.startTime = this.tableQurayTime[0];
this.tableQuray.endTime = this.tableQurayTime[1];
},
handleSizeChange(size) {
console.log(size, 111);
this.tableQuray.pSize = size;
this.initReportList();
},
handleCurrentChange(page) {
this.tableQuray.pNum = page;
this.initReportList();
},
},
};
</script>
<style scoped>
.quniaoApp{
.quniaoApp {
}
.el-row {
height: 100%;
}
.content-box {
width: 100%;
height: 100%;
padding: 1.4%;
}
.titleLabel {
display: flex;
align-items: center;
justify-content: space-between;
color: #40e5f0;
font-size: 1.2vw;
}
.titleLabel img {
vertical-align: middle;
}
.form-box {
margin-top: 4%;
width: 100%;
height: 4%;
}
::v-deep.el-form-item--medium .el-form-item__label {
font-size: 1vw;
color: white;
font-weight: normal;
height: 4vh;
line-height: 4vh;
}
::v-deep.el-date-editor {
background: rgba(32, 47, 62, 1);
border: 1px solid rgba(64, 72, 106, 1);
width: 86%;
height: 4vh;
}
::v-deep .el-date-editor .el-range-input {
background-color: transparent !important;
color: white !important;
}
::v-deep .el-range-editor--medium .el-range-separator {
color: white !important;
line-height: 3vh;
}
.TiShiShuJu {
width: 100%;
display: flex;
justify-content: center;
align-items: center;
height: 10%;
}
.TiShiShuJu > div {
display: flex;
width: 75%;
height: 100%;
justify-content: space-around;
align-items: center;
}
.TiShiShuJu > div > span {
font-size: 0.9vw;
}
.TiShiShuJu > div > span > img {
width: 19%;
}
.TiShiShuJu .text {
width: 30%;
}
.iframe{
.echarts_Box {
width: 100%;
height: 76%;
font-size: 1vw;
}
.el-col {
height: 100%;
border: none;
}
.tableQuray {
/* padding: 1%; */
margin-top: 4%;
}
.tableQuray ::v-deep .el-date-editor {
margin-left: 2%;
width: 42%;
background: transparent !important;
}
::v-deep.el-radio .el-radio__label {
color: #fff !important;
font-size: 0.9vw !important;
}
::v-deep.el-radio-group {
margin-left: 2%;
}
::v-deep .el-table {
font-size: 0.8vw;
}
::v-deep .el-table .el-table__header-wrapper th {
background-color: #172533 !important;
color: #b0bdd4 !important;
font-size: 0.9vw;
}
::v-deep .el-table--border::after {
/* background-color: #41476B !important; */
width: 0 !important;
}
::v-deep .el-table--border {
border: 1px solid #41476b !important;
}
::v-deep .el-table--border .el-table__cell {
border-right: 1px solid #41476b !important;
}
::v-deep .el-table th.el-table__cell.is-leaf {
border-bottom: 1px solid #41476b !important;
}
::v-deep .el-table::before {
height: 0 !important;
}
::v-deep .el-table__body-wrapper {
background-color: #222f3d !important;
}
::v-deep
.el-table--enable-row-hover
.el-table__body
tr:hover
> td.el-table__cell {
background-color: #222f3d;
}
::v-deep .el-table tr {
background-color: #222f3d;
color: #ffffff;
}
::v-deep .el-table td.el-table__cell {
border-bottom: 1px solid rgba(64, 72, 106, 1);
}
::v-deep .el-table .cell {
line-height: 28px;
color: #ffffff;
}
.operation {
width: 100%;
display: flex;
justify-content: space-evenly;
color: #1799e2;
cursor: pointer;
}
::v-deep .el-pagination {
/* text-align: center; */
margin-top: 20px;
margin-left: 3%;
}
::v-deep .el-pagination .el-pagination__total {
color: white !important;
font-size: 0.8vw !important;
}
::v-deep .el-pagination .el-pager li {
background-color: transparent !important;
color: white !important;
border-color: #fff !important;
font-size: 0.8vw !important;
}
::v-deep .el-pagination .el-pager li.active {
background-color: transparent !important;
color: #40e5f0 !important;
}
::v-deep .el-pagination .btn-prev,
::v-deep .el-pagination .btn-next {
background-color: transparent !important;
color: white !important;
}
::v-deep .el-pagination .el-select .el-input--mini .el-input__inner {
background-color: transparent !important;
color: white !important;
border: 1px solid #fff !important;
}
::v-deep .el-pagination .el-input-number .el-input__inner {
background-color: transparent !important;
color: white !important;
border: 1px solid #fff !important;
}
::v-deep.el-pagination .el-pagination__jump {
color: #fff !important;
font-size: 0.8vw !important;
}
::v-deep.el-pagination .el-pagination__jump .el-input__inner {
background: transparent !important;
color: #fff !important;
}
</style>
<style>
</style>

+ 0
- 84
src/views/quniao/soundWave/index copy.vue View File

@ -1,84 +0,0 @@
<template>
<div class="quniaoApp">
<iframe class="iframe" ref="iframe" :src="src" scrolling="yes"></iframe>
</div>
</template>
<script>
import { MessageBox } from "element-ui";
import {oneKeyReq} from '@/api/quniao/soundWave';
import { Message } from 'element-ui';
export default{
data(){
return{
src:'/static/quniaoShenBo.html'
}
},
methods:{
//iframe
postMessageFromIframe(message){
console.log(message.data)
if(message.data==1){
MessageBox.confirm("确认关闭?")
.then(() => {
oneKeyReq(message.data).then((res)=>{
console.log(res)
if(res.code==200){
this.handleIframeLoad(res,message.data)
Message({
message:'关闭成功',
type:'success'
})
}
})
})
.catch(() => {});
}else if(message.data==0){
MessageBox.confirm("确认开启?")
.then(() => {
oneKeyReq(message.data).then((res)=>{
console.log(res)
if(res.code==200){
this.handleIframeLoad(res,message.data)
Message({
message:'开启成功',
type:'success'
})
}
})
})
.catch(() => {});
}
},
//iframe
handleIframeLoad(data,type) {
let iframeWindow = this.$refs.iframe.contentWindow;
let result={
type,
data
}
iframeWindow.postMessage(result, '*');
},
},
mounted(){
//iframemessage
window.addEventListener('message', this.postMessageFromIframe);
},
beforeDestroy(){
//iframemessage
window.removeEventListener('message',this.postMessageFromIframe);
}
}
</script>
<style scoped>
.quniaoApp{
}
.iframe{
width: 100%;
height: 100%;
border: none;
}
</style>

+ 229
- 50
src/views/quniao/soundWave/index.vue View File

@ -294,7 +294,11 @@
</el-col>
<el-col :span="9">
<div class="cameraContent">
<div class="video_canvas video_canvas1 pitchColor">
<div
class="video_canvas video_canvas1"
:class="video_canvas_index == 0 ? 'pitchColor' : ''"
@click="video_canvasBtn(0)"
>
<img src="@/assets/images/img/title_bg.png" class="title_bg" />
<div
style="
@ -311,15 +315,15 @@
/>
<span class="video_canvas_text">驱鸟双目相机(可见光)</span>
</div>
<!-- <video
id="shipin1_video1"
autoplay
muted
src="../../../assets/1.mp4"
></video> -->
<!-- <FlvPlayer :src="videoPlayer1" id="shipin1_video1"/> -->
<div class="video_box">
<FlvPlayer :src="videoPlayer1" id="shipin1_video1" />
</div>
</div>
<div class="video_canvas video_canvas2">
<div
class="video_canvas video_canvas2"
:class="video_canvas_index == 1 ? 'pitchColor' : ''"
@click="video_canvasBtn(1)"
>
<img src="@/assets/images/img/title_bg.png" class="title_bg" />
<div
style="
@ -336,18 +340,27 @@
/>
<span class="video_canvas_text">驱鸟双目相机(红外)</span>
</div>
<video
id="shipin2_video1"
autoplay
muted
src="../../../assets/1.mp4"
></video>
<div class="video_box">
<FlvPlayer :src="videoPlayer2" id="shipin1_video2" />
</div>
</div>
</div>
</el-col>
<el-col :span="9">
<!-- @mousedown="resetZoom"
@contextmenu.prevent -->
<span
class="oneKeyButton closeDevice"
v-if="oneKeyButtonNum == 1"
@click="oneKeyBtn(true, 1)"
>
<span>一键关闭</span>
</span>
<span
class="oneKeyButton openDevice"
v-else
@click="oneKeyBtn(false, 0)"
>
<span>一键开启</span>
</span>
<div class="shiyituImage" @contextmenu.prevent="resetZoom">
<svg width="100%" height="100%" id="mySvg" ref="mySvg">
<image
@ -392,21 +405,26 @@
</el-col>
</el-row>
<el-dialog title="新增巡视任务" :visible.sync="dialogVisible">
<el-form :model="dialogForm" label-width="35%">
<el-form-item label="开始时间" class="custom-form">
<el-form
:model="dialogForm"
label-width="35%"
:rules="rules"
ref="ruleForm"
>
<el-form-item label="开始时间" class="custom-form" prop="startTime">
<el-time-picker
v-model="dialogForm.startTime"
@change="handleStartTimeChange"
value-format="HH:mm:ss"
/>
</el-form-item>
<el-form-item label="结束时间" class="custom-form">
<el-form-item label="结束时间" class="custom-form" prop="endTime">
<el-time-picker
v-model="dialogForm.endTime"
value-format="HH:mm:ss"
/>
</el-form-item>
<el-form-item label="巡视路线" class="custom-form">
<el-form-item label="巡视路线" class="custom-form" prop="patrolCode">
<el-select v-model="dialogForm.patrolCode" class="dialog-select">
<el-option
v-for="item in patrolData"
@ -441,10 +459,12 @@ import {
Preset,
visibleList,
videoLogin,
oneKeyReq,
} from "@/api/quniao/soundWave";
import { deviceListReq } from "@/api/quniao/deviceOption";
import panzoom from "panzoom";
import FlvPlayer from "../../../components/FlvPlayer/index";
import { setToken } from "@/utils/auth";
import $ from "jquery"; // jQuery
export default {
components: { FlvPlayer },
data() {
@ -454,7 +474,6 @@ export default {
tableData: [],
nvrIp: "",
channel: "",
cameraCode: "",
patrolData: [],
patrolPositionData: [],
routeItem: {},
@ -463,31 +482,46 @@ export default {
startTime: "",
endTime: "",
},
cameraCode: "04565579985929600107#f11741d796064c05a163d51ed8681070",
cameraCode: "",
positionData: [],
videoPlayer1: "",
videoPlayer2: "",
oneKeyButtonNum: false,
video_canvas_index: 0,
cameraListName: [],
rules: {
startTime: {
required: true,
message: "请选择开始时间",
trigger: "change",
},
endTime: {
required: true,
message: "请选择结束时间",
trigger: "change",
},
patrolCode: {
required: true,
message: "请选择巡视路线",
trigger: "change",
},
},
};
},
methods: {
//
initVideoPlayer1() {
visibleList().then((res) => {
console.log(res, "可见光视频");
});
},
//
initCameraList() {
cameraList().then((res) => {
console.log(res, 1111, "请求后台获取摄像头的通道号");
let cameraListName = res;
let result1 = cameraListName.filter((item) => {
this.cameraListName = res;
let result1 = this.cameraListName.filter((item) => {
return item.name == "驱鸟双目相机(可见光)";
});
console.log(result1, "result1");
this.channel = result1[0].channel;
this.cameraCode = result1[0].code;
// this.cameraPreform(channel);
this.initPositionList();
if (result1.length !== 0) {
this.channel = result1[0].channel;
this.cameraCode = result1[0].code;
this.initPositionList();
}
});
},
// nvrList
@ -699,15 +733,21 @@ export default {
},
//
dialogOkBtn() {
addPatrolTask(this.dialogForm).then((res) => {
if (res.code == 200) {
this.$message({
message: "新增成功",
type: "success",
this.$refs.ruleForm.validate((valid) => {
if (valid) {
addPatrolTask(this.dialogForm).then((res) => {
if (res.code == 200) {
this.$message({
message: "新增成功",
type: "success",
});
this.dialogVisible = false;
this.dialogForm = {};
this.initPatrolTaskList();
} else {
return false;
}
});
this.dialogVisible = false;
this.dialogForm = {};
this.initPatrolTaskList();
}
});
},
@ -743,13 +783,74 @@ export default {
},
//
initVideoLogin() {
var that = this;
let best_URL = process.env.VUE_APP_CAMERA_API;
videoLogin().then((res) => {
console.log(res, "获取视频登录");
// setToken
setToken(res.data.accessToken);
// this.initVideoPlayer1();
$.ajax({
url: `${best_URL}/api/push/getPlayUrl?app=1&stream=1&mediaServerId=zlmediakit-local`,
type: "GET",
contentType: "application/json",
headers: {
"access-token": `${res.data.accessToken}`,
},
success: function (res) {
that.videoPlayer1 = res.data.flv;
},
});
$.ajax({
url: `${best_URL}/api/push/getPlayUrl?app=2&stream=2&mediaServerId=zlmediakit-local`,
type: "GET",
contentType: "application/json",
headers: {
"access-token": `${res.data.accessToken}`,
},
success: function (res) {
that.videoPlayer2 = res.data.flv;
},
});
});
},
//
oneKeyBtn(Blob, num) {
oneKeyReq(num).then((res) => {
console.log(res, "控制声波设备");
if (res.code == 200) {
this.oneKeyButtonNum = !Blob;
this.$message({
message: res.msg,
type: "success",
});
}
});
},
//
initDeviceList() {
deviceListReq().then((res) => {
let data = res.rows;
let dataBole = data.every((item) => item.volume1Status == 0);
// console.log(dataBole,"")
this.oneKeyButtonNum = dataBole;
});
},
//
video_canvasBtn(num) {
this.video_canvas_index = num;
var name = "";
if (num == 0) {
name = "驱鸟双目相机(可见光)";
} else {
name = "驱鸟双目相机(红外)";
}
let result1 = this.cameraListName.filter((item) => {
return item.name == name;
});
console.log(result1, "result1",name);
if (result1.length !== 0) {
this.channel = result1[0].channel;
this.cameraCode = result1[0].code;
this.initPositionList();
}
},
},
mounted() {
this.$nextTick(() => {
@ -773,6 +874,7 @@ export default {
this.presetting_list_title(this.presetting_list_title_index);
this.initVideoLogin();
this.initDeviceList();
},
beforeDestroy() {},
};
@ -1092,7 +1194,7 @@ tbody tr td {
}
.cameraContent {
width: 100%;
height: calc(100vh - 120px);
height: calc(100vh - 125px);
display: flex;
flex-direction: column;
justify-content: space-between;
@ -1205,6 +1307,7 @@ video {
justify-content: center;
align-items: center;
font-size: 1vw;
cursor: pointer;
}
.quedin {
border: 1px solid rgb(64, 229, 240);
@ -1328,6 +1431,82 @@ video {
margin-bottom: 4px;
margin-right: 10px;
}
.oneKeyButton {
position: absolute;
right: 4%;
top: 2%;
width: 7%;
height: 5%;
font-size: 1vw;
cursor: pointer;
z-index: 99999;
}
.oneKeyButton > span {
display: flex;
width: 100%;
height: 100%;
justify-content: center;
align-items: center;
}
.openDevice {
border: 1px solid #43e7f2;
color: #43e7f2;
background: linear-gradient(
45deg,
rgb(67, 231, 242, 0.4),
rgb(67, 231, 242, 0.2),
rgb(0, 0, 0, 0),
rgb(0, 0, 0, 0),
rgb(0, 0, 0, 0),
rgb(67, 231, 242, 0.2),
rgb(67, 231, 242, 0.4)
),
linear-gradient(
135deg,
rgb(67, 231, 242, 0.4),
rgb(67, 231, 242, 0.2),
rgb(0, 0, 0, 0),
rgb(0, 0, 0, 0),
rgb(0, 0, 0, 0),
rgb(67, 231, 242, 0.2),
rgb(67, 231, 242, 0.4)
);
}
.closeDevice {
/* display: none; */
border: 1px solid #767c97;
color: #c6d3ec;
background: linear-gradient(
45deg,
rgb(118, 124, 151, 0.4),
rgb(118, 124, 151, 0.2),
rgb(0, 0, 0, 0),
rgb(0, 0, 0, 0),
rgb(0, 0, 0, 0),
rgb(118, 124, 151, 0.2),
rgb(118, 124, 151, 0.4)
),
linear-gradient(
135deg,
rgb(118, 124, 151, 0.4),
rgb(118, 124, 151, 0.2),
rgb(0, 0, 0, 0),
rgb(0, 0, 0, 0),
rgb(0, 0, 0, 0),
rgb(118, 124, 151, 0.2),
rgb(118, 124, 151, 0.4)
);
}
.video_box {
height: 100%;
}
#shipin1_video1,
#shipin1_video2 {
height: 90%;
}
</style>
<style>
.el-select-dropdown__item {


Loading…
Cancel
Save