人员管理(劳务人员):更改身份证头像上传方式为 http-request
This commit is contained in:
parent
d3b74de6f4
commit
5424002336
760
package-lock.json
generated
760
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -21,6 +21,7 @@
|
||||
"html2canvas": "^1.0.0-rc.7",
|
||||
"js-base64": "^3.7.2",
|
||||
"js-md5": "^0.7.3",
|
||||
"lrz": "^4.9.41",
|
||||
"moment": "^2.29.1",
|
||||
"monitorjs_horse": "^2.2.1",
|
||||
"mqtt": "^4.2.6",
|
||||
|
||||
3
src/assets/js/api/common/index.js
Normal file
3
src/assets/js/api/common/index.js
Normal file
@ -0,0 +1,3 @@
|
||||
import { post } from '@/assets/js/http'
|
||||
|
||||
export const apiUploadImage = data => post('upload/image', data) // 上传图片
|
||||
@ -43,7 +43,7 @@ if (process.env.NODE_ENV == 'development') {
|
||||
// axios.defaults.baseURL = 'http://124.71.178.44:100/' // 河南
|
||||
// tag: 本地
|
||||
// axios.defaults.baseURL = 'http://192.168.34.174:6023/' // 老大本地
|
||||
// axios.defaults.baseURL = 'http://192.168.34.125:6023/'; //杨意本地 http/1.1
|
||||
axios.defaults.baseURL = 'http://192.168.34.125:6023/'; //杨意本地 http/1.1
|
||||
// axios.defaults.baseURL = 'http://47.97.202.104:6023/';
|
||||
// axios.defaults.baseURL = 'http://124.71.178.44:9500/'; // 星璇
|
||||
// axios.defaults.baseURL = 'http://120.196.217.6:7000/';
|
||||
@ -243,7 +243,11 @@ export function post(url, params, config) {
|
||||
if (res.data.code == 200) {
|
||||
resolve(res.data);
|
||||
} else {
|
||||
Message.error(res.data.message);
|
||||
if (res.data.status !== 'SUCCESS') {
|
||||
Message.error(res.data.message);
|
||||
}else{
|
||||
resolve(res.data);
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
|
||||
@ -54,8 +54,8 @@ export default new Vuex.Store({
|
||||
|
||||
/* 2022-06-06 */ // tag: 本地测试接口
|
||||
// BASEURL:'http://192.168.34.174:6023/',
|
||||
// UPLOADURL: 'http://192.168.34.125:6023/upload/image',
|
||||
// FILEURL: 'http://192.168.34.125:6023/image/',
|
||||
UPLOADURL: 'http://192.168.34.125:6023/upload/image',
|
||||
FILEURL: 'http://192.168.34.125:6023/image/',
|
||||
// UPLOADURL:'http://'+"61.190.32.219:9050"+'/upload/image',//正式
|
||||
// FILEURL:'http://'+"61.190.32.219:9050"+'/image/',//正式
|
||||
ACCOUNTTYPE: ['系统管理员', '企业一级管理员', '企业二级管理员', '企业三级管理员', '项目管理员'], //1系统管理员,2企业管理员账号,3企业区账号,4企业市账号,5项目账号
|
||||
|
||||
@ -1889,7 +1889,6 @@ export default {
|
||||
checkAllStatus: false,
|
||||
webSocket: null,
|
||||
instrUmentScreenDialog: false,
|
||||
// umentScreenUrl: require("@/assets/logo.png"),
|
||||
umentScreenUrl: './img/logo/' + LOGO_white + '.png',
|
||||
base64Type: 'data:image/jpeg;base64,',
|
||||
isUploadToHouse: false, //是否显示上传到住建局按钮
|
||||
@ -1985,9 +1984,7 @@ export default {
|
||||
// 判断是否为深圳项目
|
||||
getProjectConfig() {
|
||||
getProjectConfigListApi({ projectSn: this.projectSn }).then((res) => {
|
||||
// this.isSzProject = 1
|
||||
this.isSzProject = res.result[0].isSzProject //1是 0否
|
||||
// console.log(res.result[0].isSzProject)
|
||||
})
|
||||
},
|
||||
exportM() {
|
||||
@ -2004,7 +2001,6 @@ export default {
|
||||
userId: this.$store.state.userInfo.userId,
|
||||
enterpriseId: this.checkedId
|
||||
}).then((res) => {
|
||||
// console.log('下发通行设备',res)
|
||||
if (res.code == 200) {
|
||||
this.$message({
|
||||
message: '操作成功,已在后台下发,请稍后查看!',
|
||||
@ -2014,10 +2010,8 @@ export default {
|
||||
})
|
||||
},
|
||||
handleChangeE(file, fileList) {
|
||||
// console.log(file)
|
||||
this.fileTemp = file.raw
|
||||
if (this.fileTemp) {
|
||||
// console.log(this.fileTemp.type)
|
||||
if (
|
||||
this.fileTemp.type ==
|
||||
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' ||
|
||||
@ -2108,7 +2102,6 @@ export default {
|
||||
console.log(res)
|
||||
this.enterpriseTreeData = res.result
|
||||
this.$nextTick(() => {
|
||||
// this.checkeEnterprise(res.result[0])
|
||||
if (this.checkedId) {
|
||||
this.$refs['treeNode'].setCurrentKey(this.checkedId.toString())
|
||||
} else {
|
||||
@ -2329,12 +2322,7 @@ export default {
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
// this.$message({
|
||||
// type: "info",
|
||||
// message: "已取消删除",
|
||||
// });
|
||||
})
|
||||
.catch(error)
|
||||
},
|
||||
|
||||
//新增 人员录入 按钮
|
||||
@ -2408,7 +2396,6 @@ export default {
|
||||
: ''
|
||||
this.showEnterpriseName =
|
||||
res.result.length > 0 ? res.result[0].enterpriseName : ''
|
||||
// console.log(res);
|
||||
this.getDepartmentList()
|
||||
this.getHierarchyEnterpriseList()
|
||||
} else {
|
||||
@ -2434,38 +2421,8 @@ export default {
|
||||
enterpriseId: ''
|
||||
}
|
||||
this.$refs.multipleTable.bodyWrapper.scrollTop = 0
|
||||
// getTableData();
|
||||
},
|
||||
|
||||
//删除 企业
|
||||
// deleteEnterpriseInfo(value) {
|
||||
// this.$confirm(
|
||||
// this.$t("message.laborMange.deleteHint"),
|
||||
// this.$t("message.laborMange.hint"),
|
||||
// {
|
||||
// confirmButtonText: this.$t("message.laborMange.confirm"),
|
||||
// cancelButtonText: this.$t("message.laborMange.cancel"),
|
||||
// type: "warning",
|
||||
// }
|
||||
// )
|
||||
// .then(() => {
|
||||
// let data = {
|
||||
// projectSn: this.projectSn,
|
||||
// enterpriseId: value.id,
|
||||
// };
|
||||
// deleteEnterprise(data).then((res) => {
|
||||
// if (res.code == 200) {
|
||||
// this.$message({
|
||||
// type: "success",
|
||||
// message: this.$t("message.laborMange.deleteSuccess"),
|
||||
// });
|
||||
// this.getProjectList();
|
||||
// this.checkedId = "";
|
||||
// }
|
||||
// });
|
||||
// })
|
||||
// },
|
||||
|
||||
// 新增 || 编辑 人员录入 保存按钮
|
||||
savePersonFn(formName) {
|
||||
console.log('企业id', this.checkedId)
|
||||
@ -2532,7 +2489,6 @@ export default {
|
||||
this.$message.success(this.$t('message.laborMange.addSuccess'))
|
||||
this.addPersonDialog = false
|
||||
this.resetForm(formName)
|
||||
// this.getDepartmentList();
|
||||
this.getTableData()
|
||||
}
|
||||
})
|
||||
@ -2709,12 +2665,7 @@ export default {
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
// this.$message({
|
||||
// type: "info",
|
||||
// message: "已取消删除",
|
||||
// });
|
||||
})
|
||||
.catch(console.log)
|
||||
},
|
||||
|
||||
//删除 身份证头像 或 现场采集照片
|
||||
@ -2743,92 +2694,6 @@ export default {
|
||||
}
|
||||
})
|
||||
localStorage.setItem('showPersonModule', 2)
|
||||
// this.personDialogTitle = this.$t(
|
||||
// "message.laborMange.detailsOfManagementPersonnel"
|
||||
// );
|
||||
// this.titleType = "detail";
|
||||
// this.personForm = {
|
||||
// workerName: "",
|
||||
// sex: "",
|
||||
// idCard: "",
|
||||
// birthday: "",
|
||||
// enterDate: "",
|
||||
// nation: "",
|
||||
// nativePlace: "",
|
||||
// issuingAuthorityForIdcard: "",
|
||||
// idCardEndDate: "",
|
||||
// longTerm: false,
|
||||
// phoneNumber: "",
|
||||
// emergentPerson: "",
|
||||
// emergentPhone: "",
|
||||
// inserviceType: "",
|
||||
// politicsStatus: "",
|
||||
// marry: "",
|
||||
// payRollBankName: "",
|
||||
// payRollBankNumber: "",
|
||||
// educational: "",
|
||||
// blood: "",
|
||||
// examinationImage: "",
|
||||
// contractImage: "",
|
||||
// employmentCard: "",
|
||||
// idCardBigPhotoUrl: "",
|
||||
// fieldAcquisitionUrl: "",
|
||||
// personType: 1,
|
||||
// };
|
||||
// this.addPersonDialog = true;
|
||||
// this.personForm = value;
|
||||
// this.personForm.sex = String(value.sex);
|
||||
// this.personForm.longTerm = value.longTerm == 1 ? true : false;
|
||||
// this.idCardUpPhotoUrlFile = this.personForm.idCardUpPhotoUrl
|
||||
// ? [
|
||||
// {
|
||||
// name: this.personForm.idCardUpPhotoUrl,
|
||||
// url: this.personForm.idCardUpPhotoUrl,
|
||||
// },
|
||||
// ]
|
||||
// : [];
|
||||
// this.idCardDownPhotoUrlFile = this.personForm.idCardDownPhotoUrl
|
||||
// ? [
|
||||
// {
|
||||
// name: this.personForm.idCardDownPhotoUrl,
|
||||
// url: this.personForm.idCardDownPhotoUrl,
|
||||
// },
|
||||
// ]
|
||||
// : [];
|
||||
// this.idCardBigPhotoUrlFile = this.personForm.idCardBigPhotoUrl
|
||||
// ? [
|
||||
// {
|
||||
// name: this.personForm.idCardBigPhotoUrl,
|
||||
// url: this.personForm.idCardBigPhotoUrl,
|
||||
// },
|
||||
// ]
|
||||
// : [];
|
||||
// this.fieldAcquisitionUrlFile = this.personForm.fieldAcquisitionUrl
|
||||
// ? [
|
||||
// {
|
||||
// name: this.personForm.fieldAcquisitionUrl,
|
||||
// url: this.personForm.fieldAcquisitionUrl,
|
||||
// },
|
||||
// ]
|
||||
// : [];
|
||||
// //合同原件
|
||||
// let arr2 = value.contractImage != "" && value.contractImage.split(",");
|
||||
// let newArr2 = [];
|
||||
// if (arr2.length > 1) {
|
||||
// for (let i in arr2) {
|
||||
// let a = arr2[i].split("*");
|
||||
// newArr2.push({ name: a[0], url: a[1] });
|
||||
// }
|
||||
// } else {
|
||||
// if (value.contractImage != "") {
|
||||
// let a = arr2[0].split("*");
|
||||
// newArr2.push({ name: a[0], url: a[1] });
|
||||
// }
|
||||
// }
|
||||
// this.contractImageFile = value.contractImage != "" ? newArr2 : []; //合同原件
|
||||
// setTimeout(() => {
|
||||
// this.$refs.personDialog.scrollTop = 0;
|
||||
// }, 120);
|
||||
},
|
||||
|
||||
//列表数据 退场按钮
|
||||
@ -2863,12 +2728,7 @@ export default {
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
// this.$message({
|
||||
// type: "info",
|
||||
// message: "已取消",
|
||||
// });
|
||||
})
|
||||
.catch(console.log)
|
||||
},
|
||||
|
||||
//切换每页显示数量
|
||||
@ -2973,7 +2833,6 @@ export default {
|
||||
handleSuccess(file, type, file2) {
|
||||
// 人员录入 type == 1 身份证正面照url 国徽; 2 身份证反面照url 人像; 3 身份证头像; 4 现场采集人脸; 5 合同附件;
|
||||
if (file.code == 200 || file.status == 'SUCCESS') {
|
||||
// this.$message.success(this.$t("message.laborMange.uploadSuccessful"));
|
||||
let arr = { name: file.data[0].filename, url: file.data[0].imageUrl }
|
||||
if (type == 1) {
|
||||
this.personForm.idCardUpPhotoUrl = file.data[0].imageUrl
|
||||
@ -2998,10 +2857,7 @@ export default {
|
||||
} else {
|
||||
this.checkFace(file.data[0].imageUrl)
|
||||
}
|
||||
// this.checkFace(file.data[0].imageUrl)
|
||||
}
|
||||
// this.cropperOption.img = this.$store.state.FILEURL + file.data[0].imageUrl;
|
||||
// this.cropperDialog = true;
|
||||
} else if (type == 5) {
|
||||
this.contractImageFile.push(arr)
|
||||
let arrJoin = []
|
||||
@ -3045,7 +2901,6 @@ export default {
|
||||
this.personForm.fieldAcquisitionUrl = url
|
||||
this.fieldAcquisitionFile = [{ name: '', url: url }]
|
||||
this.cropperDialog = false
|
||||
// this.$message.error('未匹配到照片!')
|
||||
}
|
||||
console.log(res, '-----人员库照片查询')
|
||||
}
|
||||
@ -3089,7 +2944,6 @@ export default {
|
||||
} else {
|
||||
this.checkFace(res.data.data[0].imageUrl)
|
||||
}
|
||||
// this.checkFace(res.data.data[0].imageUrl)
|
||||
}
|
||||
})
|
||||
})
|
||||
@ -3376,7 +3230,6 @@ export default {
|
||||
//保存 并 关闭
|
||||
onclose(type) {
|
||||
if (type == 1) {
|
||||
// this.webSocket.send("OpenFaceFrame(0)");
|
||||
this.webSocket.send('sGetBase64')
|
||||
} else if (type == 2) {
|
||||
this.webSocket.send('bStopPlay')
|
||||
@ -3437,19 +3290,7 @@ export default {
|
||||
id: id
|
||||
}
|
||||
console.log('data', json)
|
||||
updateByIdWorkerInfo(json).then((res) => {
|
||||
// if (res.code == 200) {
|
||||
// this.$message.success(this.$t("message.laborMange.modifySuccess"));
|
||||
// this.getTeamList(1);
|
||||
// this.addPersonDialog = false;
|
||||
// this.resetForm(formName);
|
||||
// this.examinationFile = []; //体检报告
|
||||
// this.contractFile = []; //合同附件
|
||||
// this.employmentFile = []; //从业资格证书
|
||||
// this.idCardUpPhotoFile = []; //身份证头像
|
||||
// this.fieldAcquisitionFile = []; //现场采集人脸
|
||||
// }
|
||||
})
|
||||
updateByIdWorkerInfo(json).then(console.log)
|
||||
},
|
||||
//身份证识别
|
||||
discernId(url, type) {
|
||||
@ -3491,7 +3332,6 @@ export default {
|
||||
align-items: center;
|
||||
.left2 {
|
||||
width: 370px;
|
||||
// background: #fbfbfb;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
.placeholder {
|
||||
@ -3518,12 +3358,10 @@ export default {
|
||||
.list_content::-webkit-scrollbar-thumb {
|
||||
/*滚动条里面小方块*/
|
||||
border-radius: 5px;
|
||||
// box-shadow: inset 0 0 5px #C1C1C1;
|
||||
background: #c1c1c1;
|
||||
}
|
||||
.list_content::-webkit-scrollbar-track {
|
||||
/*滚动条里面轨道*/
|
||||
// box-shadow: inset 0 0 5px #C1C1C1;
|
||||
border-radius: 5px;
|
||||
background: #f1f1f1;
|
||||
}
|
||||
@ -3603,7 +3441,6 @@ export default {
|
||||
}
|
||||
.addPerson_content {
|
||||
height: 617px;
|
||||
// overflow-y: auto;
|
||||
padding-top: 10px;
|
||||
}
|
||||
.custom-tree-node {
|
||||
|
||||
@ -39,35 +39,6 @@
|
||||
</div>
|
||||
|
||||
<div class="list_content">
|
||||
<!-- <div
|
||||
v-if="enterpriseListData.length > 0"
|
||||
class="flex content_data"
|
||||
:class="checkedId == item.id && 'checkedName'"
|
||||
@click="checkeEnterprise(item)"
|
||||
v-for="item in enterpriseListData"
|
||||
:key="item.id"
|
||||
>
|
||||
<div
|
||||
:class="
|
||||
checkedId == item.id ? 'enterpriseName' : 'enterpriseName2'
|
||||
"
|
||||
>
|
||||
{{ item.enterpriseName }}
|
||||
</div>
|
||||
<div class="flex2" v-if="checkedId == item.id">
|
||||
<img
|
||||
src="@/assets/images/icon-edit.png"
|
||||
style="margin-right: 16px"
|
||||
class="icon"
|
||||
@click="editEnterpriseInfo(item)"
|
||||
/>
|
||||
<img
|
||||
src="@/assets/images/icon-delete.png"
|
||||
class="icon"
|
||||
@click="deleteEnterpriseInfo(item)"
|
||||
/>
|
||||
</div>
|
||||
</div> -->
|
||||
<el-tree
|
||||
:data="enterpriseTreeData"
|
||||
node-key="id"
|
||||
@ -96,15 +67,6 @@
|
||||
</div>
|
||||
</span>
|
||||
</el-tree>
|
||||
<!-- <div v-if="enterpriseListData.length == 0" style="margin-top: 50%">
|
||||
<img
|
||||
src="@/assets/images/noData.png"
|
||||
style="width: 80px; height: 80px"
|
||||
/>
|
||||
<div style="color: #ccd9fa; margin-top: 5px">
|
||||
{{ $t("message.laborMange.noData") }}
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="addFirm">
|
||||
@ -443,19 +405,6 @@
|
||||
v-if="scope.row.inserviceType == 1"
|
||||
>{{ $t('message.laborMange.bowOutWith') }}</el-button
|
||||
>
|
||||
|
||||
<!-- <div
|
||||
class="operationText"
|
||||
@click="editWorkerInfo(scope.row, 1)"
|
||||
v-if="scope.row.inserviceType == 1"
|
||||
>
|
||||
<img
|
||||
src="@/assets/images/icon-edit.png"
|
||||
style="margin-right: 5px"
|
||||
/>
|
||||
<span>{{ $t("message.laborMange.edit") }}</span>
|
||||
</div> -->
|
||||
<!-- 再次进场 -->
|
||||
<el-button
|
||||
size="medium"
|
||||
type="text"
|
||||
@ -474,13 +423,6 @@
|
||||
/>
|
||||
<span>{{ $t('message.laborMange.delete') }}</span>
|
||||
</div>
|
||||
<!-- <el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="issuePersonOneFn(scope.row.id)"
|
||||
v-if="scope.row.inserviceType == 1"
|
||||
>{{ $t("message.laborMange.aKeyIssued") }}</el-button
|
||||
> -->
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@ -1475,226 +1417,6 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <el-row :gutter="24">
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
:label="$t('message.laborMange.annexContract')"
|
||||
v-model="personForm.contractImage"
|
||||
prop="contractImage"
|
||||
>
|
||||
<div
|
||||
v-if="contractFile.length == 0 && titleType == 'detail'"
|
||||
style="color: #a1a4b0"
|
||||
>
|
||||
{{ $t("message.laborMange.notHave") }}
|
||||
</div>
|
||||
<div v-else class="upload_btn_wrap">
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
:class="titleType == 'detail' ? 'margin_top35' : ''"
|
||||
:action="uploadUrl"
|
||||
:on-remove="(file) => handleRemove(file, 4)"
|
||||
:on-success="(file) => handleSuccess(file, 4)"
|
||||
:on-error="(file) => handleError(file, 4)"
|
||||
:on-preview="(file) => handlePreview(file, 4)"
|
||||
:limit="3"
|
||||
:on-exceed="(file) => handleExceed(file, 4)"
|
||||
name="files"
|
||||
:file-list="contractFile"
|
||||
:disabled="titleType == 'detail'"
|
||||
>
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
v-if="titleType != 'detail'"
|
||||
>{{
|
||||
$t("message.laborMange.clickOnTheUpload")
|
||||
}}</el-button
|
||||
>
|
||||
</el-upload>
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
class="High_btn"
|
||||
@click="turnOnTheCamera(5)"
|
||||
v-if="titleType != 'detail'"
|
||||
>{{
|
||||
$t("message.laborMange.takesPictures")
|
||||
}}</el-button
|
||||
>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
:label="$t('message.laborMange.certificate')"
|
||||
v-model="personForm.employmentCard"
|
||||
prop="employmentCard"
|
||||
:rules="[
|
||||
{
|
||||
required: specialTeam ? true : false,
|
||||
message: '必选',
|
||||
trigger: 'blur',
|
||||
},
|
||||
]"
|
||||
>
|
||||
<div
|
||||
v-if="
|
||||
employmentFile.length == 0 && titleType == 'detail'
|
||||
"
|
||||
style="color: #a1a4b0"
|
||||
>
|
||||
{{ $t("message.laborMange.notHave") }}
|
||||
</div>
|
||||
<div v-else class="upload_btn_wrap">
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
:action="uploadUrl"
|
||||
:class="titleType == 'detail' ? 'margin_top35' : ''"
|
||||
:on-remove="(file) => handleRemove(file, 5)"
|
||||
:on-success="(file) => handleSuccess(file, 5)"
|
||||
:on-error="(file) => handleError(file, 5)"
|
||||
:on-preview="(file) => handlePreview(file, 5)"
|
||||
:limit="3"
|
||||
:on-exceed="(file) => handleExceed(file, 4)"
|
||||
name="files"
|
||||
:file-list="employmentFile"
|
||||
:disabled="titleType == 'detail'"
|
||||
>
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
v-if="titleType != 'detail'"
|
||||
>{{
|
||||
$t("message.laborMange.clickOnTheUpload")
|
||||
}}</el-button
|
||||
>
|
||||
</el-upload>
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
class="High_btn"
|
||||
@click="turnOnTheCamera(6)"
|
||||
v-if="titleType != 'detail'"
|
||||
>{{
|
||||
$t("message.laborMange.takesPictures")
|
||||
}}</el-button
|
||||
>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
:label="$t('message.laborMange.physical')"
|
||||
v-model="personForm.examinationImage"
|
||||
prop="examinationImage"
|
||||
>
|
||||
<div
|
||||
v-if="
|
||||
examinationFile.length == 0 && titleType == 'detail'
|
||||
"
|
||||
style="color: #a1a4b0"
|
||||
>
|
||||
{{ $t("message.laborMange.notHave") }}
|
||||
</div>
|
||||
<div v-else class="upload_btn_wrap">
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
:class="titleType == 'detail' && 'examination'"
|
||||
:action="uploadUrl"
|
||||
:on-remove="(file) => handleRemove(file, 3)"
|
||||
:on-success="(file) => handleSuccess(file, 3)"
|
||||
:on-error="(file) => handleError(file, 3)"
|
||||
:on-preview="(file) => handlePreview(file, 3)"
|
||||
:limit="3"
|
||||
:on-exceed="(file) => handleExceed(file, 3)"
|
||||
name="files"
|
||||
:file-list="examinationFile"
|
||||
:disabled="titleType == 'detail'"
|
||||
>
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
v-if="titleType != 'detail'"
|
||||
>{{
|
||||
$t("message.laborMange.clickOnTheUpload")
|
||||
}}</el-button
|
||||
>
|
||||
</el-upload>
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
class="High_btn"
|
||||
@click="turnOnTheCamera(7)"
|
||||
v-if="titleType != 'detail'"
|
||||
>{{
|
||||
$t("message.laborMange.takesPictures")
|
||||
}}</el-button
|
||||
>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="specialTeam">
|
||||
<el-form-item
|
||||
:label="$t('message.laborMange.specialCertNum')"
|
||||
prop="specialCertificateNumber"
|
||||
:rules="[
|
||||
{ required: true, message: '必填', trigger: 'blur' },
|
||||
]"
|
||||
>
|
||||
<el-input
|
||||
v-model="personForm.specialCertificateNumber"
|
||||
:disabled="titleType == 'detail'"
|
||||
:placeholder="$t('message.laborMange.placeholder2')"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24" v-if="specialTeam">
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
:label="$t('message.laborMange.specialCert')"
|
||||
prop="specialCertificateType"
|
||||
:rules="[
|
||||
{ required: true, message: '必选', trigger: 'change' },
|
||||
]"
|
||||
>
|
||||
<el-select
|
||||
v-model="personForm.specialCertificateType"
|
||||
:placeholder="$t('message.laborMange.pleaseChoose')"
|
||||
:disabled="titleType == 'detail'"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option label="一级" :value="1"></el-option>
|
||||
<el-option label="二级" :value="2"></el-option>
|
||||
<el-option label="三级" :value="3"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
:label="$t('message.laborMange.specialCertEndDate')"
|
||||
prop="specialCertificateValidityTime"
|
||||
:rules="[
|
||||
{ required: true, message: '必选', trigger: 'blur' },
|
||||
]"
|
||||
>
|
||||
<el-date-picker
|
||||
v-model="personForm.specialCertificateValidityTime"
|
||||
type="date"
|
||||
:placeholder="
|
||||
$t('message.laborMange.pleaseSelectADate')
|
||||
"
|
||||
value-format="yyyy-MM-dd"
|
||||
style="width: 100%"
|
||||
:disabled="titleType == 'detail'"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row> -->
|
||||
<el-row>
|
||||
<el-form-item
|
||||
:label="$t('message.laborMange.faceDevice')"
|
||||
@ -1804,16 +1526,14 @@
|
||||
</div>
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
:action="uploadUrl"
|
||||
action="uploadUrl"
|
||||
:on-remove="(file) => handleRemove(file, 6)"
|
||||
:on-success="(file) => handleSuccess(file, 6)"
|
||||
:on-error="(file) => handleError(file, 6)"
|
||||
:on-preview="(file) => handlePreview(file, 6)"
|
||||
:before-upload="(file) => handleBeforeUpload(file, 6)"
|
||||
name="files"
|
||||
:show-file-list="false"
|
||||
:file-list="idCardUpPhotoFile"
|
||||
:disabled="titleType == 'detail'"
|
||||
:http-request="handleUpload"
|
||||
>
|
||||
<el-button
|
||||
size="medium"
|
||||
@ -2222,10 +1942,6 @@
|
||||
v-for="item in imgRadiolist"
|
||||
:key="item.id"
|
||||
>
|
||||
<!-- <img
|
||||
style="width: 100px; height: 100px"
|
||||
src="@/assets/images/bigScreen/002.jpg"
|
||||
/> -->
|
||||
<el-image
|
||||
style="width: 100px; height: 100px"
|
||||
:src="fileUrl + item.imageUrl"
|
||||
@ -2293,6 +2009,8 @@ import {
|
||||
} from '@/assets/js/util.js'
|
||||
import { getProjectConfigListApi } from '@/assets/js/api/project.js'
|
||||
import { VueCropper } from 'vue-cropper'
|
||||
|
||||
import { apiUploadImage } from '@/assets/js/api/common'
|
||||
export default {
|
||||
components: {
|
||||
VueCropper
|
||||
@ -2520,6 +2238,31 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleUpload(params) {
|
||||
const file = params.file
|
||||
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
|
||||
}
|
||||
const formData = new FormData()
|
||||
formData.append('files', file)
|
||||
apiUploadImage(formData).then((res) => {
|
||||
if (res.code == 200 || res.status == 'SUCCESS') {
|
||||
const data = res.data
|
||||
let obj = {}
|
||||
for (let i in data) {
|
||||
obj = { name: data[i].filename, url: data[i].imageUrl }
|
||||
}
|
||||
this.personForm.idCardBigPhotoUrl = obj.url
|
||||
this.idCardUpPhotoFile = [obj]
|
||||
}
|
||||
})
|
||||
},
|
||||
checkImg() {
|
||||
console.log(this.radio)
|
||||
this.imgRadiolist.forEach((item) => {
|
||||
@ -2534,9 +2277,7 @@ export default {
|
||||
// 判断是否为深圳项目
|
||||
getProjectConfig() {
|
||||
getProjectConfigListApi({ projectSn: this.projectSn }).then((res) => {
|
||||
// this.isSzProject = 1
|
||||
this.isSzProject = res.result[0].isSzProject //1是 0否
|
||||
// console.log(res.result[0].isSzProject)
|
||||
})
|
||||
},
|
||||
exportM() {
|
||||
@ -2553,7 +2294,6 @@ export default {
|
||||
userId: this.$store.state.userInfo.userId,
|
||||
enterpriseId: this.checkedId
|
||||
}).then((res) => {
|
||||
// console.log('下发通行设备',res)
|
||||
if (res.code == 200) {
|
||||
this.$message({
|
||||
message: '操作成功,已在后台下发,请稍后查看!',
|
||||
@ -2563,11 +2303,9 @@ export default {
|
||||
})
|
||||
},
|
||||
handleChangeE(file, fileList) {
|
||||
// console.log(file)
|
||||
this.fileTemp = file.raw
|
||||
console.log(file)
|
||||
if (this.fileTemp) {
|
||||
// console.log(this.fileTemp.type)
|
||||
if (
|
||||
this.fileTemp.type ==
|
||||
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' ||
|
||||
@ -2599,7 +2337,6 @@ export default {
|
||||
checkedCount > 0 && checkedCount < allCheckList.length
|
||||
},
|
||||
handleCheckAllChangeFace(val) {
|
||||
// console.log('全选',val);
|
||||
if (val) {
|
||||
debugger
|
||||
this.personForm.ufaceDevId = []
|
||||
@ -2912,12 +2649,7 @@ export default {
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
// this.$message({
|
||||
// type: "info",
|
||||
// message: "已取消删除",
|
||||
// });
|
||||
})
|
||||
.catch(console.log)
|
||||
},
|
||||
|
||||
/**--------------------------------------------右侧函数------------------------------------------------------------------ */
|
||||
@ -2930,7 +2662,6 @@ export default {
|
||||
getTeamInfoList(data).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.checkedTeamId = type !== 1 ? 0 : this.checkedTeamId
|
||||
// console.log(this.checkedTeamId);
|
||||
this.teamListData = res.result
|
||||
this.tableParameter.projectSn = this.projectSn
|
||||
this.getTableData()
|
||||
@ -3110,12 +2841,7 @@ export default {
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
// this.$message({
|
||||
// type: "info",
|
||||
// message: "已取消删除",
|
||||
// });
|
||||
})
|
||||
.catch(console.log)
|
||||
},
|
||||
|
||||
//获取 班组的表格数据 -- 班组详情
|
||||
@ -3344,19 +3070,7 @@ export default {
|
||||
id: id
|
||||
}
|
||||
console.log('isUploadHousing', json)
|
||||
updateByIdWorkerInfo(json).then((res) => {
|
||||
// if (res.code == 200) {
|
||||
// this.$message.success(this.$t("message.laborMange.modifySuccess"));
|
||||
// this.getTeamList(1);
|
||||
// this.addPersonDialog = false;
|
||||
// this.resetForm(formName);
|
||||
// this.examinationFile = []; //体检报告
|
||||
// this.contractFile = []; //合同附件
|
||||
// this.employmentFile = []; //从业资格证书
|
||||
// this.idCardUpPhotoFile = []; //身份证头像
|
||||
// this.fieldAcquisitionFile = []; //现场采集人脸
|
||||
// }
|
||||
})
|
||||
updateByIdWorkerInfo(json).then(console.log)
|
||||
},
|
||||
//编辑 人员信息 按钮
|
||||
editWorkerInfo(value, type) {
|
||||
@ -3518,12 +3232,7 @@ export default {
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
// this.$message({
|
||||
// type: "info",
|
||||
// message: "已取消删除",
|
||||
// });
|
||||
})
|
||||
.catch(console.log)
|
||||
},
|
||||
|
||||
//查看 人员信息 详情
|
||||
@ -3535,121 +3244,6 @@ export default {
|
||||
}
|
||||
})
|
||||
localStorage.setItem('showPersonModule', 1)
|
||||
// this.personDialogTitle = this.$t("message.laborMange.crewInfoDetail");
|
||||
// this.titleType = "detail";
|
||||
// this.personForm = {
|
||||
// workerName: "",
|
||||
// sex: "",
|
||||
// idCard: "",
|
||||
// birthday: "",
|
||||
// enterDate: "",
|
||||
// nation: "",
|
||||
// nativePlace: "",
|
||||
// issuingAuthorityForIdcard: "",
|
||||
// idCardEndDate: "",
|
||||
// longTerm: false,
|
||||
// phoneNumber: "",
|
||||
// emergentPerson: "",
|
||||
// emergentPhone: "",
|
||||
// inserviceType: 1,
|
||||
// politicsStatus: "",
|
||||
// marry: "",
|
||||
// payRollBankName: "",
|
||||
// payRollBankNumber: "",
|
||||
// educational: "",
|
||||
// blood: "",
|
||||
// examinationImage: "",
|
||||
// contractImage: "",
|
||||
// employmentCard: "",
|
||||
// idCardBigPhotoUrl: "",
|
||||
// fieldAcquisitionUrl: "",
|
||||
// personType: 1,
|
||||
// idCardUpPhotoUrl: "",
|
||||
// idCardDownPhotoUrl: "",
|
||||
// };
|
||||
// setTimeout(() => {
|
||||
// this.$refs["personForm"].clearValidate();
|
||||
// this.$refs.personDialog.scrollTop = 0;
|
||||
// }, 120);
|
||||
// this.addPersonDialog = true;
|
||||
// this.personForm = value;
|
||||
// this.personForm.sex = String(value.sex);
|
||||
// this.personForm.longTerm = value.longTerm == 1 ? true : false;
|
||||
// //体检报告
|
||||
// let arr1 =
|
||||
// value.examinationImage != "" && value.examinationImage.split(",");
|
||||
// let newArr1 = [];
|
||||
|
||||
// if (arr1.length > 1) {
|
||||
// for (let i in arr1) {
|
||||
// let a = arr1[i].split("*");
|
||||
// newArr1.push({ name: a[0], url: a[1] });
|
||||
// }
|
||||
// } else {
|
||||
// if (value.examinationImage != "") {
|
||||
// let a = arr1[0].split("*");
|
||||
// newArr1.push({ name: a[0], url: a[1] });
|
||||
// }
|
||||
// }
|
||||
// this.examinationFile = value.examinationImage != "" ? newArr1 : []; //体检报告
|
||||
|
||||
// //合同附件
|
||||
// let arr2 = value.contractImage != "" && value.contractImage.split(",");
|
||||
// let newArr2 = [];
|
||||
// if (arr2.length > 1) {
|
||||
// for (let i in arr2) {
|
||||
// let a = arr2[i].split("*");
|
||||
// newArr2.push({ name: a[0], url: a[1] });
|
||||
// }
|
||||
// } else {
|
||||
// if (value.contractImage != "") {
|
||||
// let a = arr2[0].split("*");
|
||||
// newArr2.push({ name: a[0], url: a[1] });
|
||||
// }
|
||||
// }
|
||||
// this.contractFile = value.contractImage != "" ? newArr2 : []; //合同附件
|
||||
// //从业资格证书
|
||||
// let arr3 = value.employmentCard != "" && value.employmentCard.split(",");
|
||||
// let newArr3 = [];
|
||||
// if (arr3.length > 1) {
|
||||
// for (let i in arr3) {
|
||||
// let a = arr3[i].split("*");
|
||||
// newArr3.push({ name: a[0], url: a[1] });
|
||||
// }
|
||||
// } else {
|
||||
// if (value.employmentCard != "") {
|
||||
// let a = arr3[0].split("*");
|
||||
// newArr3.push({ name: a[0], url: a[1] });
|
||||
// }
|
||||
// }
|
||||
// this.employmentFile = value.employmentCard != "" ? newArr3 : []; //从业资格证书
|
||||
|
||||
// //身份证头像
|
||||
// this.idCardUpPhotoFile =
|
||||
// value.idCardBigPhotoUrl != ""
|
||||
// ? [{ name: value.idCardBigPhotoUrl, url: value.idCardBigPhotoUrl }]
|
||||
// : []; //身份证头像
|
||||
|
||||
// //现场采集人脸
|
||||
// this.fieldAcquisitionFile =
|
||||
// value.fieldAcquisitionUrl != ""
|
||||
// ? [
|
||||
// {
|
||||
// name: value.fieldAcquisitionUrl,
|
||||
// url: value.fieldAcquisitionUrl,
|
||||
// },
|
||||
// ]
|
||||
// : []; //现场采集人脸
|
||||
|
||||
// this.idCardUpPhotoUrlFile =
|
||||
// value.idCardUpPhotoUrl != ""
|
||||
// ? [{ name: value.idCardUpPhotoUrl, url: value.idCardUpPhotoUrl }]
|
||||
// : []; //身份证国徽
|
||||
|
||||
// this.idCardDownPhotoUrlFile =
|
||||
// value.idCardDownPhotoUrl != ""
|
||||
// ? [{ name: value.idCardDownPhotoUrl, url: value.idCardDownPhotoUrl }]
|
||||
// : []; //身份证人像
|
||||
},
|
||||
|
||||
//列表数据 退场按钮
|
||||
@ -3907,7 +3501,6 @@ export default {
|
||||
this.personForm.idCardBigPhotoUrl = obj.url
|
||||
this.idCardUpPhotoFile = [obj]
|
||||
} else if (type == 7) {
|
||||
// console.log(file, file2)
|
||||
let imgStatus = file2.size / 1024 < 500
|
||||
if (!imgStatus) {
|
||||
this.cropperOption.img = this.$store.state.FILEURL + obj.url
|
||||
@ -3919,9 +3512,6 @@ export default {
|
||||
this.checkFace(file.data[0].imageUrl)
|
||||
}
|
||||
}
|
||||
// console.log(file.data[0].imageUrl)
|
||||
// this.cropperOption.img = this.$store.state.FILEURL + obj.url;
|
||||
// this.cropperDialog = true;
|
||||
} else if (type == 8) {
|
||||
console.log(file)
|
||||
let data = {
|
||||
@ -3985,7 +3575,6 @@ export default {
|
||||
this.personForm.fieldAcquisitionUrl = url
|
||||
this.fieldAcquisitionFile = [{ name: '', url: url }]
|
||||
this.cropperDialog = false
|
||||
// this.$message.error('未匹配到照片!')
|
||||
}
|
||||
console.log(res, '-----人员库照片查询')
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user