|
@@ -1,140 +1,68 @@
|
|
|
<template>
|
|
|
<div class="item carPlateInfo">
|
|
|
<div class="title">
|
|
|
- <span class="name">车牌信息</span>
|
|
|
+ <span class="name">装货信息</span>
|
|
|
<span class="detail" @click="linkTo">详情>></span>
|
|
|
</div>
|
|
|
<div class="container">
|
|
|
- <div class="carplate-item" v-for=" item in 10">
|
|
|
+ <div class="carplate-item" v-for=" item in items">
|
|
|
<div class="carplate-image__preview">
|
|
|
<div class="carplate-image-item">
|
|
|
<el-image
|
|
|
- style="width: 100%; height: 150px"
|
|
|
- :src="goafSnapPicurl"
|
|
|
+ style="width: 100%; height: 180px"
|
|
|
+ :src="item.transLoadPicurl"
|
|
|
:zoom-rate="1.2"
|
|
|
- :preview-src-list="[goafSnapPicurl]"
|
|
|
+ :preview-src-list="[item.transLoadPicurl]"
|
|
|
:initial-index="4"
|
|
|
- fit="cover"
|
|
|
- />
|
|
|
- <p>入场时间:{{parseTime(new Date())}}</p>
|
|
|
- </div>
|
|
|
- <div class="carplate-image-item">
|
|
|
- <el-image
|
|
|
- style="width: 100%; height: 150px"
|
|
|
- :src="goafSnapPicurl"
|
|
|
- :zoom-rate="1.2"
|
|
|
- :preview-src-list="[goafSnapPicurl]"
|
|
|
- :initial-index="4"
|
|
|
- fit="cover"
|
|
|
- />
|
|
|
- <p>出场时间:{{parseTime(new Date())}}</p>
|
|
|
+ />
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="carplateDiv">{{ carPlate }}</div>
|
|
|
+ <div class="bottom">
|
|
|
+ <div class="carplateDiv">{{ item.transLicense }}</div>
|
|
|
+ <span class="time">{{parseTime(item.transLoadTime)||parseTime(new Date())}}</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="video-dialog" v-if="videoDialogVisible">
|
|
|
- <div class="video-dialog-container">
|
|
|
- <div class="header">
|
|
|
- <div class="name">
|
|
|
- <span>区域入侵预警</span>
|
|
|
- </div>
|
|
|
- <div class="close" @click="videoDialogVisible=false"><el-icon><Close /></el-icon></div>
|
|
|
- </div>
|
|
|
- <div class="demo-image__preview" v-if="capturePhotos.length>0">
|
|
|
- <el-image
|
|
|
- style="width: 100px; height: 100px"
|
|
|
- :src="capturePhotos[0]"
|
|
|
- :zoom-rate="1.2"
|
|
|
- :preview-src-list="capturePhotos"
|
|
|
- :initial-index="4"
|
|
|
- fit="cover"
|
|
|
- />
|
|
|
- </div>
|
|
|
- <HkwsVideo ref="HkwsVideo"></HkwsVideo>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
- import { goafCameraAlarmNumber} from '@/api/goaf/sensor'
|
|
|
- import { NumConvertLM,parseTime} from '@/utils'
|
|
|
- import HkwsVideo from '@/components/HkwsVideo/iframe.vue'
|
|
|
+ import { NumConvertLM,parseTime} from '@/utils'
|
|
|
+ import mixins from '@/mixins/mqtt.js'
|
|
|
+ import {Uint8ArrayToString} from'@/utils'
|
|
|
+ import {getTransList} from '@/api/trans'
|
|
|
export default {
|
|
|
- name:"carPlateInfo",
|
|
|
- components:{
|
|
|
- HkwsVideo
|
|
|
- },
|
|
|
+ name:"carPlateInfo",
|
|
|
data(){
|
|
|
return{
|
|
|
videoDialogVisible:false,
|
|
|
- carPlate:"",
|
|
|
- goafSnapPicurl:"",
|
|
|
- capturePhotos:[]
|
|
|
+ items:[]
|
|
|
}
|
|
|
},
|
|
|
+ mixins:[mixins],
|
|
|
created(){
|
|
|
this.reload()
|
|
|
- },
|
|
|
+ this.init()
|
|
|
+ },
|
|
|
methods:{
|
|
|
NumConvertLM,
|
|
|
parseTime,
|
|
|
+ init(){
|
|
|
+ this.initMqtt({
|
|
|
+ mqttResponse:this.mqttResponse
|
|
|
+ })
|
|
|
+ } ,
|
|
|
reload(){
|
|
|
- this.carPlate="陕A12345"
|
|
|
- this.goafSnapPicurl="http://113.141.93.143:9000/file/20236161224471948394.jpg"
|
|
|
+ getTransList().then((resp)=>{
|
|
|
+ const {data}= resp
|
|
|
+ this.items=data
|
|
|
+ })
|
|
|
},
|
|
|
- showWarnModel(item){
|
|
|
- this.videoDialogVisible=true
|
|
|
- if(item){
|
|
|
- let warn_info=JSON.parse(JSON.stringify(item))
|
|
|
- this.warnInfo=warn_info
|
|
|
- this.warnInfo.fileUrl=warn_info.goafSnapPicurl
|
|
|
- }
|
|
|
- this.capturePhotos=[this.warnInfo.fileUrl]
|
|
|
- let warnInfo=item?item:this.warnInfo
|
|
|
- let state=true
|
|
|
- if(this.isNull(warnInfo.goafDevSocketAddr)){
|
|
|
- state="未配置推流地址"
|
|
|
- console.error('未配置推流地址')
|
|
|
- return
|
|
|
- }
|
|
|
- if(this.isNull(this.warnInfo.goafDevIp)){
|
|
|
- state="未配置设备IP"
|
|
|
- console.error(state)
|
|
|
- return
|
|
|
- }
|
|
|
- if(this.isNull(this.warnInfo.goafDevPort)){
|
|
|
- state="未配置设备端口"
|
|
|
- console.error(state)
|
|
|
- return
|
|
|
- }
|
|
|
- if(this.isNull(this.warnInfo.goafDevAccount)){
|
|
|
- state="未配置设备账号"
|
|
|
- console.error(state)
|
|
|
- return
|
|
|
- }
|
|
|
- if(this.isNull(this.warnInfo.goafDevPwd)){
|
|
|
- state="未配置设备密码"
|
|
|
- console.error(state)
|
|
|
- return
|
|
|
- }
|
|
|
- this.$nextTick(()=>{
|
|
|
- this.$refs.HkwsVideo.loadData({
|
|
|
- streamServeUrl:this.warnInfo.goafDevSocketAddr,
|
|
|
- szIP: this.warnInfo.goafDevIp, // protocol ip
|
|
|
- szPort: this.warnInfo.goafDevPort, // protocol port
|
|
|
- szUsername:this.warnInfo.goafDevAccount, // device username
|
|
|
- szPassword: this.warnInfo.goafDevPwd, // device password
|
|
|
- })
|
|
|
- })
|
|
|
- },
|
|
|
- // 获取所有采空区摄像头告警数量
|
|
|
- goafCameraAlarmNumber(){
|
|
|
- goafCameraAlarmNumber({
|
|
|
- goafAlarmStatus:0
|
|
|
- }).then((res)=>{
|
|
|
- this.total=res.data
|
|
|
- })
|
|
|
+ mqttResponse(topic,message){
|
|
|
+ this.reload()
|
|
|
+ // if(!message.includes('{')){
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // let data=message?JSON.parse(Uint8ArrayToString(message)):''
|
|
|
},
|
|
|
linkTo(){
|
|
|
this.$router.push({
|
|
@@ -166,7 +94,7 @@
|
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
|
.carplate-image-item{
|
|
|
- width: 50%;
|
|
|
+ width: 100%;
|
|
|
box-sizing: border-box;
|
|
|
padding-right: 5px;
|
|
|
&:nth-child(2){
|
|
@@ -180,23 +108,33 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- .carplateDiv{
|
|
|
- width: 50%;
|
|
|
- background-color: blue;
|
|
|
- color: #fff;
|
|
|
- height: 50px;
|
|
|
- border-radius: 2px;
|
|
|
- line-height: 50px;
|
|
|
- text-align: center;
|
|
|
- font-size: 24px;
|
|
|
- font-weight: 700;
|
|
|
- letter-spacing: 2px;
|
|
|
- box-shadow: 0 0 2px rgba(255, 255, 255, 0.6) ,inset 0 0 3px rgba(255, 255, 255, 0.8);
|
|
|
- display: inline-block;
|
|
|
- // background-image: linear-gradient(to bottom right,blue,#fff);
|
|
|
- background-image:linear-gradient(to bottom right, #5c5cb1,blue,#5c5cb1)
|
|
|
-
|
|
|
- }
|
|
|
+ .bottom{
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ .carplateDiv{
|
|
|
+ width: 40%;
|
|
|
+ background-color: blue;
|
|
|
+ color: #fff;
|
|
|
+ height: 50px;
|
|
|
+ border-radius: 2px;
|
|
|
+ line-height: 50px;
|
|
|
+ text-align: center;
|
|
|
+ font-size: 24px;
|
|
|
+ font-weight: 700;
|
|
|
+ letter-spacing: 2px;
|
|
|
+ box-shadow: 0 0 2px rgba(255, 255, 255, 0.6) ,inset 0 0 3px rgba(255, 255, 255, 0.8);
|
|
|
+ display: inline-block;
|
|
|
+ // background-image: linear-gradient(to bottom right,blue,#fff);
|
|
|
+ background-image:linear-gradient(to bottom right, #5c5cb1,blue,#5c5cb1)
|
|
|
+
|
|
|
+ }
|
|
|
+ .time{
|
|
|
+ color: #fff;
|
|
|
+ font-size: 18px;
|
|
|
+ font-weight: 700;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|