视觉盘点

merge-requests/1/head
qiushui 4 years ago
parent 55e8441222
commit 234986ab97

Binary file not shown.

@ -17,9 +17,9 @@
@change="handleGetCameraList"
>
<span slot="action" slot-scope="text, record">
<a @click="showModel('test',record)">
<!-- <a @click="showModel('test',record)">
测试
</a>
</a> -->
<a-divider type="vertical"/>
<a @click="showModel('config',record)">
配置

@ -29,6 +29,16 @@
</a-modal>
</template>
<template v-else-if="type=='test'">
<a-modal
v-model="isShow"
@cancel="handleCancel"
:footer="null"
:maskClosable="false"
width="1600px"
:bodyStyle="{padding:0,display:'flex'}"
:centered="true"
class="config-model"
>
<div class="test-model">
<video
@ -73,6 +83,7 @@
</div>
</div>
</div>
</a-modal>
</template>
<template v-else-if="type=='config'">
@ -229,6 +240,7 @@ export default {
data() {
return {
isShow:false,
player:null,
type:'',
title:'',
closable:false,//modelX
@ -265,7 +277,6 @@ export default {
this.id = this.$route.query.modelData.id
this.type = this.$route.query.modelType
this.mdata = this.$route.query.modelData
//this.getTestVideo(this.$route.query.modelData.rtsp)
this.$nextTick(() => {
this.autoPlay(this.id)
})
@ -274,13 +285,15 @@ export default {
this.id = this.$route.query.modelData.id
this.type = this.$route.query.modelType
this.mdata = this.$route.query.modelData
//this.getConfigVideo(this.$route.query.modelData.rtsp)
this.getConfigIoList()
this.$nextTick(() => {
this.autoPlay(this.id)
})
this.getConfigIoList()
}
},
destroy(){
//this.player.destroy()
},
methods: {
handleOk() {
this.confirmLoading = true;
@ -320,24 +333,29 @@ export default {
},
handleCancel() {
this.player.destroy()
console.log('Clicked cancel button');
this.$emit('close', false, {})
if(this.type=='test') {
this.$router.go(-1);
this.player.destroy()
//this.player.destroy();
this.player = null;
}else if(this.type=='config') {
this.$router.go(-1);
this.player.destroy()
//this.player.destroy();
this.player = null;
}
},
//
autoPlay(id){
let video = document.getElementById('camera'+id);
console.log(video)
if(this.player == null){
this.player = new WebRtcPlayer(video,'camera'+id);
}
this.player.load('camera'+id);
},
setVideoServer(){
this.$api.httpApi.getVideoServer({
data: {}
@ -375,7 +393,7 @@ export default {
type: type
}
}).then(res => {
console.log(res)
this.getConfigIoList()
}).catch(err => {

@ -161,7 +161,10 @@ export default {
},
mounted() {
//this.changeTab('1-1')
this.$nextTick(() => {
this.getStatus();
})
},
created() {
//this.getStatus();
@ -246,7 +249,7 @@ export default {
this.getStatusBg(a.row,a.column,a.status)
}
}
this.columnTabStatus = res.data.columnTabStatus
var i = 1;
for(let a in res.data.columnTabStatus){
this.status.column[i] = res.data.columnTabStatus[a]

@ -62,7 +62,24 @@
{{ checkObj[item.key] }}
</span>
</li>
<li>
<span class="img-box-title">
盘点图:
</span>
</li>
<template>
<span v-if="checkObj.checkPic">
<happy-scroll color="rgba(100,100,100,0.5)" size="1" class="scroll-box" style="width:50;height:90px;">
<viewer>
<img class="historyImg" :src="imgUrl+checkObj.checkPic"/>
</viewer>
</happy-scroll>
</span>
<span v-else>
暂无盘点图
</span>
</template>
</ul>
</div>
@ -99,11 +116,11 @@
</div>
<div class="carousel-page-footer">
<div class="status-btn" v-if="checkObj.status == 0">
<a-button class="btn"
<!-- <a-button class="btn"
type="danger"
@click="showModel(checkObj,index)"
>人工复核
</a-button>
</a-button> -->
<a-button class="btn"
type="primary"
style="background:#29c12b;border-color:#29c12b;"
@ -187,14 +204,7 @@ export default {
label:'扫描条码号',
key: 'code'
},
{
label:'系统数量',
key: 'wmsCount'
},
{
label:'扫描数量',
key: 'count'
}
],
statusMap: {0:"未盘点",1:"盘点异常",2:"核对正确"}
@ -449,7 +459,8 @@ export default {
closeModel(visible, data) {
this.visible = visible
this.modelData = data
}
},
}
}
@ -573,5 +584,9 @@ export default {
}
}
}
.historyImg {
width: 180px;
height:auto;
}
</style>

@ -147,7 +147,7 @@ export default {
width: 90
},
{
title: "视频时长",
title: "工单时长",
dataIndex: "timeLength",
},
{

@ -12,6 +12,7 @@ class WebRtcPlayer {
};
constructor(video1, uuid, options={}) {
console.log("new uuid:"+uuid)
this.server = WebRtcPlayer.server;
//this.video = document.getElementById(id);
this.video = video1
@ -55,6 +56,7 @@ class WebRtcPlayer {
this.webrtc.onconnectionstatechange = () => {
if(this.webrtc.connectionState == 'connected' || this.webrtc.connectionState == 'connecting'){
console.log("uuid:"+this.uuid+" status:" + this.webrtc.connectionState)
}else{
console.log(this.webrtc.connectionState)
this.load(this.uuid);
@ -97,7 +99,7 @@ class WebRtcPlayer {
}
destroy() {
console.log("destroy uuid:"+this.uuid)
this.webrtc.close();
this.webrtc = null;
this.video.srcObject = null;

Loading…
Cancel
Save