- *{{
- $t("message.laborMange.pleaseChoose") +
- $t("message.laborMange.picture")
- }}:
+ *{{ $t("message.laborMange.pleaseChoose") + $t("message.laborMange.picture") }}:
-
+
-
+
- {{ $t("message.laborMange.confirm") }}
+ {{
+ $t("message.laborMange.confirm")
+ }}
{{
$t("message.laborMange.cancel")
}}
@@ -2578,8 +1539,7 @@ export default {
// console.log(this.uGroupAllList, allCheckList)
this.checkAllGroup = checkedCount === allCheckList.length;
console.log(allCheckList);
- this.isIndeterminate3 =
- checkedCount > 0 && checkedCount < allCheckList.length;
+ this.isIndeterminate3 = checkedCount > 0 && checkedCount < allCheckList.length;
},
handleCheckAllChangeFace(val) {
if (val) {
@@ -2607,8 +1567,7 @@ export default {
// console.log(this.ufaceDevAllList, allCheckList)
this.checkAllFaceDev = checkedCount === allCheckList.length;
console.log(allCheckList);
- this.isIndeterminate2 =
- checkedCount > 0 && checkedCount < allCheckList.length;
+ this.isIndeterminate2 = checkedCount > 0 && checkedCount < allCheckList.length;
console.log(this.workerInfo.ufaceDevId);
},
// 获取所有分组
@@ -2688,9 +1647,7 @@ export default {
for (let j = 0; j < this.ufaceDevAllList.length; j++) {
console.log(this.ufaceDevAllList[j].id, id);
if (this.ufaceDevAllList[j].id == id) {
- this.ufaceDevNameList.push(
- this.ufaceDevAllList[j].devName
- );
+ this.ufaceDevNameList.push(this.ufaceDevAllList[j].devName);
this.ufaceDevAllList[j].disabled = false;
}
}
@@ -2813,11 +1770,18 @@ export default {
this.contractList = data.contractList; //合同信息
//获取证书附件
if (data.certificateList.length > 0) {
+ console.log("11111111111", data.certificateList);
data.certificateList.forEach((item) => {
item.certificateState = false; //设置可编辑状态
if (item.photoUrl) {
- let arr = item.photoUrl.split("*");
- item.fileList = [{ name: arr[0], url: arr[1] }];
+ item.fileList = item.photoUrl.split(',').map(item => {
+ const arr = item.split("*");
+ return {
+ name: arr[0],
+ url: arr[1],
+ }
+ })
+ // item.fileList = [{ }];
} else {
item.fileList = [];
}
@@ -2835,11 +1799,26 @@ export default {
//获取保险列表
if (data.insuranceList.length > 0) {
+ // data.insuranceList.forEach((item) => {
+ // item.insuranceState = false; //设置可编辑状态
+ // if (item.photoUrl) {
+ // let arr = item.photoUrl.split("*");
+ // item.fileList = [{ name: arr[0], url: arr[1] }];
+ // } else {
+ // item.fileList = [];
+ // }
+ // });
data.insuranceList.forEach((item) => {
item.insuranceState = false; //设置可编辑状态
if (item.photoUrl) {
- let arr = item.photoUrl.split("*");
- item.fileList = [{ name: arr[0], url: arr[1] }];
+ item.fileList = item.photoUrl.split(',').map(item => {
+ const arr = item.split("*");
+ return {
+ name: arr[0],
+ url: arr[1],
+ }
+ })
+ // item.fileList = [{ }];
} else {
item.fileList = [];
}
@@ -2922,10 +1901,7 @@ export default {
//保存
if (this.basicInfoStatus) {
let data = this.workerInfo;
- if (
- this.workerInfo.ufaceDevId &&
- this.workerInfo.ufaceDevId.length > 0
- ) {
+ if (this.workerInfo.ufaceDevId && this.workerInfo.ufaceDevId.length > 0) {
data.ufaceDevId = this.workerInfo.ufaceDevId.join(",");
} else {
data.ufaceDevId = "";
@@ -2989,9 +1965,7 @@ export default {
if (valid) {
editWorkerInfo(data).then((res) => {
if (res.code == 200) {
- this.$message.success(
- this.$t("message.laborMange.editSuccess")
- );
+ this.$message.success(this.$t("message.laborMange.editSuccess"));
this.detailInfoStatus = false;
this.getUfaceDevList();
this.getUGroupDevList();
@@ -3058,8 +2032,7 @@ export default {
if (type == 1) {
let imgStatus = file2.size / 1024 < 500;
if (imgStatus) {
- this.cropperOption.img =
- this.$store.state.FILEURL + file.data[0].imageUrl;
+ this.cropperOption.img = this.$store.state.FILEURL + file.data[0].imageUrl;
this.cropperDialog = true;
} else if (this.isSzProject == 1) {
console.log("6665");
@@ -3080,57 +2053,54 @@ export default {
name: file.data[0].fileInfo.originalFilename,
url: file.data[0].imageUrl,
};
- if (
- this.contractList[0].fileList &&
- this.contractList[0].fileList.length > 0
- ) {
+ if (this.contractList[0].fileList && this.contractList[0].fileList.length > 0) {
this.contractList[0].fileList.push(data);
} else {
this.contractList[0].fileList = [];
this.contractList[0].fileList.push(data);
}
} else if (type == 5) {
- let data = {
- name: file.file.data[0].fileInfo.originalFilename,
- url: file.file.data[0].imageUrl,
- };
- this.certificateList[file.index].fileList = [data];
- this.certificateList[file.index].photoUrl =
- file.file.data[0].fileInfo.originalFilename +
- "*" +
- file.file.data[0].imageUrl;
+ // 资格证书
+ this.addImgAdd('certificateList', file);
+ console.log(this.certificateList[file.index]);
} else if (type == 6) {
this.workerInfo.idCardBigPhotoUrl = file.data[0].imageUrl;
} else if (type == 7) {
- let data = {
+ // 工伤保险
+ this.addImgAdd('insuranceList', file);
+ // this.insuranceList[file.index].fileList = [data];
+ // this.insuranceList[file.index].photoUrl =
+ // file.file.data[0].fileInfo.originalFilename + "*" + file.file.data[0].imageUrl;
+ }
+ },
+ // 资格证书和工伤共用添加
+ addImgAdd(useName, file) {
+ let data = {
name: file.file.data[0].fileInfo.originalFilename,
url: file.file.data[0].imageUrl,
};
- this.insuranceList[file.index].fileList = [data];
- this.insuranceList[file.index].photoUrl =
- file.file.data[0].fileInfo.originalFilename +
- "*" +
- file.file.data[0].imageUrl;
- }
+ const fileStr = file.file.data[0].fileInfo.originalFilename + "*" + file.file.data[0].imageUrl;
+
+ this[useName][file.index].fileList.push(data);
+ this[useName][file.index].photoUrl =
+ this[useName][file.index].photoUrl == '' ? fileStr : this[useName][file.index].photoUrl + ',' + fileStr;
},
// 人员照片库比对
checkImgLibrary(url) {
- checkImgLibraryApi({ fileUrl: url, projectSn: this.projectSn }).then(
- (res) => {
- if (res.result && res.result.length > 0) {
- this.imgRadiolist = res.result;
- this.radio = res.result[0].personSerial;
- this.showImgList = true;
- this.cropperDialog = false;
- } else {
- this.workerInfo.fieldAcquisitionUrl = url;
- this.workerInfo.personSerial = "";
- this.cropperDialog = false;
- // this.$message.error('未匹配到照片!')
- }
- console.log(res, "-----人员库照片查询");
+ checkImgLibraryApi({ fileUrl: url, projectSn: this.projectSn }).then((res) => {
+ if (res.result && res.result.length > 0) {
+ this.imgRadiolist = res.result;
+ this.radio = res.result[0].personSerial;
+ this.showImgList = true;
+ this.cropperDialog = false;
+ } else {
+ this.workerInfo.fieldAcquisitionUrl = url;
+ this.workerInfo.personSerial = "";
+ this.cropperDialog = false;
+ // this.$message.error('未匹配到照片!')
}
- );
+ console.log(res, "-----人员库照片查询");
+ });
},
//人脸监测、
checkFace(url) {
@@ -3230,8 +2200,7 @@ export default {
if (res.code == 200) {
let val = res.result;
if (type == 1) {
- this.workerInfo.nation =
- val.ethnicity + this.$t("message.laborMange.clan");
+ this.workerInfo.nation = val.ethnicity + this.$t("message.laborMange.clan");
this.workerInfo.sex = val.sex == "男" ? 1 : 2;
this.workerInfo.workerName = val.name;
this.workerInfo.birthday = val.birth;
@@ -3244,9 +2213,7 @@ export default {
? val.valid_to
: "";
this.workerInfo.longTerm =
- val.valid_to == "长期" || val.valid_to.indexOf("长期") == -1
- ? true
- : false;
+ val.valid_to == "长期" || val.valid_to.indexOf("长期") == -1 ? true : false;
}
} else {
this.$message.error(this.$t("message.laborMange.hint10"));
@@ -3323,14 +2290,25 @@ export default {
}
});
} else if (type == 5) {
- this.certificateList[file.index].fileList = [];
- this.certificateList[file.index].photoUrl = "";
+ console.log('1111111111', file.file.url);
+ // this.certificateList[file.index].fileList = [];
+ // this.certificateList[file.index].photoUrl = "";
+ this.deleteImgUse('certificateList', file);
} else if (type == 7) {
- this.insuranceList[file.index].fileList = [];
- this.insuranceList[file.index].photoUrl = "";
+ this.deleteImgUse('insuranceList', file);
}
},
+ // 资格证书和工伤共用删除
+ deleteImgUse(useName, file) {
+ const findIndex = this[useName][file.index].fileList.findIndex(item => item.url == file.file.url);
+ const arr = this[useName][file.index].photoUrl.split(',');
+ if (findIndex > -1) {
+ arr.splice(findIndex, 1);
+ this[useName][file.index].photoUrl = arr.join(",");
+ this[useName][file.index].fileList.splice(findIndex, 1);
+ }
+ },
//编辑合同信息
editPactInfo() {
if (this.pactInfoStatus) {
@@ -3352,8 +2330,8 @@ export default {
if (this.contractList[0].contractNumber == "") {
this.$message.error(
this.$t("message.laborMange.placeholder2") +
- this.$t("message.laborMange.contract") +
- this.$t("message.laborMange.serialNumber")
+ this.$t("message.laborMange.contract") +
+ this.$t("message.laborMange.serialNumber")
);
return;
}
@@ -3374,8 +2352,8 @@ export default {
if (this.contractList[0].contractNumber == "") {
this.$message.error(
this.$t("message.laborMange.placeholder2") +
- this.$t("message.laborMange.contract") +
- this.$t("message.laborMange.serialNumber")
+ this.$t("message.laborMange.contract") +
+ this.$t("message.laborMange.serialNumber")
);
return;
}
@@ -3544,9 +2522,7 @@ export default {
} else if (type == 4) {
//获取合同照片
if (data.contractList.length > 0) {
- let arr = data.contractList[0]
- ? data.contractList[0].imageUrl.split(",")
- : "";
+ let arr = data.contractList[0] ? data.contractList[0].imageUrl.split(",") : "";
let fileList = [];
arr.forEach((item) => {
let valArr = item.split("*");
@@ -3573,10 +2549,7 @@ export default {
saveTableInfo(type, index) {
//type == 1 证书 2 体检报告; 3 保险
if (type == 1) {
- let date1_s = this.certificateList[index].effectTime.replace(
- /\-/g,
- "/"
- );
+ let date1_s = this.certificateList[index].effectTime.replace(/\-/g, "/");
let date2_s = this.certificateList[index].issueTime.replace(/\-/g, "/");
let date1_unix = Date.parse(date1_s); //將字符串格式日期转化为时间戳,就是1970年到当前日期的毫秒数
let date2_unix = Date.parse(date2_s); //將字符串格式日期转化为时间戳,就是1970年到当前日期的毫秒数
@@ -3594,7 +2567,7 @@ export default {
if (this.certificateList[index].certificateType == "") {
this.$message.error(
this.$t("message.laborMange.pleaseChoose") +
- this.$t("message.laborMange.certificateType")
+ this.$t("message.laborMange.certificateType")
);
return;
}
@@ -3623,7 +2596,7 @@ export default {
if (this.physicalsList[index].personHeight == "") {
this.$message.error(
this.$t("message.laborMange.placeholder2") +
- this.$t("message.laborMange.stature")
+ this.$t("message.laborMange.stature")
);
return;
}
@@ -3650,10 +2623,12 @@ export default {
});
}
} else if (type == 3) {
- let date1_s = this.insuranceList[index].insuranceTime.replace(
- /\-/g,
- "/"
- );
+ if(!this.insuranceList[index].insuranceTime || !this.insuranceList[index].expireTime){
+ this.$message.error("日期不能为空!");
+ return
+ }
+
+ let date1_s = this.insuranceList[index].insuranceTime.replace(/\-/g, "/");
let date2_s = this.insuranceList[index].expireTime.replace(/\-/g, "/");
let date1_unix = Date.parse(date1_s); //將字符串格式日期转化为时间戳,就是1970年到当前日期的毫秒数
let date2_unix = Date.parse(date2_s); //將字符串格式日期转化为时间戳,就是1970年到当前日期的毫秒数
@@ -3666,7 +2641,7 @@ export default {
if (this.insuranceList[index].state == "") {
this.$message.error(
this.$t("message.laborMange.pleaseChoose") +
- this.$t("message.laborMange.insurancePurchaseStatus")
+ this.$t("message.laborMange.insurancePurchaseStatus")
);
return;
}
@@ -3831,7 +2806,7 @@ export default {
},
//处罚记录 切换
- handleClick() {},
+ handleClick() { },
//滚动事件
handleScroll(e) {
@@ -3860,14 +2835,17 @@ export default {
display: flex;
align-items: center;
}
+
.flex3 {
display: flex;
align-items: center;
justify-content: space-between;
}
+
.flex2 {
display: flex;
}
+
.personDetails {
width: 100%;
height: 100%;
@@ -3890,9 +2868,11 @@ export default {
// margin-bottom: 50px;
padding: 0 40px;
box-sizing: border-box;
+
.img_wrap {
text-align: center;
margin-right: 30px;
+
// height: 146px;
img {
width: 105px;
@@ -3901,6 +2881,7 @@ export default {
}
}
}
+
.table {
margin-bottom: 40px;
}
@@ -3910,18 +2891,23 @@ export default {
font-size: 28px;
font-weight: 600;
}
+
.time {
line-height: 28px;
}
+
.workType {
line-height: 28px;
}
+
.team1 {
line-height: 28px;
}
+
.team2 {
line-height: 28px;
}
+
.number {
line-height: 28px;
}
@@ -3947,43 +2933,52 @@ export default {
height: 100%;
text-align: center;
border-left: 1px solid #bbbbbb;
+
div {
height: 40px;
line-height: 40px;
cursor: pointer;
}
}
+
.checkedClass {
color: #5181f6;
}
+
.hide {
width: 90%;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
+
.img-list {
.form-label {
margin-bottom: 20px;
+
span {
color: #f56c6c;
}
}
+
.radio-box {
padding: 0 30px;
}
+
/deep/.el-radio {
display: inline-flex;
align-items: center;
margin-right: 30px;
margin-bottom: 20px;
}
+
.btn-box {
margin-top: 30px;
display: flex;
justify-content: space-around;
}
}
+
::v-deep .el-input__inner {
line-height: 1px !important;
}