Browse Source

生产点位

dev
wangxingyuan 8 months ago
parent
commit
041ab0cd97
5 changed files with 701 additions and 152 deletions
  1. +58
    -1
      src/api/point/site_management.js
  2. BIN
      src/assets/video/1.mp4
  3. +1
    -1
      src/components/videoPlayer/index.vue
  4. +455
    -0
      src/views/point/components/site_VideoDialog.vue
  5. +187
    -150
      src/views/point/site_management.vue

+ 58
- 1
src/api/point/site_management.js View File

@ -77,4 +77,61 @@ export function algList(id) {
method: 'get',
// data:query
})
}
}
export function vl(){
return request({
url: `/patrol/preset/camera/vl`,
method: 'get',
// data:query
})
}
// 获取摄像头列表
export function listByEqIdAndChannelId(data){
return request({
url: `/patrol/preset/listByEqIdAndChannelId`,
method: 'get',
params:data
})
}
// 点击摄像头列表
export function realtime(data){
return request({
url: `/patrol/video/realtime`,
method: 'get',
params:data
})
}
// 云台控制
export function PZT(data){
return request({
url: `/patrol/videotape/ptz`,
method: 'get',
params:data
})
}
// 云台控制fi
export function fi(data){
return request({
url: `/patrol/videotape/ptz/fi`,
method: 'get',
params:data
})
}
// 编辑预置点名称
export function goto(data){
return request({
url: `/patrol/preset/goto`,
method: 'get',
params:data
})
}
// 预置点下发
export function presetDotDistribute (params) {
return request({
url: '/patrol/preset/issue',
method: 'get',
params: params
})
}

BIN
src/assets/video/1.mp4 View File


+ 1
- 1
src/components/videoPlayer/index.vue View File

@ -43,7 +43,7 @@ export default {
sources: [
{
type: "video/mp4",
src: "",
src: require("../../assets/video/1.mp4"),
},
],
poster: "", //


+ 455
- 0
src/views/point/components/site_VideoDialog.vue View File

@ -0,0 +1,455 @@
<template>
<el-dialog
:title="pointDialogDataName"
:visible.sync="pointDialogShow"
width="70%"
:before-close="bindingMonitorPointClose"
>
<el-row :gutter="20">
<el-col :span="5">
<div class="bindingMonitorPointTree">
<el-tree
:data="dialogPointTree"
:props="defaultPropsMonitor"
@node-click="handleMonitor"
></el-tree>
</div>
</el-col>
<el-col :span="13">
<div class="bindingMonitorPointDiv">
<videoPlayer />
</div>
</el-col>
<el-col :span="6">
<div style="background: #eee; padding: 5px">
{{ $t("site_management.PTZ") }}
</div>
<div class="PTZ-content">
<img src="@/assets/images/PTZImg.png" alt="" class="PTZImg" />
<div class="r-ti2-pos">
<div @click="ptzBtn('UP', 'UP_STOP')"></div>
<div @click="ptzBtn('UP_RIGHT', 'UP_RIGHT_STOP')"></div>
<div @click="ptzBtn('RIGHT', 'RIGHT_STOP')"></div>
<div @click="ptzBtn('DOWN_RIGHT', 'DOWN_RIGHT_STOP')"></div>
<div @click="ptzBtn('DOWN', 'DOWN_STOP')"></div>
<div @click="ptzBtn('DOWN_LEFT', 'DOWN_LEFT_STOP')"></div>
<div @click="ptzBtn('LEFT', 'LEFT_STOP')"></div>
<div @click="ptzBtn('UP_LEFT', 'UP_LEFT_STOP')"></div>
</div>
</div>
<div class="r-ti3">
<div class="r-ti3-d1">
<img src="@/assets/images/searchImg.png" alt="" />
<div class="r-ti3-d2">
<div @click="ptzBtn('ZOOM_OUT', 'ZOOM_OUT_STOP')"></div>
<div @click="ptzBtn('ZOOM_IN', 'ZOOM_IN_STOP')"></div>
</div>
</div>
<div class="r-ti3-d1">
<img src="@/assets/images/r2Img.png" alt="" />
<div class="r-ti3-d2">
<div @click="fiBtn('nearfocus', 'nearfocusstop')"></div>
<div @click="fiBtn('farfocus', 'farfocusstop')"></div>
</div>
</div>
<div class="r-ti3-d1">
<img src="@/assets/images/r3Img.png" alt="" />
<div class="r-ti3-d2">
<div @click="fiBtn('apertureoff', 'apertureoffstop')"></div>
<div @click="fiBtn('apertureon', 'apertureonstop')"></div>
</div>
</div>
</div>
<div class="r-ti4">
<div style="display: flex">
<el-select
v-model="presetDotNum"
:placeholder="$t('site_management.PleaseSelectAPresetPoint')"
@change="presetDotBtn"
>
<el-option
:label="item.dictLabel"
:value="item.dictValue"
v-for="item in listByEqIdAndChanneData"
:key="item.dictValue"
>
</el-option>
</el-select>
<img
src="@/assets/images/playImg.png"
@click="editPresetDot1"
title="编辑预置点名称"
/>
<img src="@/assets/images/addImg.png" alt="" />
<el-popover
placement="top"
width="300"
v-model="popovervisible"
trigger="click"
>
<el-input placeholder="请输入内容" v-model="newpresetName"/>
<div class="popover-footer">
<el-button size="mini" type="primary" @click="popovervisibleShow">取消</el-button>
<el-button size="mini" type="primary" @click="setPresetDot1">确定</el-button>
</div>
</el-popover>
</div>
<div style="display: flex; margin-top: 20px">
<el-input
v-model="presetName"
:placeholder="$t('site_management.PleaseEnterTheContent')"
></el-input>
<img
src="@/assets/images/setImg.png"
alt=""
title="编辑预置点名称"
/>
</div>
</div>
</el-col>
</el-row>
<el-table
:data="bindingMonitorPointTableData"
style="width: 100%"
@header-click="clickFun"
>
<el-table-column
prop="date"
:label="$t('site_management.ActionType')"
align="center"
>
</el-table-column>
<el-table-column
prop="name"
:label="$t('site_management.RecordingDuration')"
align="center"
>
</el-table-column>
<el-table-column
prop="address"
:label="$t('site_management.NumberOfPhotosTaken')"
align="center"
>
</el-table-column>
<el-table-column
prop="address"
:label="$t('site_management.PhotoInterval')"
align="center"
>
</el-table-column>
<el-table-column
align="center"
:render-header="(h, obj) => renderHeader(h, obj, $t('share.addTo'))"
>
<template slot-scope="scope">
<span>{{ $t("share.delete") }}</span>
</template>
</el-table-column>
</el-table>
</el-dialog>
</template>
<script>
import videoPlayer from "@/components/videoPlayer/index.vue";
import {
vl,
listByEqIdAndChannelId,
realtime,
PZT,
fi,
goto,
presetDotDistribute
} from "@/api/point/site_management";
export default {
components: { videoPlayer },
props: ["pointDialogDataName", "pointDialogShow"],
data() {
return {
bindingMonitorPointTitle: "绑定可见光检测点",
bindingMonitorPointDialogVisible: true,
dialogPointTree: [],
defaultPropsMonitor: {
children: "children",
label: "name",
},
listByEqIdAndChanneData: [],
bindingMonitorPointTableData: [],
presetDotNum: "",
PZTData: {},
presetName: "",
popovervisible: true,
newpresetName:''
};
},
methods: {
bindingMonitorPointClose() {
this.bindingMonitorPointDialogVisible = false;
},
//
handleMonitor(e) {
if (e.eqpbookId) {
this.PZTData = e;
listByEqIdAndChannelId({
channelCode: e.channelCode,
patroldeviceCode: e.patroldeviceCode,
}).then((res) => {
if (res.code == 200) {
this.listByEqIdAndChanneData = res.data;
}
});
realtime({
patroldeviceCode: e.patroldeviceCode,
channelCode: e.channelCode,
}).then((res) => {
if (res.code == 200) {
// this.bindingMonitorPointTableData=res.data;
console.log(res, 1111);
}
});
}
},
renderHeader(h, { column, $index }, type) {
let that = this;
return h("div", [
//
h("span", column.label),
//
h(
"el-button",
{
props: {
type: "text",
size: "small",
},
style: "margin-left: 5px;",
on: {
click: function () {
that.clickButton(type);
},
},
},
this.$t("share.addTo")
),
]);
},
clickButton(type) {
console.log("我点击了" + type + "的列");
},
clickFun() {},
init() {
vl().then((res) => {
if (res.code == 200) {
this.dialogPointTree = res.data;
}
});
},
ptzBtn(start, stop) {
let startData = {
speed: 5,
patroldeviceCode: this.PZTData.patroldeviceCode,
channelCode: this.PZTData.channelCode,
ptzControlType: start,
};
let stopData = {
speed: 5,
patroldeviceCode: this.PZTData.patroldeviceCode,
channelCode: this.PZTData.channelCode,
ptzControlType: stop,
};
if (startData.patroldeviceCode && startData.channelCode) {
PZT(startData).then((res) => {
if (res.code) {
console.log(res, "start");
}
});
PZT(stopData).then((res) => {
if (res.code) {
console.log(res, "stop");
}
});
}
},
fiBtn(start, stop) {
let startData = {
speed: 5,
patroldeviceCode: this.PZTData.patroldeviceCode,
channelCode: this.PZTData.channelCode,
ptzControlType: start,
};
let stopData = {
speed: 5,
patroldeviceCode: this.PZTData.patroldeviceCode,
channelCode: this.PZTData.channelCode,
ptzControlType: stop,
};
if (startData.patroldeviceCode && startData.channelCode) {
fi(startData).then((res) => {
if (res.code) {
console.log(res, "start");
}
});
fi(stopData).then((res) => {
if (res.code) {
console.log(res, "stop");
}
});
}
},
presetDotBtn(value) {
this.listByEqIdAndChanneData.forEach((item) => {
if (item.dictValue == this.presetDotNum) {
this.presetName = item.dictLabel;
}
});
},
//
editPresetDot1() {
let data = {
patroldeviceCode: this.PZTData.patroldeviceCode,
channelCode: this.PZTData.channelCode,
presetDotNum: this.presetDotNum,
name: this.presetName,
};
goto(data).then((res) => {
if (res.code == 200) {
this.$message({
message: res.msg,
type: "success",
});
} else {
this.$message.error(res.msg);
}
});
},
popovervisibleShow(){
this.popovervisible=false;
this.newpresetName="";
},
setPresetDot1(){
}
},
mounted() {
this.init();
},
};
</script>
<style lang="scss" scoped>
.bindingMonitorPointTree {
width: 100%;
height: 37vh;
overflow-y: scroll;
}
.bindingMonitorPointDiv {
width: 100%;
height: 40vh;
// background: red;
}
.PTZ-content {
width: 170px;
margin: 10px auto;
position: relative;
img {
width: 100%;
}
}
.r-ti2-pos {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
div {
position: absolute;
z-index: 999;
width: 20px;
height: 15px;
cursor: pointer;
}
div:first-child {
top: 32px;
left: 75px;
}
div:nth-child(2) {
top: 50px;
left: 102px;
}
div:nth-child(3) {
top: 77px;
right: 30px;
}
div:nth-child(4) {
bottom: 56px;
left: 102px;
}
div:nth-child(5) {
bottom: 36px;
left: 75px;
}
div:nth-child(6) {
bottom: 56px;
right: 100px;
}
div:nth-child(7) {
bottom: 80px;
left: 30px;
}
div:nth-child(8) {
top: 50px;
right: 102px;
}
}
.r-ti3 {
width: 100%;
display: flex;
padding-top: 10px;
-webkit-box-pack: justify;
justify-content: space-between;
}
.r-ti3-d1 {
width: 76px;
position: relative;
img {
width: 100%;
}
.r-ti3-d2 {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
div:first-child {
width: 50%;
height: 100%;
position: absolute;
top: 0;
left: 0;
cursor: pointer;
}
div:nth-child(2) {
width: 50%;
height: 100%;
position: absolute;
top: 0;
right: 0;
cursor: pointer;
}
}
}
.r-ti4 {
padding-top: 20px;
img {
width: 24px;
height: 24px;
position: relative;
top: 6px;
cursor: pointer;
}
}
.popover-footer{
width: 100%;
margin-top: 20px;
display: flex;
justify-content: flex-end;
}
</style>

+ 187
- 150
src/views/point/site_management.vue View File

@ -433,9 +433,9 @@
}}</el-button>
</span>
</el-dialog>
<siteVideoDialog :pointDialogDataName="pointDialogDataName" :pointDialogShow="pointDialogShow"/>
<!-- 绑定可见光监测点 -->
<el-dialog
<!-- <el-dialog
:title="bindingMonitorPointTitle"
:visible.sync="bindingMonitorPointDialogVisible"
width="70%"
@ -444,7 +444,7 @@
<el-row :gutter="20">
<el-col :span="5">
<div class="bindingMonitorPointTree">
<el-tree :data="treeData" :props="defaultProps"></el-tree>
<el-tree :data="dialogPointTree" :props="defaultPropsMonitor" @node-click="handleMonitor"></el-tree>
</div>
</el-col>
<el-col :span="13">
@ -498,7 +498,7 @@
v-model="value"
:placeholder="$t('site_management.PleaseSelectAPresetPoint')"
>
<el-option label="item.label" value="item.value"> </el-option>
<el-option :label="item.dictLabel" :value="item.dictValue" v-for=" item in listByEqIdAndChanneData" :key="item.dictValue"> </el-option>
</el-select>
<img src="@/assets/images/playImg.png" alt="" />
<img src="@/assets/images/addImg.png" alt="" />
@ -550,8 +550,7 @@
</template>
</el-table-column>
</el-table>
</el-dialog>
</el-dialog> -->
<!-- 绑定巡检设备 -->
<el-dialog
:title="$t('site_management.SelectInspectionEquipment')"
@ -845,12 +844,15 @@ import {
edit,
editItem,
postRemove,
// vl,
// listByEqIdAndChannelId
} from "@/api/point/site_management";
import siteVideoDialog from "./components/site_VideoDialog.vue";
export default {
name: "SiteManagement",
components: {
videoPlayer,
siteVideoDialog
},
data() {
return {
@ -975,6 +977,14 @@ export default {
TreeItem: {},
type: 0,
RightBtnShow: true,
// dialogPointTree:[],
// defaultPropsMonitor: {
// children: "children",
// label: "name",
// },
// listByEqIdAndChanneData: [],
pointDialogDataName:{},
pointDialogShow:false,
};
},
mounted() {
@ -1070,46 +1080,60 @@ export default {
this.bindingMonitorPointDialogVisible = false;
},
bindingMonitorBtn(type) {
if (type == 0) {
this.bindingMonitorPointTitle = this.$t(
//
// this.bindingMonitorPointTitle = this.$t(
// "site_management.BindVisibleLightMonitoringPoints"
// );
// vl().then(res=>{
// if(res.code==200){
// this.dialogPointTree=res.data;
// }
// })
this.pointDialogDataName = this.$t(
"site_management.BindVisibleLightMonitoringPoints"
);
} else {
this.bindingMonitorPointTitle = this.$t(
// this.bindingMonitorPointTitle = this.$t(
// "site_management.BindThermalImagingMonitoringPoints"
// );
this.pointDialogDataName = this.$t(
"site_management.BindThermalImagingMonitoringPoints"
);
}
this.bindingMonitorPointDialogVisible = true;
},
clickFun() {},
renderHeader(h, { column, $index }, type) {
let that = this;
return h("div", [
//
h("span", column.label),
//
h(
"el-button",
{
props: {
type: "text",
size: "small",
},
style: "margin-left: 5px;",
on: {
click: function () {
that.clickButton(type);
},
},
},
this.$t("share.addTo")
),
]);
},
clickButton(type) {
console.log("我点击了" + type + "的列");
this.pointDialogShow=true;
// this.bindingMonitorPointDialogVisible = true;
},
// clickFun() {},
// renderHeader(h, { column, $index }, type) {
// let that = this;
// return h("div", [
// //
// h("span", column.label),
// //
// h(
// "el-button",
// {
// props: {
// type: "text",
// size: "small",
// },
// style: "margin-left: 5px;",
// on: {
// click: function () {
// that.clickButton(type);
// },
// },
// },
// this.$t("share.addTo")
// ),
// ]);
// },
// clickButton(type) {
// console.log("" + type + "");
// },
InspectionHandleClose() {
this.InspectionDialogVisible = false;
},
@ -1191,6 +1215,19 @@ export default {
}
});
},
//
handleMonitor(e){
if (e.eqpbookId) {
// console.log(e,'')
listByEqIdAndChannelId({channelCode:e.channelCode,patroldeviceCode:e.patroldeviceCode}).then(res=>{
console.log(e,'摄像头列表')
if(res.code==200){
this.listByEqIdAndChanneData=res.data;
}
})
}
}
},
};
</script>
@ -1228,117 +1265,117 @@ export default {
.tabsBtn {
text-align: center;
}
.bindingMonitorPointTree {
width: 100%;
height: 37vh;
overflow-y: scroll;
}
.bindingMonitorPointDiv {
width: 100%;
height: 40vh;
// background: red;
}
.PTZ-content {
width: 170px;
margin: 10px auto;
position: relative;
img {
width: 100%;
}
}
.r-ti2-pos {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
div {
position: absolute;
z-index: 999;
width: 20px;
height: 15px;
cursor: pointer;
}
div:first-child {
top: 32px;
left: 75px;
}
div:nth-child(2) {
top: 50px;
left: 102px;
}
div:nth-child(3) {
top: 77px;
right: 30px;
}
div:nth-child(4) {
bottom: 56px;
left: 102px;
}
div:nth-child(5) {
bottom: 36px;
left: 75px;
}
div:nth-child(6) {
bottom: 56px;
right: 100px;
}
div:nth-child(7) {
bottom: 80px;
left: 30px;
}
div:nth-child(8) {
top: 50px;
right: 102px;
}
}
.r-ti3 {
width: 100%;
display: flex;
padding-top: 10px;
-webkit-box-pack: justify;
justify-content: space-between;
}
.r-ti3-d1 {
width: 76px;
position: relative;
img {
width: 100%;
}
.r-ti3-d2 {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
div:first-child {
width: 50%;
height: 100%;
position: absolute;
top: 0;
left: 0;
cursor: pointer;
}
div:nth-child(2) {
width: 50%;
height: 100%;
position: absolute;
top: 0;
right: 0;
cursor: pointer;
}
}
}
.r-ti4 {
padding-top: 20px;
img {
width: 24px;
height: 24px;
position: relative;
top: 6px;
cursor: pointer;
}
}
// .bindingMonitorPointTree {
// width: 100%;
// height: 37vh;
// overflow-y: scroll;
// }
// .bindingMonitorPointDiv {
// width: 100%;
// height: 40vh;
// // background: red;
// }
// .PTZ-content {
// width: 170px;
// margin: 10px auto;
// position: relative;
// img {
// width: 100%;
// }
// }
// .r-ti2-pos {
// position: absolute;
// top: 0;
// left: 0;
// width: 100%;
// height: 100%;
// div {
// position: absolute;
// z-index: 999;
// width: 20px;
// height: 15px;
// cursor: pointer;
// }
// div:first-child {
// top: 32px;
// left: 75px;
// }
// div:nth-child(2) {
// top: 50px;
// left: 102px;
// }
// div:nth-child(3) {
// top: 77px;
// right: 30px;
// }
// div:nth-child(4) {
// bottom: 56px;
// left: 102px;
// }
// div:nth-child(5) {
// bottom: 36px;
// left: 75px;
// }
// div:nth-child(6) {
// bottom: 56px;
// right: 100px;
// }
// div:nth-child(7) {
// bottom: 80px;
// left: 30px;
// }
// div:nth-child(8) {
// top: 50px;
// right: 102px;
// }
// }
// .r-ti3 {
// width: 100%;
// display: flex;
// padding-top: 10px;
// -webkit-box-pack: justify;
// justify-content: space-between;
// }
// .r-ti3-d1 {
// width: 76px;
// position: relative;
// img {
// width: 100%;
// }
// .r-ti3-d2 {
// position: absolute;
// top: 0;
// left: 0;
// width: 100%;
// height: 100%;
// div:first-child {
// width: 50%;
// height: 100%;
// position: absolute;
// top: 0;
// left: 0;
// cursor: pointer;
// }
// div:nth-child(2) {
// width: 50%;
// height: 100%;
// position: absolute;
// top: 0;
// right: 0;
// cursor: pointer;
// }
// }
// }
// .r-ti4 {
// padding-top: 20px;
// img {
// width: 24px;
// height: 24px;
// position: relative;
// top: 6px;
// cursor: pointer;
// }
// }
.intelligenceType {
cursor: pointer;
color: #409eff;


Loading…
Cancel
Save