<template>
|
<!-- 巡查记录的详情 -->
|
<div class="reacrd-modal">
|
<a-modal centered :footer="null" width="60%" v-model="visibleShow" title="详情" @cancel="cancelClick">
|
<a-spin :spinning="spinning" tip="文件下载中请稍等..." class="spin-content">
|
<div class="header-card">
|
<div>
|
<div>
|
<span class="text-title">巡查时间 : </span> {{ infoObj.startTime }}
|
<span class="text-title"> 至 </span>
|
{{ infoObj.endTime }}
|
</div>
|
<div v-show="infoObj.auditResult == 2">
|
<span class="text-title">处理人 : </span>{{ infoObj.auditUser }}
|
</div>
|
</div>
|
<div>
|
<div><span class="text-title">巡查时长 : </span> {{ ChangeHourMinutestr(infoObj.spandTime) }}</div>
|
<div v-show="infoObj.auditResult == 2">
|
<span class="text-title">处理时间 : </span> {{ infoObj.auditTime }}
|
</div>
|
</div>
|
<div>
|
<div><span class="text-title">AI分析情况 : </span> {{ infoObj.aiNum }}</div>
|
<div v-show="infoObj.auditResult == 2">
|
<span class="text-title">人工认定完成 : </span> {{ infoObj.auditNum }}
|
</div>
|
</div>
|
<div>
|
<a-button type="primary" size="small" icon="download" @click="recExportXls()">导出</a-button>
|
<div v-show="infoObj.auditResult == 2">
|
<span class="text-title">认定得分 : </span> {{ infoObj.score }}分
|
</div>
|
</div>
|
</div>
|
<div style="display: flex">
|
<div v-for="(item, index) in dialogInfo.outGroup" :key="item.id" style="margin-bottom: 20px">
|
<div style="display: flex; align-items: center; justify-content: space-between">
|
<div class="img-list-title">{{ item.algorithmName }}</div>
|
<a-radio-group v-model="item.auditResult" :disabled="infoObj.auditResult != 0">
|
<a-radio :value="1"> 合格 </a-radio>
|
<a-radio :value="2"> 不合格 </a-radio>
|
</a-radio-group>
|
</div>
|
<div class="foot-list">
|
<div class="img-list">
|
<div v-if="item.imgPath" class="img-box">
|
<img :src="item.imgPath" alt="" />
|
<div v-if="item.auditResult == 1" class="words">{{ item.cameraName }}</div>
|
<div v-else class="words words-red">{{ item.cameraName }}</div>
|
<div class="img-mask">
|
<div class="img-handle-ct">
|
<div @click="checkImg(item.imgPath)">图片</div>
|
<div @click="checkVideo(item.videoPath)">视频</div>
|
</div>
|
</div>
|
<!-- <div class="img-handle"></div> -->
|
<!-- <div class="bottom-text">{{ item.eventTime }}</div> -->
|
</div>
|
<div v-else class="img-box">
|
<img src="@/assets/img/nopic.png" alt="" />
|
<div v-if="item.auditResult == 1" class="words">{{ item.cameraName }}</div>
|
<div v-else class="words words-red">{{ item.cameraName }}</div>
|
</div>
|
</div>
|
<div>上报时间:{{ item.eventTime ? item.eventTime : '---' }}</div>
|
</div>
|
</div>
|
</div>
|
<div style="display: flex">
|
<div v-for="(item, index) in dialogInfo.inGroup" :key="item.id">
|
<div style="display: flex; align-items: center; justify-content: space-between">
|
<div v-show="index == 0" class="img-list-title">{{ item.algorithmName }}</div>
|
<a-radio-group v-model="item.auditResult" :disabled="infoObj.auditResult != 0">
|
<a-radio :value="1"> 合格 </a-radio>
|
<a-radio :value="2"> 不合格 </a-radio>
|
</a-radio-group>
|
</div>
|
<div class="foot-list">
|
<div class="img-list">
|
<div v-if="item.imgPath" class="img-box">
|
<img :src="item.imgPath" alt="" />
|
<div v-if="item.auditResult == 1" class="words">{{ item.cameraName }}</div>
|
<div v-else class="words words-red">{{ item.cameraName }}</div>
|
<div class="img-mask">
|
<div class="img-handle-ct">
|
<div @click="checkImg(item.imgPath)">图片</div>
|
<div @click="checkVideo(item.videoPath)">视频</div>
|
</div>
|
</div>
|
<!-- <div class="img-handle"></div> -->
|
<!-- <div class="bottom-text">{{ item.eventTime }}</div> -->
|
</div>
|
<div v-else class="img-box">
|
<img src="@/assets/img/nopic.png" alt="" />
|
<div v-if="item.auditResult == 1" class="words">{{ item.cameraName }}</div>
|
<div v-else class="words words-red">{{ item.cameraName }}</div>
|
</div>
|
<div>上报时间:{{ item.eventTime }}</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<div style="display: flex; justify-content: center; margin-top: 20px">
|
<a-button @click="cancelClick()">关闭</a-button>
|
<a-button v-show="infoObj.auditResult == 0" style="margin-left: 20px" type="primary" @click="saveInfo()"
|
>确认保存</a-button
|
>
|
</div>
|
</a-spin>
|
</a-modal>
|
|
<a-modal @cancel="closeVideoModal" :width="1000" title="播放视频" :visible="viedeoModalShow" :footer="null">
|
<div class="videoContainer"></div>
|
</a-modal>
|
</div>
|
</template>
|
<script>
|
import { postAction, putAction, getAction } from '@tievd/cube-block/lib/api/manage'
|
import { ChangeHourMinutestr } from '@/utils/util'
|
export default {
|
created() {},
|
props: {
|
visible: {
|
type: Boolean,
|
default: false,
|
},
|
// 详情
|
infoObj: {
|
type: Object,
|
default: {},
|
},
|
},
|
data() {
|
return {
|
viedeoModalShow: false,
|
spinning: false,
|
visibleShow: false,
|
queryFrom: {
|
auditComment: '',
|
auditResult: 0,
|
},
|
dialogInfo: {},
|
player: null,
|
url: {
|
oilAudit: '/jyz/oilEvent/audit', //事件审核
|
outAudit: '/jyz/oiloutEvent/audit', // 告警审核
|
},
|
}
|
},
|
computed: {
|
isAddress() {
|
return this.infoObj.eventAddress ? '事件' : '告警'
|
},
|
},
|
filters: {
|
filterAudit(val) {
|
let text = ''
|
switch (val) {
|
case 1:
|
text = '属实'
|
break
|
case 2:
|
text = '误报'
|
break
|
case 0:
|
text = '未处理'
|
break
|
default:
|
break
|
}
|
return text
|
},
|
filterAddress(val) {
|
let text = ''
|
switch (val) {
|
case 1:
|
text = '卸油区'
|
break
|
case 2:
|
text = '加油区'
|
break
|
case 3:
|
text = '便利店'
|
break
|
default:
|
break
|
}
|
return text
|
},
|
},
|
watch: {
|
visible(val) {
|
this.visibleShow = val
|
this.queryFrom.auditComment = ''
|
// console.log(this.infoObj)
|
},
|
},
|
methods: {
|
ChangeHourMinutestr,
|
// 点击关闭或者是遮罩发射关闭信号给父组件,控制关闭
|
cancelClick(data = null) {
|
// this.$refs.videoRef.pause();//暂停
|
this.$emit('modalClose', data)
|
},
|
saveInfo(type) {
|
let arr = []
|
this.dialogInfo.outGroup.map((el) => {
|
arr.push({
|
id: el.id,
|
auditResult: el.auditResult,
|
})
|
})
|
this.dialogInfo.inGroup.map((el) => {
|
arr.push({
|
id: el.id,
|
auditResult: el.auditResult,
|
})
|
})
|
for (let i = 0; i < arr.length; i++) {
|
if (arr[i].auditResult == 0) {
|
this.$message.error('请对每个点位检查后提交')
|
return
|
}
|
}
|
postAction('/jyz/patrolRecord/auditPatrolEvent', arr).then((res) => {
|
if (res.code === 200) {
|
this.$message.success(res.message)
|
this.cancelClick(res.code)
|
} else {
|
this.$message.error(res.message)
|
}
|
})
|
},
|
getDetails() {
|
console.log(this.infoObj)
|
getAction('/jyz/patrolRecord/listEvent', {
|
recordId: this.infoObj.id,
|
}).then((res) => {
|
if (res.code === 200) {
|
console.log(res)
|
this.dialogInfo = res.result
|
}
|
})
|
},
|
checkImg(imgUrl) {
|
this.$viewerApi({ images: [imgUrl] })
|
},
|
checkVideo(videoUrl) {
|
this.viedeoModalShow = true
|
let videoConfig = {
|
variable: 'player', //播放函数名称,该属性必需设置,值等于下面的new ckplayer()的对象
|
// live: true,
|
backLive: false,
|
track: null, //字幕
|
crossorigin: '',
|
playbackrateOpen: true,
|
autoplay: true,
|
loop: true, //是否需要循环播放
|
video: videoUrl, //视频地址,
|
container: '.videoContainer',
|
}
|
this.$nextTick(() => {
|
this.player && this.player.remove()
|
this.player = new ckplayer(videoConfig) //初始化播放器
|
})
|
},
|
closeVideoModal() {
|
this.player && this.player.remove()
|
this.viedeoModalShow = false
|
},
|
},
|
}
|
</script>
|
|
<style lang="less" scoped>
|
@import '~@assets/less/dialog.less';
|
.color5c8 {
|
color: #5c84fd;
|
}
|
/deep/ .ant-radio-disabled .ant-radio-inner::after {
|
background-color: #66c9e7;
|
}
|
.header-card {
|
display: flex !important;
|
justify-content: space-between;
|
align-items: center;
|
padding: 12px 22px;
|
font-size: 16px;
|
// height: 45px;
|
width: 100%;
|
background: linear-gradient(40deg, rgba(38, 43, 53, 0.6), rgba(31, 35, 43, 0.6));
|
border: 1px solid #343a44;
|
box-shadow: 0px 5px 22px 0px rgba(0, 0, 0, 0.1);
|
color: #567ae8;
|
margin-bottom: 20px;
|
.text-title {
|
color: #fff;
|
}
|
}
|
.img-list-title {
|
font-size: 16px;
|
color: #567ae8;
|
}
|
.content-card {
|
display: flex;
|
justify-content: space-between;
|
margin-top: 17px;
|
font-size: 14px;
|
.left-content {
|
width: 75%;
|
height: 402px;
|
position: relative;
|
.left-video {
|
width: 100%;
|
height: 100%;
|
}
|
.icon-text {
|
position: absolute;
|
left: 15px;
|
top: 12px;
|
color: #fff;
|
font-size: 12px;
|
span {
|
display: inline-block;
|
width: 10px;
|
height: 10px;
|
border-radius: 50%;
|
margin-right: 5px;
|
background: #3eb171;
|
}
|
}
|
}
|
.right-content {
|
width: 25%;
|
margin-left: 19px;
|
.top-title {
|
font-weight: bolder;
|
font-size: 14px;
|
}
|
|
.trailColor {
|
margin: 11px 0;
|
width: 100%;
|
height: 2px;
|
background-color: #343a44;
|
position: relative;
|
.strokeColor {
|
width: 56px;
|
height: 2px;
|
background-color: #5c84fd;
|
position: absolute;
|
left: 0;
|
top: 0;
|
}
|
}
|
|
.right-progress {
|
display: flex;
|
justify-content: space-between;
|
width: 100%;
|
margin-top: 5px;
|
font-size: 12px;
|
height: 355px;
|
padding: 10px;
|
background: linear-gradient(40deg, rgba(38, 43, 53, 0.6), rgba(31, 35, 43, 0.6));
|
border: 1px solid #343a44;
|
box-shadow: 0px 5px 22px 0px rgba(0, 0, 0, 0.1);
|
.left-tree {
|
color: #5c84fd;
|
width: 35%;
|
text-align: center;
|
.arrowhead-box {
|
width: 8px;
|
min-height: 34px;
|
background-color: #5c84fd;
|
margin: 0 auto;
|
margin-top: 10px;
|
}
|
.arrowhead-top {
|
height: 145px;
|
}
|
.arrowhead {
|
position: relative;
|
height: 0px;
|
width: 0px;
|
margin: 0 auto;
|
border-top: 8px solid #5c84fd;
|
border-right: 8px solid transparent;
|
border-bottom: 8px solid transparent;
|
border-left: 8px solid transparent;
|
margin-bottom: 10px;
|
}
|
}
|
.right-tree {
|
width: 55%;
|
height: 338px;
|
overflow-y: auto;
|
.status-list {
|
display: flex;
|
align-items: center;
|
line-height: 39px;
|
font-size: 14px;
|
.icon {
|
width: 10px;
|
height: 10px;
|
border-radius: 50%;
|
margin-right: 9px;
|
}
|
.right-text {
|
width: 100%;
|
overflow: hidden;
|
white-space: nowrap;
|
text-overflow: ellipsis;
|
}
|
}
|
}
|
}
|
}
|
}
|
.foot-list {
|
width: 100%;
|
margin-top: 18px;
|
display: flex;
|
flex-wrap: wrap;
|
// justify-content: space-between;
|
// overflow-y: auto;
|
|
.img-list {
|
padding-bottom: 10px;
|
&:last-child {
|
margin-right: 0px;
|
}
|
.img-box {
|
margin-right: 13px;
|
display: flex;
|
flex-direction: column;
|
position: relative;
|
img {
|
width: 240px;
|
object-fit: cover;
|
}
|
.img-mask {
|
color: #fff;
|
width: 100%;
|
height: 100%;
|
position: absolute;
|
top: 0;
|
left: 0;
|
background: rgba(0, 0, 0, 0.7);
|
display: none;
|
padding: 0 20%;
|
.img-handle-ct {
|
width: 100%;
|
height: 100%;
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
font-size: 16px;
|
div {
|
cursor: pointer;
|
&:hover {
|
opacity: 0.7;
|
}
|
}
|
}
|
}
|
.words {
|
width: 110px;
|
height: 29px;
|
background: rgba(93, 133, 255, 0.6);
|
border: 1px solid #5b81f9;
|
color: #fff;
|
font-size: 14px;
|
position: absolute;
|
left: 0;
|
top: 0;
|
text-align: center;
|
line-height: 29px;
|
}
|
.words-red {
|
color: red;
|
}
|
&:hover {
|
.img-mask {
|
display: block;
|
}
|
}
|
}
|
.bottom-text {
|
margin-top: 11px;
|
font-size: 12px;
|
}
|
}
|
|
.spin-content {
|
border: 1px solid #91d5ff;
|
background-color: #e6f7ff;
|
}
|
}
|
.videoContainer {
|
width: 950px;
|
height: 534px;
|
}
|
</style>
|