fix: 合并代码以及解决冲突

This commit is contained in:
kun 2024-06-18 15:22:18 +08:00
commit 1cdbd6c928
16 changed files with 3755 additions and 3041 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

@ -266,4 +266,12 @@ export const getHikvisionPageApi = data => get('xmgl/xzHikvisionCompareData/page
// 校验同步(批量)
export const getHikvisionSyncApi = data => post('xmgl/xzHikvisionCompareData/sync', data);
// 人员|车辆校验
export const getHikvisionManualCompareApi = data => post('xmgl/xzHikvisionCompareData/manualCompareData', data);
export const getHikvisionManualCompareApi = data => post('xmgl/xzHikvisionCompareData/manualCompareData', data);
//海康人脸评分接口
// export const checkfaceHikvisionApi = (data,token) => post('xmgl/recognition/checkfaceHikvision', data, { headers: {Authorization: token}});
export const checkfaceHikvisionApi = data => post('xmgl/recognition/checkfaceHikvision', data);
//人员管理批量删除
export const onBatchDeletionApi = data => post('xmgl/workerInfo/deleteBatch', data);

View File

@ -804,12 +804,13 @@
action="uploadUrl"
:on-remove="(file) => handleRemove(file, 4)"
:on-preview="(file) => handlePreview(file, 4)"
:beforeUpload="(file) => handleBeforeUpload(file, 4)"
:beforeUpload="(file) => handleBeforeUpload(file, 7)"
list-type="picture"
:show-file-list="false"
:file-list="fieldAcquisitionUrlFile"
:file-list="fieldAcquisitionFile"
:http-request="(val) => handleUpload(val, 'livesFace')"
>
<!-- :file-list="fieldAcquisitionUrlFile" -->
<el-button
size="medium"
style="padding: 9px 20px"
@ -1026,7 +1027,7 @@
>
<div class="dialog_content" style="height: 400px">
<!-- <vue-scroll> -->
<vueCropper
<!-- <vueCropper
ref="cropper"
:img="cropperOption.img"
:outputType="cropperOption.outputType"
@ -1034,6 +1035,19 @@
:autoCropHeight="cropperOption.autoCropHeight"
:autoCrop="true"
:fixedBox="true"
:outputSize="0.7"
:maxImgSize="300"
></vueCropper> -->
<vueCropper
ref="cropper"
:img="cropperOption.img"
:outputType="cropperOption.outputType"
:autoCropWidth="cropperOption.autoCropWidth"
:autoCropHeight="cropperOption.autoCropHeight"
:outputSize="1"
:maxImgSize="300"
mode="contain"
:autoCrop="true"
></vueCropper>
<!-- </vue-scroll> -->
</div>
@ -1088,6 +1102,7 @@ import {
sendBatchWokerApi,
importImgDataApi,
getDepartmentInfoList,
checkfaceHikvisionApi,
} from "@/assets/js/api/laborPerson";
import {
selectUserDevAuthorityByUserIdApi,
@ -1110,6 +1125,7 @@ export default {
props: ["adminDialogVisible"],
data() {
return {
isIscDevice: false, //
visible: false,
defaultImg: require("../../../../../../assets/images/profile_photo.png"),
idCardBigPhotoUrlFile: [],
@ -1295,7 +1311,8 @@ export default {
attendRulesList: [],
enterpriseTypeId: "",
cropperOption: {
outputType: "png",
// outputType: "png",
outputType: "jpeg",
img: "",
autoCropWidth: 300, //
autoCropHeight: 360, //
@ -1704,14 +1721,32 @@ 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);
// formData.append("files", result.file, "image.jpg");
formData.append("files", file, "image.jpg");
//
apiUploadImage(formData).then((res) => {
if (res.code == 200 || res.status == "SUCCESS") {
const imgInfo = res.data[0];
if (
imgInfo.fileInfo.contentType != "image/jpeg" &&
imgInfo.fileInfo.contentType != "image/jpg"
// file.type != "image/png"
) {
this.$message.error(this.$t("请上传jpg格式图片")); //"jpgjpeg"
return false;
}
let imgSize = Number(imgInfo.fileInfo.size / 1024);
console.log(11111111, imgSize);
if (imgSize <= 10 || imgSize >= 200) {
this.$message.error("文件大小不能超过200kb小于10kb,请重新上传!");
return false;
}
switch (type) {
case "idCardAvatar": //
this.personForm.idCardBigPhotoUrl = imgInfo.imageUrl;
@ -1720,9 +1755,34 @@ export default {
];
break;
case "livesFace": //
this.cropperOption.img =
this.$store.state.FILEURL + imgInfo.imageUrl;
this.cropperDialog = true;
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")
console.log(res)
console.log("333333333333333333333")
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)
}
}).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 =
@ -1739,7 +1799,7 @@ export default {
}
}
});
});
// });
},
checkImg() {
console.log(this.radio);
@ -1989,6 +2049,7 @@ export default {
if (result.success) {
if (result.result) {
this.isUploadToHouse = result.result.housing ? true : false;
this.isIscDevice = result.result.supplierType == 9 ? true : false;
}
}
});
@ -2631,6 +2692,12 @@ export default {
this.$message.error(this.$t("message.laborMange.hint8")); //"jpgjpeg"
return false;
}
let imgSize = Number(file.size / 1024);
console.log(11111111, imgSize);
if (imgSize <= 10 || imgSize >= 200) {
this.$message.error("文件大小不能超过200kb小于10kb,请重新上传!");
return false;
}
}
return true;
},
@ -2866,14 +2933,47 @@ export default {
checkFace(url) {
checkFaceApi({ fileUrl: url }).then((res) => {
if (res.result.checkType == 1) {
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;
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"){
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;
}
}else{
this.$message.error(res.result.message);
}
}).finally(() => {
loading.close();
})
}else{
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);
@ -2891,7 +2991,8 @@ export default {
return;
}
var param = new FormData();
param.append("files", data, "image.png");
// param.append("files", data, "image.png");
param.append("files", data, "image.jpg");
_this.$http
.post("/upload/image", param, {
headers: {
@ -2900,6 +3001,12 @@ export default {
})
.then((res) => {
console.log("aaaaa", res);
let imgSize = Number(res.data.data[0].fileInfo.size / 1024);
console.log('经过vueCropper裁剪后', imgSize);
if (imgSize <= 10 || imgSize >= 200) {
this.$message.error("图片裁剪后大小不能超过200kb小于10kb,请重新裁剪或重新上传图片!");
return false;
}
if (res.data.status == "SUCCESS") {
if (this.isSzProject == 1) {
this.checkImgLibrary(res.data.data[0].imageUrl);

View File

@ -945,7 +945,7 @@
>
<div class="dialog_content" style="height: 400px">
<!-- <vue-scroll> -->
<vueCropper
<!-- <vueCropper
ref="cropper"
:img="cropperOption.img"
:outputType="cropperOption.outputType"
@ -953,6 +953,19 @@
:autoCropHeight="cropperOption.autoCropHeight"
:autoCrop="true"
:fixedBox="true"
:outputSize="0.7"
:maxImgSize="300"
></vueCropper> -->
<vueCropper
ref="cropper"
:img="cropperOption.img"
:outputType="cropperOption.outputType"
:autoCropWidth="cropperOption.autoCropWidth"
:autoCropHeight="cropperOption.autoCropHeight"
:outputSize="1"
:maxImgSize="300"
mode="contain"
:autoCrop="true"
></vueCropper>
<!-- </vue-scroll> -->
</div>
@ -1007,6 +1020,7 @@ import {
sendBatchWokerApi,
importImgDataApi,
getDepartmentInfoList,
checkfaceHikvisionApi,
} from "@/assets/js/api/laborPerson";
import {
selectUserDevAuthorityByUserIdApi,
@ -1029,6 +1043,7 @@ export default {
props: ["laborDialogVisible"],
data() {
return {
isIscDevice: false, //
visible: false,
defaultImg: require("../../../../../../assets/images/profile_photo.png"),
idCardBigPhotoUrlFile: [],
@ -1215,7 +1230,8 @@ export default {
attendRulesList: [],
enterpriseTypeId: "",
cropperOption: {
outputType: "png",
// outputType: "png",
outputType: "jpeg",
img: "",
autoCropWidth: 300, //
autoCropHeight: 360, //
@ -1572,14 +1588,32 @@ 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);
// formData.append("files", result.file, "image.jpg");
formData.append("files", file, "image.jpg");
//
apiUploadImage(formData).then((res) => {
if (res.code == 200 || res.status == "SUCCESS") {
const imgInfo = res.data[0];
if (
imgInfo.fileInfo.contentType != "image/jpeg" &&
imgInfo.fileInfo.contentType != "image/jpg"
// file.type != "image/png"
) {
this.$message.error(this.$t("请上传jpg格式图片")); //"jpgjpeg"
return false;
}
let imgSize = Number(imgInfo.fileInfo.size / 1024);
console.log(11111111, imgSize);
if (imgSize <= 10 || imgSize >= 200) {
this.$message.error("文件大小不能超过200kb小于10kb,请重新上传!");
return false;
}
switch (type) {
case "idCardAvatar": //
this.personForm.idCardBigPhotoUrl = imgInfo.imageUrl;
@ -1588,9 +1622,34 @@ export default {
];
break;
case "livesFace": //
this.cropperOption.img =
this.$store.state.FILEURL + imgInfo.imageUrl;
this.cropperDialog = true;
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")
console.log(res)
console.log("333333333333333333333")
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)
}
}).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 =
@ -1607,7 +1666,7 @@ export default {
}
}
});
});
// });
},
checkImg() {
console.log(this.radio);
@ -1857,6 +1916,7 @@ export default {
if (result.success) {
if (result.result) {
this.isUploadToHouse = result.result.housing ? true : false;
this.isIscDevice = result.result.supplierType == 9 ? true : false;
}
}
});
@ -2450,6 +2510,12 @@ export default {
this.$message.error(this.$t("message.laborMange.hint8")); //"jpgjpeg"
return false;
}
let imgSize = Number(file.size / 1024);
console.log(11111111, imgSize);
if (imgSize <= 10 || imgSize >= 200) {
this.$message.error("文件大小不能超过200kb小于10kb,请重新上传!");
return false;
}
}
return true;
},
@ -2673,13 +2739,44 @@ export default {
checkFace(url) {
checkFaceApi({ fileUrl: url }).then((res) => {
if (res.result.checkType == 1) {
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;
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"){
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;
}
}else{
this.$message.error(res.result.message);
}
}).finally(() => {
loading.close();
})
}else{
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);
@ -2697,7 +2794,8 @@ export default {
return;
}
var param = new FormData();
param.append("files", data, "image.png");
// param.append("files", data, "image.png");
param.append("files", data, "image.jpg");
_this.$http
.post("/upload/image", param, {
headers: {
@ -2706,6 +2804,12 @@ export default {
})
.then((res) => {
console.log("aaaaa", res);
let imgSize = Number(res.data.data[0].fileInfo.size / 1024);
console.log('经过vueCropper裁剪后', imgSize);
if (imgSize <= 10 || imgSize >= 200) {
this.$message.error("图片裁剪后大小不能超过200kb小于10kb,请重新裁剪或重新上传图片!");
return false;
}
if (res.data.status == "SUCCESS") {
if (this.isSzProject == 1) {
this.checkImgLibrary(res.data.data[0].imageUrl);

View File

@ -55,10 +55,11 @@
class="upload-demo"
:action="uploadUrl"
:on-success="(res, file) => handleSuccess(res, 1, file)"
:beforeUpload="(file) => handleBeforeUpload(file, 1)"
:beforeUpload="(file) => handleBeforeUpload(file, 7)"
:show-file-list="false"
name="files"
accept=".jpg, .jpeg"
:http-request="(val) => handleUpload(val, 'livesFace')"
>
<el-button size="small" type="primary">{{
$t("message.laborMange.updateOnsitePhotos")
@ -2298,7 +2299,7 @@
>
<div class="dialog_content" style="height: 400px">
<!-- <vue-scroll> -->
<vueCropper
<!-- <vueCropper
ref="cropper"
:img="cropperOption.img"
:outputType="cropperOption.outputType"
@ -2306,6 +2307,19 @@
:autoCropHeight="cropperOption.autoCropHeight"
:autoCrop="true"
:fixedBox="true"
:outputSize="0.7"
:maxImgSize="300"
></vueCropper> -->
<vueCropper
ref="cropper"
:img="cropperOption.img"
:outputType="cropperOption.outputType"
:autoCropWidth="cropperOption.autoCropWidth"
:autoCropHeight="cropperOption.autoCropHeight"
:outputSize="1"
:maxImgSize="300"
mode="contain"
:autoCrop="true"
></vueCropper>
<!-- </vue-scroll> -->
</div>
@ -2400,11 +2414,15 @@ import {
checkImgLibraryApi,
safeReduceDetailList,
resetScoreApi,
checkfaceHikvisionApi,
getProjectUfaceConfigInfo,
} from "@/assets/js/api/laborPerson.js";
import { getProjectConfigListApi } from "@/assets/js/api/project.js";
import { selectUserDevAuthorityByUserIdApi } from "@/assets/js/api/configManage";
import QRCode from "qrcodejs2";
import { VueCropper } from "vue-cropper";
import { apiUploadImage } from "@/assets/js/api/common";
import lrz from "lrz";
export default {
components: {
VueCropper,
@ -2461,7 +2479,8 @@ export default {
autoCropHeight: 360, //
},
cropperOption: {
outputType: "png",
// outputType: "png",
outputType: "jpeg",
img: "",
autoCropWidth: 300, //
autoCropHeight: 360, //
@ -2486,6 +2505,7 @@ export default {
},
],
},
isIscDevice: false, //isc
};
},
@ -2500,6 +2520,7 @@ export default {
this.getSafeScoreDetail();
this.getAttendRuleList();
this.getProjectConfig();
this.getConfig();//
},
mounted() {
new QRCode("workerQRcode", {
@ -3095,35 +3116,139 @@ export default {
//
handleBeforeUpload(file, type) {
console.log("上传前----", file);
if (type == 1) {
// >>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<
// if (type == 1) {
// if (
// file.type != "image/jpeg" &&
// file.type != "image/jpg" &&
// file.type != "image/png"
// // file.type != "image/png"
// ) {
// this.$message.error(this.$t("message.laborMange.hint8"));
// return false;
// }
// }
// >>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<
if (
file.type != "image/jpeg" &&
file.type != "image/png" &&
file.type != "image/jpg" &&
file.type != "image/bmp"
) {
this.$message.error(this.$t("message.companyDiagram.uploadMsg")); //
return false;
} else if (type == 7) {
console.log('11111111111111111111')
console.log(file);
console.log('11111111111111111111')
if (
file.type != "image/jpeg" &&
file.type != "image/jpg" &&
file.type != "image/png"
file.type != "image/jpg"
// file.type != "image/png"
) {
this.$message.error(this.$t("message.laborMange.hint8"));
this.$message.error(this.$t("请上传jpg格式图片")); //"jpgjpeg"
return false;
}
let imgSize = Number(file.size / 1024);
console.log(11111111, imgSize);
if (imgSize <= 10 || imgSize >= 200) {
this.$message.error("文件大小不能超过200kb小于10kb,请重新上传!");
return false;
}
}
return true;
},
handleUpload(fileData, type) {
const file = fileData.file;
//
// 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", file, "image.jpg");
//
apiUploadImage(formData).then((res) => {
if (res.code == 200 || res.status == "SUCCESS") {
console.log("000000000000000000000000000")
console.log(res)
console.log("000000000000000000000000000")
const imgInfo = res.data[0];
if (
imgInfo.fileInfo.contentType != "image/jpeg" &&
imgInfo.fileInfo.contentType != "image/jpg"
// file.type != "image/png"
) {
this.$message.error(this.$t("请上传jpg格式图片")); //"jpgjpeg"
return false;
}
let imgSize = Number(imgInfo.fileInfo.size / 1024);
console.log(11111111, imgSize);
if (imgSize <= 10 || imgSize >= 200) {
this.$message.error("文件大小不能超过200kb小于10kb,请重新上传!");
return false;
}
switch (type) {
// case "idCardAvatar": //
// this.personForm.idCardBigPhotoUrl = imgInfo.imageUrl;
// this.idCardUpPhotoFile = [
// { name: imgInfo.filename, url: imgInfo.imageUrl },
// ];
// 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")
console.log(res)
console.log("333333333333333333333")
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)
}
}).finally(() => {
loading.close();
})
}else{
this.cropperOption.img =
this.$store.state.FILEURL + imgInfo.imageUrl;
this.cropperDialog = true;
}
break;
}
}
});
// });
},
//
handleSuccess(file, type, file2) {
// type==1 2 3 4 5 6
if (type == 1) {
let imgStatus = file2.size / 1024 < 500;
if (imgStatus) {
this.cropperOption.img =
this.$store.state.FILEURL + file.data[0].imageUrl;
this.cropperDialog = true;
} else if (this.isSzProject == 1) {
console.log("6665");
this.checkImgLibrary(file.data[0].imageUrl);
} else {
this.checkFace(file.data[0].imageUrl);
}
// this.cropperOption.img = this.$store.state.FILEURL + file.data[0].imageUrl;
// this.cropperDialog = true;
// let imgStatus = file2.size / 1024 < 500;
// if (imgStatus) {
// this.cropperOption.img =
// this.$store.state.FILEURL + file.data[0].imageUrl;
// this.cropperDialog = true;
// } else if (this.isSzProject == 1) {
// console.log("6665");
// this.checkImgLibrary(file.data[0].imageUrl);
// } else {
// this.checkFace(file.data[0].imageUrl);
// }
// // this.cropperOption.img = this.$store.state.FILEURL + file.data[0].imageUrl;
// // this.cropperDialog = true;
} else if (type == 2) {
this.workerInfo.idCardUpPhotoUrl = file.data[0].imageUrl;
this.discernId(file.data[0].imageUrl, 2);
@ -3195,6 +3320,19 @@ export default {
}
);
},
//
getConfig() {
getProjectUfaceConfigInfo({
projectSn: this.$store.state.projectSn,
}).then((result) => {
if (result.success) {
if (result.result) {
// this.isUploadToHouse = result.result.housing ? true : false;
this.isIscDevice = result.result.supplierType == 9 ? true : false;
}
}
});
},
//
checkFace(url) {
console.log("url", url);
@ -3210,6 +3348,47 @@ export default {
}
});
},
//
checkFace2(url) {
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")
console.log(res)
console.log("7777777777777777777777")
if(res.code == 200 && res.result.checkType == "1"){
// this.personForm.fieldAcquisitionUrl = url;
// this.fieldAcquisitionFile = [{ name: "", url: url }];
// this.cropperDialog = false;
this.workerInfo.fieldAcquisitionUrl = url;
this.cropperDialog = false;
}else{
this.$message.error(res.result.message);
}
}).finally(() => {
loading.close();
})
}else{
this.workerInfo.fieldAcquisitionUrl = url;
this.cropperDialog = false;
// this.$message({
// message: "",
// type: "error",
// });
}
} else {
this.$message.error(res.result.message);
}
});
},
//
saveMapUrlEditFn() {
this.$refs.cropperEdit.startCrop();
@ -3260,7 +3439,8 @@ export default {
return;
}
var param = new FormData();
param.append("files", data, "image.png");
// param.append("files", data, "image.png");
param.append("files", data, "image.jpg");
_this.$http
.post("/upload/image", param, {
headers: {
@ -3277,8 +3457,19 @@ export default {
// this.checkFace(res.data.data[0].imageUrl);
// }
// }
let imgSize = Number(res.data.data[0].fileInfo.size / 1024);
console.log('经过vueCropper裁剪后', imgSize);
if (imgSize <= 10 || imgSize >= 200) {
this.$message.error("图片裁剪后大小不能超过200kb小于10kb,请重新裁剪或重新上传图片!");
return false;
}
if (res.data.status == "SUCCESS") {
this.checkImgLibrary(res.data.data[0].imageUrl);
// this.checkImgLibrary(res.data.data[0].imageUrl);
if (this.isSzProject == 1) {
this.checkImgLibrary(res.data.data[0].imageUrl);
} else {
this.checkFace2(res.data.data[0].imageUrl);
}
}
});
});

View File

@ -487,11 +487,13 @@
style="width: 100%; color: #737996"
@selection-change="handleCheckedCitiesChange"
:show-header="false"
row-key="id"
:row-class-name="tableRowClassName"
>
<el-table-column
type="selection"
width="55"
:reserve-selection="true"
:selectable="selectEnable"
></el-table-column>
<el-table-column prop="workerName">

View File

@ -202,9 +202,10 @@
tooltip-effect="dark"
style="width: 100%;color:#737996;"
@selection-change="handleCheckedCitiesChange"
row-key="id"
:show-header="false"
>
<el-table-column type="selection" width="55" :selectable="selectEnable"></el-table-column>
<el-table-column type="selection" width="55" :reserve-selection="true" :selectable="selectEnable"></el-table-column>
<el-table-column prop="workerName">
<template slot-scope="scope">
<div class="flex2">

View File

@ -297,7 +297,7 @@
<el-button
v-if="isIscDevice"
v-permission="{
key: 'rygl_distributeAccessEquipment',
key: 'rygl_check_all',
menuPath: '/project/labor/personManage',
}"
size="medium"
@ -449,11 +449,13 @@
style="width: 100%; color: #737996"
@selection-change="handleCheckedCitiesChange"
:show-header="false"
row-key="id"
:row-class-name="tableRowClassName"
>
<el-table-column
type="selection"
width="55"
:reserve-selection="true"
:selectable="selectEnable"
></el-table-column>
<el-table-column prop="workerName">
@ -687,6 +689,19 @@
@click="workerExitBtn(checkedWorker, 2)"
>{{ $t("message.laborMange.batchBowOutWith") }}</el-button
>
<!-- v-if="isIscDevice" -->
<el-button
type="text"
v-permission="{
key: 'rygl_onBatchDeletion',
menuPath: '/project/labor/personManage',
}"
@click="onBatchDeletion"
:disabled="checkedWorker.length <= 0"
>批量删除</el-button
>
<!-- size="medium" -->
<!-- style="margin-left: 5px" -->
</div>
<div>
<el-pagination
@ -2227,7 +2242,7 @@
>
<div class="dialog_content" style="height: 400px">
<!-- <vue-scroll> -->
<vueCropper
<!-- <vueCropper
ref="cropper"
:img="cropperOption.img"
:outputType="cropperOption.outputType"
@ -2237,6 +2252,17 @@
:fixedBox="true"
:outputSize="0.7"
:maxImgSize="300"
></vueCropper> -->
<vueCropper
ref="cropper"
:img="cropperOption.img"
:outputType="cropperOption.outputType"
:autoCropWidth="cropperOption.autoCropWidth"
:autoCropHeight="cropperOption.autoCropHeight"
:outputSize="1"
:maxImgSize="300"
mode="contain"
:autoCrop="true"
></vueCropper>
<!-- </vue-scroll> -->
</div>
@ -2414,6 +2440,8 @@ import {
importImgDataApi,
xmglXzHikvisionSyncGetNewestList,
xmglXzHikvisionSyncRetryAPI,
checkfaceHikvisionApi,
onBatchDeletionApi,
} from "@/assets/js/api/laborPerson";
import {
selectUserDevAuthorityByUserIdApi,
@ -2426,6 +2454,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";
@ -2622,7 +2651,8 @@ export default {
attendRulesList: [],
enterpriseTypeId: "",
cropperOption: {
outputType: "png",
// outputType: "png",
outputType: "jpeg",
img: "",
autoCropWidth: 300, //
autoCropHeight: 360, //
@ -2747,13 +2777,35 @@ 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);
// formData.append("files", result.file, "image.jpg");
formData.append("files", file, "image.jpg");
//
apiUploadImage(formData).then((res) => {
if (res.code == 200 || res.status == "SUCCESS") {
console.log("0000000000000000000000000000")
console.log(res)
console.log("0000000000000000000000000000")
const imgInfo = res.data[0];
if (
imgInfo.fileInfo.contentType != "image/jpeg" &&
imgInfo.fileInfo.contentType != "image/jpg"
// file.type != "image/png"
) {
this.$message.error(this.$t("请上传jpg格式图片")); //"jpgjpeg"
return false;
}
let imgSize = Number(imgInfo.fileInfo.size / 1024);
console.log(11111111, imgSize);
if (imgSize <= 10 || imgSize >= 200) {
this.$message.error("文件大小不能超过200kb小于10kb,请重新上传!");
return false;
}
switch (type) {
case "idCardAvatar": //
@ -2763,9 +2815,37 @@ export default {
];
break;
case "livesFace": //
this.cropperOption.img =
this.$store.state.FILEURL + imgInfo.imageUrl;
this.cropperDialog = true;
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) => {
checkfaceHikvisionApi(data).then((res) => {
console.log("333333333333333333333")
console.log(res)
console.log("333333333333333333333")
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)
}
}).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 =
@ -2782,7 +2862,7 @@ export default {
}
}
});
});
// });
},
checkImg() {
console.log(this.radio);
@ -2816,6 +2896,48 @@ export default {
//
this.$refs.multipleTable.toggleAllSelection();
},
//
onBatchDeletion(){
if (this.checkedWorker.length == 0) {
this.$message.warning("请选择需要删除的数据!");
return;
}
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
let data = {
ids: this.checkedWorker.map((item) => item.id).join(","),
projectSn: this.projectSn
}
onBatchDeletionApi(data).then((res) => {
if (res.code == 200) {
this.$message({
type: 'success',
message: '批量删除成功!'
})
// this.page =
// this.page > 1 && this.tableListData.length == 1
// ? this.page - 1
// : this.page;
this.getTeamList(1);
let tempArr = []
this.checkedWorker = tempArr
this.$refs.multipleTable.clearSelection();
console.log('this.checkedWorker',this.checkedWorker)
}
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
//
passEquipment() {
let requestData = {
@ -4026,7 +4148,9 @@ export default {
this.$message.error(this.$t("message.companyDiagram.uploadMsg")); //
return false;
} else if (type == 7) {
console.log('11111111111111111111')
console.log(file);
console.log('11111111111111111111')
if (
file.type != "image/jpeg" &&
file.type != "image/jpg"
@ -4260,9 +4384,37 @@ export default {
checkFace(url) {
checkFaceApi({ fileUrl: url }).then((res) => {
if (res.result.checkType == 1) {
this.personForm.fieldAcquisitionUrl = url;
this.fieldAcquisitionFile = [{ name: "", url: url }];
this.cropperDialog = false;
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")
console.log(res)
console.log("7777777777777777777777")
if(res.code == 200 && res.result.checkType == "1"){
this.personForm.fieldAcquisitionUrl = url;
this.fieldAcquisitionFile = [{ name: "", url: url }];
this.cropperDialog = false;
}else{
this.$message.error(res.result.message);
}
}).finally(() => {
loading.close();
})
}else{
// this.$message({
// message: "",
// type: "error",
// });
this.personForm.fieldAcquisitionUrl = url;
this.fieldAcquisitionFile = [{ name: "", url: url }];
this.cropperDialog = false;
}
} else {
this.$message.error(res.result.message);
}
@ -4279,7 +4431,8 @@ export default {
return;
}
var param = new FormData();
param.append("files", data, "image.png");
// param.append("files", data, "image.png");
param.append("files", data, "image.jpg");
_this.$http
.post("/upload/image", param, {
headers: {
@ -4288,6 +4441,12 @@ export default {
})
.then((res) => {
console.log("aaaaa", res);
let imgSize = Number(res.data.data[0].fileInfo.size / 1024);
console.log('经过vueCropper裁剪后', imgSize);
if (imgSize <= 10 || imgSize >= 200) {
this.$message.error("图片裁剪后大小不能超过200kb小于10kb,请重新裁剪或重新上传图片!");
return false;
}
if (res.data.status == "SUCCESS") {
if (this.isSzProject == 1) {
this.checkImgLibrary(res.data.data[0].imageUrl);

View File

@ -184,7 +184,7 @@
type="primary"
@click="checkAllFn"
v-permission="{
key: 'hmc_batch_authorization',
key: 'hmc_check_all',
menuPath: '/project/labor/roster',
}"
>全选</el-button
@ -198,6 +198,15 @@
}"
>批量授权门禁权限</el-button
>
<!-- <el-button
type="primary"
@click="onBatchDeletion"
v-permission="{
key: 'hmc_batch_deletion',
menuPath: '/project/labor/roster',
}"
>批量删除</el-button
> -->
</el-form-item>
</el-form>
</div>
@ -1163,6 +1172,19 @@ export default {
this.getConfig();
},
methods: {
//
// onBatchDeletion(){
// if (this.multipleSelection.length == 0) {
// this.$message.warning("!");
// return;
// }
// console.log("999999999999999999999999999")
// console.log(this.multipleSelection)
// console.log("999999999999999999999999999")
// const deleteIds = this.multipleSelection.map((item) => item.id).join(",");
// console.log(deleteIds)
// },
//
onBatchSynchronization() {
if (this.multipleSelection.length == 0) {