<template>
|
<div>
|
<el-dialog
|
ref="myModelRef"
|
:visible.sync="dialogVisible"
|
:show-close="true"
|
width="700px"
|
class="el-dialog_jes"
|
>
|
<div class="d-flex">
|
<div
|
variant="link"
|
:class="['table-type-btns',tableType === 'catch'?'active':'']"
|
@click="tableType='catch'"
|
>大图</div>
|
<div class="flex-vertical-center px-3">
|
<span class="text-light">|</span>
|
</div>
|
<div
|
variant="link"
|
:class="['table-type-btns',tableType === 'alarm'?'active':'']"
|
@click="tableType='alarm'"
|
>视频</div>
|
</div>
|
<div class="d-flex">
|
<!-- 视频展示 -->
|
<!-- <div
|
v-if="tableType==='alarm'"
|
ref="vxgPlayer"
|
class="vxgplayer mb-2"
|
style="float:left;width:65%;width:550px;height:320px;"
|
:id="vxgPlayerId"
|
></div>-->
|
<div v-if="tableType==='alarm'" style="float:left;width:65%;width:550px;height:320px;">
|
<video
|
controls="controls"
|
autoplay="autoplay"
|
style="float:left;width:65%;width:550px;height:320px;"
|
>
|
<source :src="videoUrl" type="video/mp4">Your browser does not support the video tag.
|
</video>
|
</div>
|
<!-- 大图展示 -->
|
<div v-if="tableType==='catch'" style="float:left;width:320px;height:300px;">
|
<httpImg :src="BigPicUrl" v-img style="float:left;width:300px;height:300px;"></httpImg>
|
</div>
|
<div v-if="tableType==='catch'" class="d-flex" style="float:left;width:280px;height:300px;">
|
<div style="margin:0px 0px">
|
<div>
|
<div class="imgdiv">
|
<httpImg :src="parentData.picSmUrl" style="width:138px;height:138px;"></httpImg>
|
</div>
|
<div class="imgdiv">
|
<httpImg
|
v-if="parentData.personId!==''"
|
:src="parentData.personPicUrl"
|
style="width:138px;height:138px;"
|
></httpImg>
|
</div>
|
<div
|
v-if="parentData.likePer"
|
:class="parentData.personIsHub==='1'||parentData.personIsHub==='4'? 'percentage-red-comp' : 'percentage-green-comp'"
|
>{{parentData.likePer}}%</div>
|
</div>
|
<!-- 没有对比图片 -->
|
<div v-if="parentData.personId===''" style="margin:140px -20px">
|
<ul>
|
<li>
|
<div
|
@click="searchPerson(parentData)"
|
class="fas fa-user-circle myion"
|
title="查找此人"
|
></div>
|
<div @click="orbit(parentData)" class="ion ion-logo-polymer myion" title="查看轨迹"></div>
|
<div
|
@click="control(parentData)"
|
class="d-block fas fa-shield-alt pb5 myion"
|
title="加入布控"
|
></div>
|
</li>
|
<li
|
:class="parentData.personIsHub==='1'||parentData.personIsHub==='4'? 'red1' : 'green1' "
|
>
|
<b>底库:{{parentData.BaseName}}</b>
|
</li>
|
<li>姓名:{{parentData.picName}} 性别:{{parentData.Gender}}</li>
|
<li class="omit" :title="parentData.personId">身份证号:{{parentData.personId}}</li>
|
<li class="omit" :title="parentData.personId">电话:{{parentData.personId}}</li>
|
<li class="omit" :title="parentData.personId">组织机构:{{parentData.personId}}</li>
|
</ul>
|
</div>
|
<!-- 有对比图片 -->
|
<div v-if="parentData.personId!==''" style="margin:0px -11px">
|
<ul>
|
<li>
|
<div
|
@click="searchPerson(parentData)"
|
class="fas fa-user-circle myion"
|
title="查找此人"
|
></div>
|
<div @click="orbit(parentData)" class="ion ion-logo-polymer myion" title="查看轨迹"></div>
|
<div
|
@click="control(parentData)"
|
class="d-block fas fa-shield-alt pb5 myion"
|
title="加入布控"
|
></div>
|
</li>
|
<li
|
:class="parentData.personIsHub==='1'||parentData.personIsHub==='4'? 'red1' : 'green1' "
|
>
|
<b>底库:{{parentData.BaseName}}</b>
|
</li>
|
<li>姓名:{{parentData.picName}} 性别:{{parentData.Gender}}</li>
|
<li class="omit" :title="parentData.personId">身份证号:{{parentData.personId}}</li>
|
<li class="omit" :title="parentData.personId">电话:{{parentData.personId}}</li>
|
<li class="omit" :title="parentData.personId">组织机构:{{parentData.personId}}</li>
|
</ul>
|
</div>
|
<!-- 完 -->
|
</div>
|
</div>
|
</div>
|
<div>
|
<div variant="link" class="table-type-btns">随行人员</div>
|
<div>
|
<silider
|
ref="siliderForBijiao"
|
:params="accompanyPersonParam"
|
score="0"
|
slideWidth="210px"
|
imgwidth="100"
|
imgheight="100"
|
></silider>
|
</div>
|
</div>
|
</el-dialog>
|
</div>
|
</template>
|
<script>
|
import { Row, Col, Dialog, Button } from 'element-ui'
|
import speciaButton from '@/components/specialButton/speciaButton.vue'
|
import { getDeviceById, getDeviceType, getStatus } from '@/server/home.js'
|
import {
|
getBigPic,
|
accompanyPerson,
|
getVideoByCServer,
|
addFromRetrieve
|
} from '../../../../server/searchList/commomList.js'
|
import silider from '../silider/comparesilider'
|
import { mapActions } from 'vuex'
|
export default {
|
components: {
|
elRow: Row,
|
elCol: Col,
|
elButton: Button,
|
elDialog: Dialog,
|
speciaButton,
|
silider,
|
getBigPic,
|
accompanyPerson,
|
getVideoByCServer,
|
mapActions,
|
addFromRetrieve
|
},
|
props: {
|
parentData: {
|
default: () => {},
|
type: Object
|
},
|
BigPicParam: {
|
default: () => {},
|
type: Object
|
},
|
accompanyPersonParam: {
|
default: () => {},
|
type: Object
|
}
|
},
|
watch: {},
|
data() {
|
return {
|
BigPicUrl: '',
|
dialogVisible: false,
|
vxgPlayerId: 'vxgPlayerId',
|
videoUrl: '',
|
/** 设备信息 */
|
deviceInfo: {},
|
/** tab标签对象 */
|
tableType: 'catch'
|
}
|
},
|
methods: {
|
...mapActions(['openNewWindowtab']),
|
// 查找此人
|
searchPerson(obj) {
|
this.openNewWindowtab({
|
urlStr: window.document.location.href.substring(
|
0,
|
window.document.location.href.indexOf('#') + 2
|
),
|
query:
|
'tabType=table&tableType=mapList&urlPath=' +
|
obj.picSmUrl +
|
'&liker=' +
|
localStorage.getItem('threshold')
|
})
|
},
|
// 加入布控
|
control(obj) {
|
let json = {
|
dbInfos: [
|
{
|
cluId: obj.cluster_id,
|
devId: obj.indeviceid
|
}
|
],
|
imgUrl: obj.picSmUrl,
|
featureBase64: obj.FaceFeature,
|
idCard: obj.cardId ? obj.cardId : ''
|
}
|
let res = addFromRetrieve(json)
|
if (res && res.success) {
|
this.$toast({
|
type: 'primary',
|
message: '已加入待布控表',
|
toastHorizontalPosition: 'right'
|
})
|
} else {
|
this.$toast({
|
type: 'error',
|
message: '加入待布控表失败',
|
toastHorizontalPosition: 'right'
|
})
|
}
|
},
|
// 查看轨迹
|
orbit(obj) {
|
let jsonstr = localStorage.getItem('sear')
|
let json = JSON.parse(jsonstr)
|
json.path = obj.picSmUrl
|
localStorage.removeItem('esList') // 清除esList
|
localStorage.setItem('searParams', JSON.stringify(json))
|
localStorage.setItem('personId', obj.personId)
|
this.openNewWindowtab({
|
urlStr: window.document.location.href.substring(
|
0,
|
window.document.location.href.indexOf('#') + 2
|
),
|
query: 'tabType=map'
|
})
|
},
|
// 得到大图
|
async getBigImg(BigPicjson) {
|
this.BigPicUrl = ''
|
let res = await getBigPic(BigPicjson)
|
console.log(res, '得到大图')
|
let res2 = await getVideoByCServer(BigPicjson)
|
this.videoUrl = res2.data.filepath
|
if (res && res.success) {
|
this.BigPicUrl = res.data.img_url
|
console.log(this.BigPicUrl, '大图路径')
|
}
|
},
|
/** 显示model框 */
|
/* eslint-disable */
|
// 使弹框显示并,取得大图数据
|
async showModel(BigPicjson) {
|
this.dialogVisible = true
|
this.tableType = 'catch'
|
this.getBigImg(BigPicjson)
|
},
|
// 播放视频
|
async video() {
|
let json = {
|
id: marker.data.id
|
}
|
let res = await getDeviceById(json)
|
if (res && res.success) {
|
this.deviceInfo = res.data
|
let typeArr = await getDeviceType()
|
let statusArr = await getStatus()
|
if (typeArr && typeArr.success && typeArr.data.length !== 0) {
|
typeArr.data.forEach(item => {
|
if (item.value === this.deviceInfo.type) {
|
this.$set(this.deviceInfo, 'typeName', item.name)
|
}
|
})
|
}
|
if (statusArr && statusArr.success && statusArr.data.length !== 0) {
|
statusArr.data.forEach(item => {
|
if (parseInt(item.value) === this.deviceInfo.status) {
|
this.$set(this.deviceInfo, 'statusName', item.name)
|
}
|
})
|
}
|
// this.videoUrl = marker.data.url
|
// console.log(this.videoUrl,'model 框中流')
|
// this.videoUrl ='rtsp://admin:a1234567@192.168.1.64:554/h264/ch1/main/av_stream'
|
// this.vxgPlayerId = this.vxgPlayerId + new Date().getTime() + ''
|
// this.$nextTick(() => {
|
// this.vxgplayerInit({
|
// id: this.vxgPlayerId,
|
// url: this.videoUrl,
|
// autostart: false
|
// })
|
// })
|
} else {
|
this.$toast({
|
type: 'error',
|
message: '查询设备信息失败!'
|
})
|
}
|
},
|
vxgplayerInit(optJson) {
|
const {
|
id = 'vxgplayer',
|
url = '',
|
nmf_path = 'media_player.nmf',
|
nmf_src = '/static/vxgplayer-1.8.31/pnacl/Release/media_player.nmf',
|
latency = '10000',
|
width = '960px',
|
height = '200px',
|
aspect_ratio_mode = 1,
|
autohide = 3,
|
controls = true,
|
connection_timeout = 5000,
|
connection_udp = 0,
|
custom_digital_zoom = false,
|
autostart = false
|
} = optJson
|
vxgplayer(id, {
|
...optJson,
|
url: url,
|
nmf_path,
|
nmf_src,
|
latency,
|
width,
|
height,
|
aspect_ratio_mode,
|
autohide,
|
controls,
|
connection_timeout,
|
connection_udp,
|
custom_digital_zoom
|
}).ready(function(data) {
|
vxgplayer(id).src(url)
|
vxgplayer(id).play()
|
// //console.log('fn&&fn',vxgplayer(id).isPlaying())
|
/* 播放钩子函数 */
|
vxgplayer(id).onStateChange(function(state) {
|
switch (state) {
|
case 0:
|
// PLAYER_STOPPED
|
break
|
case 1:
|
// PLAYER_CONNECTING
|
break
|
case 2:
|
// PLAYER_PLAYING 成功播放
|
break
|
case 3:
|
// PLAYER_STOPPING
|
break
|
default:
|
// no ready
|
}
|
//console.log('state', state)
|
})
|
vxgplayer(id).onError(function(player) {
|
//console.log(player.error(), '播放错误')
|
})
|
})
|
}
|
},
|
mounted() {}
|
}
|
</script>
|
<style lang="scss">
|
.table-type-btns {
|
font-size: 14px;
|
padding: 10px 0px;
|
font-weight: 400;
|
color: #868686;
|
transition: all 0.5s;
|
cursor: pointer;
|
&:after {
|
content: '';
|
display: block;
|
background: transparent;
|
width: 0%;
|
height: 2px;
|
transition: all 0.5s;
|
}
|
&.active {
|
color: #35bde7;
|
&:after {
|
background: #35bde7;
|
width: 100%;
|
}
|
}
|
}
|
.el-dialog .el-dialog__body {
|
padding: 0px 20px 20px;
|
padding-top: 0px !important;
|
padding-right: 20px;
|
padding-bottom: 20px;
|
padding-left: 20px;
|
color: #606266;
|
font-size: 14px;
|
}
|
.zuhe {
|
float: left;
|
width: 50%;
|
border: 2px solid #76bef7;
|
overflow: hidden;
|
}
|
.imgdiv {
|
float: left;
|
width: 50%;
|
}
|
.img43 {
|
width: 160px;
|
height: 160px;
|
max-width: 100%;
|
max-height: 100%;
|
}
|
.percentage-red-comp {
|
text-align: center;
|
background: url('/static/img/search/red.png');
|
height: 20px;
|
float: left;
|
width: 75px;
|
color: white;
|
margin: -20px 105px !important;
|
}
|
.percentage-green-comp {
|
text-align: center;
|
background: url('/static/img/search/green.png');
|
height: 20px;
|
float: left;
|
width: 75px;
|
color: white;
|
margin: -20px 105px !important;
|
}
|
.omit {
|
width: 70%;
|
overflow: hidden;
|
text-overflow: ellipsis;
|
white-space: nowrap;
|
}
|
ul {
|
list-style-type: none;
|
line-height: 1.8em;
|
}
|
.myion {
|
width: 30px;
|
height: 30px;
|
}
|
.green1 {
|
color: green;
|
}
|
.red1 {
|
color: red;
|
}
|
.xiangqing {
|
width: 100%;
|
text-align: center;
|
}
|
video {
|
width: 100%;
|
height: auto;
|
}
|
</style>
|