logoHidden
This commit is contained in:
parent
794a73ad7b
commit
680bf77ac3
|
@ -130,9 +130,15 @@
|
|||
let imgData = {base64:img};
|
||||
faceLogin(imgData).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
let item= {name:res.data.username,token:res.data.access};
|
||||
that.$emit('func',item);
|
||||
that.$message.success("身份认证成功!");
|
||||
if(res.data.access){
|
||||
let item= {name:res.data.username,token:res.data.access};
|
||||
that.$emit('func',item);
|
||||
that.$message.success("身份认证成功!");
|
||||
this.closeCamera();
|
||||
}else{
|
||||
that.uploadLock = false;
|
||||
that.$message.error("身份认证失败,请重新进行人脸识别!");
|
||||
}
|
||||
}else{
|
||||
// 打开锁
|
||||
that.uploadLock = false;
|
||||
|
@ -141,21 +147,40 @@
|
|||
}).catch(()=>{
|
||||
// 打开锁
|
||||
that.uploadLock = false;
|
||||
// this.$message.error('面部识别失败请重新验证');
|
||||
});
|
||||
},
|
||||
closeCamera () {
|
||||
debugger;
|
||||
let video = document.getElementById('video');
|
||||
let stream = video.srcObject;
|
||||
console.log(stream);
|
||||
let tracks = stream.getTracks();
|
||||
tracks.forEach(track => {
|
||||
track.stop()
|
||||
});
|
||||
video.srcObject = null;
|
||||
this.video.srcObject.getTracks()[0].stop();
|
||||
},
|
||||
},
|
||||
beforeDestroy() {
|
||||
let video = document.getElementById('video');
|
||||
let stream = video.srcObject;
|
||||
console.log(stream);
|
||||
let tracks = stream.getTracks();
|
||||
tracks.forEach(track => {
|
||||
track.stop()
|
||||
});
|
||||
video.srcObject = null;
|
||||
this.video.srcObject.getTracks()[0].stop();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.faceLoginWrap{
|
||||
padding: 50px;
|
||||
width: 600px;
|
||||
height: 600px;
|
||||
background: #000000;
|
||||
/*padding: 50px;*/
|
||||
/*width: 600px;*/
|
||||
/*height: 600px;*/
|
||||
/*background: #000000;*/
|
||||
margin:50px auto 0 auto;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
@ -169,7 +194,7 @@
|
|||
position: relative;
|
||||
width: 500px;
|
||||
height: 500px;
|
||||
background: #000000;
|
||||
/*background: #000000;*/
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
|
|
@ -144,12 +144,12 @@
|
|||
</script>
|
||||
<style scoped>
|
||||
.faceLoginWrap{
|
||||
padding: 50px;
|
||||
width: 600px;
|
||||
height: 600px;
|
||||
background: #000000;
|
||||
/*padding: 50px;*/
|
||||
/*width: 600px;*/
|
||||
/*height: 600px;*/
|
||||
/*background: #000000;*/
|
||||
margin:50px auto 0 auto;
|
||||
box-sizing: border-box;
|
||||
/*box-sizing: border-box;*/
|
||||
}
|
||||
|
||||
#screenshotCanvas {
|
||||
|
@ -157,6 +157,8 @@
|
|||
}
|
||||
|
||||
.video-box {
|
||||
width: 500px;
|
||||
height: 500px;
|
||||
margin: auto;
|
||||
position: relative;
|
||||
}
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
<div class="sidebar-logo-container" :class="{'collapse':collapse}">
|
||||
<transition name="sidebarLogoFade">
|
||||
<router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
|
||||
<img v-if="logo" :src="logo" class="sidebar-logo">
|
||||
<h1 v-else class="sidebar-title">{{ title }} </h1>
|
||||
<!--<img v-if="logo" :src="logo" class="sidebar-logo">-->
|
||||
<h1 class="sidebar-title">{{ title }} </h1>
|
||||
</router-link>
|
||||
<router-link v-else key="expand" class="sidebar-logo-link" to="/">
|
||||
<img v-if="logo" :src="logo" class="sidebar-logo">
|
||||
<!--<img v-if="logo" :src="logo" class="sidebar-logo">-->
|
||||
<h1 class="sidebar-title">{{ title }} </h1>
|
||||
</router-link>
|
||||
</transition>
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
</div>
|
||||
<app-main />
|
||||
|
||||
<div class="floatDiv" @click="gotoTicketPage" v-if="count.total_count>0">
|
||||
<!--<div class="floatDiv" @click="gotoTicketPage" v-if="count.total_count>0">
|
||||
<el-badge :value="count.total_count" class="item ">
|
||||
<el-icon class="el-icon-s-management" style="font-size: 30px;color: #409EFF;padding-top: 12px;"></el-icon>
|
||||
</el-badge>
|
||||
<div class="typeWrap">
|
||||
<div class="detailItem" v-for="item in count.details" :key="item.workflow">{{item.workflow__name}}:{{item.count}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="完工时间" prop="end_date">
|
||||
</el-table-column>
|
||||
<el-table-column label="检验状态">
|
||||
<el-table-column label="首件确认状态">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.leader_1!==null&&scope.row.leader_2!==null&&scope.row.leader_3!==null">已完成</span>
|
||||
<span v-else>未完成</span>
|
||||
|
@ -189,6 +189,13 @@
|
|||
<img style="width: 45%;vertical-align: text-top;" :src="'http://47.95.0.242:2222'+item.field_value"/>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="achieve">
|
||||
<div class="items">
|
||||
<span class="itemLabel">检验结果:</span>
|
||||
<span v-if="is_testok">检验合格</span>
|
||||
<span v-else>检验不合格</span>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="reviewWrap" v-if="!achieve">
|
||||
<div class="reviewBlock">
|
||||
|
@ -228,6 +235,7 @@
|
|||
|
||||
export default {
|
||||
name: "firstCheck",
|
||||
inject:['reload'],
|
||||
components: {Pagination,faceLogin,customForm},
|
||||
data() {
|
||||
return {
|
||||
|
@ -263,6 +271,7 @@
|
|||
reviewVisible:false,
|
||||
recordVisible:false,
|
||||
is_midtesting:false,
|
||||
is_testok:false,
|
||||
formName:'首件确认检查表',
|
||||
update_time:'',
|
||||
first_sign_time:'',
|
||||
|
@ -332,6 +341,7 @@
|
|||
that.first_sign_time = scope.row.first_sign_time?scope.row.first_sign_time:'';
|
||||
getTestRecordItem(scope.row.first_test).then((res) => {
|
||||
that.formName = res.data.form_.name;
|
||||
that.is_testok = res.data.is_testok;
|
||||
that.update_time = res.data.update_time;
|
||||
let fieldList = res.data.record_data;
|
||||
that.fieldList = [...fieldList];
|
||||
|
@ -394,6 +404,29 @@
|
|||
/*关闭相机*/
|
||||
closeCamera () {
|
||||
this.$refs.faceTracking.closeCamera();
|
||||
let video = document.getElementById('video');
|
||||
let stream = video.srcObject;
|
||||
console.log(stream);
|
||||
let tracks = stream.getTracks();
|
||||
tracks.forEach(track => {
|
||||
track.stop()
|
||||
});
|
||||
video.srcObject = null;
|
||||
/*let firstTestIndex = sessionStorage.getItem('firstTestIndex');
|
||||
let firstTestProcess = sessionStorage.getItem('firstTestProcess');
|
||||
if(firstTestIndex){
|
||||
sessionStorage.removeItem('firstTestIndex');
|
||||
sessionStorage.setItem('firstTestIndex',this.activeIndex);
|
||||
}else{
|
||||
sessionStorage.setItem('firstTestIndex',this.activeIndex);
|
||||
}
|
||||
if(firstTestProcess){
|
||||
sessionStorage.removeItem('firstTestProcess');
|
||||
sessionStorage.setItem('firstTestProcess',this.listQuery.process);
|
||||
}else{
|
||||
sessionStorage.setItem('firstTestProcess',this.listQuery.process);
|
||||
}
|
||||
this.reload();*/
|
||||
// this.thisVideo.srcObject.getTracks()[0].stop();
|
||||
},
|
||||
//保存首件检查
|
||||
|
@ -482,28 +515,63 @@
|
|||
//获取人脸数据
|
||||
getMsgFormSon(data){
|
||||
let that =this;
|
||||
if(that.leader==='leader_1'){
|
||||
that.leader_1=data.name;
|
||||
}else if(that.leader==='leader_2'){
|
||||
that.leader_2=data.name;
|
||||
}else if(that.leader==='leader_3'){
|
||||
that.leader_3=data.name;
|
||||
}
|
||||
firstAudit(that.planId,{leader:that.leader ,token : data.token}).then(res=>{
|
||||
if(res.code===200){
|
||||
this.limitedPhoto = false;
|
||||
if(that.leader_1!==null&&that.leader_2!==null&&that.leader_3!==null){
|
||||
this.reviewVisible = false;
|
||||
}
|
||||
that.getTableData();
|
||||
if(data.token!==''&&data.token!==null&&data.token!==undefined){
|
||||
if(that.leader==='leader_1'){
|
||||
that.leader_1=data.name;
|
||||
}else if(that.leader==='leader_2'){
|
||||
that.leader_2=data.name;
|
||||
}else if(that.leader==='leader_3'){
|
||||
that.leader_3=data.name;
|
||||
}
|
||||
})
|
||||
firstAudit(that.planId,{leader:that.leader ,token : data.token}).then(res=>{
|
||||
this.limitedPhoto = false;
|
||||
if(res.code===200){
|
||||
this.limitedPhoto = false;
|
||||
if(that.leader_1!==null&&that.leader_2!==null&&that.leader_3!==null){
|
||||
this.reviewVisible = false;
|
||||
}
|
||||
/* let firstTestIndex = sessionStorage.getItem('firstTestIndex');
|
||||
let firstTestProcess = sessionStorage.getItem('firstTestProcess');
|
||||
if(firstTestIndex){
|
||||
sessionStorage.removeItem('firstTestIndex');
|
||||
sessionStorage.setItem('firstTestIndex',this.activeIndex);
|
||||
}else{
|
||||
sessionStorage.setItem('firstTestIndex',this.activeIndex);
|
||||
}
|
||||
if(firstTestProcess){
|
||||
sessionStorage.removeItem('firstTestProcess');
|
||||
sessionStorage.setItem('firstTestProcess',this.listQuery.process);
|
||||
}else{
|
||||
sessionStorage.setItem('firstTestProcess',this.listQuery.process);
|
||||
}*/
|
||||
that.getTableData();
|
||||
// that.reload();
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
mounted() {
|
||||
debugger;
|
||||
this.getProcessList();
|
||||
}
|
||||
/*let that = this;
|
||||
let activeIndex = sessionStorage.getItem('firstTestIndex');
|
||||
let firstTestProcess = sessionStorage.getItem('firstTestProcess');
|
||||
if(activeIndex&&firstTestProcess){
|
||||
this.activeIndex = parseInt(activeIndex);
|
||||
this.listQuery.process = parseInt(firstTestProcess);
|
||||
sessionStorage.removeItem('firstTestIndex');
|
||||
sessionStorage.removeItem('firstTestProcess');
|
||||
this.getTableData();
|
||||
getProcessList({page: 0}).then((response) => {
|
||||
if (response.data) {
|
||||
that.processOption = response.data;
|
||||
}
|
||||
});
|
||||
}else{
|
||||
this.getProcessList();
|
||||
}*/
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in New Issue