<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>
|
<span class="text-title">卸油时间 : </span> {{ dialogInfo.listData.startTime }}
|
<span class="text-title"> 至 </span>
|
{{ dialogInfo.listData.endTime }}
|
</div>
|
<div>
|
<span class="text-title">卸油时长 : </span> {{ ChangeHourMinutestr(dialogInfo.listData.spandTime) }}
|
</div>
|
<div><span class="text-title">完成情况 : </span> {{ dialogInfo.listData.complete }}</div>
|
<a-button type="primary" size="small" icon="download" @click="recExportXls()">导出</a-button>
|
</div>
|
|
<!-- 脚部图片 -->
|
<div>
|
<div class="img-list-title">卸前准备</div>
|
</div>
|
<div v-if="!dialogInfo.listDetails.find((el) => el.eventPhrase == 1)">无数据</div>
|
<div v-else class="foot-list">
|
<div class="img-list" v-for="(item, index) in dialogInfo.listDetails" :key="item.id">
|
<div v-if="item.eventPhrase == 1" class="img-box">
|
<viewer>
|
<img :src="item.imgPath" alt="" />
|
</viewer>
|
<div class="words" :style="{'color':item.eventType==2?'red':''}">{{ item.algorithmName }}</div>
|
<div class="bottom-text">{{ item.eventTime }}</div>
|
</div>
|
</div>
|
</div>
|
<div>
|
<div class="img-list-title">卸油过程</div>
|
</div>
|
<div v-if="!dialogInfo.listDetails.find((el) => el.eventPhrase == 2)">无数据</div>
|
<div v-else class="foot-list">
|
<div class="img-list" v-for="(item, index) in dialogInfo.listDetails" :key="item.id">
|
<div v-if="item.eventPhrase == 2" class="img-box">
|
<viewer>
|
<img :src="item.imgPath" alt="" />
|
</viewer>
|
<div class="words" :style="{'color':item.eventType==2?'red':''}" >{{ item.algorithmName }}</div>
|
<div class="bottom-text">{{ item.eventTime }}</div>
|
</div>
|
</div>
|
</div>
|
<div>
|
<div class="img-list-title">卸后处理</div>
|
</div>
|
<div v-if="!dialogInfo.listDetails.find((el) => el.eventPhrase == 3)">无数据</div>
|
<div v-else class="foot-list">
|
<div class="img-list" v-for="(item, index) in dialogInfo.listDetails" :key="item.id">
|
<div v-if="item.eventPhrase == 3" class="img-box">
|
<viewer>
|
<img :src="item.imgPath" alt="" />
|
</viewer>
|
<div class="words" :style="{'color':item.eventType==2?'red':''}">{{ item.algorithmName }}</div>
|
<div class="bottom-text">{{ item.eventTime }}</div>
|
</div>
|
</div>
|
</div>
|
</a-spin>
|
</a-modal>
|
</div>
|
</template>
|
<script>
|
import { ChangeHourMinutestr } from '@/utils/util'
|
import { downFile } from '@tievd/cube-block/lib/api/manage'
|
export default {
|
created() {},
|
props: {
|
visible: {
|
type: Boolean,
|
default: false,
|
},
|
dialogdetails: {
|
type: Object,
|
default: {},
|
},
|
},
|
data() {
|
return {
|
visibleShow: false,
|
treedatalist: [
|
{
|
status: 1,
|
name: '油罐车检测',
|
},
|
{
|
status: 2,
|
name: '三角木识别',
|
},
|
{
|
status: 1,
|
name: '静电夹连接检测11111111111111111111111111111',
|
},
|
{
|
status: 2,
|
name: '警示牌识别',
|
},
|
{
|
status: 1,
|
name: '灭火器识别',
|
},
|
{
|
status: 2,
|
name: '稳油检测',
|
},
|
{
|
status: 1,
|
name: '取样检测',
|
},
|
{
|
status: 1,
|
name: '安全帽检测',
|
},
|
{
|
status: 1,
|
name: '卸油管连接检测',
|
},
|
{
|
status: 1,
|
name: '安全帽检测',
|
},
|
{
|
status: 1,
|
name: '摸底油检测',
|
},
|
{
|
status: 2,
|
name: '安全值守检测',
|
},
|
{
|
status: 1,
|
name: '油罐车离开',
|
},
|
{
|
status: 1,
|
name: '卸后清洁检测',
|
},
|
{
|
status: 1,
|
name: '卸后清洁检测',
|
},
|
],
|
spinning: false,
|
dialogInfo: {
|
listData: {},
|
listDetails: [
|
{
|
cameraName: '',
|
},
|
],
|
},
|
}
|
},
|
watch: {
|
visible(val) {
|
this.visibleShow = val
|
},
|
dialogdetails(val) {
|
this.dialogInfo = val
|
console.log(this.dialogInfo)
|
},
|
},
|
methods: {
|
ChangeHourMinutestr,
|
// 点击关闭或者是遮罩发射关闭信号给父组件,控制关闭
|
cancelClick() {
|
this.$emit('modalClose')
|
},
|
// 记录详情导出
|
recExportXls() {
|
this.spinning = true
|
const { id } = this.dialogInfo.listData
|
downFile('/jyz/oiloutRecord/exportWord', { recordId: id }).then((data) => {
|
this.spinning = false
|
if (!data) {
|
this.$message.error('文件下载失败')
|
return
|
}
|
let blob = new Blob([data], { type: 'application/msword;charset=UTF-8' })
|
let downloadElement = document.createElement('a')
|
let href = window.URL.createObjectURL(blob) //创建下载的链接
|
downloadElement.href = href
|
downloadElement.download = '卸油记录详情' //下载后文件名
|
document.body.appendChild(downloadElement)
|
downloadElement.click() //点击下载
|
document.body.removeChild(downloadElement) //下载完成移除元素
|
window.URL.revokeObjectURL(href) //释放掉blob对象
|
})
|
},
|
},
|
}
|
</script>
|
|
<style lang="less" scoped>
|
@import '~@assets/less/dialog.less';
|
.color5c8 {
|
color: #5c84fd;
|
}
|
.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;
|
.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: 170px;
|
object-fit: cover;
|
}
|
.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;
|
}
|
}
|
.bottom-text {
|
margin-top: 11px;
|
font-size: 12px;
|
}
|
}
|
.spin-content {
|
border: 1px solid #91d5ff;
|
background-color: #e6f7ff;
|
}
|
}
|
</style>
|