fix:人员二维码录入人脸采集图片时添加是否为海康isc设备的判断以及在劳务管理模块中上传人脸采集图片时加上是否为海康isc设备的判断且不影响其他项目

This commit is contained in:
Vce 2024-06-17 21:54:57 +08:00
parent e33bd23541
commit 4a5df1227c
12 changed files with 267 additions and 92 deletions

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>人员录入</title><link href=/doc/h5Entry/static/css/app.2cdeaee4c36ffb7a7d2a066d20ccda32.css rel=stylesheet></head><body><div id=app></div><script>var host = window.location.origin;
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>人员录入</title><link href=/doc/h5Entry/static/css/app.ecb8e28f466f1c0f45f1072ba4552d65.css rel=stylesheet></head><body><div id=app></div><script>var host = window.location.origin;
var rootURL = host + "/";
// var rootURL = "http://192.168.34.221:28888/";
// var rootURL = "http://192.168.34.221:9111/"; //本地
@ -13,8 +13,10 @@
) {
// rootURL = "http://183.95.84.34:8081/"; //恩施
// rootURL = "http://192.168.34.125:6023/" //本地
rootURL = "http://192.168.34.221:9111/" //本地
// rootURL = "http://192.168.34.221:9111/" //本地
rootURL = "http://42.180.188.17:11211/" //测试环境
// rootURL = "http://182.90.224.237:51234/" //雄远程
// rootURL = "http://192.168.34.155:19111/" //本地
// locationURL=rootURL+'doc/h5Entry/index.html?userId=4&projectSn=a2ef0238b59146aa814b93f47710dbf2#/'
locationURL=rootURL+'doc/h5Entry/index.html?userId=1779721457571291137&projectSn=BD3137498CB84BF0969979E0342CDBCA&educationId=1666278624304615426#/'
}</script><script type=text/javascript src=/doc/h5Entry/static/js/manifest.563937856c360ceca791.js></script><script type=text/javascript src=/doc/h5Entry/static/js/vendor.08fb8d13d88c906352f9.js></script><script type=text/javascript src=/doc/h5Entry/static/js/app.b254623430b00511f0d5.js></script></body></html>
}</script><script type=text/javascript src=/doc/h5Entry/static/js/manifest.0472d3b0ffdec0d4b63b.js></script><script type=text/javascript src=/doc/h5Entry/static/js/vendor.08fb8d13d88c906352f9.js></script><script type=text/javascript src=/doc/h5Entry/static/js/app.b254623430b00511f0d5.js></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,a){for(var f,i,u,s=0,l=[];s<r.length;s++)i=r[s],t[i]&&l.push(t[i][0]),t[i]=0;for(f in c)Object.prototype.hasOwnProperty.call(c,f)&&(e[f]=c[f]);for(n&&n(r,c,a);l.length;)l.shift()();if(a)for(s=0;s<a.length;s++)u=o(o.s=a[s]);return u};var r={},t={8:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var c=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,o.nc&&a.setAttribute("nonce",o.nc),a.src=o.p+"static/js/"+e+"."+{0:"fbf64467c6abbbc1eb98",1:"75a3aa4283927f4b1b27",2:"b40a0ecff2f58dd786e6",3:"0bbf754e0899dd4c85c2",4:"c52430ef4f6e74b5b49a",5:"ef7329314c5270b36976"}[e]+".js";var f=setTimeout(i,12e4);function i(){a.onerror=a.onload=null,clearTimeout(f);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return a.onerror=a.onload=i,c.appendChild(a),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="/doc/h5Entry/",o.oe=function(e){throw console.error(e),e}}([]);
//# sourceMappingURL=manifest.0472d3b0ffdec0d4b63b.js.map

File diff suppressed because one or more lines are too long

View File

@ -1710,10 +1710,12 @@ export default {
console.log(fileData, 111222);
const file = fileData.file;
//
lrz(file, { quality: 1 }).then((result) => {
// lrz(file, { quality: 1 }).then((result) => {
const formData = new FormData();
// formData.append("files", result.file);
formData.append("files", result.file, "image.jpg");
// formData.append("files", result.file, "image.jpg");
formData.append("files", file, "image.jpg");
//
apiUploadImage(formData).then((res) => {
if (res.code == 200 || res.status == "SUCCESS") {
@ -1742,6 +1744,14 @@ export default {
];
break;
case "livesFace": //
if(this.isIscDevice){
const loading = this.$loading({
lock: true,
text: '图片检测中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.5)'
});
let data = {fileUrl: imgInfo.imageUrl}
checkfaceHikvisionApi(data).then((res) => {
console.log("333333333333333333333")
@ -1754,7 +1764,14 @@ export default {
}else{
this.$message.error(res.result.message)
}
}).finally(() => {
loading.close();
})
}else{
this.cropperOption.img =
this.$store.state.FILEURL + imgInfo.imageUrl;
this.cropperDialog = true;
}
// let imgStatus = result.file.size / 1024 < 500
// if (!imgStatus) {
// this.cropperOption.img =
@ -1771,7 +1788,7 @@ export default {
}
}
});
});
// });
},
checkImg() {
console.log(this.radio);
@ -2906,6 +2923,13 @@ export default {
checkFaceApi({ fileUrl: url }).then((res) => {
if (res.result.checkType == 1) {
if(this.isIscDevice){
const loading = this.$loading({
lock: true,
text: '裁剪图片检测中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.5)'
});
let data = {fileUrl: url}
checkfaceHikvisionApi(data).then((res) => {
if(res.code == 200 && res.result.checkType == "1"){
@ -2921,13 +2945,24 @@ export default {
}else{
this.$message.error(res.result.message);
}
}).finally(() => {
loading.close();
})
}else{
this.$message({
message: "非海康设备,请检查后重试!",
type: "error",
});
if (this.temporaryDialog1 || this.temporaryDialog2) {
this.personForm.fieldAcquisitionUrl = url;
this.fieldAcquisitionFile = [{ name: "", url: url }];
this.cropperDialog = false;
} else {
this.personForm.fieldAcquisitionUrl = url;
this.fieldAcquisitionFile = [{ name: "", url: url }];
this.cropperDialog = false;
}
// this.$message({
// message: "",
// type: "error",
// });
}
} else {
this.$message.error(res.result.message);

View File

@ -1577,10 +1577,12 @@ export default {
console.log(fileData, 111222);
const file = fileData.file;
//
lrz(file, { quality: 1 }).then((result) => {
// lrz(file, { quality: 1 }).then((result) => {
const formData = new FormData();
// formData.append("files", result.file);
formData.append("files", result.file, "image.jpg");
// formData.append("files", result.file, "image.jpg");
formData.append("files", file, "image.jpg");
//
apiUploadImage(formData).then((res) => {
if (res.code == 200 || res.status == "SUCCESS") {
@ -1609,6 +1611,14 @@ export default {
];
break;
case "livesFace": //
if(this.isIscDevice){
const loading = this.$loading({
lock: true,
text: '图片检测中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.5)'
});
let data = {fileUrl: imgInfo.imageUrl}
checkfaceHikvisionApi(data).then((res) => {
console.log("333333333333333333333")
@ -1621,7 +1631,14 @@ export default {
}else{
this.$message.error(res.result.message)
}
}).finally(() => {
loading.close();
})
}else{
this.cropperOption.img =
this.$store.state.FILEURL + imgInfo.imageUrl;
this.cropperDialog = true;
}
// let imgStatus = result.file.size / 1024 < 500
// if (!imgStatus) {
// this.cropperOption.img =
@ -1638,7 +1655,7 @@ export default {
}
}
});
});
// });
},
checkImg() {
console.log(this.radio);
@ -2712,6 +2729,13 @@ export default {
checkFaceApi({ fileUrl: url }).then((res) => {
if (res.result.checkType == 1) {
if(this.isIscDevice){
const loading = this.$loading({
lock: true,
text: '裁剪图片检测中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.5)'
});
let data = {fileUrl: url}
checkfaceHikvisionApi(data).then((res) => {
if(res.code == 200 && res.result.checkType == "1"){
@ -2726,12 +2750,22 @@ export default {
}else{
this.$message.error(res.result.message);
}
}).finally(() => {
loading.close();
})
}else{
this.$message({
message: "非海康设备,请检查后重试!",
type: "error",
});
if (this.temporaryDialog1 || this.temporaryDialog2) {
this.personForm.fieldAcquisitionUrl = url;
this.fieldAcquisitionFile = [{ name: "", url: url }];
this.cropperDialog = false;
} else {
this.fieldAcquisitionFile = [{ name: "", url: url }];
this.cropperDialog = false;
}
// this.$message({
// message: "",
// type: "error",
// });
}
} else {
this.$message.error(res.result.message);

View File

@ -1206,10 +1206,12 @@ export default {
console.log(fileData, 111222);
const file = fileData.file;
//
lrz(file, { quality: 1 }).then((result) => {
// lrz(file, { quality: 1 }).then((result) => {
const formData = new FormData();
// formData.append("files", result.file);
formData.append("files", result.file, "image.jpg");
// formData.append("files", result.file, "image.jpg");
formData.append("files", file, "image.jpg");
//
apiUploadImage(formData).then((res) => {
if (res.code == 200 || res.status == "SUCCESS") {
@ -1223,6 +1225,14 @@ export default {
];
break;
case "livesFace": //
if(this.isIscDevice){
const loading = this.$loading({
lock: true,
text: '图片检测中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.5)'
});
let data = {fileUrl: imgInfo.imageUrl}
checkfaceHikvisionApi(data).then((res) => {
console.log("333333333333333333333")
@ -1235,7 +1245,18 @@ export default {
}else{
this.$message.error(res.result.message)
}
}).finally(() => {
loading.close();
})
}else{
if(res.code == 200 && res.result.checkType == "1"){
this.cropperOption.img =
this.$store.state.FILEURL + imgInfo.imageUrl;
this.cropperDialog = true;
}else{
this.$message.error(res.result.message)
}
}
// let imgStatus = result.file.size / 1024 < 500
// if (!imgStatus) {
// this.cropperOption.img =
@ -1252,7 +1273,7 @@ export default {
}
}
});
});
// });
},
checkImg() {
console.log(this.radio);
@ -2388,6 +2409,13 @@ export default {
checkFaceApi({ fileUrl: url }).then((res) => {
if (res.result.checkType == 1) {
if(this.isIscDevice){
const loading = this.$loading({
lock: true,
text: '裁剪图片检测中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.5)'
});
let data = {fileUrl: url}
checkfaceHikvisionApi(data).then((res) => {
if(res.code == 200 && res.result.checkType == "1"){
@ -2403,13 +2431,24 @@ export default {
}else{
this.$message.error(res.result.message);
}
}).finally(() => {
loading.close();
})
}else{
this.$message({
message: "非海康设备,请检查后重试!",
type: "error",
});
if (this.temporaryDialog1 || this.temporaryDialog2) {
this.personForm.fieldAcquisitionUrl = url;
this.fieldAcquisitionFile = [{ name: "", url: url }];
this.cropperDialog = false;
} else {
this.addForm.fieldAcquisitionUrl = url;
this.fieldAcquisitionFile = [{ name: "", url: url }];
this.cropperDialog = false;
}
// this.$message({
// message: "",
// type: "error",
// });
}
} else {
this.$message.error(res.result.message);

View File

@ -3150,10 +3150,12 @@ export default {
handleUpload(fileData, type) {
const file = fileData.file;
//
lrz(file, { quality: 1 }).then((result) => {
// lrz(file, { quality: 1 }).then((result) => {
const formData = new FormData();
// formData.append("files", result.file);
formData.append("files", result.file, "image.jpg");
// formData.append("files", result.file, "image.jpg");
formData.append("files", file, "image.jpg");
//
apiUploadImage(formData).then((res) => {
if (res.code == 200 || res.status == "SUCCESS") {
@ -3185,6 +3187,14 @@ export default {
// ];
// break;
case "livesFace": //
if(this.isIscDevice){
const loading = this.$loading({
lock: true,
text: '图片检测中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.5)'
});
let data = {fileUrl: imgInfo.imageUrl}
checkfaceHikvisionApi(data).then((res) => {
console.log("333333333333333333333")
@ -3197,12 +3207,19 @@ export default {
}else{
this.$message.error(res.result.message)
}
}).finally(() => {
loading.close();
})
}else{
this.cropperOption.img =
this.$store.state.FILEURL + imgInfo.imageUrl;
this.cropperDialog = true;
}
break;
}
}
});
});
// });
},
//
handleSuccess(file, type, file2) {
@ -3325,6 +3342,12 @@ export default {
checkFaceApi({ fileUrl: url }).then((res) => {
if (res.result.checkType == 1) {
if(this.isIscDevice){
const loading = this.$loading({
lock: true,
text: '裁剪图片检测中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.5)'
});
let data = {fileUrl: url}
checkfaceHikvisionApi(data).then((res) => {
console.log("7777777777777777777777")
@ -3339,12 +3362,16 @@ export default {
}else{
this.$message.error(res.result.message);
}
}).finally(() => {
loading.close();
})
}else{
this.$message({
message: "非海康设备,请检查后重试!",
type: "error",
});
this.workerInfo.fieldAcquisitionUrl = url;
this.cropperDialog = false;
// this.$message({
// message: "",
// type: "error",
// });
}
} else {
this.$message.error(res.result.message);

View File

@ -2443,6 +2443,7 @@ import {
} from "@/assets/js/util.js";
import { getProjectConfigListApi } from "@/assets/js/api/project.js";
import { VueCropper } from "vue-cropper";
import { Loading } from 'element-ui';
import { apiUploadImage } from "@/assets/js/api/common";
import lrz from "lrz";
@ -2765,10 +2766,12 @@ export default {
handleUpload(fileData, type) {
const file = fileData.file;
//
lrz(file, { quality: 1 }).then((result) => {
// lrz(file, { quality: 1 }).then((result) => {
const formData = new FormData();
// formData.append("files", result.file);
formData.append("files", result.file, "image.jpg");
// formData.append("files", result.file, "image.jpg");
formData.append("files", file, "image.jpg");
//
apiUploadImage(formData).then((res) => {
if (res.code == 200 || res.status == "SUCCESS") {
@ -2801,6 +2804,14 @@ export default {
];
break;
case "livesFace": //
if(this.isIscDevice){
const loading = this.$loading({
lock: true,
text: '图片检测中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.5)'
});
let data = {fileUrl: imgInfo.imageUrl}
// let token = this.$store.state.userInfo.token
// checkfaceHikvisionApi(data,token).then((res) => {
@ -2815,7 +2826,14 @@ export default {
}else{
this.$message.error(res.result.message)
}
}).finally(() => {
loading.close();
})
}else{
this.cropperOption.img =
this.$store.state.FILEURL + imgInfo.imageUrl;
this.cropperDialog = true;
}
// let imgStatus = result.file.size / 1024 < 500
// if (!imgStatus) {
@ -2833,7 +2851,7 @@ export default {
}
}
});
});
// });
},
checkImg() {
console.log(this.radio);
@ -4356,6 +4374,12 @@ export default {
checkFaceApi({ fileUrl: url }).then((res) => {
if (res.result.checkType == 1) {
if(this.isIscDevice){
const loading = this.$loading({
lock: true,
text: '裁剪图片检测中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.5)'
});
let data = {fileUrl: url}
checkfaceHikvisionApi(data).then((res) => {
console.log("7777777777777777777777")
@ -4368,12 +4392,17 @@ export default {
}else{
this.$message.error(res.result.message);
}
}).finally(() => {
loading.close();
})
}else{
this.$message({
message: "非海康设备,请检查后重试!",
type: "error",
});
// this.$message({
// message: "",
// type: "error",
// });
this.personForm.fieldAcquisitionUrl = url;
this.fieldAcquisitionFile = [{ name: "", url: url }];
this.cropperDialog = false;
}
} else {
this.$message.error(res.result.message);