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