confirmationBeforeFaceBrushSubmit
This commit is contained in:
parent
a75ea367b8
commit
7273dbc35a
|
@ -2,10 +2,10 @@
|
||||||
<div class="faceLoginWrap">
|
<div class="faceLoginWrap">
|
||||||
<div style="height: 500px;">
|
<div style="height: 500px;">
|
||||||
<div class="video-box">
|
<div class="video-box">
|
||||||
<video id="video" width="500" height="500" preload autoplay loop muted></video>
|
<video id="video" width="600" preload autoplay loop muted></video>
|
||||||
<canvas id="canvas" width="500" height="500"></canvas>
|
<canvas id="canvas" width="600" height="500"></canvas>
|
||||||
</div>
|
</div>
|
||||||
<canvas id="screenshotCanvas" width="500" height="500"></canvas>
|
<canvas id="screenshotCanvas" width="600" height="500"></canvas>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -132,7 +132,7 @@
|
||||||
if(res.data.access){
|
if(res.data.access){
|
||||||
let item= {name:res.data.name,token:res.data.access};
|
let item= {name:res.data.name,token:res.data.access};
|
||||||
that.$emit('func',item);
|
that.$emit('func',item);
|
||||||
that.$message.success("身份认证成功!");
|
// that.$message.success("身份认证成功!");
|
||||||
this.closeCamera();
|
this.closeCamera();
|
||||||
}else{
|
}else{
|
||||||
that.uploadLock = false;
|
that.uploadLock = false;
|
||||||
|
@ -165,7 +165,6 @@
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
let video = document.getElementById('video');
|
let video = document.getElementById('video');
|
||||||
let stream = video.srcObject;
|
let stream = video.srcObject;
|
||||||
// console.log(stream);
|
|
||||||
let tracks = stream.getTracks();
|
let tracks = stream.getTracks();
|
||||||
tracks.forEach(track => {
|
tracks.forEach(track => {
|
||||||
track.stop()
|
track.stop()
|
||||||
|
@ -188,8 +187,7 @@
|
||||||
.video-box {
|
.video-box {
|
||||||
margin: auto;
|
margin: auto;
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 500px;
|
width: 600px;
|
||||||
height: 500px;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -365,6 +365,7 @@
|
||||||
//首件审批
|
//首件审批
|
||||||
handleSelectclick(scope,index){
|
handleSelectclick(scope,index){
|
||||||
let that = this;
|
let that = this;
|
||||||
|
debugger;
|
||||||
this.reviewVisible = true;
|
this.reviewVisible = true;
|
||||||
that.planId = scope.row.id;
|
that.planId = scope.row.id;
|
||||||
that.leader_1 = scope.row.leader_1_?scope.row.leader_1_.name:null;
|
that.leader_1 = scope.row.leader_1_?scope.row.leader_1_.name:null;
|
||||||
|
@ -479,6 +480,8 @@
|
||||||
that.checkParams = params;
|
that.checkParams = params;
|
||||||
that.limitedUserCheck = true;
|
that.limitedUserCheck = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//人脸识别获取人员信息后
|
||||||
checkSubmit(data){
|
checkSubmit(data){
|
||||||
let that =this;
|
let that =this;
|
||||||
let id = that.checkParams.id;
|
let id = that.checkParams.id;
|
||||||
|
@ -486,7 +489,13 @@
|
||||||
params.is_testok = that.checkParams.is_testok;
|
params.is_testok = that.checkParams.is_testok;
|
||||||
params.record_data = that.checkParams.record_data;
|
params.record_data = that.checkParams.record_data;
|
||||||
params.token = data.token;
|
params.token = data.token;
|
||||||
|
let text = '确定以操作员'+data.name+'身份提交?';
|
||||||
if(data.token!==''&&data.token!==null&&data.token!==undefined) {
|
if(data.token!==''&&data.token!==null&&data.token!==undefined) {
|
||||||
|
this.$confirm(text, '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
putTestRecordItem(id, params).then((res) => {
|
putTestRecordItem(id, params).then((res) => {
|
||||||
if (res.code >= 200) {
|
if (res.code >= 200) {
|
||||||
subTestRecordItem(id, params).then((res) => {
|
subTestRecordItem(id, params).then((res) => {
|
||||||
|
@ -507,6 +516,9 @@
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
that.$message.error(err);
|
that.$message.error(err);
|
||||||
});
|
});
|
||||||
|
}).catch(() => {
|
||||||
|
that.limitedUserCheck = false;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -1544,12 +1544,17 @@
|
||||||
params.is_testok = that.params.is_testok;
|
params.is_testok = that.params.is_testok;
|
||||||
params.record_data = that.params.record_data;
|
params.record_data = that.params.record_data;
|
||||||
params.token = data.token;
|
params.token = data.token;
|
||||||
|
let text = '确定以操作员'+data.name+'身份提交?';
|
||||||
if (data.token !== '' && data.token !== null && data.token !== undefined) {
|
if (data.token !== '' && data.token !== null && data.token !== undefined) {
|
||||||
|
this.$confirm(text, '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
that.limitedPhoto = false;
|
||||||
putTestRecordItem(id, params).then((res) => {
|
putTestRecordItem(id, params).then((res) => {
|
||||||
if (res.code >= 200) {
|
if (res.code >= 200) {
|
||||||
subTestRecordItem(id, params).then((res) => {
|
subTestRecordItem(id, params).then((res) => {
|
||||||
debugger;
|
|
||||||
that.limitedPhoto = false;
|
|
||||||
if (res.code >= 200) {
|
if (res.code >= 200) {
|
||||||
that.recordVisible = false;
|
that.recordVisible = false;
|
||||||
that.limitedReview = false;
|
that.limitedReview = false;
|
||||||
|
@ -1562,15 +1567,17 @@
|
||||||
} else {
|
} else {
|
||||||
that.$message.error(res.msg)
|
that.$message.error(res.msg)
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {});
|
||||||
that.limitedPhoto = false;
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
that.$message.error(res.msg)
|
that.$message.error(res.msg)
|
||||||
}
|
}
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
that.$message.error(err);
|
that.$message.error(err);
|
||||||
});
|
});
|
||||||
|
}).catch(() => {
|
||||||
|
that.limitedPhoto = false;
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -1220,9 +1220,10 @@
|
||||||
getMsgFormSon(data) {
|
getMsgFormSon(data) {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.operationData.user = data.name;
|
that.operationData.user = data.name;
|
||||||
|
let text = '确定以操作员'+data.name+'身份提交?';
|
||||||
if (data.token !== '' && data.token !== null && data.token !== undefined) {
|
if (data.token !== '' && data.token !== null && data.token !== undefined) {
|
||||||
if (that.inputData == "") {
|
if (that.inputData == "") {
|
||||||
that.$confirm("没有消耗物料确定提交吗?", "提示", {
|
that.$confirm("没有消耗物料,"+text, "提示", {
|
||||||
confirmButtonText: "确认",
|
confirmButtonText: "确认",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "error",
|
type: "error",
|
||||||
|
@ -1241,6 +1242,12 @@
|
||||||
that.limitedPhoto = false;
|
that.limitedPhoto = false;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
this.$confirm(text, '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
that.limitedPhoto = false;
|
||||||
submitOperation(that.id,{token:data.token}).then((res) => {
|
submitOperation(that.id,{token:data.token}).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
that.$router.push({name: "operation"});
|
that.$router.push({name: "operation"});
|
||||||
|
@ -1251,6 +1258,10 @@
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
that.$message.error(err);
|
that.$message.error(err);
|
||||||
});
|
});
|
||||||
|
}).catch(() => {
|
||||||
|
that.limitedPhoto = false;
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -288,16 +288,27 @@
|
||||||
<el-button type="primary" @click="putins">确 定</el-button>
|
<el-button type="primary" @click="putins">确 定</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<!--操作人员确认-->
|
||||||
|
<el-dialog :visible.sync="limitedPhoto" @close="closeCamera" id="loginFaceWrap">
|
||||||
|
<div style="font-size: 28px;color: #333333;text-align: center;font-weight: bold;">操作人员确认</div>
|
||||||
|
<div class="testTracking">
|
||||||
|
<faceLogin
|
||||||
|
v-if="limitedPhoto"
|
||||||
|
ref="faceTracking"
|
||||||
|
name="faceLogin"
|
||||||
|
@func="getMsgFormSon"
|
||||||
|
></faceLogin>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
// import {getOrderList} from "@/api/sam";
|
|
||||||
import checkPermission from "@/utils/permission";
|
import checkPermission from "@/utils/permission";
|
||||||
import {getWarehouseList} from "@/api/inm";
|
import {getWarehouseList} from "@/api/inm";
|
||||||
import { getrecordformList, getrffieldList} from "@/api/mtm";
|
import { getrecordformList, getrffieldList} from "@/api/mtm";
|
||||||
// import {genTree} from "@/utils";
|
|
||||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||||
import customForm from "@/components/customForm/index";
|
import customForm from "@/components/customForm/index";
|
||||||
|
import faceLogin from '@/components/faceLogin/review.vue';
|
||||||
import {
|
import {
|
||||||
getwproductList,
|
getwproductList,
|
||||||
wproductTest,
|
wproductTest,
|
||||||
|
@ -315,12 +326,12 @@
|
||||||
|
|
||||||
const defaultetestitem = {};
|
const defaultetestitem = {};
|
||||||
export default {
|
export default {
|
||||||
components: {Pagination, customForm},
|
components: {Pagination, customForm,faceLogin},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
testitem: defaultetestitem,
|
testitem: defaultetestitem,
|
||||||
form: {remark: "", warehouse: ""},
|
form: {remark: "", warehouse: ""},
|
||||||
form1: {},
|
submitForm: {},
|
||||||
wproductList: {
|
wproductList: {
|
||||||
count: 0,
|
count: 0,
|
||||||
},
|
},
|
||||||
|
@ -372,11 +383,13 @@
|
||||||
recordList: [],
|
recordList: [],
|
||||||
recordformList: [],
|
recordformList: [],
|
||||||
recordform: null,
|
recordform: null,
|
||||||
|
submitFormId: null,
|
||||||
fifo_detail: "",
|
fifo_detail: "",
|
||||||
listQueryrecordform: {
|
listQueryrecordform: {
|
||||||
page: 0,
|
page: 0,
|
||||||
},
|
},
|
||||||
hasPicture: false,
|
hasPicture: false,
|
||||||
|
limitedPhoto: false,
|
||||||
outerVisible: false,
|
outerVisible: false,
|
||||||
innerVisible: false,
|
innerVisible: false,
|
||||||
dialogFormVisible: false,
|
dialogFormVisible: false,
|
||||||
|
@ -680,12 +693,12 @@
|
||||||
|
|
||||||
//记录提交检查项目
|
//记录提交检查项目
|
||||||
recordSubmit(value) {
|
recordSubmit(value) {
|
||||||
let that = this;
|
// let that = this;
|
||||||
let id = value.id;
|
this.submitFormId = value.id;
|
||||||
let params = {};
|
this.submitForm.record_data = value.record_data;
|
||||||
params.record_data = value.record_data;
|
this.submitForm.is_testok = value.is_testok;
|
||||||
params.is_testok = value.is_testok;
|
this.limitedPhoto = true;
|
||||||
putTestRecordItem(id, params)
|
/*putTestRecordItem(id, params)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.code >= 200) {
|
if (res.code >= 200) {
|
||||||
subTestRecordItem(id, params).then((res) => {
|
subTestRecordItem(id, params).then((res) => {
|
||||||
|
@ -704,7 +717,7 @@
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
this.$message.error(err);
|
this.$message.error(err);
|
||||||
});
|
});*/
|
||||||
},
|
},
|
||||||
|
|
||||||
//第一次保存提交检查项目
|
//第一次保存提交检查项目
|
||||||
|
@ -712,6 +725,55 @@
|
||||||
this.outerVisible = false;
|
this.outerVisible = false;
|
||||||
this.innerVisible = false;
|
this.innerVisible = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//获取人脸数据
|
||||||
|
getMsgFormSon(data) {
|
||||||
|
let that = this;
|
||||||
|
let text = '确定以操作员'+data.name+'身份提交?';
|
||||||
|
if (data.token !== '' && data.token !== null && data.token !== undefined) {
|
||||||
|
this.$confirm(text, '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
that.limitedPhoto = false;
|
||||||
|
putTestRecordItem(this.submitFormId, that.submitForm)
|
||||||
|
.then((res) => {
|
||||||
|
if (res.code >= 200) {
|
||||||
|
subTestRecordItem(this.submitFormId, that.submitForm).then((res) => {
|
||||||
|
if (res.code >= 200) {
|
||||||
|
that.innerVisible = false;
|
||||||
|
that.limitedReview = false;
|
||||||
|
that.limitedCheckRecord = false;
|
||||||
|
this.getList();
|
||||||
|
this.getList1();
|
||||||
|
that.refreshRecord();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.msg);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
this.$message.error(err);
|
||||||
|
});
|
||||||
|
}).catch(() => {
|
||||||
|
that.limitedPhoto = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/*关闭相机*/
|
||||||
|
closeCamera() {
|
||||||
|
this.$refs.faceTracking.closeCamera();
|
||||||
|
let video = document.getElementById('video');
|
||||||
|
let stream = video.srcObject;
|
||||||
|
let tracks = stream.getTracks();
|
||||||
|
tracks.forEach(track => {
|
||||||
|
track.stop()
|
||||||
|
});
|
||||||
|
video.srcObject = null;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue