5281 lines
182 KiB
Vue
5281 lines
182 KiB
Vue
<template>
|
||
<div class="laborComponent">
|
||
<div class="left2 whiteBlock">
|
||
<div class="placeholder"></div>
|
||
<div class="left_list">
|
||
<div style="margin: 15px 0">
|
||
<el-select
|
||
size="medium"
|
||
@change="
|
||
checkedId = 0;
|
||
getHierarchyEnterpriseList();
|
||
"
|
||
v-model="enterpriseTypeId"
|
||
:placeholder="$t('message.laborMange.formOfBusiness')"
|
||
style="width: 120px"
|
||
:clearable="true"
|
||
>
|
||
<el-option
|
||
v-for="item in enterpriseTypeList"
|
||
:key="item.id"
|
||
:label="item.companyTypeName"
|
||
:value="item.id"
|
||
></el-option>
|
||
</el-select>
|
||
<el-input
|
||
:placeholder="$t('message.laborMange.placeholder1')"
|
||
v-model="enterpriseName"
|
||
size="medium"
|
||
style="margin-left: 10px; width: 220px"
|
||
@keyup.enter.native="getHierarchyEnterpriseList"
|
||
>
|
||
<i
|
||
slot="suffix"
|
||
class="el-input__icon el-icon-search"
|
||
@click="getHierarchyEnterpriseList"
|
||
style="cursor: pointer"
|
||
></i>
|
||
</el-input>
|
||
</div>
|
||
|
||
<div class="list_content">
|
||
<el-tree
|
||
:data="enterpriseTreeData"
|
||
node-key="id"
|
||
ref="treeNode"
|
||
label="enterpriseName"
|
||
:expand-on-click-node="false"
|
||
:default-expand-all="true"
|
||
@node-click="checkeEnterprise"
|
||
>
|
||
<span class="custom-tree-node" slot-scope="{ node, data }">
|
||
<span :title="data.enterpriseName">{{
|
||
data.enterpriseName
|
||
}}</span>
|
||
<!-- 企业删除与修改 -->
|
||
<div class="flex2" v-if="checkedId == data.id">
|
||
<img
|
||
v-permission="{
|
||
key: 'rygl_editCompany',
|
||
menuPath: '/project/labor/personManage',
|
||
}"
|
||
src="@/assets/images/icon-edit.png"
|
||
style="margin-right: 16px"
|
||
class="icon"
|
||
@click="editEnterpriseInfo(data)"
|
||
/>
|
||
<img
|
||
v-permission="{
|
||
key: 'rygl_deleteCompany',
|
||
menuPath: '/project/labor/personManage',
|
||
}"
|
||
src="@/assets/images/icon-delete.png"
|
||
class="icon"
|
||
@click="deleteEnterpriseInfo(data)"
|
||
/>
|
||
</div>
|
||
</span>
|
||
</el-tree>
|
||
</div>
|
||
</div>
|
||
<!-- 增加企业 -->
|
||
<div class="addFirm">
|
||
<el-button
|
||
v-permission="{
|
||
key: 'rygl_addCompany',
|
||
menuPath: '/project/labor/personManage',
|
||
}"
|
||
size="medium"
|
||
type="primary"
|
||
plain
|
||
icon="el-icon-plus"
|
||
@click="addEnterpriseBtn"
|
||
>{{ $t("message.laborMange.theNewEnterprise") }}</el-button
|
||
>
|
||
</div>
|
||
</div>
|
||
<div class="right2" v-if="refreshPage">
|
||
<div class="title flex whiteBlock">
|
||
<span>{{ $t("message.laborMange.crewInfo") }}</span>
|
||
<div class="team_number flex2">
|
||
{{ $t("message.laborMange.team") }}:
|
||
<span class="number" style="margin-right: 50px">{{
|
||
teamListData.totalTeamNum
|
||
}}</span>
|
||
{{ $t("message.laborMange.crew") }}:
|
||
<span class="number">{{ teamListData.totalWorkerNum }}</span>
|
||
</div>
|
||
</div>
|
||
<div class="team_list flex2 whiteBlock">
|
||
<!-- 增加班组 -->
|
||
<el-button
|
||
v-permission="{
|
||
key: 'rygl_addTeam',
|
||
menuPath: '/project/labor/personManage',
|
||
}"
|
||
type="primary"
|
||
plain
|
||
icon="el-icon-plus"
|
||
class="team_addBtn"
|
||
@click="addTeamBtn"
|
||
v-if="enterpriseListData.length > 0"
|
||
>{{ $t("message.laborMange.theNewTeam") }}</el-button
|
||
>
|
||
<div
|
||
class="flex2 list_wrap"
|
||
:class="showTeamList ? 'show_teamList' : 'height_79'"
|
||
@click="hideTeamList"
|
||
>
|
||
<div
|
||
class="list"
|
||
:class="checkedTeamId == 0 && 'checkedTeam'"
|
||
@click="switchoverTeam(0, 0)"
|
||
>
|
||
<div>{{ $t("message.laborMange.allTheTeam") }}</div>
|
||
<div style="margin: 4px 0">
|
||
({{ teamListData.totalWorkerNum }})
|
||
</div>
|
||
<i class="el-icon-arrow-down" style="font-size: 17px"></i>
|
||
</div>
|
||
<div
|
||
class="list"
|
||
:class="checkedTeamId == item.id && 'checkedTeam'"
|
||
v-if="teamListData.list.length > 0"
|
||
v-for="item in teamListData.list"
|
||
:key="item.id"
|
||
@click="switchoverTeam(item.id, item.specialTeam)"
|
||
>
|
||
<el-popover
|
||
placement="top"
|
||
v-if="String(item.teamName).length >= 5"
|
||
trigger="hover"
|
||
>
|
||
{{ item.teamName }}
|
||
<div slot="reference">{{ item.teamName }}</div>
|
||
</el-popover>
|
||
<div v-else>{{ item.teamName }}</div>
|
||
<div style="margin: 4px 0">({{ item.workerNum }})</div>
|
||
<el-popover placement="bottom" min-width="80" trigger="hover">
|
||
<div style="margin: 0; text-align: center">
|
||
<div
|
||
v-permission="{
|
||
key: 'rygl_editTeam',
|
||
menuPath: '/project/labor/personManage',
|
||
}"
|
||
style="cursor: pointer; margin-bottom: 5px"
|
||
@click="editTeamInfo(item)"
|
||
>
|
||
<img
|
||
src="@/assets/images/icon-edit.png"
|
||
style="margin-right: 5px"
|
||
/>
|
||
<span>{{ $t("message.laborMange.edit") }}</span>
|
||
</div>
|
||
<div
|
||
v-permission="{
|
||
key: 'rygl_deleteTeam',
|
||
menuPath: '/project/labor/personManage',
|
||
}"
|
||
style="cursor: pointer"
|
||
@click="deleteTeamInfo(item)"
|
||
>
|
||
<img
|
||
src="@/assets/images/icon-delete.png"
|
||
style="margin-right: 5px"
|
||
/>
|
||
<span>{{ $t("message.laborMange.delete") }}</span>
|
||
</div>
|
||
</div>
|
||
<div slot="reference">
|
||
<i class="el-icon-arrow-down" style="font-size: 17px"></i>
|
||
</div>
|
||
</el-popover>
|
||
</div>
|
||
<i
|
||
class="el-icon-arrow-up"
|
||
@click="showTeamList = true"
|
||
v-if="showTeamList && teamListData.totalTeamNum > 0"
|
||
style="
|
||
position: absolute;
|
||
right: 10px;
|
||
top: 35%;
|
||
font-size: 26px;
|
||
cursor: pointer;
|
||
color: #999;
|
||
"
|
||
></i>
|
||
</div>
|
||
<i
|
||
class="el-icon-more-outline"
|
||
@click="showTeamList = true"
|
||
v-if="!showTeamList && teamListData.totalTeamNum > 0"
|
||
style="font-size: 26px; cursor: pointer; color: #999"
|
||
></i>
|
||
</div>
|
||
<div class="laborComponent_table_wrap whiteBlock">
|
||
<!-- :class="{ flex: COMPANY != 'nanchang' }" -->
|
||
<div class="search_wrap">
|
||
<!-- 人员录入 -->
|
||
<el-button
|
||
v-permission="{
|
||
key: 'rygl_inputPerson',
|
||
menuPath: '/project/labor/personManage',
|
||
}"
|
||
type="primary"
|
||
size="medium"
|
||
@click="personnelEntry"
|
||
:disabled="checkedTeamId === 0"
|
||
>{{ $t("message.laborMange.personnelEntry") }}</el-button
|
||
>
|
||
<!-- 导入模板 -->
|
||
<el-button
|
||
v-permission="{
|
||
key: 'rygl_exportTemplate',
|
||
menuPath: '/project/labor/personManage',
|
||
}"
|
||
type="primary"
|
||
size="medium"
|
||
@click="exportM"
|
||
>{{
|
||
$t("message.laborMange.export") +
|
||
$t("message.laborMange.template")
|
||
}}</el-button
|
||
>
|
||
<el-upload
|
||
style="display: inline-block; margin-left: 5px"
|
||
class="upload-demo"
|
||
name="excelFile"
|
||
:action="
|
||
$http.defaults.baseURL + 'xmgl/workerInfo/uploadExcelWorkerInfo'
|
||
"
|
||
:on-change="handleChangeE"
|
||
:on-success="handleSuccessE"
|
||
:on-error="handleErrorE"
|
||
:show-file-list="false"
|
||
:headers="headers"
|
||
:data="{ projectSn: $store.state.projectSn }"
|
||
:limit="1"
|
||
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
|
||
:auto-upload="true"
|
||
>
|
||
<!-- 批量导入 -->
|
||
<el-button
|
||
v-permission="{
|
||
key: 'rygl_input_pl',
|
||
menuPath: '/project/labor/personManage',
|
||
}"
|
||
size="medium"
|
||
type="primary"
|
||
>{{ $t("message.laborMange.bulkImport") }}</el-button
|
||
>
|
||
</el-upload>
|
||
<!-- 导入图片 -->
|
||
<el-button
|
||
v-permission="{
|
||
key: 'rygl_ImportPhotos',
|
||
menuPath: '/project/labor/personManage',
|
||
}"
|
||
size="medium"
|
||
@click="importImgOpen()"
|
||
type="primary"
|
||
style="margin-left: 5px"
|
||
>导入照片</el-button
|
||
>
|
||
<!-- v-if="isIscDevice" -->
|
||
<el-button
|
||
v-permission="{
|
||
key: 'rygl_distributeAccessEquipment',
|
||
menuPath: '/project/labor/personManage',
|
||
}"
|
||
size="medium"
|
||
@click="passEquipment()"
|
||
type="primary"
|
||
style="margin-left: 5px"
|
||
:disabled="checkedWorker.length <= 0"
|
||
>下发通行设备</el-button
|
||
>
|
||
<el-button
|
||
v-if="isIscDevice"
|
||
v-permission="{
|
||
key: 'rygl_check_all',
|
||
menuPath: '/project/labor/personManage',
|
||
}"
|
||
size="medium"
|
||
@click="checkAllFn()"
|
||
type="primary"
|
||
style="margin-left: 5px"
|
||
>全选</el-button
|
||
>
|
||
<br />
|
||
<el-form
|
||
:inline="true"
|
||
:model="tableParameter"
|
||
size="medium"
|
||
class="demo-form-inline"
|
||
style="margin-top: 5px"
|
||
>
|
||
<el-form-item label="人员下发状态" v-if="isIscDevice">
|
||
<el-select
|
||
size="medium"
|
||
v-model="tableParameter.sendSuccessStatus"
|
||
placeholder="请选择"
|
||
style="width: 120px"
|
||
>
|
||
<el-option
|
||
v-for="(item, index) in sendStatusArr"
|
||
:key="index"
|
||
:label="item.name"
|
||
:value="item.value"
|
||
></el-option>
|
||
</el-select>
|
||
</el-form-item>
|
||
<el-form-item :label="$t('message.laborMange.workingState')">
|
||
<el-select
|
||
v-model="tableParameter.inserviceType"
|
||
style="width: 80px"
|
||
>
|
||
<el-option
|
||
:label="$t('message.laborMange.all')"
|
||
value
|
||
></el-option>
|
||
<el-option
|
||
:label="$t('message.laborMange.onJob')"
|
||
value="1"
|
||
></el-option>
|
||
<el-option
|
||
:label="$t('message.laborMange.dimission')"
|
||
value="2"
|
||
></el-option>
|
||
</el-select>
|
||
</el-form-item>
|
||
<el-form-item
|
||
:label="$t('message.laborMange.healthCodeStatus')"
|
||
v-if="COMPANY == 'nanchang'"
|
||
>
|
||
<el-select v-model="tableParameter.codeState" style="width: 80px">
|
||
<el-option
|
||
:label="$t('message.laborMange.all')"
|
||
value
|
||
></el-option>
|
||
<el-option
|
||
:label="$t('message.laborMange.codeless')"
|
||
value="0"
|
||
></el-option>
|
||
<el-option
|
||
:label="$t('message.laborMange.redCode')"
|
||
value="1"
|
||
></el-option>
|
||
<el-option
|
||
:label="$t('message.laborMange.yellowCode')"
|
||
value="2"
|
||
></el-option>
|
||
<el-option
|
||
:label="$t('message.laborMange.greenCode')"
|
||
value="3"
|
||
></el-option>
|
||
</el-select>
|
||
</el-form-item>
|
||
<el-form-item :label="$t('message.laborMange.compellation')">
|
||
<el-input
|
||
style="width: 100px"
|
||
v-model="tableParameter.workerName"
|
||
:placeholder="$t('message.laborMange.placeholder2')"
|
||
></el-input>
|
||
</el-form-item>
|
||
<el-form-item :label="$t('message.laborMange.IdNumber')">
|
||
<el-input
|
||
style="width: 120px"
|
||
v-model="tableParameter.idCard"
|
||
:placeholder="$t('message.laborMange.placeholder2')"
|
||
></el-input>
|
||
</el-form-item>
|
||
<el-form-item :label="$t('message.laborMange.dateOfEntry')">
|
||
<el-date-picker
|
||
style="width: 120px"
|
||
v-model="tableParameter.enterDate"
|
||
type="date"
|
||
:placeholder="$t('message.laborMange.pleaseChoose')"
|
||
value-format="yyyy-MM-dd"
|
||
>
|
||
</el-date-picker>
|
||
</el-form-item>
|
||
<el-form-item>
|
||
<!-- 查询 -->
|
||
<el-button
|
||
v-permission="{
|
||
key: 'rygl_query',
|
||
menuPath: '/project/labor/personManage',
|
||
}"
|
||
type="primary"
|
||
@click="inquireBtn"
|
||
plain
|
||
>{{ $t("message.laborMange.inquire") }}</el-button
|
||
>
|
||
<!-- 刷新 -->
|
||
<!-- <el-button
|
||
v-permission="{
|
||
key: 'rygl_refresh',
|
||
menuPath: '/project/labor/personManage',
|
||
}" -->
|
||
<el-button type="warning" @click="refreshBtn" plain>{{
|
||
$t("message.laborMange.refresh")
|
||
}}</el-button>
|
||
<!-- 导出 -->
|
||
<el-button
|
||
title="按班组导出"
|
||
v-permission="{
|
||
key: 'rygl_drive',
|
||
menuPath: '/project/labor/personManage',
|
||
}"
|
||
type="primary"
|
||
@click="exportFn"
|
||
>{{ $t("message.laborMange.export") }}</el-button
|
||
>
|
||
<el-button
|
||
type="primary"
|
||
:disabled="checkedWorker.length == 0"
|
||
@click="issuePersonFn"
|
||
v-if="key"
|
||
>{{ $t("message.laborMange.aKeyIssued") }}</el-button
|
||
>
|
||
</el-form-item>
|
||
</el-form>
|
||
</div>
|
||
<vue-scroll style="height: calc(100% - 100px)">
|
||
<el-table
|
||
ref="multipleTable"
|
||
:data="tableListData"
|
||
tooltip-effect="dark"
|
||
style="width: 100%; color: #737996"
|
||
@selection-change="handleCheckedCitiesChange"
|
||
:show-header="false"
|
||
row-key="id"
|
||
:row-class-name="tableRowClassName"
|
||
>
|
||
<!-- :reserve-selection="true" -->
|
||
<el-table-column
|
||
type="selection"
|
||
width="55"
|
||
:selectable="selectEnable"
|
||
></el-table-column>
|
||
<el-table-column prop="workerName">
|
||
<template slot-scope="scope">
|
||
<div class="flex2">
|
||
<img
|
||
style="width: 51px; height: 72px; margin-right: 40px"
|
||
:src="fileUrl + scope.row.fieldAcquisitionUrl"
|
||
v-if="scope.row.fieldAcquisitionUrl"
|
||
@click="
|
||
handlePreview(fileUrl + scope.row.fieldAcquisitionUrl, 0)
|
||
"
|
||
/>
|
||
<img
|
||
style="width: 51px; height: 72px; margin-right: 40px"
|
||
src="@/assets/images/profile_photo.png"
|
||
v-else
|
||
/>
|
||
<div>
|
||
<!-- 班组人员名称 -->
|
||
<el-button
|
||
type="text"
|
||
style="font-size: 18px"
|
||
@click="viewDetails(scope.row)"
|
||
>{{ scope.row.workerName }}</el-button
|
||
>
|
||
<el-tag
|
||
v-if="COMPANY == 'nanchang'"
|
||
:type="parseCode(scope.row.codeState)[0]"
|
||
size="small"
|
||
style="margin-left: 10px"
|
||
>{{ parseCode(scope.row.codeState)[1] }}</el-tag
|
||
>
|
||
<div>
|
||
<span>{{
|
||
scope.row.sex == 1
|
||
? $t("message.laborMange.man")
|
||
: $t("message.laborMange.female")
|
||
}}</span>
|
||
<span style="margin: 0 5px"
|
||
>{{ scope.row.age
|
||
}}{{ $t("message.laborMange.age") }}</span
|
||
>
|
||
<span>{{ scope.row.nation }}</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column prop="phoneNumber">
|
||
<template slot-scope="scope">
|
||
<div>
|
||
{{ $t("message.laborMange.contactNumber") }}:
|
||
<span class="values">{{ scope.row.phoneNumber }}</span>
|
||
</div>
|
||
<div class="personItemBottom">
|
||
{{ $t("message.laborMange.belongsToTeam") }}:
|
||
<span class="values">{{ scope.row.teamName }}</span>
|
||
</div>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column prop="enterDate">
|
||
<template slot-scope="scope">
|
||
<div>
|
||
{{ $t("message.laborMange.dateOfEntry") }}:
|
||
<span class="values">{{ scope.row.enterDate }}</span>
|
||
</div>
|
||
<div class="personItemBottom">
|
||
{{ $t("message.laborMange.workingState") }}:
|
||
<span class="values">{{
|
||
scope.row.inserviceType == 1
|
||
? $t("message.laborMange.onJob")
|
||
: $t("message.laborMange.dimission")
|
||
}}</span>
|
||
</div>
|
||
</template>
|
||
</el-table-column>
|
||
<!-- 测试 -->
|
||
<el-table-column prop="sendSuccessStatus">
|
||
<template v-slot="{ row }">
|
||
<div v-if="isIscDevice">
|
||
下发状态:
|
||
<span
|
||
:class="[
|
||
'valuesColor',
|
||
row.sendSuccessStatus === 1
|
||
? 'green'
|
||
: row.sendSuccessStatus === 2 ||
|
||
row.sendSuccessStatus === 4
|
||
? 'red'
|
||
: row.sendSuccessStatus === 3
|
||
? 'yellow'
|
||
: '',
|
||
]"
|
||
>
|
||
{{
|
||
row.sendSuccessStatus === 1
|
||
? "成功"
|
||
: row.sendSuccessStatus === 2
|
||
? "失败"
|
||
: row.sendSuccessStatus === 3
|
||
? "部分成功"
|
||
: row.sendSuccessStatus === 4
|
||
? "未下发"
|
||
: ""
|
||
}}</span
|
||
>
|
||
</div>
|
||
<div class="personItemBottom">
|
||
所属企业:
|
||
<span class="values">{{ row.enterpriseName }}</span>
|
||
</div>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column prop="address" width="400px">
|
||
<template slot-scope="scope">
|
||
<div class="tableBtns">
|
||
<el-button
|
||
v-if="isIscDevice"
|
||
v-permission="{
|
||
key: 'rygl_Check_Distribution',
|
||
menuPath: '/project/labor/personManage',
|
||
}"
|
||
size="medium"
|
||
type="text"
|
||
class="operationText"
|
||
@click="issueTeamEvent(scope.row.id)"
|
||
>查看下发详情</el-button
|
||
>
|
||
<!-- 退场 issueTeamDialog -->
|
||
<el-button
|
||
v-permission="{
|
||
key: 'rygl_exit',
|
||
menuPath: '/project/labor/personManage',
|
||
}"
|
||
size="medium"
|
||
type="text"
|
||
class="operationText"
|
||
@click="workerExitBtn(scope.row, 1)"
|
||
v-if="scope.row.inserviceType == 1"
|
||
>{{ $t("message.laborMange.bowOutWith") }}</el-button
|
||
>
|
||
<!-- 再次进场 -->
|
||
<el-button
|
||
size="medium"
|
||
type="text"
|
||
class="operationText"
|
||
@click="editWorkerInfo(scope.row, 2)"
|
||
v-if="scope.row.inserviceType == 2"
|
||
>{{ $t("message.laborMange.toPlayAgain") }}</el-button
|
||
>
|
||
<!-- 删除人员 -->
|
||
<div
|
||
v-permission="{
|
||
key: 'rygl_delete',
|
||
menuPath: '/project/labor/personManage',
|
||
}"
|
||
class="operationText"
|
||
@click="removeWorkerInfo(scope.row)"
|
||
>
|
||
<img
|
||
src="@/assets/images/icon-delete.png"
|
||
style="margin-right: 5px"
|
||
/>
|
||
<span>{{ $t("message.laborMange.delete") }}</span>
|
||
</div>
|
||
<!-- 一键下发 -->
|
||
<el-button
|
||
type="primary"
|
||
size="mini"
|
||
@click="issuePersonOneFn(scope.row.id)"
|
||
v-if="key"
|
||
>{{ $t("message.laborMange.aKeyIssued") }}</el-button
|
||
>
|
||
</div>
|
||
<!-- 此处注释是因为当时的需求 '上传到住建局' 的按钮要去掉 所以更改判断条件-->
|
||
<!-- <div
|
||
class="personItemBottom"
|
||
v-if="isUploadToHouse && scope.row.inserviceType == 1"
|
||
>
|
||
<el-checkbox
|
||
v-model="scope.row.isUploadHousing"
|
||
:checked="scope.row.isUploadHousing == 1 ? true : false"
|
||
@change="
|
||
uploadToHouseFn(scope.row.isUploadHousing, scope.row.id)
|
||
"
|
||
>{{ $t("message.laborDev.uploadToOuter") }}</el-checkbox
|
||
>
|
||
</div> -->
|
||
<div class="personItemBottom" v-if="key">
|
||
<el-checkbox
|
||
v-model="scope.row.isUploadHousing"
|
||
:checked="scope.row.isUploadHousing == 1 ? true : false"
|
||
:indeterminate="
|
||
scope.row.isUploadHousing == 1 ? true : false
|
||
"
|
||
@change="
|
||
uploadToHouseFn(scope.row.isUploadHousing, scope.row.id)
|
||
"
|
||
>{{ $t("message.laborDev.uploadToOuter") }}</el-checkbox
|
||
>
|
||
</div>
|
||
</template>
|
||
</el-table-column>
|
||
</el-table>
|
||
</vue-scroll>
|
||
<div class="flex table_wrap_bottom">
|
||
<div>
|
||
<el-checkbox
|
||
v-permission="{
|
||
key: 'rygl_lot_move_exit',
|
||
menuPath: '/project/labor/personManage',
|
||
}"
|
||
:indeterminate="isIndeterminate"
|
||
v-model="checkAll"
|
||
@change="handleCheckAllChange"
|
||
:disabled="checkAllStatus"
|
||
></el-checkbox>
|
||
<!-- 批量移动 -->
|
||
<el-button
|
||
type="text"
|
||
class="table_wrap_btn"
|
||
:disabled="checkedWorker.length <= 0"
|
||
@click="batchMove"
|
||
>{{ $t("message.laborMange.batchMobile") }}</el-button
|
||
>
|
||
<!-- 批量退场 -->
|
||
<el-button
|
||
type="text"
|
||
:disabled="checkedWorker.length <= 0"
|
||
@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
|
||
class="pagerBox"
|
||
style="margin-top: 0; margin-right: 600px"
|
||
@size-change="handleSizeChange"
|
||
@current-change="handleCurrentChange"
|
||
:current-page="page"
|
||
:page-sizes="pageSizeList"
|
||
:page-size="pageSize"
|
||
layout="total, sizes, prev, pager, next"
|
||
:total="Number(total)"
|
||
background
|
||
></el-pagination>
|
||
<!-- -->
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- 照片导入弹框 -->
|
||
<el-dialog
|
||
class="importImgDialog"
|
||
:modal-append-to-body="false"
|
||
title="导入照片"
|
||
:close-on-click-modal="false"
|
||
:visible.sync="imgImportDialog"
|
||
width="668px"
|
||
>
|
||
<div class="import-content">
|
||
<div class="alarm-content">
|
||
<i class="el-icon-warning-outline"></i>
|
||
<div>
|
||
向目标组织下批量导入人员正面免冠照,导入前建议使用人脸照片预处理工具进行质量清洗,并确认照片对应的人员信息是否存在。
|
||
</div>
|
||
</div>
|
||
<div class="import-operation">
|
||
<span>导入文件:</span>
|
||
<div>
|
||
<!-- :action="
|
||
$http.defaults.baseURL + 'xmgl/workerInfo/uploadWorkerInfoImgs'
|
||
" -->
|
||
<el-upload
|
||
class="upload-demo"
|
||
drag
|
||
name="files"
|
||
:action="$store.state.UPLOADURL"
|
||
:multiple="false"
|
||
:on-exceed="handleImportExceed"
|
||
:on-success="handleImportSuccess"
|
||
:file-list="imgFileList"
|
||
accept=".zip"
|
||
>
|
||
<i class="el-icon-upload"></i>
|
||
<div class="el-upload__text">
|
||
将文件拖到此处,或<em>点击上传</em>
|
||
</div>
|
||
</el-upload>
|
||
</div>
|
||
</div>
|
||
<div
|
||
class="upload-tip"
|
||
:style="{ 'margin-top': imgFileList.length > 0 ? '40px' : '5px' }"
|
||
>
|
||
支持导入200MB以内的ZIP文件,建议文件中包含照片的数量在1000张以内;
|
||
照片命名规则为姓名_证件号码jpg,需露出眉毛和眼睛;单张照片文件大小10
|
||
KB~200 KB。
|
||
</div>
|
||
<div class="upload-tip-sub">选择文件后将自动上传并进行数据校验</div>
|
||
<div class="dialog-footer">
|
||
<el-button
|
||
class="cancleBtn"
|
||
@click="imgImportDialog = false"
|
||
icon="el-icon-circle-close"
|
||
size="medium"
|
||
>{{ $t("message.laborMange.cancel") }}</el-button
|
||
>
|
||
<el-button
|
||
type="primary"
|
||
icon="el-icon-circle-check"
|
||
@click="saveImportFn()"
|
||
size="medium"
|
||
>导入</el-button
|
||
>
|
||
</div>
|
||
</div>
|
||
</el-dialog>
|
||
<!-- 新增 || 编辑 企业弹窗 -->
|
||
<el-dialog
|
||
:modal-append-to-body="false"
|
||
:title="enterpriseDialogTitle"
|
||
:close-on-click-modal="false"
|
||
:visible.sync="addEnterpriseDialog"
|
||
width="969px"
|
||
>
|
||
<vue-scroll style="height: 618px">
|
||
<div class="dialog_content" ref="enterpriseDialog">
|
||
<el-form
|
||
size="small"
|
||
ref="enterpriseForm"
|
||
:model="enterpriseForm"
|
||
:rules="enterpriseFormRules"
|
||
label-position="top"
|
||
label-width="80px"
|
||
>
|
||
<el-row :gutter="24">
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.theNameOfFirm')"
|
||
prop="enterpriseName"
|
||
>
|
||
<el-input
|
||
v-model="enterpriseForm.enterpriseName"
|
||
:placeholder="$t('message.laborMange.placeholder2')"
|
||
></el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.legalRepresentative')"
|
||
prop="enterpriseLegalPerson"
|
||
>
|
||
<el-input
|
||
v-model="enterpriseForm.enterpriseLegalPerson"
|
||
:placeholder="$t('message.laborMange.placeholder2')"
|
||
></el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row :gutter="24">
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.formOfBusiness')"
|
||
prop="enterpriseTypeId"
|
||
>
|
||
<el-select
|
||
v-model="enterpriseForm.enterpriseTypeId"
|
||
:placeholder="$t('message.laborMange.pleaseChoose')"
|
||
style="width: 100%"
|
||
>
|
||
<el-option
|
||
v-for="item in enterpriseTypeList"
|
||
:key="item.id"
|
||
:label="item.companyTypeName"
|
||
:value="item.id"
|
||
></el-option>
|
||
</el-select>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.unifiedSocialCreditCode')"
|
||
prop="socialCode"
|
||
>
|
||
<el-input
|
||
v-model="enterpriseForm.socialCode"
|
||
:placeholder="$t('message.laborMange.placeholder2')"
|
||
maxlength="18"
|
||
></el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row :gutter="24">
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.openingBank')"
|
||
prop="bankname"
|
||
>
|
||
<el-input
|
||
v-model="enterpriseForm.bankname"
|
||
:placeholder="$t('message.laborMange.placeholder2')"
|
||
></el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.registeredCapital')"
|
||
prop="registeredCapital"
|
||
>
|
||
<el-input
|
||
v-model="enterpriseForm.registeredCapital"
|
||
:placeholder="$t('message.laborMange.placeholder2')"
|
||
></el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row :gutter="24">
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.numberOfRegistrant')"
|
||
prop="registerPersonPhoneTel"
|
||
>
|
||
<el-input
|
||
v-model="enterpriseForm.registerPersonPhoneTel"
|
||
oninput="if(value.length>11)value=value.slice(0,11)"
|
||
type="number"
|
||
:placeholder="$t('message.laborMange.placeholder2')"
|
||
></el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.bankAccount')"
|
||
prop="bankcardnumber"
|
||
>
|
||
<el-input
|
||
v-model="enterpriseForm.bankcardnumber"
|
||
:placeholder="$t('message.laborMange.placeholder2')"
|
||
></el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row :gutter="24">
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.legalPersonPhone')"
|
||
prop="legalPersonTel"
|
||
>
|
||
<el-input
|
||
v-model="enterpriseForm.legalPersonTel"
|
||
oninput="if(value.length>11)value=value.slice(0,11)"
|
||
type="number"
|
||
:placeholder="$t('message.laborMange.placeholder2')"
|
||
></el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.businessNumber')"
|
||
prop="businessNumber"
|
||
>
|
||
<el-input
|
||
v-model="enterpriseForm.businessNumber"
|
||
:placeholder="$t('message.laborMange.placeholder2')"
|
||
></el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row :gutter="24">
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.businessLicense')"
|
||
prop="businessLicenseEndDate"
|
||
>
|
||
<el-date-picker
|
||
v-model="enterpriseForm.businessLicenseEndDate"
|
||
type="date"
|
||
:placeholder="$t('message.laborMange.pleaseSelectADate')"
|
||
value-format="yyyy-MM-dd"
|
||
style="width: 100%"
|
||
></el-date-picker>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.addressOfPlant')"
|
||
prop="enterpriseAddress"
|
||
>
|
||
<el-input
|
||
v-model="enterpriseForm.enterpriseAddress"
|
||
:placeholder="$t('message.laborMange.placeholder2')"
|
||
></el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row :gutter="24">
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.enterpriseMailbox')"
|
||
prop="enterpriseEmail"
|
||
>
|
||
<el-input
|
||
v-model="enterpriseForm.enterpriseEmail"
|
||
:placeholder="$t('message.laborMange.placeholder2')"
|
||
></el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.safetyProductionLicense')"
|
||
prop="enterpriseSafeAllow"
|
||
>
|
||
<el-input
|
||
v-model="enterpriseForm.enterpriseSafeAllow"
|
||
:placeholder="$t('message.laborMange.placeholder2')"
|
||
></el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row :gutter="24">
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.laborCertificateNo')"
|
||
prop="qualificationNumber"
|
||
>
|
||
<el-input
|
||
v-model="enterpriseForm.qualificationNumber"
|
||
:placeholder="$t('message.laborMange.placeholder2')"
|
||
></el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.natureOfUnit')"
|
||
prop="enterpriseProperty"
|
||
>
|
||
<el-select
|
||
v-model="enterpriseForm.enterpriseProperty"
|
||
:placeholder="$t('message.laborMange.pleaseChoose')"
|
||
style="width: 100%"
|
||
>
|
||
<el-option
|
||
:label="$t('message.laborMange.stateOwnedBusiness')"
|
||
:value="1"
|
||
></el-option>
|
||
<el-option
|
||
:label="
|
||
$t('message.laborMange.overseasInvestedEnterprises')
|
||
"
|
||
:value="2"
|
||
></el-option>
|
||
<el-option
|
||
:label="$t('message.laborMange.collectiveEnterprises')"
|
||
:value="3"
|
||
></el-option>
|
||
<el-option
|
||
:label="$t('message.laborMange.privateEnterprise')"
|
||
:value="4"
|
||
></el-option>
|
||
</el-select>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row :gutter="24">
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.photosOfQualification')"
|
||
prop="enterpriseQualificationUrl"
|
||
>
|
||
<el-upload
|
||
class="upload-demo"
|
||
:action="uploadUrl"
|
||
:on-remove="(file) => handleRemove(file, 1)"
|
||
:on-success="(file) => handleSuccess(file, 1)"
|
||
:on-error="(file) => handleError(file, 1)"
|
||
:on-preview="(file) => handlePreview(file, 1)"
|
||
:before-upload="(file) => handleBeforeUpload(file, 1)"
|
||
name="files"
|
||
:file-list="aptitudeFileList"
|
||
>
|
||
<el-button size="small" type="primary">{{
|
||
$t("message.laborMange.clickOnTheUpload")
|
||
}}</el-button>
|
||
</el-upload>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item label="logo" prop="logo">
|
||
<el-upload
|
||
class="upload-demo"
|
||
:action="uploadUrl"
|
||
:on-remove="(file) => handleRemove(file, 2)"
|
||
:on-success="(file) => handleSuccess(file, 2)"
|
||
:on-error="(file) => handleError(file, 2)"
|
||
:on-preview="(file) => handlePreview(file, 2)"
|
||
:before-upload="(file) => handleBeforeUpload(file, 2)"
|
||
name="files"
|
||
:file-list="logoFileList"
|
||
>
|
||
<el-button size="small" type="primary">{{
|
||
$t("message.laborMange.clickOnTheUpload")
|
||
}}</el-button>
|
||
</el-upload>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
</el-form>
|
||
<div class="dialog-footer">
|
||
<el-button
|
||
class="cancleBtn"
|
||
@click="addEnterpriseDialog = false"
|
||
icon="el-icon-circle-close"
|
||
size="medium"
|
||
>{{ $t("message.laborMange.cancel") }}</el-button
|
||
>
|
||
<el-button
|
||
type="primary"
|
||
icon="el-icon-circle-check"
|
||
@click="saveEnterpriseFn('enterpriseForm')"
|
||
size="medium"
|
||
>{{ $t("message.laborMange.confirm") }}</el-button
|
||
>
|
||
</div>
|
||
</div>
|
||
</vue-scroll>
|
||
</el-dialog>
|
||
|
||
<!-- 新增 || 编辑 || 详情 人员录入弹窗 -->
|
||
<el-dialog
|
||
:modal-append-to-body="false"
|
||
:title="personDialogTitle"
|
||
:close-on-click-modal="false"
|
||
:visible.sync="addPersonDialog"
|
||
width="969px"
|
||
>
|
||
<vue-scroll style="height: 618px">
|
||
<div class="dialog_content addPerson_content" ref="personDialog">
|
||
<el-form
|
||
size="small"
|
||
ref="personForm"
|
||
label-position="top"
|
||
:model="personForm"
|
||
label-width="80px"
|
||
:rules="personFormRules"
|
||
>
|
||
<el-row :gutter="24">
|
||
<el-col :span="16">
|
||
<el-row :gutter="24">
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.compellation')"
|
||
prop="workerName"
|
||
>
|
||
<el-input
|
||
v-model="personForm.workerName"
|
||
:disabled="titleType == 'detail'"
|
||
:placeholder="$t('message.laborMange.placeholder2')"
|
||
></el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.frontAndBackOfIdCard')"
|
||
prop="idCardUpPhotoUrl"
|
||
>
|
||
<div class="flex3" style="width: 160px">
|
||
<div>
|
||
<div
|
||
v-if="personForm.idCardUpPhotoUrl"
|
||
style="
|
||
position: relative;
|
||
width: 60px;
|
||
height: 38px;
|
||
"
|
||
>
|
||
<img
|
||
:src="fileUrl + personForm.idCardUpPhotoUrl"
|
||
style="width: 60px; height: 38px"
|
||
@click="
|
||
handlePreview(
|
||
fileUrl + personForm.idCardUpPhotoUrl,
|
||
0
|
||
)
|
||
"
|
||
/>
|
||
<img
|
||
v-if="
|
||
personForm.idCardUpPhotoUrl &&
|
||
titleType != 'detail'
|
||
"
|
||
src="@/assets/images/shut_icon.png"
|
||
width="15px"
|
||
height="15px"
|
||
class="shut_icon"
|
||
@click="shutIconBtn(2)"
|
||
/>
|
||
</div>
|
||
<el-upload
|
||
v-else
|
||
class="upload-demo identity_card"
|
||
:action="uploadUrl"
|
||
:on-remove="(file) => handleRemove(file, 8)"
|
||
:on-success="(file) => handleSuccess(file, 8)"
|
||
:on-error="(file) => handleError(file, 8)"
|
||
:on-preview="(file) => handlePreview(file, 8)"
|
||
:beforeUpload="
|
||
(file) => handleBeforeUpload(file, 8)
|
||
"
|
||
name="files"
|
||
:class="titleType == 'detail' ? 'margin_top35' : ''"
|
||
:file-list="idCardUpPhotoUrlFile"
|
||
:disabled="titleType == 'detail'"
|
||
:show-file-list="false"
|
||
>
|
||
<img src="@/assets/images/cockade.png" />
|
||
<!-- <el-button type="primary" v-if="personDialogTitle!='人员信息详情'">上传国徽面</el-button> -->
|
||
</el-upload>
|
||
</div>
|
||
<div>
|
||
<div
|
||
v-if="personForm.idCardDownPhotoUrl"
|
||
style="
|
||
position: relative;
|
||
width: 60px;
|
||
height: 38px;
|
||
"
|
||
>
|
||
<img
|
||
:src="fileUrl + personForm.idCardDownPhotoUrl"
|
||
style="width: 60px; height: 38px"
|
||
@click="
|
||
handlePreview(
|
||
fileUrl + personForm.idCardDownPhotoUrl,
|
||
0
|
||
)
|
||
"
|
||
/>
|
||
<img
|
||
v-if="
|
||
personForm.idCardDownPhotoUrl &&
|
||
titleType != 'detail'
|
||
"
|
||
src="@/assets/images/shut_icon.png"
|
||
width="15px"
|
||
height="15px"
|
||
class="shut_icon"
|
||
@click="shutIconBtn(3)"
|
||
/>
|
||
</div>
|
||
<el-upload
|
||
v-else
|
||
class="upload-demo identity_card"
|
||
:action="uploadUrl"
|
||
:on-remove="(file) => handleRemove(file, 9)"
|
||
:on-success="(file) => handleSuccess(file, 9)"
|
||
:on-error="(file) => handleError(file, 9)"
|
||
:on-preview="(file) => handlePreview(file, 9)"
|
||
:beforeUpload="
|
||
(file) => handleBeforeUpload(file, 9)
|
||
"
|
||
name="files"
|
||
:class="titleType == 'detail' ? 'margin_top35' : ''"
|
||
:file-list="idCardDownPhotoUrlFile"
|
||
:disabled="titleType == 'detail'"
|
||
:show-file-list="false"
|
||
>
|
||
<img src="@/assets/images/portrait.png" />
|
||
<!-- <el-button type="primary" v-if="personDialogTitle!='人员信息详情'">上传人像面</el-button> -->
|
||
</el-upload>
|
||
</div>
|
||
</div>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
|
||
<el-row :gutter="24">
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.sex')"
|
||
prop="sex"
|
||
>
|
||
<el-radio-group
|
||
v-model="personForm.sex"
|
||
:disabled="titleType == 'detail'"
|
||
>
|
||
<el-radio :label="1">{{
|
||
$t("message.laborMange.man")
|
||
}}</el-radio>
|
||
<el-radio :label="2">{{
|
||
$t("message.laborMange.female")
|
||
}}</el-radio>
|
||
</el-radio-group>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.IdNumber2')"
|
||
prop="idCard"
|
||
>
|
||
<el-input
|
||
v-model="personForm.idCard"
|
||
:disabled="titleType == 'detail'"
|
||
maxlength="18"
|
||
:placeholder="$t('message.laborMange.placeholder2')"
|
||
@change="changeIdCard"
|
||
></el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row :gutter="24">
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.dateOfBirth')"
|
||
prop="birthday"
|
||
>
|
||
<el-date-picker
|
||
v-model="personForm.birthday"
|
||
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-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.nation')"
|
||
prop="nation"
|
||
>
|
||
<el-select
|
||
v-model="personForm.nation"
|
||
:placeholder="$t('message.laborMange.pleaseChoose')"
|
||
style="width: 100%"
|
||
:disabled="titleType == 'detail'"
|
||
>
|
||
<el-option
|
||
v-for="(item, index) in nationList"
|
||
:key="index"
|
||
:label="item.name"
|
||
:value="item.name"
|
||
></el-option>
|
||
</el-select>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row :gutter="24">
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.nativePlace')"
|
||
prop="nativePlace"
|
||
>
|
||
<el-input
|
||
v-model="personForm.nativePlace"
|
||
:placeholder="$t('message.laborMange.placeholder2')"
|
||
:disabled="titleType == 'detail'"
|
||
></el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.issuingAuthority')"
|
||
prop="issuingAuthorityForIdcard"
|
||
>
|
||
<el-input
|
||
v-model="personForm.issuingAuthorityForIdcard"
|
||
:disabled="titleType == 'detail'"
|
||
:placeholder="$t('message.laborMange.pleaseAuthority')"
|
||
></el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row :gutter="24">
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.effectiveDate')"
|
||
:prop="
|
||
personForm.longTerm || personForm.longTerm == 1
|
||
? ''
|
||
: 'idCardEndDate'
|
||
"
|
||
>
|
||
<el-date-picker
|
||
v-model="personForm.idCardEndDate"
|
||
v-if="personForm.longTerm != 1 || !personForm.longTerm"
|
||
:placeholder="
|
||
personForm.longTerm
|
||
? ''
|
||
: $t('message.laborMange.pleaseSelectADate')
|
||
"
|
||
value-format="yyyy-MM-dd"
|
||
style="width: 75%"
|
||
:disabled="personForm.longTerm || titleType == 'detail'"
|
||
></el-date-picker>
|
||
<el-input
|
||
v-else
|
||
v-model="personForm.idCardEndDate"
|
||
style="width: 75%"
|
||
:disabled="true"
|
||
></el-input>
|
||
|
||
<el-checkbox
|
||
v-model="personForm.longTerm"
|
||
:disabled="titleType == 'detail'"
|
||
@change="checkboxLongTerm"
|
||
style="margin-left: 10px"
|
||
>{{ $t("message.laborMange.longTime") }}</el-checkbox
|
||
>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.phone')"
|
||
prop="phoneNumber"
|
||
>
|
||
<el-input
|
||
v-model="personForm.phoneNumber"
|
||
:disabled="titleType == 'detail'"
|
||
:placeholder="$t('message.laborMange.placeholder2')"
|
||
oninput="if(value.length>11)value=value.slice(0,11)"
|
||
type="number"
|
||
></el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row :gutter="24">
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.emergencyContact')"
|
||
prop="emergentPerson"
|
||
>
|
||
<el-input
|
||
v-model="personForm.emergentPerson"
|
||
:placeholder="$t('message.laborMange.placeholder2')"
|
||
:disabled="titleType == 'detail'"
|
||
></el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.emergencyContactPhone')"
|
||
prop="emergentPhone"
|
||
>
|
||
<el-input
|
||
v-model="personForm.emergentPhone"
|
||
:disabled="titleType == 'detail'"
|
||
oninput="if(value.length>11)value=value.slice(0,11)"
|
||
type="number"
|
||
:placeholder="$t('message.laborMange.placeholder2')"
|
||
></el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row :gutter="24">
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.dateOfEntry')"
|
||
prop="enterDate"
|
||
>
|
||
<el-date-picker
|
||
v-model="personForm.enterDate"
|
||
:disabled="titleType == 'detail'"
|
||
type="date"
|
||
:placeholder="
|
||
$t('message.laborMange.pleaseSelectADate')
|
||
"
|
||
value-format="yyyy-MM-dd"
|
||
style="width: 100%"
|
||
></el-date-picker>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.workingState')"
|
||
prop="inserviceType"
|
||
>
|
||
<el-select
|
||
v-model="personForm.inserviceType"
|
||
:placeholder="$t('message.laborMange.pleaseChoose')"
|
||
style="width: 100%"
|
||
:disabled="true"
|
||
>
|
||
<el-option
|
||
:label="$t('message.laborMange.onJob')"
|
||
:value="1"
|
||
></el-option>
|
||
<el-option
|
||
:label="$t('message.laborMange.dimission')"
|
||
:value="2"
|
||
></el-option>
|
||
</el-select>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row :gutter="24">
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.maritalStatus')"
|
||
prop="marry"
|
||
>
|
||
<el-select
|
||
v-model="personForm.marry"
|
||
:placeholder="$t('message.laborMange.pleaseChoose')"
|
||
style="width: 100%"
|
||
v-if="
|
||
titleType != 'detail' ||
|
||
(personForm.marry && titleType == 'detail')
|
||
"
|
||
:disabled="titleType == 'detail'"
|
||
>
|
||
<el-option
|
||
:label="$t('message.laborMange.spinsterhood')"
|
||
:value="1"
|
||
></el-option>
|
||
<el-option
|
||
:label="$t('message.laborMange.married')"
|
||
:value="2"
|
||
></el-option>
|
||
<el-option
|
||
:label="$t('message.laborMange.divorced')"
|
||
:value="3"
|
||
></el-option>
|
||
<el-option
|
||
:label="$t('message.laborMange.widowed')"
|
||
:value="4"
|
||
></el-option>
|
||
</el-select>
|
||
<el-input
|
||
v-else
|
||
:disabled="titleType == 'detail'"
|
||
></el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.cardBank')"
|
||
prop="payRollBankName"
|
||
>
|
||
<el-input
|
||
v-model="personForm.payRollBankName"
|
||
:placeholder="
|
||
personForm.payRollBankName == '' &&
|
||
titleType == 'detail'
|
||
? ''
|
||
: $t('message.laborMange.placeholder2')
|
||
"
|
||
:disabled="titleType == 'detail'"
|
||
></el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row :gutter="24">
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.bankCardNumber')"
|
||
prop="payRollBankNumber"
|
||
>
|
||
<el-input
|
||
v-model="personForm.payRollBankNumber"
|
||
:disabled="titleType == 'detail'"
|
||
:placeholder="
|
||
personForm.payRollBankNumber == '' &&
|
||
titleType == 'detail'
|
||
? ''
|
||
: $t('message.laborMange.placeholder2')
|
||
"
|
||
></el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.educationBackground')"
|
||
prop="educational"
|
||
>
|
||
<el-select
|
||
v-model="personForm.educational"
|
||
:placeholder="$t('message.laborMange.pleaseChoose')"
|
||
style="width: 100%"
|
||
:disabled="titleType == 'detail'"
|
||
v-if="
|
||
titleType != 'detail' ||
|
||
(personForm.educational && titleType == 'detail')
|
||
"
|
||
>
|
||
<el-option
|
||
:label="$t('message.laborMange.primarySchool')"
|
||
value="1"
|
||
></el-option>
|
||
<el-option
|
||
:label="$t('message.laborMange.juniorHighSchool')"
|
||
value="2"
|
||
></el-option>
|
||
<el-option
|
||
:label="$t('message.laborMange.technicalSchool')"
|
||
value="3"
|
||
></el-option>
|
||
<el-option
|
||
:label="$t('message.laborMange.seniorHighSchool')"
|
||
value="4"
|
||
></el-option>
|
||
<el-option
|
||
:label="$t('message.laborMange.juniorCollege')"
|
||
value="5"
|
||
></el-option>
|
||
<el-option
|
||
:label="$t('message.laborMange.regularCollegeCourse')"
|
||
value="6"
|
||
></el-option>
|
||
<el-option
|
||
:label="$t('message.laborMange.graduateStudent')"
|
||
value="7"
|
||
></el-option>
|
||
<el-option
|
||
:label="$t('message.laborMange.doctor')"
|
||
value="8"
|
||
></el-option>
|
||
<el-option
|
||
:label="$t('message.laborMange.postdoctor')"
|
||
value="9"
|
||
></el-option>
|
||
</el-select>
|
||
<el-input
|
||
v-else
|
||
:disabled="titleType == 'detail'"
|
||
></el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row :gutter="24">
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.bloodType')"
|
||
prop="blood"
|
||
>
|
||
<el-select
|
||
v-model="personForm.blood"
|
||
:placeholder="$t('message.laborMange.pleaseChoose')"
|
||
:disabled="titleType == 'detail'"
|
||
v-if="
|
||
titleType != 'detail' ||
|
||
(personForm.blood && titleType == 'detail')
|
||
"
|
||
style="width: 100%"
|
||
>
|
||
<el-option label="A" value="A"></el-option>
|
||
<el-option label="B" value="B"></el-option>
|
||
<el-option label="AB" value="AB"></el-option>
|
||
<el-option label="O" value="O"></el-option>
|
||
</el-select>
|
||
<el-input
|
||
v-else
|
||
:disabled="titleType == 'detail'"
|
||
></el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.politicsStatus')"
|
||
prop="politicsStatus"
|
||
>
|
||
<el-select
|
||
v-model="personForm.politicsStatus"
|
||
:placeholder="$t('message.laborMange.pleaseChoose')"
|
||
style="width: 100%"
|
||
v-if="
|
||
titleType != 'detail' ||
|
||
(personForm.politicsStatus && titleType == 'detail')
|
||
"
|
||
:disabled="titleType == 'detail'"
|
||
>
|
||
<el-option
|
||
:label="$t('message.laborMange.memberOfChina')"
|
||
:value="1"
|
||
></el-option>
|
||
<el-option
|
||
:label="$t('message.laborMange.memberYouthLeague')"
|
||
:value="2"
|
||
></el-option>
|
||
<el-option
|
||
:label="$t('message.laborMange.ordinaryResident')"
|
||
:value="3"
|
||
></el-option>
|
||
<el-option
|
||
:label="$t('message.laborMange.otherParty')"
|
||
:value="4"
|
||
></el-option>
|
||
</el-select>
|
||
<el-input
|
||
v-else
|
||
:disabled="titleType == 'detail'"
|
||
></el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row :gutter="24">
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.attendanceNumber')"
|
||
prop="attendanceNumber"
|
||
>
|
||
<el-input
|
||
:disabled="titleType == 'detail'"
|
||
v-model="personForm.attendanceNumber"
|
||
:placeholder="$t('message.laborMange.placeholder2')"
|
||
></el-input> </el-form-item
|
||
></el-col>
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.attendanceRules')"
|
||
prop="ruleId"
|
||
>
|
||
<el-select
|
||
v-model="personForm.ruleId"
|
||
:placeholder="$t('message.laborMange.pleaseChoose')"
|
||
style="width: 100%"
|
||
v-if="
|
||
titleType != 'detail' ||
|
||
(personForm.ruleId && titleType == 'detail')
|
||
"
|
||
@change="changRuleId"
|
||
:disabled="titleType == 'detail'"
|
||
>
|
||
<el-option
|
||
v-for="(item, index) in attendRulesList"
|
||
:key="index"
|
||
:label="item.ruleName"
|
||
:value="item.id"
|
||
></el-option>
|
||
</el-select>
|
||
<el-input
|
||
v-else
|
||
:disabled="titleType == 'detail'"
|
||
></el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row :gutter="24">
|
||
<el-col :span="12">
|
||
<el-form-item label="人员定位标签号" prop="locationCardno">
|
||
<el-input
|
||
v-model="personForm.locationCardno"
|
||
placeholder="请输入标签号"
|
||
></el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item label="邮箱" prop="personMail">
|
||
<el-input
|
||
v-model="personForm.personMail"
|
||
placeholder="请输入邮箱"
|
||
></el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
|
||
<el-col :span="12">
|
||
<el-form-item
|
||
label="人员性质"
|
||
prop="workerNature"
|
||
>
|
||
<el-select
|
||
v-model="personForm.workerNature"
|
||
:placeholder="$t('message.laborMange.pleaseChoose')"
|
||
style="width: 100%"
|
||
:disabled="titleType == 'detail'"
|
||
>
|
||
<el-option
|
||
v-for="(item, index) in workerNatureList"
|
||
:key="index"
|
||
:label="item.name"
|
||
:value="item.data"
|
||
></el-option>
|
||
</el-select>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<div class="type-change">
|
||
<el-radio-group v-model="typeRadio">
|
||
<el-radio :label="1">设备</el-radio>
|
||
<el-radio :label="2">分组</el-radio>
|
||
</el-radio-group>
|
||
</div>
|
||
<el-row v-if="typeRadio == 1">
|
||
<el-form-item
|
||
:label="$t('message.laborMange.faceDevice')"
|
||
prop="ufaceDevList"
|
||
>
|
||
<el-checkbox
|
||
:indeterminate="isIndeterminate2"
|
||
v-model="checkAllFaceDev"
|
||
@change="handleCheckAllChangeFace"
|
||
>{{ $t("message.laborMange.checkAll") }}</el-checkbox
|
||
>
|
||
<el-checkbox-group
|
||
key="group1"
|
||
v-model="personForm.ufaceDevId"
|
||
@change="handleUfaceDevChange"
|
||
>
|
||
<el-checkbox
|
||
v-for="(item, index) in ufaceDevAllList"
|
||
:key="index"
|
||
:label="item.id"
|
||
:disabled="item.disabled"
|
||
>
|
||
{{ item.devName }}
|
||
</el-checkbox>
|
||
</el-checkbox-group>
|
||
</el-form-item>
|
||
</el-row>
|
||
<el-row v-if="typeRadio == 2">
|
||
<el-form-item label="人脸分组" prop="ufaceDevList">
|
||
<el-checkbox
|
||
:indeterminate="isIndeterminate3"
|
||
v-model="checkAllGroupDev"
|
||
@change="handleCheckAllChangeGroup"
|
||
>{{ $t("message.laborMange.checkAll") }}</el-checkbox
|
||
>
|
||
<el-checkbox-group
|
||
key="group2"
|
||
v-model="personForm.ufaceDevGroupId"
|
||
@change="handleUGroupChange"
|
||
>
|
||
<el-checkbox
|
||
v-for="(item, index) in uGroupAllList"
|
||
:key="index"
|
||
:label="item.id"
|
||
:disabled="item.disabled"
|
||
>
|
||
{{ item.name }}
|
||
</el-checkbox>
|
||
</el-checkbox-group>
|
||
</el-form-item>
|
||
</el-row>
|
||
</el-col>
|
||
<el-col :span="8">
|
||
<el-row :gutter="24">
|
||
<el-button
|
||
size="medium"
|
||
type="primary"
|
||
style="
|
||
margin-left: 30px;
|
||
width: 120px;
|
||
text-align: center;
|
||
padding: 9px 12px;
|
||
"
|
||
v-if="titleType != 'detail'"
|
||
@click="turnOnTheCamera(1)"
|
||
>{{ $t("message.laborMange.idCardInformation") }}</el-button
|
||
>
|
||
<el-button
|
||
size="medium"
|
||
type="primary"
|
||
style="
|
||
margin-left: 22px;
|
||
width: 104px;
|
||
text-align: center;
|
||
padding: 9px 18px;
|
||
"
|
||
v-if="titleType != 'detail'"
|
||
@click="turnOnTheCamera(2)"
|
||
>{{ $t("message.laborMange.turnCamera") }}</el-button
|
||
>
|
||
<el-button
|
||
size="medium"
|
||
type="primary"
|
||
style="
|
||
width: 82%;
|
||
margin: 15px 0 18px 30px;
|
||
background: #09c2aa;
|
||
border-color: #09c2aa;
|
||
"
|
||
@click="downloadPlugIn"
|
||
v-if="titleType != 'detail'"
|
||
>{{ $t("message.laborMange.highBeatDownload") }}</el-button
|
||
>
|
||
<el-row :gutter="24">
|
||
<el-col :span="10" :offset="2">
|
||
<div
|
||
style="position: relative; width: 100px; height: 119px"
|
||
>
|
||
<img
|
||
v-if="personForm.idCardBigPhotoUrl"
|
||
:src="fileUrl + personForm.idCardBigPhotoUrl"
|
||
@click="
|
||
handlePreview(
|
||
fileUrl + personForm.idCardBigPhotoUrl,
|
||
0
|
||
)
|
||
"
|
||
width="100%"
|
||
height="100%"
|
||
/>
|
||
<img
|
||
v-else
|
||
src="@/assets/images/profile_photo.png"
|
||
width="100%"
|
||
height="100%"
|
||
/>
|
||
<img
|
||
v-if="
|
||
personForm.idCardBigPhotoUrl &&
|
||
titleType != 'detail'
|
||
"
|
||
src="@/assets/images/shut_icon.png"
|
||
width="15px"
|
||
height="15px"
|
||
class="shut_icon"
|
||
@click="shutIconBtn(0)"
|
||
/>
|
||
</div>
|
||
<div style="margin: 4px 0">
|
||
<!-- <span style="color: #f76c6c">*</span> -->
|
||
<div style="width: 100px; text-align: center">
|
||
{{ $t("message.laborMange.IdCardHead") }}
|
||
</div>
|
||
</div>
|
||
<!-- 身份证头像 -->
|
||
<el-upload
|
||
class="upload-demo"
|
||
action="uploadUrl"
|
||
:on-remove="(file) => handleRemove(file, 6)"
|
||
:on-preview="(file) => handlePreview(file, 6)"
|
||
:before-upload="(file) => handleBeforeUpload(file, 6)"
|
||
:show-file-list="false"
|
||
:file-list="idCardUpPhotoFile"
|
||
:disabled="titleType == 'detail'"
|
||
:http-request="
|
||
(val) => handleUpload(val, 'idCardAvatar')
|
||
"
|
||
>
|
||
<el-button
|
||
size="medium"
|
||
style="padding: 9px 20px"
|
||
type="primary"
|
||
v-if="titleType != 'detail'"
|
||
>{{
|
||
$t("message.laborMange.clickOnTheUpload")
|
||
}}</el-button
|
||
>
|
||
</el-upload>
|
||
</el-col>
|
||
<el-col :span="11" :offset="1">
|
||
<div
|
||
style="position: relative; width: 100px; height: 119px"
|
||
>
|
||
<img
|
||
v-if="personForm.fieldAcquisitionUrl"
|
||
:src="fileUrl + personForm.fieldAcquisitionUrl"
|
||
@click="
|
||
handlePreview(
|
||
fileUrl + personForm.fieldAcquisitionUrl,
|
||
0
|
||
)
|
||
"
|
||
width="100%"
|
||
height="100%"
|
||
/>
|
||
<img
|
||
v-else
|
||
src="@/assets/images/profile_photo.png"
|
||
width="100%"
|
||
height="100%"
|
||
/>
|
||
<img
|
||
v-if="
|
||
personForm.fieldAcquisitionUrl &&
|
||
titleType != 'detail'
|
||
"
|
||
src="@/assets/images/shut_icon.png"
|
||
width="15px"
|
||
height="15px"
|
||
class="shut_icon"
|
||
@click="shutIconBtn(1)"
|
||
/>
|
||
</div>
|
||
<div style="margin: 4px 0">
|
||
<span style="color: #f76c6c">*</span>
|
||
<!-- <div style="width: 100px;text-align: center;"> -->
|
||
{{ $t("message.laborMange.spotFaceCollection") }}
|
||
<!-- </div> -->
|
||
</div>
|
||
<el-upload
|
||
accept=".jpg"
|
||
class="upload-demo"
|
||
action="uploadUrl"
|
||
:on-remove="(file) => handleRemove(file, 7)"
|
||
:on-preview="(file) => handlePreview(file, 7)"
|
||
:before-upload="(file) => handleBeforeUpload(file, 7)"
|
||
:file-list="fieldAcquisitionFile"
|
||
:disabled="titleType == 'detail'"
|
||
:show-file-list="false"
|
||
:http-request="(val) => handleUpload(val, 'livesFace')"
|
||
>
|
||
<el-button
|
||
size="medium"
|
||
style="padding: 9px 20px"
|
||
type="primary"
|
||
v-if="titleType != 'detail'"
|
||
>{{
|
||
$t("message.laborMange.clickOnTheUpload")
|
||
}}</el-button
|
||
>
|
||
</el-upload>
|
||
</el-col>
|
||
</el-row>
|
||
</el-row>
|
||
<el-col :span="22" :offset="2" class="hint">{{
|
||
$t("message.laborMange.imgHint")
|
||
}}</el-col>
|
||
</el-col>
|
||
</el-row>
|
||
</el-form>
|
||
<div class="dialog-footer">
|
||
<el-button
|
||
class="cancleBtn"
|
||
@click="addPersonDialog = false"
|
||
icon="el-icon-circle-close"
|
||
size="medium"
|
||
>{{ $t("message.laborMange.cancel") }}</el-button
|
||
>
|
||
<!-- 确定按钮 -->
|
||
<el-button
|
||
type="primary"
|
||
icon="el-icon-circle-check"
|
||
@click="savePersonFn('personForm')"
|
||
:disabled="titleType == 'detail'"
|
||
size="medium"
|
||
>{{ $t("message.laborMange.confirm") }}</el-button
|
||
>
|
||
</div>
|
||
</div>
|
||
</vue-scroll>
|
||
</el-dialog>
|
||
|
||
<!-- 新增 班组 弹窗 -->
|
||
<el-dialog
|
||
:modal-append-to-body="false"
|
||
:title="teamDialogTitle"
|
||
:close-on-click-modal="false"
|
||
:visible.sync="addTeamDialog"
|
||
width="740px"
|
||
>
|
||
<div class="dialog_content">
|
||
<el-form
|
||
size="small"
|
||
ref="teamForm"
|
||
:model="teamForm"
|
||
label-position="top"
|
||
label-width="80px"
|
||
:rules="teamFormRules"
|
||
>
|
||
<el-form-item
|
||
:label="$t('message.laborMange.workType')"
|
||
prop="workerTypeId"
|
||
>
|
||
<el-select
|
||
v-model="teamForm.workerTypeId"
|
||
:placeholder="$t('message.laborMange.pleaseChoose')"
|
||
@change="changeWorkerType"
|
||
style="width: 100%"
|
||
>
|
||
<el-option
|
||
v-for="item in workerTypeList"
|
||
:key="item.id"
|
||
:label="item.typeName"
|
||
:value="item.id"
|
||
></el-option>
|
||
</el-select>
|
||
</el-form-item>
|
||
<el-form-item
|
||
:label="$t('message.laborMange.principalName')"
|
||
prop="leaderName"
|
||
>
|
||
<el-input
|
||
v-model="teamForm.leaderName"
|
||
@change="changeLeaderName"
|
||
:disabled="teamForm.workerTypeId == ''"
|
||
:placeholder="$t('message.laborMange.placeholder2')"
|
||
></el-input>
|
||
</el-form-item>
|
||
<el-form-item
|
||
:label="$t('message.laborMange.principalId')"
|
||
prop="leaderIdCard"
|
||
>
|
||
<el-input
|
||
v-model="teamForm.leaderIdCard"
|
||
:placeholder="$t('message.laborMange.placeholder2')"
|
||
maxlength="18"
|
||
></el-input>
|
||
</el-form-item>
|
||
<el-form-item
|
||
:label="$t('message.laborMange.principalPhone')"
|
||
prop="leaderPhone"
|
||
>
|
||
<el-input
|
||
v-model="teamForm.leaderPhone"
|
||
:placeholder="$t('message.laborMange.placeholder2')"
|
||
oninput="if(value.length>11)value=value.slice(0,11)"
|
||
type="number"
|
||
></el-input>
|
||
</el-form-item>
|
||
<el-form-item :label="$t('message.laborMange.teamName')">
|
||
<el-input
|
||
v-model="teamForm.teamName"
|
||
:disabled="true"
|
||
:placeholder="$t('message.laborMange.placeholder2')"
|
||
></el-input>
|
||
</el-form-item>
|
||
<el-form-item
|
||
:label="$t('message.laborMange.teamType')"
|
||
prop="teamType"
|
||
>
|
||
<el-select
|
||
v-model="teamForm.teamType"
|
||
:placeholder="$t('message.laborMange.pleaseChoose')"
|
||
style="width: 100%"
|
||
>
|
||
<el-option
|
||
:label="$t('message.laborMange.ordinaryTeam')"
|
||
:value="$t('message.laborMange.ordinaryTeam')"
|
||
></el-option>
|
||
<el-option
|
||
:label="$t('message.laborMange.temporaryShift')"
|
||
:value="$t('message.laborMange.temporaryShift')"
|
||
></el-option>
|
||
</el-select>
|
||
</el-form-item>
|
||
<el-form-item :label="$t('message.laborMange.describe')">
|
||
<el-input
|
||
v-model="teamForm.describeValue"
|
||
:placeholder="$t('message.laborMange.placeholder2')"
|
||
></el-input>
|
||
</el-form-item>
|
||
</el-form>
|
||
<div class="dialog-footer">
|
||
<el-button
|
||
class="cancleBtn"
|
||
@click="addTeamDialog = false"
|
||
icon="el-icon-circle-close"
|
||
size="medium"
|
||
>{{ $t("message.laborMange.cancel") }}</el-button
|
||
>
|
||
<el-button
|
||
type="primary"
|
||
icon="el-icon-circle-check"
|
||
@click="saveTeamFn('teamForm')"
|
||
size="medium"
|
||
>{{ $t("message.laborMange.confirm") }}</el-button
|
||
>
|
||
</div>
|
||
</div>
|
||
</el-dialog>
|
||
|
||
<!-- 批量 移动 弹窗 -->
|
||
<el-dialog
|
||
:modal-append-to-body="false"
|
||
:title="$t('message.laborMange.mobileWorkers')"
|
||
:close-on-click-modal="false"
|
||
:visible.sync="batchMoveDialog"
|
||
width="740px"
|
||
>
|
||
<div class="dialog_content" style="height: 250px">
|
||
<el-form
|
||
size="small"
|
||
ref="batchMoveForm"
|
||
:model="batchMoveForm"
|
||
label-position="top"
|
||
label-width="80px"
|
||
>
|
||
<el-form-item
|
||
:label="$t('message.laborMange.set')"
|
||
prop="enterpriseId"
|
||
:rules="[
|
||
{
|
||
required: true,
|
||
message: $t('message.laborMange.pleaseSelectMoveTo'),
|
||
trigger: 'change',
|
||
},
|
||
]"
|
||
>
|
||
<el-select
|
||
v-model="batchMoveForm.enterpriseId"
|
||
:placeholder="$t('message.laborMange.pleaseChoose')"
|
||
@change="changeMoveCompany"
|
||
style="width: 100%"
|
||
>
|
||
<el-option
|
||
v-for="item in enterpriseListData"
|
||
:key="item.id"
|
||
:label="item.enterpriseName"
|
||
:value="item.id"
|
||
></el-option>
|
||
</el-select>
|
||
</el-form-item>
|
||
<el-form-item
|
||
:label="$t('message.laborMange.toTheTeam')"
|
||
prop="teamId"
|
||
:rules="[
|
||
{
|
||
required: true,
|
||
message: $t('message.laborMange.pleaseSelectMoveToTeam'),
|
||
trigger: 'change',
|
||
},
|
||
]"
|
||
>
|
||
<el-select
|
||
v-model="batchMoveForm.teamId"
|
||
:placeholder="$t('message.laborMange.pleaseChoose')"
|
||
@change="changeWorkerType"
|
||
style="width: 100%"
|
||
>
|
||
<el-option
|
||
v-for="item in moveTeamList.list"
|
||
:key="item.id"
|
||
:label="item.teamName"
|
||
:value="item.id"
|
||
></el-option>
|
||
</el-select>
|
||
</el-form-item>
|
||
</el-form>
|
||
<div class="dialog-footer">
|
||
<el-button
|
||
class="cancleBtn"
|
||
@click="batchMoveDialog = false"
|
||
icon="el-icon-circle-close"
|
||
size="medium"
|
||
>{{ $t("message.laborMange.cancel") }}</el-button
|
||
>
|
||
<el-button
|
||
type="primary"
|
||
icon="el-icon-circle-check"
|
||
@click="saveBatchMove('batchMoveForm')"
|
||
size="medium"
|
||
>{{ $t("message.laborMange.confirm") }}</el-button
|
||
>
|
||
</div>
|
||
</div>
|
||
</el-dialog>
|
||
|
||
<!-- 查看大图 -->
|
||
<div
|
||
v-if="bigImageDialog"
|
||
class="bigImageDialog"
|
||
@click="bigImageDialog = false"
|
||
>
|
||
<div class="bigImageContent">
|
||
<img width="auto" height="auto" :src="bigImageUrl" alt />
|
||
</div>
|
||
</div>
|
||
|
||
<!--高拍仪画面 -->
|
||
<el-dialog
|
||
:modal-append-to-body="false"
|
||
:title="$t('message.laborMange.instrumentScreen')"
|
||
:close-on-click-modal="false"
|
||
:visible.sync="instrUmentScreenDialog"
|
||
width="700px"
|
||
:show-close="false"
|
||
>
|
||
<div style="height: 500px; width: 100%">
|
||
<div style="height: 400px; width: 100%">
|
||
<img
|
||
style="width: 100%; height: 400px"
|
||
ref="screen"
|
||
:src="umentScreenUrl"
|
||
alt
|
||
/>
|
||
</div>
|
||
<div class="dialog-footer" style="text-align: center">
|
||
<el-button type="primary" @click="onclose(1)" size="small">{{
|
||
$t("message.laborMange.photograph")
|
||
}}</el-button>
|
||
<el-button class="cancleBtn" @click="onclose(2)" size="small">{{
|
||
$t("message.laborMange.close")
|
||
}}</el-button>
|
||
</div>
|
||
</div>
|
||
</el-dialog>
|
||
|
||
<!-- 图片裁剪弹框 -->
|
||
<el-dialog
|
||
:modal-append-to-body="false"
|
||
:title="
|
||
$t('message.personnelPosition.mapManage.dialog_KJNova_Clipper.title')
|
||
"
|
||
:visible.sync="cropperDialog"
|
||
width="767px"
|
||
>
|
||
<div class="dialog_content" style="height: 400px">
|
||
<!-- <vue-scroll> -->
|
||
<!-- <vueCropper
|
||
ref="cropper"
|
||
:img="cropperOption.img"
|
||
:outputType="cropperOption.outputType"
|
||
:autoCropWidth="cropperOption.autoCropWidth"
|
||
: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"
|
||
:centerBox="true"
|
||
mode="contain"
|
||
:autoCrop="true"
|
||
></vueCropper>
|
||
<!-- </vue-scroll> -->
|
||
</div>
|
||
<div class="dialog-footer">
|
||
<el-button
|
||
class="cancleBtn"
|
||
@click="cropperDialog = false"
|
||
icon="el-icon-circle-close"
|
||
size="medium"
|
||
>{{ $t("message.personnelPosition.cancel") }}
|
||
</el-button>
|
||
<el-button
|
||
type="primary"
|
||
icon="el-icon-circle-check"
|
||
@click="saveMapUrlFn"
|
||
size="medium"
|
||
>{{ $t("message.personnelPosition.determine") }}
|
||
</el-button>
|
||
</div>
|
||
</el-dialog>
|
||
|
||
<el-dialog
|
||
:modal-append-to-body="false"
|
||
:title="$t('message.laborMange.photoComparisonResults')"
|
||
:visible.sync="showImgList"
|
||
width="767px"
|
||
>
|
||
<div class="img-list">
|
||
<div class="form-label">
|
||
<span>*</span
|
||
>{{
|
||
$t("message.laborMange.pleaseChoose") +
|
||
$t("message.laborMange.picture")
|
||
}}:
|
||
</div>
|
||
<el-radio-group class="radio-box" v-model="radio">
|
||
<el-radio
|
||
:label="item.personSerial"
|
||
v-for="item in imgRadiolist"
|
||
:key="item.id"
|
||
>
|
||
<el-image
|
||
style="width: 100px; height: 100px"
|
||
:src="fileUrl + item.imageUrl"
|
||
:preview-src-list="[fileUrl + item.imageUrl]"
|
||
>
|
||
</el-image>
|
||
</el-radio>
|
||
</el-radio-group>
|
||
<div class="btn-box">
|
||
<el-button
|
||
icon="el-icon-circle-check"
|
||
type="primary"
|
||
@click="checkImg"
|
||
>{{ $t("message.laborMange.confirm") }}</el-button
|
||
>
|
||
<el-button icon="el-icon-circle-close" @click="showImgList = false">{{
|
||
$t("message.laborMange.cancel")
|
||
}}</el-button>
|
||
</div>
|
||
</div>
|
||
</el-dialog>
|
||
|
||
<!-- 下发详情 -->
|
||
<el-dialog
|
||
:modal-append-to-body="false"
|
||
title="下发详情"
|
||
:close-on-click-modal="false"
|
||
:visible.sync="issueTeamDialog"
|
||
width="740px"
|
||
>
|
||
<div class="dialog_content">
|
||
<div class="table_wrap whiteBlock">
|
||
<el-table class="tables" :data="issuePointList">
|
||
<el-table-column
|
||
type="index"
|
||
width="50"
|
||
align="center"
|
||
:label="$t('message.personnelPosition.beaconManage.table.index')"
|
||
></el-table-column>
|
||
<el-table-column
|
||
prop="detail"
|
||
label="任务名称"
|
||
align="center"
|
||
></el-table-column>
|
||
<el-table-column prop="isSuccess" label="执行结果" align="center">
|
||
<template v-slot="{ row }">{{
|
||
row.isSuccess === 1 ? "成功" : row.isSuccess === 0 ? "失败" : ""
|
||
}}</template>
|
||
</el-table-column>
|
||
|
||
<el-table-column
|
||
:label="
|
||
$t('message.personnelPosition.beaconManage.table.operation')
|
||
"
|
||
align="center"
|
||
width="150"
|
||
>
|
||
<template v-slot="{ row }">
|
||
<div
|
||
class="operationText"
|
||
@click="retryEvent(row.id)"
|
||
v-if="row.isSuccess === 0"
|
||
>
|
||
<span style="color: #5381f6">重试</span>
|
||
</div>
|
||
</template>
|
||
</el-table-column>
|
||
<!-- <div slot="empty">{{$t('message.personnelPosition.empty')}}</div> -->
|
||
</el-table>
|
||
<!-- <el-pagination
|
||
class="pagerBox"
|
||
@size-change="handleSizeChange"
|
||
@current-change="handleCurrentChange"
|
||
:current-page="issuePage.pageNo"
|
||
:page-sizes="$store.state.PAGESIZRS"
|
||
:page-size="issuePage.pageSize"
|
||
layout="total, sizes, prev, pager, next"
|
||
:total="Number(total)"
|
||
background
|
||
></el-pagination> -->
|
||
<!-- <div class="dialog-footer">
|
||
<el-button
|
||
class="cancleBtn"
|
||
@click="issueTeamDialog = false"
|
||
icon="el-icon-circle-close"
|
||
size="medium"
|
||
>{{ $t("message.laborMange.cancel") }}</el-button
|
||
>
|
||
<el-button
|
||
type="primary"
|
||
icon="el-icon-circle-check"
|
||
@click="issueTeamDialog = false"
|
||
size="medium"
|
||
>{{ $t("message.laborMange.confirm") }}</el-button
|
||
>
|
||
</div> -->
|
||
</div>
|
||
</div>
|
||
</el-dialog>
|
||
</div>
|
||
</template>
|
||
|
||
<script>
|
||
import {
|
||
getEnterpriseInfoList,
|
||
getEnterpriseTypeList,
|
||
setEnterpriseInfo,
|
||
editEnterpriseInfo,
|
||
deleteEnterprise,
|
||
getTeamInfoList,
|
||
getProjectTeamList,
|
||
getWorkerTypeList,
|
||
addTeamInfo,
|
||
deleteTeamInfo,
|
||
editTeamInfo,
|
||
getWorkerInfoList,
|
||
addWorkerInfo,
|
||
editWorkerInfo,
|
||
updateWorkerExit,
|
||
updateWorkerTeam,
|
||
deleteWorkerInfo,
|
||
getProjectUfaceConfigInfo,
|
||
getIdCardInfoApi,
|
||
checkFaceApi,
|
||
workerAttendanceRuleList,
|
||
sendWorkerInfoByIdApi,
|
||
batchSendWorkerInfoApi,
|
||
selectHierarchyEnterpriseListApi,
|
||
ufaceDevList,
|
||
getGroupListApi,
|
||
checkImgLibraryApi,
|
||
updateByIdWorkerInfo,
|
||
sendBatchWokerApi,
|
||
importImgDataApi,
|
||
xmglXzHikvisionSyncGetNewestList,
|
||
xmglXzHikvisionSyncRetryAPI,
|
||
checkfaceHikvisionApi,
|
||
onBatchDeletionApi,
|
||
} from "@/assets/js/api/laborPerson";
|
||
import {
|
||
selectUserDevAuthorityByUserIdApi,
|
||
exporExcelWorkerTemplateApi,
|
||
} from "@/assets/js/api/configManage";
|
||
import { getDictionaryItemApi } from '@/assets/js/api/companyDiagram.js'
|
||
import {
|
||
checkPhone,
|
||
CheckSocialCreditCode,
|
||
IdentityCodeValid,
|
||
} 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";
|
||
import mqtt from "mqtt";
|
||
var client = null;
|
||
const options = {
|
||
connectTimeout: 40000,
|
||
clientId: "mqttjs_" + Math.random().toString(16).substr(2, 8),
|
||
username: "root",
|
||
password: "123456",
|
||
clean: true,
|
||
};
|
||
export default {
|
||
components: {
|
||
VueCropper,
|
||
},
|
||
data() {
|
||
return {
|
||
pageSizeList: [10, 50, 100, 200, 500],
|
||
sendStatusArr: [
|
||
{ name: "未下发", value: 4 },
|
||
{ name: "成功", value: 1 },
|
||
{ name: "失败", value: 2 },
|
||
{ name: "部分成功", value: 3 },
|
||
],
|
||
issuePointList: [],
|
||
typeRadio: 1,
|
||
refreshPage: true, //静默刷新
|
||
radio: "",
|
||
key: false, //判断是否显示一件下发按钮
|
||
COMPANY: COMPANY,
|
||
isCheckeedData: true, //判断一键下发是否有数据选中
|
||
ufaceDevAllList: [], //所有人脸设备
|
||
uGroupAllList: [], //所有分组
|
||
projectSn: null, //projectSn 项目sn
|
||
uploadUrl: "", //文件上传地址
|
||
fileUrl: "", //文件上传地址
|
||
showImgList: false,
|
||
// ------------------------------------------------------------------
|
||
|
||
enterpriseName: "", //劳务公司名称 || 企业名称
|
||
enterpriseListData: [], //企业列表 || 劳务公司列表
|
||
checkedId: 0, //选中的企业
|
||
//新增企业表单
|
||
enterpriseForm: {
|
||
name: "",
|
||
bankcardnumber: "", //银行卡号
|
||
bankname: "", // 开户行
|
||
businessLicenseEndDate: "", // 营业执照截止日期
|
||
businessNumber: "", //营业执照注册号
|
||
enterpriseAddress: "", //企业地址
|
||
enterpriseEmail: "", //企业邮箱
|
||
enterpriseLegalPerson: "", //法定代表人
|
||
enterpriseName: "", //企业名称
|
||
enterpriseProperty: "", //单位性质 1.国有企业 2三资企业 3集体企业 4私营企业
|
||
enterpriseQualificationUrl: "", //企业资质图片地址
|
||
enterpriseSafeAllow: "", //企业安全生产许可证
|
||
enterpriseTypeId: "", //企业类型Id
|
||
legalPersonTel: "", //法人电话
|
||
logo: "", //logo
|
||
projectSn: "", //项目Sn
|
||
qualificationNumber: "", //资质证书号
|
||
registerPersonPhoneTel: "", //注册人电话
|
||
registeredCapital: "", //注册资金
|
||
socialCode: "", //社会统一信用代码
|
||
},
|
||
//校验新增企业表单
|
||
enterpriseFormRules: this.$t("message.laborMange.enterpriseFormRules"),
|
||
//民族
|
||
nationList: this.$t("message.laborMange.nationList"),
|
||
imgFileList: [], // 照片文件列表
|
||
aptitudeFileList: [], //资质照片列表
|
||
logoFileList: [], //logo 文件列表
|
||
enterpriseTypeList: [], //新增企业 企业类型下拉
|
||
bigImageDialog: false, //查看大图
|
||
bigImageUrl: "", //大图地址
|
||
enterpriseDialogTitle: this.$t("message.laborMange.theNewEnterprise"), // 用于判断 是新增 还是编辑 修改字段要谨慎啊
|
||
addEnterpriseDialog: false, //新增企业 弹窗
|
||
|
||
/*-------------------
|
||
-----------------------右边数据字段----------------
|
||
---------------*/
|
||
teamDialogTitle: this.$t("message.laborMange.theNewTeam"),
|
||
addTeamDialog: false, // 新增班组 弹窗
|
||
//班组信息
|
||
teamForm: {
|
||
describeValue: "", //描述
|
||
leaderIdCard: "", //负责人身份证号
|
||
leaderName: "", //负责人姓名
|
||
leaderPhone: "", //负责人手机号
|
||
teamName: "", //班组名称
|
||
teamType: "", //班组类型
|
||
workerTypeId: "", //工种id
|
||
specialTeam: 0, //是否是特殊班组 0否,1是
|
||
},
|
||
specialTeam: 0,
|
||
//班组校验
|
||
teamFormRules: this.$t("message.laborMange.teamFormRules"),
|
||
workerTypeList: [], // 班组 工种
|
||
showEnterpriseName: "", //头部的企业名称
|
||
teamListData: {}, // 班组列表
|
||
checkedTeamId: 0, //选中的班组id
|
||
pageSize: 10,
|
||
page: 1,
|
||
total: 0,
|
||
//请求表格参数
|
||
tableParameter: {
|
||
idCard: "",
|
||
personType: 1,
|
||
projectSn: "",
|
||
teamId: "",
|
||
workerName: "",
|
||
inserviceType: "",
|
||
sendSuccessStatus: null,
|
||
enterDate: "",
|
||
codeState: "",
|
||
},
|
||
tableListData: [], //表格数据
|
||
personDialogTitle: this.$t("message.laborMange.personnelEntry"),
|
||
titleType: "add",
|
||
imgImportDialog: false, //照片导入 弹窗
|
||
addPersonDialog: false, //人员录入 弹窗
|
||
//人员表单字段
|
||
personForm: {
|
||
workerName: "",
|
||
sex: "",
|
||
idCard: "",
|
||
birthday: "",
|
||
enterDate: "",
|
||
nation: "",
|
||
nativePlace: "",
|
||
isUploadHousing: "",
|
||
issuingAuthorityForIdcard: "",
|
||
idCardEndDate: "",
|
||
longTerm: false,
|
||
phoneNumber: "",
|
||
emergentPerson: "",
|
||
emergentPhone: "",
|
||
inserviceType: "",
|
||
politicsStatus: "",
|
||
marry: "",
|
||
payRollBankName: "",
|
||
payRollBankNumber: "",
|
||
educational: "",
|
||
blood: "",
|
||
examinationImage: "",
|
||
contractImage: "",
|
||
employmentCard: "",
|
||
idCardBigPhotoUrl: "",
|
||
fieldAcquisitionUrl: "",
|
||
personType: 1,
|
||
idCardUpPhotoUrl: "",
|
||
idCardDownPhotoUrl: "",
|
||
ruleId: "",
|
||
ufaceDevId: [],
|
||
ufaceDevGroupId: [],
|
||
personSerial: "",
|
||
locationCardno: "", //人员定位标签号
|
||
personMail: "",
|
||
workerNature: ""
|
||
},
|
||
//人员录入校验
|
||
personFormRules: this.$t("message.laborMange.personFormRules2"),
|
||
|
||
//显示的文件列表
|
||
examinationFile: [], //体检报告
|
||
contractFile: [], //合同附件
|
||
employmentFile: [], //从业资格证书
|
||
idCardUpPhotoFile: [], //身份证头像
|
||
fieldAcquisitionFile: [], //现场采集人脸
|
||
idCardUpPhotoUrlFile: [], // 身份证国徽面
|
||
idCardDownPhotoUrlFile: [], // 身份证人像面
|
||
|
||
checkAll: false, //显示选中状态
|
||
isIndeterminate: false, //有选中的数据
|
||
checkedWorker: [], //批量选中的数据
|
||
batchMoveDialog: false, //批量移动弹窗
|
||
//批量移动表单
|
||
batchMoveForm: {
|
||
teamId: "",
|
||
enterpriseId: "",
|
||
},
|
||
moveTeamList: [], // 选择移动的班组的列表
|
||
showTeamList: false, //显示班组列表
|
||
|
||
// 表格 全选 状态 禁用启用
|
||
checkAllStatus: false,
|
||
|
||
webSocket: null,
|
||
instrUmentScreenDialog: false,
|
||
umentScreenUrl: "",
|
||
base64Type: "data:image/jpeg;base64,",
|
||
isUploadToHouse: false, //是否显示上传到住建局按钮
|
||
isIscDevice: false, //是否是海康门禁isc设备
|
||
attendRulesList: [],
|
||
enterpriseTypeId: "",
|
||
cropperOption: {
|
||
outputType: "jpeg",
|
||
img: "",
|
||
autoCropWidth: 300, // 默认生成截图框宽度
|
||
autoCropHeight: 360, // 默认生成截图框高度
|
||
},
|
||
cropperDialog: false,
|
||
enterpriseTreeData: [],
|
||
defaultId: "",
|
||
isIndeterminate2: false,
|
||
isIndeterminate3: false,
|
||
checkAllFaceDev: false,
|
||
checkAllGroupDev: false,
|
||
fileTemp: "",
|
||
imgRadiolist: [],
|
||
isSzProject: "",
|
||
issueTeamDialog: false,
|
||
issuePage: {
|
||
pageNo: 1,
|
||
pageSize: 10,
|
||
},
|
||
whoId: "",
|
||
topicName: "topic",
|
||
userId: "",
|
||
workerNatureList: []
|
||
};
|
||
},
|
||
created() {
|
||
// this.pageSizeList = JSON.parse(JSON.stringify(this.$store.state.PAGESIZRS));
|
||
this.projectSn = this.$store.state.projectSn;
|
||
this.uploadUrl = this.$store.state.UPLOADURL;
|
||
this.fileUrl = this.$store.state.FILEURL;
|
||
let data = JSON.parse(sessionStorage.getItem("vuex"));
|
||
// console.log('vuex信息',data)
|
||
data.menuList.forEach((item) => {
|
||
if (item.actionList) {
|
||
item.actionList.find((item2) => {
|
||
if (item2.actionCode == "akey_issued") {
|
||
this.key = true;
|
||
}
|
||
// console.log('this.key', this.key)
|
||
});
|
||
}
|
||
});
|
||
if (sessionStorage.getItem("personPage")) {
|
||
this.page = JSON.parse(sessionStorage.getItem("personPage"));
|
||
}
|
||
if (sessionStorage.getItem("companyPage")) {
|
||
this.checkedId = JSON.parse(sessionStorage.getItem("companyPage"));
|
||
}
|
||
this.getConfig();
|
||
|
||
this.getProjectList();
|
||
this.getAttendRuleList();
|
||
this.getHierarchyEnterpriseList();
|
||
this.getUfaceDevList();
|
||
this.getUGroupDevList();
|
||
this.getProjectConfig();
|
||
this.getWorkerNatureList()
|
||
},
|
||
beforeDestroy() {
|
||
if (client) {
|
||
client.unsubscribe(this.topicName + this.userId, options);
|
||
client.end();
|
||
}
|
||
client = null;
|
||
},
|
||
mounted() {
|
||
// this.webSocket = new WebSocket("ws://127.0.0.1:1818");
|
||
this.userId = this.$store.state.userInfo.userId;
|
||
this.topicName = this.$store.state.userInfo.scope;
|
||
this.getEnterpriseType();
|
||
client = mqtt.connect(mqttUrl, options);
|
||
this.mqttMSG();
|
||
},
|
||
computed: {
|
||
headers() {
|
||
return {
|
||
Authorization: this.$store.state.userInfo.token,
|
||
};
|
||
},
|
||
},
|
||
methods: {
|
||
// 获取人员性质下拉
|
||
async getWorkerNatureList () {
|
||
const res = await getDictionaryItemApi({
|
||
dictionaryEncoding: 'worker_nature',
|
||
projectSn: this.projectSn
|
||
})
|
||
if (res.code == 200) {
|
||
this.workerNatureList = res.result
|
||
}
|
||
},
|
||
// 监听mqtt下发信息然后刷新列表
|
||
mqttMSG() {
|
||
// mqtt连接 +"/#" +workerId
|
||
client.on("connect", (e) => {
|
||
// console.log('连接成功:', this.topicName + this.userId)
|
||
client.subscribe(this.topicName + this.userId, { qos: 0 }, (error) => {
|
||
if (!error) {
|
||
// console.log('订阅成功123')
|
||
} else {
|
||
console.log("订阅失败");
|
||
}
|
||
});
|
||
});
|
||
// 接收消息处理
|
||
client.on("message", (topic, message) => {
|
||
// console.log(message);
|
||
this.getTableData();
|
||
});
|
||
// 断开发起重连
|
||
// client.on("reconnect", (error) => {
|
||
// console.log("正在重连:", error);
|
||
// });
|
||
// 链接异常处理
|
||
client.on("error", (error) => {
|
||
console.log("连接失败:", error);
|
||
});
|
||
},
|
||
handleImportSuccess(response, file, fileList) {
|
||
console.log(response, file, fileList);
|
||
this.imgFileList = fileList;
|
||
console.log(this.imgFileList);
|
||
},
|
||
handleImportExceed(files, fileList) {
|
||
/*this.$message.warning(
|
||
`当前限制选择 1 个文件,本次选择了 ${files.length} 个文件,共选择了 ${
|
||
files.length + fileList.length
|
||
} 个文件`
|
||
);*/
|
||
this.$message.warning(
|
||
this.$t("message.docManage.dialog_upload_files.limitingChoice")
|
||
); //当前限制选择 1 个文件
|
||
},
|
||
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("图片上传后",res)
|
||
|
||
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格式图片")); //"请上传jpg、jpeg格式图片"
|
||
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}
|
||
// 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 =
|
||
// this.$store.state.FILEURL + imgInfo.imageUrl
|
||
// this.cropperDialog = true
|
||
// } else {
|
||
// if (this.isSzProject == 1) {
|
||
// this.checkImgLibrary(imgInfo.imageUrl)
|
||
// } else {
|
||
// this.checkFace(imgInfo.imageUrl)
|
||
// }
|
||
// }
|
||
break;
|
||
}
|
||
}
|
||
});
|
||
// });
|
||
},
|
||
checkImg() {
|
||
console.log(this.radio);
|
||
this.imgRadiolist.forEach((item) => {
|
||
if (this.radio == item.personSerial) {
|
||
this.personForm.personSerial = this.radio;
|
||
this.personForm.fieldAcquisitionUrl = item.imageUrl;
|
||
this.fieldAcquisitionFile = [{ name: "", url: item.imageUrl }];
|
||
}
|
||
});
|
||
this.showImgList = false;
|
||
},
|
||
// 判断是否为深圳项目
|
||
getProjectConfig() {
|
||
getProjectConfigListApi({ projectSn: this.projectSn }).then((res) => {
|
||
this.isSzProject = res.result[0].isSzProject; //1是 0否
|
||
});
|
||
},
|
||
exportM() {
|
||
window.location.href =
|
||
this.$http.defaults.baseURL +
|
||
"xmgl/download/exporExcelWorkerTemplate?projectSn=" +
|
||
this.projectSn;
|
||
},
|
||
// 导入照片弹窗
|
||
importImgOpen() {
|
||
this.imgFileList = [];
|
||
this.imgImportDialog = true;
|
||
},
|
||
checkAllFn() {
|
||
// 全选按钮值切换
|
||
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 = {
|
||
projectSn: this.projectSn,
|
||
personType: "1",
|
||
userId: this.$store.state.userInfo.userId,
|
||
enterpriseId: this.checkedId,
|
||
};
|
||
if (this.checkedWorker.length > 0) {
|
||
const ids = this.checkedWorker.map((item) => item.id).join(",");
|
||
requestData.workerIds = ids;
|
||
}
|
||
sendBatchWokerApi(requestData).then((res) => {
|
||
if (res.code == 200) {
|
||
this.$message({
|
||
message: "操作成功,已在后台下发,请稍后查看!",
|
||
type: "success",
|
||
});
|
||
}
|
||
});
|
||
},
|
||
handleChangeE(file, fileList) {
|
||
this.fileTemp = file.raw;
|
||
console.log(file);
|
||
if (this.fileTemp) {
|
||
if (
|
||
this.fileTemp.type ==
|
||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" ||
|
||
this.fileTemp.type == "application/vnd.ms-excel"
|
||
) {
|
||
} else {
|
||
this.$message.error(this.$t("message.laborMange.hint5"));
|
||
}
|
||
}
|
||
},
|
||
handleSuccessE(file) {
|
||
this.refreshPage = false;
|
||
console.log("==========", file);
|
||
if (file.code == 200) {
|
||
this.$message.success(file.message); //导入成功
|
||
this.refreshBtn();
|
||
this.getTeamList();
|
||
} else {
|
||
this.$message.error(file.message);
|
||
}
|
||
this.$nextTick(() => {
|
||
this.refreshPage = true;
|
||
});
|
||
},
|
||
handleErrorE() {
|
||
this.$message.error(this.$t("message.laborMange.hint7"));
|
||
this.refreshBtn();
|
||
},
|
||
handleUfaceDevChange(val) {
|
||
let checkedCount = val.length;
|
||
let allCheckList = [];
|
||
for (let i = 0; i < this.ufaceDevAllList.length; i++) {
|
||
if (!this.ufaceDevAllList[i].disabled) {
|
||
allCheckList.push(this.ufaceDevAllList[i]);
|
||
}
|
||
}
|
||
this.checkAllFaceDev = checkedCount === allCheckList.length;
|
||
this.isIndeterminate2 =
|
||
checkedCount > 0 && checkedCount < allCheckList.length;
|
||
},
|
||
handleUGroupChange(val) {
|
||
let checkedCount = val.length;
|
||
let allCheckList = [];
|
||
for (let i = 0; i < this.uGroupAllList.length; i++) {
|
||
if (!this.uGroupAllList[i].disabled) {
|
||
allCheckList.push(this.uGroupAllList[i]);
|
||
}
|
||
}
|
||
this.checkAllGroupDev = checkedCount === allCheckList.length;
|
||
this.isIndeterminate3 =
|
||
checkedCount > 0 && checkedCount < allCheckList.length;
|
||
},
|
||
handleCheckAllChangeFace(val) {
|
||
if (val) {
|
||
this.personForm.ufaceDevId = [];
|
||
this.ufaceDevAllList.forEach((item) => {
|
||
this.personForm.ufaceDevId.push(item.id);
|
||
});
|
||
} else {
|
||
// this.ufaceDevAllList = []
|
||
this.personForm.ufaceDevId = [];
|
||
}
|
||
this.isIndeterminate2 = false;
|
||
},
|
||
handleCheckAllChangeGroup(val) {
|
||
if (val) {
|
||
this.personForm.ufaceDevGroupId = [];
|
||
this.uGroupAllList.forEach((item) => {
|
||
this.personForm.ufaceDevGroupId.push(item.id);
|
||
});
|
||
} else {
|
||
this.personForm.ufaceDevGroupId = [];
|
||
}
|
||
this.isIndeterminate2 = false;
|
||
},
|
||
// 获取所有分组
|
||
getUGroupDevList() {
|
||
getGroupListApi({ projectSn: this.projectSn }).then((res) => {
|
||
console.log(res);
|
||
if (res.code == 200) {
|
||
this.uGroupAllList = res.result;
|
||
console.log(this.uGroupAllList, 123456);
|
||
this.personForm.ufaceDevGroupId = [
|
||
...this.personForm.ufaceDevGroupId,
|
||
];
|
||
if (this.$store.state.userInfo.accountType == 6) {
|
||
this.uGroupAllList.forEach((item) => {
|
||
item.disabled = true;
|
||
});
|
||
// selectUserDevAuthorityByUserIdApi({
|
||
// userId: this.$store.state.userInfo.userId,
|
||
// devType: "1",
|
||
// }).then((res) => {
|
||
// if (res.code == 200) {
|
||
// let arr = res.result.devId.split(",");
|
||
// let id = "";
|
||
// this.personForm.ufaceDevId = [];
|
||
// for (let i = 0; i < arr.length; i++) {
|
||
// console.log(parseInt(arr[i]));
|
||
// this.personForm.ufaceDevId.push(parseInt(arr[i]));
|
||
// id = parseInt(arr[i]);
|
||
// for (let j = 0; j < this.ufaceDevAllList.length; j++) {
|
||
// if (this.ufaceDevAllList[j].id == id) {
|
||
// this.ufaceDevAllList[j].disabled = false;
|
||
// }
|
||
// }
|
||
// }
|
||
// }
|
||
// });
|
||
}
|
||
}
|
||
});
|
||
},
|
||
// 获取所有人脸设备
|
||
getUfaceDevList() {
|
||
ufaceDevList({ projectSn: this.projectSn }).then((res) => {
|
||
console.log(res);
|
||
if (res.code == 200) {
|
||
this.ufaceDevAllList = res.result;
|
||
this.personForm.ufaceDevId = [...this.personForm.ufaceDevId];
|
||
if (this.$store.state.userInfo.accountType == 6) {
|
||
this.ufaceDevAllList.forEach((item) => {
|
||
item.disabled = true;
|
||
});
|
||
selectUserDevAuthorityByUserIdApi({
|
||
userId: this.$store.state.userInfo.userId,
|
||
devType: "1",
|
||
}).then((res) => {
|
||
if (res.code == 200) {
|
||
let arr = res.result.devId.split(",");
|
||
let id = "";
|
||
this.personForm.ufaceDevId = [];
|
||
for (let i = 0; i < arr.length; i++) {
|
||
console.log(parseInt(arr[i]));
|
||
this.personForm.ufaceDevId.push(parseInt(arr[i]));
|
||
id = parseInt(arr[i]);
|
||
for (let j = 0; j < this.ufaceDevAllList.length; j++) {
|
||
if (this.ufaceDevAllList[j].id == id) {
|
||
this.ufaceDevAllList[j].disabled = false;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
});
|
||
}
|
||
}
|
||
});
|
||
},
|
||
//一键下发
|
||
issuePersonFn() {
|
||
batchSendWorkerInfoApi({
|
||
projectSn: this.$store.state.projectSn,
|
||
personType: 1,
|
||
}).then((res) => {
|
||
this.$message.success("已执行人员下发命令");
|
||
this.getTableData();
|
||
});
|
||
},
|
||
//单个人员下发
|
||
issuePersonOneFn(workerId) {
|
||
sendWorkerInfoByIdApi({ workerId: workerId }).then((res) => {
|
||
this.$message.success(this.$t("message.laborMange.hint4"));
|
||
});
|
||
},
|
||
changRuleId(val) {
|
||
console.log(val);
|
||
},
|
||
//获取考勤规则列表
|
||
getAttendRuleList() {
|
||
workerAttendanceRuleList({ projectSn: this.$store.state.projectSn }).then(
|
||
(result) => {
|
||
this.attendRulesList = result.result;
|
||
console.log(result.result);
|
||
}
|
||
);
|
||
},
|
||
exportFn() {
|
||
window.location.href =
|
||
this.$http.defaults.baseURL +
|
||
"xmgl/download/exporZipWorkerInfo?idCard=" +
|
||
this.tableParameter.idCard +
|
||
"&projectSn=" +
|
||
this.tableParameter.projectSn +
|
||
"&teamId=" +
|
||
this.tableParameter.teamId +
|
||
"&workerName=" +
|
||
this.tableParameter.workerName +
|
||
"&personType=" +
|
||
this.tableParameter.personType +
|
||
"&enterDate=" +
|
||
this.tableParameter.enterDate +
|
||
"&codeState=" +
|
||
this.tableParameter.codeState +
|
||
"&enterpriseId=" +
|
||
this.checkedId;
|
||
},
|
||
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;
|
||
}
|
||
}
|
||
});
|
||
},
|
||
//获取企业 || 劳务公司 列表
|
||
getProjectList(type) {
|
||
let data = {
|
||
projectSn: this.projectSn,
|
||
enterpriseName: this.enterpriseName,
|
||
userEnterpriseId: this.$store.state.userInfo.userEnterpriseId,
|
||
enterpriseTypeId: this.enterpriseTypeId,
|
||
};
|
||
getEnterpriseInfoList(data).then((res) => {
|
||
console.log(res, "执行");
|
||
if (res.code == 200) {
|
||
this.enterpriseListData = res.result;
|
||
// this.$set(this, 'enterpriseListData', res.result)
|
||
console.log(this.enterpriseListData);
|
||
this.checkedId = this.checkedId
|
||
? this.checkedId
|
||
: res.result.length > 0
|
||
? res.result[0].id
|
||
: "";
|
||
this.showEnterpriseName =
|
||
res.result.length > 0 ? res.result[0].enterpriseName : "";
|
||
|
||
this.getTeamList();
|
||
this.getHierarchyEnterpriseList();
|
||
} else {
|
||
this.$message.error(this.$t("message.laborMange.queryFails"));
|
||
}
|
||
});
|
||
},
|
||
// 获取企业分级列表
|
||
getHierarchyEnterpriseList() {
|
||
let data = {
|
||
projectSn: this.projectSn,
|
||
enterpriseName: this.enterpriseName,
|
||
userEnterpriseId: this.$store.state.userInfo.userEnterpriseId,
|
||
enterpriseTypeId: this.enterpriseTypeId,
|
||
};
|
||
selectHierarchyEnterpriseListApi(data).then((res) => {
|
||
if (res.code == 200) {
|
||
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 {
|
||
this.$refs["treeNode"].setCurrentKey(res.result[0].id.toString());
|
||
}
|
||
});
|
||
console.log(this.defaultId);
|
||
}
|
||
});
|
||
},
|
||
// 切换 选择 企业 || 劳务公司
|
||
checkeEnterprise(value) {
|
||
this.checkedId = value.id;
|
||
this.showEnterpriseName = value.enterpriseName;
|
||
this.page = 1;
|
||
sessionStorage.setItem("personPage", 1);
|
||
sessionStorage.setItem("companyPage", value.id);
|
||
this.$refs.multipleTable.toggleRowSelection([], false);
|
||
this.getTeamList();
|
||
this.checkedTeamId = 0;
|
||
this.tableParameter.teamId = "";
|
||
this.batchMoveForm = {
|
||
teamId: "",
|
||
enterpriseId: "",
|
||
};
|
||
this.$refs.multipleTable.bodyWrapper.scrollTop = 0;
|
||
},
|
||
//编辑企业 || 劳务公司 信息
|
||
editEnterpriseInfo(value) {
|
||
this.addEnterpriseDialog = true;
|
||
this.enterpriseDialogTitle = this.$t("message.laborMange.editEnterprise");
|
||
this.enterpriseForm = JSON.parse(JSON.stringify(value));
|
||
this.getEnterpriseType();
|
||
//资质file
|
||
this.aptitudeFileList =
|
||
value.enterpriseQualificationUrl != ""
|
||
? [JSON.parse(this.enterpriseForm.enterpriseQualificationUrl)]
|
||
: [];
|
||
//logo
|
||
this.logoFileList =
|
||
value.logo != "" ? [JSON.parse(this.enterpriseForm.logo)] : [];
|
||
setTimeout(() => {
|
||
this.$refs.enterpriseDialog.scrollTop = 0;
|
||
this.$refs["enterpriseForm"].clearValidate();
|
||
}, 120);
|
||
},
|
||
//新增企业 按钮
|
||
addEnterpriseBtn() {
|
||
window._paq.push(["trackEvent", "点击", "新增企业", "添加企业信息"]);
|
||
this.enterpriseForm = {
|
||
name: "",
|
||
bankcardnumber: "", //银行卡号
|
||
bankname: "", // 开户行
|
||
businessLicenseEndDate: "", // 营业执照截止日期
|
||
businessNumber: "", //营业执照注册号
|
||
enterpriseAddress: "", //企业地址
|
||
enterpriseEmail: "", //企业邮箱
|
||
enterpriseLegalPerson: "", //法定代表人
|
||
enterpriseName: "", //企业名称
|
||
enterpriseProperty: "", //单位性质 1.国有企业 2三资企业 3集体企业 4私营企业
|
||
enterpriseQualificationUrl: "", //企业资质图片地址
|
||
enterpriseSafeAllow: "", //企业安全生产许可证
|
||
enterpriseTypeId: "", //企业类型Id
|
||
legalPersonTel: "", //法人电话
|
||
logo: "", //logo
|
||
projectSn: "", //项目Sn
|
||
qualificationNumber: "", //资质证书号
|
||
registerPersonPhoneTel: "", //注册人电话
|
||
registeredCapital: "", //注册资金
|
||
socialCode: "", //社会统一信用代码
|
||
};
|
||
this.aptitudeFileList = []; //资质照片列表
|
||
this.logoFileList = []; //logo 文件列表
|
||
this.addEnterpriseDialog = true;
|
||
this.enterpriseDialogTitle = this.$t(
|
||
"message.laborMange.theNewEnterprise"
|
||
);
|
||
setTimeout(() => {
|
||
this.$refs["enterpriseForm"].clearValidate();
|
||
this.$refs.enterpriseDialog.scrollTop = 0;
|
||
}, 120);
|
||
},
|
||
//新增企业 -- 企业类型下拉
|
||
getEnterpriseType() {
|
||
let data = {};
|
||
getEnterpriseTypeList(data).then((res) => {
|
||
if (res.code == 200) {
|
||
this.enterpriseTypeList = res.result;
|
||
}
|
||
});
|
||
},
|
||
// 导入照片数据
|
||
saveImportFn() {
|
||
if (this.imgFileList.length == 0) {
|
||
this.$message.success("请先导入文件");
|
||
return;
|
||
}
|
||
let data = new FormData(); //new出来的对象
|
||
data.append("file", this.imgFileList[0].raw);
|
||
data.append("projectSn", this.$store.state.projectSn);
|
||
importImgDataApi(data).then((res) => {
|
||
if (res.success) {
|
||
this.$message.success("操作成功");
|
||
this.imgImportDialog = false;
|
||
this.getTableData();
|
||
}
|
||
});
|
||
},
|
||
//新增企业 保存
|
||
saveEnterpriseFn(formName) {
|
||
// if (!checkPhone(this.enterpriseForm.legalPersonTel)) {
|
||
// this.$message.error("请输入正确的法人电话");
|
||
// return;
|
||
// }
|
||
// if (!checkPhone(this.enterpriseForm.registerPersonPhoneTel)) {
|
||
// this.$message.error("请输入正确的注册人电话");
|
||
// return;
|
||
// }
|
||
if (!CheckSocialCreditCode(this.enterpriseForm.socialCode)) {
|
||
this.$message.error(this.$t("message.laborMange.creditCode"));
|
||
return;
|
||
}
|
||
this.$refs[formName].validate((valid) => {
|
||
if (valid) {
|
||
this.enterpriseForm.projectSn = this.projectSn;
|
||
if (
|
||
this.enterpriseDialogTitle ==
|
||
this.$t("message.laborMange.theNewEnterprise")
|
||
) {
|
||
//新增 请求
|
||
setEnterpriseInfo(this.enterpriseForm).then((res) => {
|
||
if (res.code == 200) {
|
||
this.$message.success(res.message);
|
||
this.addEnterpriseDialog = false;
|
||
this.getProjectList();
|
||
this.resetForm(formName);
|
||
}
|
||
});
|
||
} else {
|
||
//编辑 请求
|
||
editEnterpriseInfo(this.enterpriseForm).then((res) => {
|
||
if (res.code == 200) {
|
||
this.$message.success(
|
||
this.$t("message.laborMange.modifySuccess")
|
||
);
|
||
this.resetForm(formName);
|
||
this.addEnterpriseDialog = false;
|
||
this.getProjectList();
|
||
}
|
||
});
|
||
}
|
||
} else {
|
||
return false;
|
||
}
|
||
});
|
||
},
|
||
//删除 企业
|
||
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 = "";
|
||
}
|
||
});
|
||
})
|
||
.catch(console.log);
|
||
},
|
||
|
||
/**--------------------------------------------右侧函数------------------------------------------------------------------ */
|
||
//获取企业的 - 班组列表
|
||
getTeamList(type) {
|
||
let data = {
|
||
enterpriseId: this.checkedId,
|
||
projectSn: this.projectSn,
|
||
};
|
||
getTeamInfoList(data).then((res) => {
|
||
if (res.code == 200) {
|
||
this.checkedTeamId = type !== 1 ? 0 : this.checkedTeamId;
|
||
this.teamListData = res.result;
|
||
console.log("==============", res.result);
|
||
this.tableParameter.projectSn = this.projectSn;
|
||
this.getTableData();
|
||
}
|
||
});
|
||
},
|
||
//新增 班组 按钮
|
||
addTeamBtn() {
|
||
window._paq.push(["trackEvent", "点击", "新增班组", "新增班组信息"]);
|
||
this.addTeamDialog = true;
|
||
this.teamDialogTitle = this.$t("message.laborMange.theNewTeam");
|
||
this.teamForm = {
|
||
describeValue: "", //描述
|
||
leaderIdCard: "", //负责人身份证号
|
||
leaderName: "", //负责人姓名
|
||
leaderPhone: "", //负责人手机号
|
||
teamName: "", //班组名称
|
||
teamType: "", //班组类型
|
||
workerTypeId: "", //工种id
|
||
};
|
||
setTimeout(() => {
|
||
this.$refs["teamForm"].clearValidate();
|
||
}, 120);
|
||
this.getWorkerTypeListData();
|
||
},
|
||
|
||
//获取工种
|
||
getWorkerTypeListData() {
|
||
let data = {
|
||
projectSn: this.projectSn,
|
||
};
|
||
getWorkerTypeList(data).then((res) => {
|
||
if (res.code == 200) {
|
||
this.workerTypeList = res.result;
|
||
}
|
||
});
|
||
},
|
||
//选择工种设置班组名称
|
||
changeWorkerType(value) {
|
||
for (let i in this.workerTypeList) {
|
||
if (this.workerTypeList[i].id == value) {
|
||
if (this.teamForm.teamName.indexOf("-") != -1) {
|
||
this.teamForm.teamName =
|
||
this.workerTypeList[i].typeName + "-" + this.teamForm.leaderName;
|
||
} else {
|
||
this.teamForm.teamName =
|
||
this.workerTypeList[i].typeName + "-" + this.teamForm.leaderName;
|
||
}
|
||
}
|
||
}
|
||
},
|
||
//输入负责人名称时
|
||
changeLeaderName(value) {
|
||
if (this.teamForm.teamName != "") {
|
||
let arr = this.teamForm.teamName.split("-");
|
||
this.teamForm.teamName = arr[0] + "-" + value;
|
||
}
|
||
},
|
||
|
||
//新增 班组 保存
|
||
saveTeamFn(formName) {
|
||
if (!checkPhone(this.teamForm.leaderPhone)) {
|
||
this.$message.error(
|
||
this.$t("message.laborMange.correctCellPhoneNumber")
|
||
);
|
||
return;
|
||
}
|
||
if (!IdentityCodeValid(this.teamForm.leaderIdCard)) {
|
||
this.$message.error(this.$t("message.laborMange.correctCellIdCard"));
|
||
return;
|
||
}
|
||
if (this.teamForm.workerTypeId == 385) {
|
||
this.teamForm.specialTeam = 1;
|
||
} else {
|
||
this.teamForm.specialTeam = 0;
|
||
}
|
||
this.$refs[formName].validate((valid) => {
|
||
if (valid) {
|
||
if (
|
||
this.teamDialogTitle == this.$t("message.laborMange.theNewTeam")
|
||
) {
|
||
this.teamForm.projectSn = this.projectSn;
|
||
this.teamForm.enterpriseId = this.checkedId;
|
||
addTeamInfo(this.teamForm).then((res) => {
|
||
if (res.code == 200) {
|
||
this.$message.success(
|
||
this.$t("message.laborMange.saveSuccess")
|
||
);
|
||
this.getTeamList();
|
||
this.addTeamDialog = false;
|
||
this.resetForm(formName);
|
||
}
|
||
});
|
||
} else {
|
||
editTeamInfo(this.teamForm).then((res) => {
|
||
if (res.code == 200) {
|
||
this.$message.success(res.message);
|
||
this.addTeamDialog = false;
|
||
this.getTeamList();
|
||
this.resetForm(formName);
|
||
}
|
||
});
|
||
}
|
||
} else {
|
||
return false;
|
||
}
|
||
});
|
||
},
|
||
parseCode(code) {
|
||
if (code == 0) {
|
||
return ["info", this.$t("message.laborMange.codeless")];
|
||
} else if (code == 1) {
|
||
return ["danger", this.$t("message.laborMange.redCode")];
|
||
} else if (code == 2) {
|
||
return ["warning", this.$t("message.laborMange.yellowCode")];
|
||
} else if (code == 3) {
|
||
return ["success", this.$t("message.laborMange.greenCode")];
|
||
}
|
||
},
|
||
//隐藏 班组列表
|
||
hideTeamList() {
|
||
if (this.showTeamList) {
|
||
this.showTeamList = false;
|
||
}
|
||
},
|
||
|
||
//切换 班组
|
||
switchoverTeam(id, specialTeam) {
|
||
window._paq.push(["trackEvent", "点击", "切换班组", "切换班组"]);
|
||
this.checkedTeamId = id;
|
||
this.page = 1;
|
||
this.$refs.multipleTable.toggleRowSelection([], false);
|
||
this.$refs.multipleTable.bodyWrapper.scrollTop = 0;
|
||
if (id === 0) {
|
||
this.tableParameter.teamId = "";
|
||
} else {
|
||
for (let i in this.teamListData.list) {
|
||
if (this.teamListData.list[i].id == id) {
|
||
this.tableParameter.teamId = this.teamListData.list[i].id;
|
||
}
|
||
}
|
||
}
|
||
this.specialTeam = specialTeam;
|
||
this.getTableData();
|
||
},
|
||
|
||
//编辑 班组 按钮
|
||
editTeamInfo(value) {
|
||
this.teamDialogTitle = this.$t("message.laborMange.editorialTeam");
|
||
this.addTeamDialog = true;
|
||
setTimeout(() => {
|
||
this.$refs["teamForm"].clearValidate();
|
||
}, 120);
|
||
this.teamForm = JSON.parse(JSON.stringify(value));
|
||
this.getWorkerTypeListData();
|
||
},
|
||
//删除班组
|
||
deleteTeamInfo(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 = {
|
||
id: value.id,
|
||
};
|
||
deleteTeamInfo(data).then((res) => {
|
||
if (res.code == 200) {
|
||
this.$message({
|
||
type: "success",
|
||
message: this.$t("message.laborMange.deleteSuccess"),
|
||
});
|
||
this.getTeamList();
|
||
}
|
||
});
|
||
})
|
||
.catch(console.log);
|
||
},
|
||
|
||
//获取 班组的表格数据 -- 班组详情
|
||
getTableData() {
|
||
let data = this.tableParameter;
|
||
data.pageNo = this.page;
|
||
data.pageSize = this.pageSize;
|
||
data.enterpriseId = this.checkedId;
|
||
getWorkerInfoList(data).then((res) => {
|
||
if (res.code == 200) {
|
||
this.tableListData = res.result.records;
|
||
console.log("------------", res.result.records);
|
||
let boole = true;
|
||
for (let i in res.result.records) {
|
||
if (res.result.records[i].inserviceType == 1) {
|
||
boole = false;
|
||
}
|
||
}
|
||
this.checkAllStatus =
|
||
this.tableListData.length == 0 ? true : boole ? true : false;
|
||
this.total = res.result.total;
|
||
// if (
|
||
// +res.result.total > this.pageSizeList[this.pageSizeList.length - 1]
|
||
// ) {
|
||
// this.pageSizeList.push(+res.result.total);
|
||
// }
|
||
}
|
||
});
|
||
},
|
||
|
||
//人员录入 按钮
|
||
personnelEntry() {
|
||
this.personDialogTitle = this.$t("message.laborMange.personnelEntry");
|
||
this.titleType = "add";
|
||
this.addPersonDialog = true;
|
||
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: "",
|
||
ufaceDevId: [],
|
||
ufaceDevGroupId: [],
|
||
personSerial: "",
|
||
workerNature: ""
|
||
};
|
||
if (this.attendRulesList.length > 0) {
|
||
this.personForm.ruleId = this.attendRulesList[0].id;
|
||
} else {
|
||
this.personForm.ruleId = "";
|
||
}
|
||
this.getUfaceDevList();
|
||
setTimeout(() => {
|
||
this.$refs["personForm"].clearValidate();
|
||
this.$refs.personDialog.scrollTop = 0;
|
||
}, 120);
|
||
this.examinationFile = []; //体检报告
|
||
this.contractFile = []; //合同附件
|
||
this.employmentFile = []; //从业资格证书
|
||
this.idCardUpPhotoFile = []; //身份证头像
|
||
this.fieldAcquisitionFile = [];
|
||
this.idCardUpPhotoUrlFile = []; // 身份证国徽面
|
||
this.idCardDownPhotoUrlFile = []; // 身份证人像面
|
||
// 默认全选设备
|
||
this.checkAllFaceDev = true;
|
||
this.checkAllGroupDev = false;
|
||
this.ufaceDevAllList.map((item) => {
|
||
this.personForm.ufaceDevId.push(item.id);
|
||
});
|
||
},
|
||
|
||
// 有效日期 长期 按钮
|
||
checkboxLongTerm(value) {
|
||
if (this.personForm.longTerm) {
|
||
this.$refs["personForm"].clearValidate("idCardEndDate");
|
||
}
|
||
this.personForm.idCardEndDate = this.personForm.longTerm
|
||
? ""
|
||
: this.personForm.idCardEndDate;
|
||
},
|
||
|
||
// 新增 || 编辑 人员录入 保存按钮
|
||
savePersonFn(formName) {
|
||
this.personForm.isUploadHousing = this.personForm.isUploadHousing ? 1 : 0;
|
||
console.log("进场确定参数", this.personForm);
|
||
console.log("进场确定参数", IdentityCodeValid(this.personForm.idCard));
|
||
// 身份证校验
|
||
if (!IdentityCodeValid(this.personForm.idCard)) {
|
||
this.$message.error(this.$t("message.laborMange.correctCellIdCard"));
|
||
return;
|
||
}
|
||
// 电话校验
|
||
// if (!checkPhone(this.personForm.phoneNumber)) {
|
||
// this.$message.error(
|
||
// this.$t('message.laborMange.correctCellPhoneNumber')
|
||
// )
|
||
// return
|
||
// }
|
||
// 紧急电话校验
|
||
// if (!checkPhone(this.personForm.emergentPhone)) {
|
||
// this.$message.error(
|
||
// this.$t(
|
||
// 'message.laborMange.pleaseEnterTheCorrectEmergencyContactNumber'
|
||
// )
|
||
// )
|
||
// return
|
||
// }
|
||
// if (this.personForm.idCardUpPhotoUrl == '') {
|
||
// this.$message.error(
|
||
// this.$t('message.laborMange.pleaseUploadTheNationalEmblemOfIdCard')
|
||
// )
|
||
// return
|
||
// }
|
||
// if (this.personForm.idCardDownPhotoUrl == '') {
|
||
// this.$message.error(
|
||
// this.$t('message.laborMange.pleaseUploadYourIDCardPortrait')
|
||
// )
|
||
// return
|
||
// }
|
||
|
||
this.$refs[formName].validate((valid) => {
|
||
if (valid) {
|
||
// 身份证头像和现场人脸采集校验
|
||
// if (this.personForm.idCardBigPhotoUrl == '') {
|
||
// this.$message.error(
|
||
// this.$t('message.laborMange.pleaseUploadYourIDPhoto')
|
||
// )
|
||
// return
|
||
// } else if (this.personForm.fieldAcquisitionUrl == '') {
|
||
// this.$message.error(
|
||
// this.$t('message.laborMange.pleaseUploadPhotosOfTheScene')
|
||
// )
|
||
// return
|
||
// }
|
||
// 现场人脸采集校验
|
||
if (this.personForm.fieldAcquisitionUrl == "") {
|
||
this.$message.error(
|
||
this.$t("message.laborMange.pleaseUploadPhotosOfTheScene")
|
||
);
|
||
return;
|
||
}
|
||
|
||
if (this.personForm.ruleId == "") {
|
||
this.personForm.ruleId = 0;
|
||
}
|
||
//新增
|
||
if (!this.personForm.id) {
|
||
let data = { ...this.personForm };
|
||
data.projectSn = this.projectSn;
|
||
data.teamId = this.checkedTeamId;
|
||
data.enterpriseId = this.checkedId;
|
||
data.longTerm = this.personForm.longTerm ? 1 : 0;
|
||
data.registerType = 1;
|
||
data.devType = this.typeRadio;
|
||
data.userId = this.$store.state.userInfo.userId;
|
||
if (this.$store.state.userInfo.accountType == 6) {
|
||
data.accountType = 2;
|
||
} else {
|
||
data.accountType = 1;
|
||
}
|
||
if (this.personForm.ufaceDevId.length > 0 && data.devType == 1) {
|
||
data.ufaceDevId = this.personForm.ufaceDevId.join(",");
|
||
data.ufaceDevGroupId = "";
|
||
} else {
|
||
data.ufaceDevId = "";
|
||
}
|
||
if (
|
||
this.personForm.ufaceDevGroupId.length > 0 &&
|
||
data.devType == 2
|
||
) {
|
||
data.ufaceDevGroupId = this.personForm.ufaceDevGroupId.join(",");
|
||
data.ufaceDevId = "";
|
||
} else {
|
||
data.ufaceDevGroupId = "";
|
||
}
|
||
addWorkerInfo(data).then((res) => {
|
||
if (res.code == 200) {
|
||
this.$message.success(
|
||
this.$t("message.laborMange.saveSuccess")
|
||
);
|
||
this.getTeamList(1);
|
||
this.addPersonDialog = false;
|
||
this.resetForm(formName);
|
||
this.examinationFile = []; //体检报告
|
||
this.contractFile = []; //合同附件
|
||
this.employmentFile = []; //从业资格证书
|
||
this.idCardUpPhotoFile = []; //身份证头像
|
||
this.fieldAcquisitionFile = []; //现场采集人脸
|
||
}
|
||
});
|
||
//编辑
|
||
} else {
|
||
let data = { ...this.personForm };
|
||
data.longTerm = this.personForm.longTerm ? 1 : 0;
|
||
data.registerType = 1;
|
||
data.devType = this.typeRadio;
|
||
// 跟杨珊对接需要再再次进场时多传入一个新的字段
|
||
data.reEntry = 1;
|
||
data.userId = this.$store.state.userInfo.userId;
|
||
if (this.personForm.ufaceDevId.length > 0 && data.devType == 1) {
|
||
data.ufaceDevId = this.personForm.ufaceDevId.join(",");
|
||
data.ufaceDevGroupId = "";
|
||
} else {
|
||
data.ufaceDevId = "";
|
||
}
|
||
if (
|
||
this.personForm.ufaceDevGroupId.length > 0 &&
|
||
data.devType == 2
|
||
) {
|
||
data.ufaceDevGroupId = this.personForm.ufaceDevGroupId.join(",");
|
||
data.ufaceDevId = "";
|
||
} else {
|
||
data.ufaceDevGroupId = "";
|
||
}
|
||
if (this.$store.state.userInfo.accountType == 6) {
|
||
data.accountType = 2;
|
||
} else {
|
||
data.accountType = 1;
|
||
}
|
||
delete data.addTime;
|
||
editWorkerInfo(data).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 = []; //现场采集人脸
|
||
}
|
||
});
|
||
}
|
||
} else {
|
||
this.$message.error(
|
||
this.$t("message.laborMange.ThereAreRequiredFieldsLeftUnfilled")
|
||
);
|
||
return false;
|
||
}
|
||
});
|
||
},
|
||
uploadToHouseFn(value, id) {
|
||
console.log("value", value);
|
||
var json = {
|
||
isUploadHousing: value ? 1 : 0,
|
||
id: id,
|
||
};
|
||
console.log("isUploadHousing", json);
|
||
updateByIdWorkerInfo(json).then(console.log);
|
||
},
|
||
//编辑 人员信息 按钮
|
||
editWorkerInfo(value, type) {
|
||
console.log("当前行", value);
|
||
if (value.isUploadHousing) {
|
||
this.personForm.isUploadHousing = 1;
|
||
} else {
|
||
this.personForm.isUploadHousing = 0;
|
||
}
|
||
this.personDialogTitle = this.$t("message.laborMange.editCrewInfo");
|
||
this.titleType = "edit";
|
||
this.personForm = {
|
||
workerName: "",
|
||
sex: "",
|
||
idCard: "",
|
||
birthday: "",
|
||
enterDate: "",
|
||
nation: "",
|
||
nativePlace: "",
|
||
issuingAuthorityForIdcard: "",
|
||
idCardEndDate: "",
|
||
longTerm: false,
|
||
phoneNumber: "",
|
||
emergentPerson: "",
|
||
emergentPhone: "",
|
||
inserviceType: 2,
|
||
politicsStatus: "",
|
||
marry: "",
|
||
payRollBankName: "",
|
||
payRollBankNumber: "",
|
||
educational: "",
|
||
blood: "",
|
||
examinationImage: "",
|
||
contractImage: "",
|
||
employmentCard: "",
|
||
idCardBigPhotoUrl: "",
|
||
fieldAcquisitionUrl: "",
|
||
personType: 1,
|
||
idCardUpPhotoUrl: "",
|
||
idCardDownPhotoUrl: "",
|
||
ufaceDevId: [],
|
||
ufaceDevGroupId: [],
|
||
personSerial: "",
|
||
workerNature: ""
|
||
};
|
||
this.getUfaceDevList();
|
||
setTimeout(() => {
|
||
this.$refs["personForm"].clearValidate();
|
||
this.$refs.personDialog.scrollTop = 0;
|
||
}, 120);
|
||
this.addPersonDialog = true;
|
||
this.personForm = JSON.parse(JSON.stringify(value));
|
||
this.personForm.workerNature = String(value.workerNature)
|
||
if (value.ufaceDevId) {
|
||
this.personForm.ufaceDevId = value.ufaceDevId.split(",");
|
||
this.handleUfaceDevChange(this.personForm.ufaceDevId); // 做一下全选按钮的选中与否
|
||
} else {
|
||
this.personForm.ufaceDevId = [];
|
||
this.handleUfaceDevChange(this.personForm.ufaceDevId); // 做一下全选按钮的选中与否
|
||
}
|
||
if (value.ufaceDevGroupId) {
|
||
this.personForm.ufaceDevGroupId = value.ufaceDevGroupId.split(",");
|
||
this.handleUGroupChange(this.personForm.ufaceDevGroupId); // 做一下全选按钮的选中与否
|
||
} else {
|
||
this.personForm.ufaceDevGroupId = [];
|
||
this.handleUGroupChange(this.personForm.ufaceDevGroupId); // 做一下全选按钮的选中与否
|
||
}
|
||
if (this.personForm.ruleId == 0) {
|
||
this.personForm.ruleId = "";
|
||
}
|
||
this.personForm.sex = Number(value.sex);
|
||
this.personForm.inserviceType = type == 2 ? 1 : value.inserviceType;
|
||
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 }]
|
||
: []; //身份证人像
|
||
},
|
||
|
||
// 删除 人员信息
|
||
removeWorkerInfo(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 = {
|
||
id: value.id,
|
||
};
|
||
deleteWorkerInfo(data).then((res) => {
|
||
if (res.code == 200) {
|
||
this.$message({
|
||
type: "success",
|
||
message: this.$t("message.laborMange.deleteSuccess"),
|
||
});
|
||
this.page =
|
||
this.page > 1 && this.tableListData.length == 1
|
||
? this.page - 1
|
||
: this.page;
|
||
this.getTeamList(1);
|
||
}
|
||
});
|
||
})
|
||
.catch(console.log);
|
||
},
|
||
|
||
//查看 人员信息 详情
|
||
viewDetails(value) {
|
||
this.$router.push({
|
||
path: "/project/labor/personDetails",
|
||
query: {
|
||
id: value.id,
|
||
},
|
||
});
|
||
localStorage.setItem("showPersonModule", 1);
|
||
},
|
||
|
||
//列表数据 退场按钮
|
||
workerExitBtn(value, type) {
|
||
// type == 1 单条数据操作 2 批量操作
|
||
let arr = [];
|
||
if (type == 2 && this.checkedWorker.length > 0) {
|
||
for (let i in this.checkedWorker) {
|
||
arr.push(this.checkedWorker[i].id);
|
||
}
|
||
}
|
||
let data = {
|
||
workerIdStr: type == 1 ? value.id : arr.join(","),
|
||
};
|
||
this.$confirm(
|
||
this.$t("message.laborMange.bowOutWithHint"),
|
||
this.$t("message.laborMange.hint"),
|
||
{
|
||
confirmButtonText: this.$t("message.laborMange.confirm"),
|
||
cancelButtonText: this.$t("message.laborMange.cancel"),
|
||
type: "warning",
|
||
}
|
||
).then(() => {
|
||
updateWorkerExit(data).then((res) => {
|
||
if (res.code == 200) {
|
||
this.getTeamList();
|
||
this.$message({
|
||
type: "success",
|
||
message: this.$t("message.laborMange.bowOutWitSuccess"),
|
||
});
|
||
}
|
||
});
|
||
});
|
||
},
|
||
|
||
//切换每页显示数量
|
||
handleSizeChange(val) {
|
||
this.pageSize = val;
|
||
this.getTableData();
|
||
},
|
||
//换页
|
||
handleCurrentChange(val) {
|
||
this.page = val;
|
||
sessionStorage.setItem("personPage", val);
|
||
this.getTableData();
|
||
this.$refs.multipleTable.bodyWrapper.scrollTop = 0;
|
||
},
|
||
|
||
//功能开发中
|
||
inDevelopment() {
|
||
this.$message.warning(
|
||
this.$t("message.laborMange.functionalDevelopment")
|
||
);
|
||
},
|
||
|
||
//查询按钮
|
||
inquireBtn() {
|
||
window._paq.push(["trackEvent", "点击", "查询", "查询人员信息"]);
|
||
this.page = 1;
|
||
this.getTableData();
|
||
},
|
||
|
||
//刷新按钮
|
||
refreshBtn() {
|
||
window._paq.push(["trackEvent", "点击", "刷新", "刷新人员信息"]);
|
||
this.page = 1;
|
||
this.tableParameter.idCard = "";
|
||
this.tableParameter.workerName = "";
|
||
this.tableParameter.inserviceType = "";
|
||
this.tableParameter.sendSuccessStatus = null;
|
||
this.tableParameter.enterDate = "";
|
||
this.tableParameter.codeState = "";
|
||
this.getTableData();
|
||
},
|
||
|
||
//清空表单
|
||
resetForm(formName) {
|
||
this.aptitudeFileList = [];
|
||
this.logoFileList = [];
|
||
this.$refs[formName].resetFields();
|
||
},
|
||
|
||
// 文件上传 之前
|
||
handleBeforeUpload(file, type) {
|
||
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("判断大小以及格式之前的图片",file);
|
||
if (
|
||
file.type != "image/jpeg" &&
|
||
file.type != "image/jpg"
|
||
// file.type != "image/png"
|
||
) {
|
||
this.$message.error(this.$t("请上传jpg格式图片")); //"请上传jpg、jpeg格式图片"
|
||
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;
|
||
},
|
||
|
||
//删除 身份证头像 或 现场采集照片
|
||
shutIconBtn(type) {
|
||
if (type == 0) {
|
||
this.personForm.idCardBigPhotoUrl = "";
|
||
this.idCardUpPhotoFile = [];
|
||
} else if (type == 1) {
|
||
this.personForm.fieldAcquisitionUrl = "";
|
||
this.fieldAcquisitionFile = [];
|
||
this.personForm.personSerial = "";
|
||
this.radio = "";
|
||
} else if (type == 2) {
|
||
this.personForm.idCardUpPhotoUrl = "";
|
||
this.idCardUpPhotoFile = [];
|
||
} else if (type == 3) {
|
||
this.personForm.idCardDownPhotoUrl = "";
|
||
this.idCardDownPhotoUrlFile = [];
|
||
}
|
||
},
|
||
|
||
//删除上传文件
|
||
handleRemove(file, type) {
|
||
if (file.status == "ready") {
|
||
} else {
|
||
this.$message.success(this.$t("message.laborMange.deleteSuccess"));
|
||
if (type == 1) {
|
||
this.enterpriseForm.enterpriseQualificationUrl = "";
|
||
} else if (type == 2) {
|
||
this.enterpriseForm.logo = "";
|
||
} else if (type == 3) {
|
||
let newArr = [];
|
||
let arrJoin = [];
|
||
for (let i = 0; i < this.examinationFile.length; i++) {
|
||
if (file.uid == this.examinationFile[i].uid) {
|
||
this.examinationFile.splice(i, 1);
|
||
newArr = this.examinationFile;
|
||
}
|
||
}
|
||
if (newArr.length > 0) {
|
||
for (let j = 0; j < newArr.length; j++) {
|
||
let data =
|
||
this.examinationFile[j].name +
|
||
"*" +
|
||
this.examinationFile[j].url;
|
||
arrJoin.push(data);
|
||
}
|
||
} else {
|
||
arrJoin = newArr;
|
||
}
|
||
this.personForm.examinationImage = arrJoin.join(",");
|
||
} else if (type == 4) {
|
||
let newArr = [];
|
||
let arrJoin = [];
|
||
for (let i = 0; i < this.contractFile.length; i++) {
|
||
if (file.uid == this.contractFile[i].uid) {
|
||
this.contractFile.splice(i, 1);
|
||
newArr = this.contractFile;
|
||
}
|
||
}
|
||
if (newArr.length > 0) {
|
||
for (let j = 0; j < newArr.length; j++) {
|
||
let data =
|
||
this.contractFile[j].name + "*" + this.contractFile[j].url;
|
||
arrJoin.push(data);
|
||
}
|
||
} else {
|
||
arrJoin = newArr;
|
||
}
|
||
this.personForm.contractImage = arrJoin.join(",");
|
||
} else if (type == 5) {
|
||
let newArr = [];
|
||
let arrJoin = [];
|
||
for (let i = 0; i < this.employmentFile.length; i++) {
|
||
if (file.uid == this.employmentFile[i].uid) {
|
||
this.employmentFile.splice(i, 1);
|
||
newArr = this.employmentFile;
|
||
}
|
||
}
|
||
if (newArr.length > 0) {
|
||
for (let j = 0; j < newArr.length; j++) {
|
||
let data =
|
||
this.employmentFile[j].name + "*" + this.employmentFile[j].url;
|
||
arrJoin.push(data);
|
||
}
|
||
} else {
|
||
arrJoin = newArr;
|
||
}
|
||
this.personForm.employmentCard = arrJoin.join(",");
|
||
} else if (type == 6) {
|
||
this.personForm.idCardBigPhotoUrl = "";
|
||
} else if (type == 7) {
|
||
this.personForm.fieldAcquisitionUrl = "";
|
||
} else if (type == 8) {
|
||
this.personForm.idCardUpPhotoUrl = "";
|
||
} else if (type == 9) {
|
||
this.personForm.idCardDownPhotoUrl = "";
|
||
}
|
||
}
|
||
},
|
||
//上传成功
|
||
handleSuccess(file, type, file2) {
|
||
console.log(file, type, file2);
|
||
// 新增企业 type == 1 资质照片; 2 logo;
|
||
// 人员录入 type == 3 体检报告; 4 合同附件; 5 从业资格证书; 6 身份证头像; 7 现场采集人脸; 8 身份证国徽面; 9 身份证人像面
|
||
if (file.code == 200 || file.status == "SUCCESS") {
|
||
// this.$message.success(this.$t("message.laborMange.uploadSuccessful"));
|
||
let obj = {};
|
||
for (let i in file.data) {
|
||
obj = { name: file.data[i].filename, url: file.data[i].imageUrl };
|
||
}
|
||
|
||
if (type == 1) {
|
||
this.enterpriseForm.enterpriseQualificationUrl = JSON.stringify(obj);
|
||
this.aptitudeFileList = [obj];
|
||
} else if (type == 2) {
|
||
this.enterpriseForm.logo = JSON.stringify(obj);
|
||
this.logoFileList = [obj];
|
||
} else if (type == 3) {
|
||
this.examinationFile.push(obj);
|
||
let arrJoin = [];
|
||
for (let i in this.examinationFile) {
|
||
let data =
|
||
this.examinationFile[i].name + "*" + this.examinationFile[i].url;
|
||
arrJoin.push(data);
|
||
}
|
||
this.personForm.examinationImage = arrJoin.join(",");
|
||
} else if (type == 4) {
|
||
this.contractFile.push(obj);
|
||
let arrJoin = [];
|
||
for (let i in this.contractFile) {
|
||
let data =
|
||
this.contractFile[i].name + "*" + this.contractFile[i].url;
|
||
arrJoin.push(data);
|
||
}
|
||
this.personForm.contractImage = arrJoin.join(",");
|
||
} else if (type == 5) {
|
||
this.employmentFile.push(obj);
|
||
let arrJoin = [];
|
||
for (let i in this.employmentFile) {
|
||
let data =
|
||
this.employmentFile[i].name + "*" + this.employmentFile[i].url;
|
||
arrJoin.push(data);
|
||
}
|
||
this.personForm.employmentCard = arrJoin.join(",");
|
||
} else if (type == 8) {
|
||
console.log("身份证正面上传", file);
|
||
let data = {
|
||
name: file.data[0].filename,
|
||
url: file.data[0].imageUrl,
|
||
};
|
||
this.discernId(file.data[0].imageUrl, 2);
|
||
this.personForm.idCardUpPhotoUrl = data.url;
|
||
this.idCardUpPhotoUrlFile = [data];
|
||
if (this.personForm.idCardDownPhotoUrl) {
|
||
this.$refs["personForm"].clearValidate("idCardUpPhotoUrl");
|
||
}
|
||
} else if (type == 9) {
|
||
let data = {
|
||
name: file.data[0].filename,
|
||
url: file.data[0].imageUrl,
|
||
};
|
||
this.discernId(file.data[0].imageUrl, 1);
|
||
this.personForm.idCardDownPhotoUrl = data.url;
|
||
this.idCardDownPhotoUrlFile = [data];
|
||
if (this.personForm.idCardUpPhotoUrl) {
|
||
this.$refs["personForm"].clearValidate("idCardUpPhotoUrl");
|
||
}
|
||
}
|
||
} else {
|
||
//清空
|
||
this.$message.error(file.message);
|
||
if (type == 1) {
|
||
this.aptitudeFileList = [];
|
||
} else if (type == 2) {
|
||
this.logoFileList = [];
|
||
} else if (type == 3) {
|
||
this.examinationFile = [];
|
||
} else if (type == 4) {
|
||
this.contractFile = [];
|
||
} else if (type == 5) {
|
||
this.employmentFile = [];
|
||
} else if (type == 6) {
|
||
this.idCardUpPhotoFile = [];
|
||
} else if (type == 7) {
|
||
this.fieldAcquisitionFile = [];
|
||
} else if (type == 8) {
|
||
this.idCardUpPhotoUrlFile = [];
|
||
} else if (type == 9) {
|
||
this.idCardDownPhotoUrlFile = [];
|
||
}
|
||
}
|
||
},
|
||
// 人员照片库比对
|
||
checkImgLibrary(url) {
|
||
console.log(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.personForm.personSerial = "";
|
||
this.personForm.fieldAcquisitionUrl = url;
|
||
this.fieldAcquisitionFile = [{ name: "", url: url }];
|
||
this.cropperDialog = false;
|
||
}
|
||
console.log(res, "-----人员库照片查询");
|
||
}
|
||
);
|
||
},
|
||
//人脸监测、
|
||
checkFace(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;
|
||
}else{
|
||
this.$message.error(res.result.message);
|
||
}
|
||
}).finally(() => {
|
||
loading.close();
|
||
})
|
||
}else{
|
||
this.personForm.fieldAcquisitionUrl = url;
|
||
this.fieldAcquisitionFile = [{ name: "", url: url }];
|
||
this.cropperDialog = false;
|
||
}
|
||
} else {
|
||
this.$message.error(res.result.message);
|
||
}
|
||
});
|
||
},
|
||
//保存截图
|
||
saveMapUrlFn() {
|
||
this.$refs.cropper.startCrop();
|
||
var _this = this;
|
||
this.$refs.cropper.getCropBlob((data) => {
|
||
const isLt2M = data.size / 1024 < 500;
|
||
if (!isLt2M) {
|
||
this.$message.error(this.$t("message.laborMange.hint9"));
|
||
return;
|
||
}
|
||
var param = new FormData();
|
||
// param.append("files", data, "image.png");
|
||
param.append("files", data, "image.jpg");
|
||
_this.$http
|
||
.post("/upload/image", param, {
|
||
headers: {
|
||
"Content-Type": "multipart/form-data",
|
||
},
|
||
})
|
||
.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);
|
||
} else {
|
||
this.checkFace(res.data.data[0].imageUrl);
|
||
}
|
||
}
|
||
});
|
||
});
|
||
},
|
||
// 超出 上传文件 数量
|
||
handleExceed(file, type) {
|
||
this.$message.error(
|
||
this.$t("message.laborMange.uploadLimitHasBeenReached")
|
||
);
|
||
},
|
||
|
||
//查看图片
|
||
handlePreview(file, type) {
|
||
if (type === 0) {
|
||
this.bigImageDialog = true;
|
||
this.bigImageUrl = file;
|
||
} else {
|
||
// 新增企业 type == 1 资质照片; 2 logo;
|
||
// 人员录入 type == 3 体检报告; 4 合同附件; 5 从业资格证书; 6 身份证头像; 7 现场采集人脸;
|
||
let fileType = null;
|
||
if (file.response) {
|
||
let url = file.response.data[0];
|
||
fileType = url.imageUrl.split(".")[1];
|
||
} else {
|
||
fileType = file.url.split(".")[1];
|
||
}
|
||
if (
|
||
fileType != "jpg" &&
|
||
fileType != "jpeg" &&
|
||
fileType != "png" &&
|
||
fileType != "bmp" &&
|
||
fileType != "gif"
|
||
) {
|
||
window.open(this.fileUrl + file.url);
|
||
//type== 0 直接查看列表中的图片
|
||
} else {
|
||
this.bigImageDialog = true;
|
||
this.bigImageUrl = file.response
|
||
? this.fileUrl + file.response.data[0].imageUrl
|
||
: this.fileUrl + file.url;
|
||
}
|
||
}
|
||
},
|
||
|
||
//上传失败
|
||
handleError(file, type) {
|
||
this.$message.error(this.$t("message.laborMange.pleaseReupload"));
|
||
},
|
||
//点击全选时
|
||
handleCheckAllChange(val) {
|
||
let checkedLst = val ? this.tableListData : [];
|
||
this.isIndeterminate = false;
|
||
for (let i in this.tableListData) {
|
||
if (checkedLst.length > 0 && this.tableListData[i].inserviceType == 1) {
|
||
this.$refs.multipleTable.toggleRowSelection(
|
||
this.tableListData[i],
|
||
true
|
||
);
|
||
} else {
|
||
this.$refs.multipleTable.toggleRowSelection(
|
||
this.tableListData[i],
|
||
false
|
||
);
|
||
}
|
||
}
|
||
},
|
||
// 获取 多选 选中的 数据
|
||
handleCheckedCitiesChange(value) {
|
||
if (value.length == 0) {
|
||
this.$refs.multipleTable.toggleRowSelection([], false);
|
||
this.checkAll = false;
|
||
this.isIndeterminate = false;
|
||
this.checkedWorker = [];
|
||
} else {
|
||
this.checkedWorker = value;
|
||
let checkedCount = value.length;
|
||
this.checkAll = checkedCount === this.tableListData.length;
|
||
this.isIndeterminate =
|
||
checkedCount > 0 && checkedCount < this.tableListData.length;
|
||
}
|
||
},
|
||
|
||
// 离职状态 不能多选
|
||
selectEnable(row, rowIndex) {
|
||
if (row.inserviceType == 1) {
|
||
return true;
|
||
} else {
|
||
return false;
|
||
}
|
||
},
|
||
//批量移动按钮
|
||
batchMove() {
|
||
this.batchMoveDialog = true;
|
||
this.batchMoveForm = {
|
||
teamId: "",
|
||
enterpriseId: "",
|
||
};
|
||
setTimeout(() => {
|
||
this.$refs["batchMoveForm"].clearValidate();
|
||
}, 120);
|
||
this.changeMoveCompany(this.checkedId);
|
||
},
|
||
//选择批量移动的 公司时
|
||
changeMoveCompany(value) {
|
||
this.batchMoveForm.teamId = "";
|
||
let data = {
|
||
enterpriseId: value,
|
||
projectSn: this.projectSn,
|
||
};
|
||
getTeamInfoList(data).then((res) => {
|
||
if (res.code == 200) {
|
||
this.moveTeamList = res.result;
|
||
}
|
||
});
|
||
},
|
||
|
||
//批量移动 保存按钮
|
||
saveBatchMove(formName) {
|
||
this.$refs[formName].validate((valid) => {
|
||
if (valid) {
|
||
let data = this.batchMoveForm;
|
||
let arr = [];
|
||
if (this.checkedWorker.length > 0) {
|
||
for (let i in this.checkedWorker) {
|
||
arr.push(this.checkedWorker[i].id);
|
||
}
|
||
}
|
||
data.workerIdStr = arr.join(",");
|
||
updateWorkerTeam(data).then((res) => {
|
||
if (res.code == 200) {
|
||
this.batchMoveDialog = false;
|
||
this.$message.success(
|
||
this.$t("message.laborMange.mobileSuccess")
|
||
);
|
||
this.getTeamList();
|
||
this.resetForm(formName);
|
||
}
|
||
});
|
||
} else {
|
||
return false;
|
||
}
|
||
});
|
||
},
|
||
|
||
//新增 人员 输入身份证 自动获取 出身日期 性别
|
||
changeIdCard(value) {
|
||
if (value.length < 18) {
|
||
this.$message.error(
|
||
this.$t("message.laborMange.PleaseEnterYourFullIDNumber")
|
||
);
|
||
return;
|
||
} else {
|
||
let birth = this.getBirth(value);
|
||
let sex = this.getSex(value);
|
||
this.personForm.sex = Number(sex);
|
||
this.personForm.birthday = birth;
|
||
}
|
||
},
|
||
// 获取 出生日期
|
||
getBirth(idCard) {
|
||
var birthday = "";
|
||
if (idCard != null && idCard != "") {
|
||
if (idCard.length == 15) {
|
||
birthday = "19" + idCard.slice(6, 12);
|
||
} else if (idCard.length == 18) {
|
||
birthday = idCard.slice(6, 14);
|
||
}
|
||
birthday = birthday.replace(/(.{4})(.{2})/, "$1-$2-");
|
||
//通过正则表达式来指定输出格式为:1990-01-01
|
||
}
|
||
return birthday;
|
||
},
|
||
//获取 性别 男女
|
||
getSex(idCard) {
|
||
var sexStr = "";
|
||
if (parseInt(idCard.slice(-2, -1)) % 2 == 1) {
|
||
sexStr = "1";
|
||
} else {
|
||
sexStr = "2";
|
||
}
|
||
return sexStr;
|
||
},
|
||
|
||
//下载插件
|
||
downloadPlugIn() {
|
||
window.open("http://139.159.226.224:9000/itbgp/file/IDCamera1.0.rar");
|
||
},
|
||
|
||
//打开摄像头
|
||
turnOnTheCamera(type) {
|
||
var ws = new WebSocket("ws://127.0.0.1:1818");
|
||
this.webSocket = ws;
|
||
ws.onopen = (event) => {
|
||
this.onopen(event, type);
|
||
};
|
||
|
||
ws.onmessage = (event) => {
|
||
this.onmessage(event, type);
|
||
};
|
||
|
||
ws.onerror = this.onerror;
|
||
},
|
||
//发送链接设备请求
|
||
onopen(event, type) {
|
||
if (type == 1) {
|
||
// 识别身份证
|
||
this.webSocket.send("ReadCard(1001,C:\\Doccamera\\)");
|
||
} else if (type == 2) {
|
||
//打开人脸 摄像头
|
||
this.webSocket.send("OpenFaceFrame(1)");
|
||
this.webSocket.send("vSetResolutionEx(2,3)");
|
||
this.webSocket.send("bStartPlay2");
|
||
} else {
|
||
//文件 打开识别摄像头
|
||
this.webSocket.send("OpenFaceFrame(0)");
|
||
this.webSocket.send("vSetResolutionEx(2,3)");
|
||
this.webSocket.send("bStartPlay");
|
||
}
|
||
},
|
||
//接收服务器返回的信息
|
||
onmessage(event, type) {
|
||
//结束通讯
|
||
if (
|
||
event.data.indexOf("BeginbStopPlaytrueEndbStopPlay") >= 0 ||
|
||
event.data.indexOf("BeginbStopPlayfalseEndbStopPlay") >= 0 ||
|
||
event.data.indexOf("BeginbStartPlayfalseEndbStartPlay") >= 0 ||
|
||
event.data.indexOf("BeginbStartPlay2falseEndbStartPlay2") >= 0 ||
|
||
event.data.indexOf("BeginOpenFaceFrametrueEndOpenFaceFrame") >= 0
|
||
) {
|
||
this.instrUmentScreenDialog = false;
|
||
return;
|
||
} else if (
|
||
event.data.indexOf("BeginbStopPlaytrueEndbStopPlay") == -1 &&
|
||
event.data.indexOf("BeginReadCard") == -1
|
||
) {
|
||
this.instrUmentScreenDialog = true;
|
||
}
|
||
if (event.data.indexOf("BeginReadCard") >= 0) {
|
||
//获取身份证信息
|
||
if (event.data == "BeginReadCardEndReadCard") {
|
||
this.$message.error(
|
||
this.$t("message.laborMange.failedToObtainIdentityInformation")
|
||
);
|
||
return;
|
||
} else {
|
||
// 截取掉 多余的字符
|
||
let data = JSON.parse(
|
||
event.data.replace("BeginReadCard", "").replace("EndReadCard", "")
|
||
);
|
||
//身份证 人脸照片
|
||
this.uploadFile(data.PhotoB64, 1);
|
||
//身份证 国徽面
|
||
this.uploadFile(data.BackB64, 2);
|
||
//身份证 人像面
|
||
this.uploadFile(data.FrontB64, 3);
|
||
this.$refs["personForm"].clearValidate();
|
||
this.personForm.nativePlace = data.Address;
|
||
this.personForm.issuingAuthorityForIdcard = data.Agency;
|
||
this.personForm.nation =
|
||
data.Folk + this.$t("message.laborMange.clan");
|
||
this.personForm.workerName = data.Name;
|
||
this.personForm.idCard = data.IdNo;
|
||
//截取身份证有效日期
|
||
let date = data.Valid.split("-");
|
||
this.personForm.idCardEndDate = date[1] == "长期" ? "" : date[1];
|
||
this.personForm.longTerm = date[1] == "长期" ? true : false;
|
||
this.changeIdCard(data.IdNo);
|
||
}
|
||
} else if (event.data.indexOf("BeginBase64") >= 0) {
|
||
if (type == 2) {
|
||
this.$message.success(
|
||
this.$t("message.laborMange.takePhotosSuccess")
|
||
);
|
||
// 上传的是现场采集照片
|
||
let url = JSON.parse(JSON.stringify(event.data.substring(11)));
|
||
this.uploadFile(url, 4);
|
||
} else if (type == 5) {
|
||
//合同附件
|
||
if (this.contractFile.length >= 3) {
|
||
this.$message.error(
|
||
this.$t("message.laborMange.uploadLimitHasBeenReached")
|
||
);
|
||
return;
|
||
} else {
|
||
this.$message.success(
|
||
this.$t("message.laborMange.takePhotosSuccess")
|
||
);
|
||
let url = JSON.parse(JSON.stringify(event.data.substring(11)));
|
||
this.uploadFile(url, 5);
|
||
}
|
||
} else if (type == 6) {
|
||
//从业资格证书
|
||
if (this.employmentFile.length >= 3) {
|
||
this.$message.error(
|
||
this.$t("message.laborMange.uploadLimitHasBeenReached")
|
||
);
|
||
return;
|
||
} else {
|
||
this.$message.success(
|
||
this.$t("message.laborMange.takePhotosSuccess")
|
||
);
|
||
let url = JSON.parse(JSON.stringify(event.data.substring(11)));
|
||
this.uploadFile(url, 6);
|
||
}
|
||
} else if (type == 7) {
|
||
//体检报告
|
||
if (this.examinationFile.length >= 3) {
|
||
this.$message.error(
|
||
this.$t("message.laborMange.uploadLimitHasBeenReached")
|
||
);
|
||
return;
|
||
} else {
|
||
this.$message.success(
|
||
this.$t("message.laborMange.takePhotosSuccess")
|
||
);
|
||
let url = JSON.parse(JSON.stringify(event.data.substring(11)));
|
||
this.uploadFile(url, 7);
|
||
}
|
||
}
|
||
} else {
|
||
//显示的图像
|
||
this.umentScreenUrl = this.base64Type + event.data;
|
||
}
|
||
},
|
||
onerror() {
|
||
this.$message.error(this.$t("message.laborMange.failedToConnectDevice"));
|
||
},
|
||
|
||
//保存 并 关闭
|
||
onclose(type) {
|
||
if (type == 1) {
|
||
this.webSocket.send("sGetBase64");
|
||
} else if (type == 2) {
|
||
this.webSocket.send("bStopPlay");
|
||
}
|
||
},
|
||
|
||
//上传现场采集照片发到服务器
|
||
uploadFile(url, type) {
|
||
let param = new FormData(); //创建form对象
|
||
// if(url.endsWidth('EndBase64')){
|
||
url = url.replace("EndBase64", "");
|
||
// }
|
||
param.append("base64Image", this.base64Type + url); //通过append向form对象添加数据
|
||
this.$http({
|
||
url: "/upload/uploadBase64",
|
||
method: "post",
|
||
data: param,
|
||
headers: {
|
||
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
|
||
},
|
||
}).then((res) => {
|
||
if ((res.status = "SUCCESS")) {
|
||
if (type == 1) {
|
||
this.personForm.idCardBigPhotoUrl = res.data.data.imageUrl;
|
||
} else if (type == 2) {
|
||
this.personForm.idCardUpPhotoUrl = res.data.data.imageUrl;
|
||
} else if (type == 3) {
|
||
this.personForm.idCardDownPhotoUrl = res.data.data.imageUrl;
|
||
} else if (type == 4) {
|
||
this.personForm.fieldAcquisitionUrl = res.data.data.imageUrl;
|
||
} else if (type == 5) {
|
||
let arr =
|
||
this.personForm.contractImage != ""
|
||
? this.personForm.contractImage.split(",")
|
||
: [];
|
||
let newUrl =
|
||
this.$t("message.laborMange.contract") +
|
||
(arr.length + 1) +
|
||
"*" +
|
||
res.data.data.imageUrl;
|
||
let data = {
|
||
name: this.$t("message.laborMange.contract") + (arr.length + 1),
|
||
url: res.data.data.imageUrl,
|
||
};
|
||
arr.push(newUrl);
|
||
this.personForm.contractImage = arr.join(",");
|
||
this.contractFile.push(data);
|
||
} else if (type == 6) {
|
||
let arr =
|
||
this.personForm.employmentCard != ""
|
||
? this.personForm.employmentCard.split(",")
|
||
: [];
|
||
let newUrl =
|
||
this.$t("message.laborMange.certificate") +
|
||
(arr.length + 1) +
|
||
"*" +
|
||
res.data.data.imageUrl;
|
||
let data = {
|
||
name:
|
||
this.$t("message.laborMange.certificate") + (arr.length + 1),
|
||
url: res.data.data.imageUrl,
|
||
};
|
||
arr.push(newUrl);
|
||
this.personForm.employmentCard = arr.join(",");
|
||
this.employmentFile.push(data);
|
||
} else if (type == 7) {
|
||
let arr =
|
||
this.personForm.examinationImage != ""
|
||
? this.personForm.examinationImage.split(",")
|
||
: [];
|
||
let newUrl =
|
||
this.$t("message.laborMange.physical") +
|
||
(arr.length + 1) +
|
||
"*" +
|
||
res.data.data.imageUrl;
|
||
let data = {
|
||
name: this.$t("message.laborMange.physical") + (arr.length + 1),
|
||
url: res.data.data.imageUrl,
|
||
};
|
||
arr.push(newUrl);
|
||
this.personForm.examinationImage = arr.join(",");
|
||
this.examinationFile.push(data);
|
||
}
|
||
} else {
|
||
this.$message.error(
|
||
this.$t("message.laborMange.PhotoUploadingToServerFailed")
|
||
);
|
||
}
|
||
});
|
||
},
|
||
|
||
//身份证识别
|
||
discernId(url, type) {
|
||
let data = {
|
||
imageUrl: this.fileUrl + url,
|
||
side: type,
|
||
};
|
||
getIdCardInfoApi(data).then((res) => {
|
||
console.log("返回值", res);
|
||
if (res.code == 200) {
|
||
console.log("成了吗", res);
|
||
let val = res.result;
|
||
if (type == 1) {
|
||
this.personForm.nation =
|
||
val.ethnicity + this.$t("message.laborMange.clan");
|
||
this.personForm.sex = val.sex == "男" ? 1 : 2;
|
||
this.personForm.workerName = val.name;
|
||
this.personForm.birthday = val.birth;
|
||
this.personForm.nativePlace = val.address;
|
||
this.personForm.idCard = val.number;
|
||
} else {
|
||
this.personForm.issuingAuthorityForIdcard = val.issue;
|
||
this.personForm.idCardEndDate =
|
||
val.valid_to != "长期" ? val.valid_to : "";
|
||
this.personForm.longTerm = val.valid_to == "长期" ? true : false;
|
||
}
|
||
} else {
|
||
this.$message.error(this.$t("message.laborMange.hint10"));
|
||
}
|
||
});
|
||
},
|
||
tableRowClassName({ row, rowIndex }) {
|
||
if (!this.isIscDevice) {
|
||
return;
|
||
}
|
||
if (row.sendSuccessStatus === 1) {
|
||
return "green2";
|
||
}
|
||
if (row.sendSuccessStatus === 2 || row.sendSuccessStatus === 4) {
|
||
return "red2";
|
||
}
|
||
if (row.sendSuccessStatus === 3) {
|
||
return "yellow2";
|
||
}
|
||
},
|
||
async issueTeamEvent(id) {
|
||
this.issueTeamDialog = true;
|
||
this.whoId = id;
|
||
this.getNewestList();
|
||
},
|
||
async getNewestList() {
|
||
const res = await xmglXzHikvisionSyncGetNewestList({
|
||
// pageNo:this.issuePage.pageNo,
|
||
// pageSize:this.issuePage.pageSize,
|
||
whoId: this.whoId,
|
||
});
|
||
console.log(res, "---------------------");
|
||
this.issuePointList = res.result;
|
||
},
|
||
async retryEvent(id) {
|
||
this.$notify({
|
||
title: "正在重试...",
|
||
type: "success",
|
||
duration: 1500,
|
||
});
|
||
const res = await xmglXzHikvisionSyncRetryAPI({
|
||
id: id,
|
||
});
|
||
console.log(res);
|
||
this.getTableData();
|
||
},
|
||
},
|
||
};
|
||
</script>
|
||
<style lang="less" scoped>
|
||
@import "./laborPersonCommon.less";
|
||
::v-deep .el-button--medium {
|
||
padding: 9px 16px;
|
||
}
|
||
.laborComponent {
|
||
width: 100%;
|
||
height: 100%;
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
.left2 {
|
||
width: 370px;
|
||
// background: #fbfbfb;
|
||
height: 100%;
|
||
position: relative;
|
||
.placeholder {
|
||
width: 339px;
|
||
height: 42px;
|
||
}
|
||
.left_list {
|
||
width: 100%;
|
||
text-align: center;
|
||
height: calc(100% - 61px);
|
||
.list_content {
|
||
height: calc(100% - 114px);
|
||
overflow-y: hidden;
|
||
margin-bottom: 60px;
|
||
}
|
||
.list_content:hover {
|
||
overflow-y: auto;
|
||
}
|
||
.list_content::-webkit-scrollbar {
|
||
/*滚动条整体样式*/
|
||
width: 5px; /*高宽分别对应横竖滚动条的尺寸*/
|
||
height: 1px;
|
||
}
|
||
.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;
|
||
}
|
||
}
|
||
.el-menu-vertical-demo {
|
||
text-align: left;
|
||
}
|
||
.addFirm {
|
||
position: absolute;
|
||
bottom: 0;
|
||
left: 0;
|
||
right: 0;
|
||
height: 45px;
|
||
line-height: 45px;
|
||
color: rgba(81, 129, 246, 1);
|
||
font-size: 15px;
|
||
text-align: center;
|
||
background: #fff;
|
||
border-top: 1px solid #e6e6e6;
|
||
font-family: PingFangSC-Regular;
|
||
cursor: pointer;
|
||
}
|
||
.content_data {
|
||
padding: 0 20px;
|
||
box-sizing: border-box;
|
||
height: 43px;
|
||
line-height: 43px;
|
||
cursor: pointer;
|
||
.enterpriseName {
|
||
width: 80%;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
text-align: left;
|
||
}
|
||
.enterpriseName2 {
|
||
text-align: left;
|
||
width: 100%;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
}
|
||
}
|
||
.checkedName {
|
||
background-color: rgba(81, 129, 246, 0.1);
|
||
border-left: 3px solid #5181f6;
|
||
padding-left: 17px;
|
||
}
|
||
}
|
||
/deep/ .el-form--label-top .el-form-item__label {
|
||
padding: 0;
|
||
}
|
||
// 照片导入
|
||
.importImgDialog {
|
||
/deep/.el-dialog__body {
|
||
padding: 15px 20px;
|
||
}
|
||
}
|
||
.import-content {
|
||
.alarm-content {
|
||
display: flex;
|
||
align-items: center;
|
||
margin-left: 104px;
|
||
.el-icon-warning-outline {
|
||
color: #ea3941;
|
||
font-size: 23px;
|
||
}
|
||
div {
|
||
width: 405px;
|
||
line-height: 18px;
|
||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||
font-weight: 400;
|
||
font-size: 12px;
|
||
color: #ea3941;
|
||
margin: 5px;
|
||
}
|
||
}
|
||
.import-operation {
|
||
display: flex;
|
||
margin-top: 5px;
|
||
margin-left: 136px;
|
||
span {
|
||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||
font-weight: 400;
|
||
font-size: 14px;
|
||
color: #272d45;
|
||
margin-right: 10px;
|
||
}
|
||
> div {
|
||
.upload-demo {
|
||
width: 321px;
|
||
height: 45px;
|
||
/deep/.el-upload {
|
||
width: 100%;
|
||
height: 100%;
|
||
.el-upload-dragger {
|
||
width: 100%;
|
||
height: 100%;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
.el-icon-upload {
|
||
color: #a2a4af;
|
||
font-size: 20px;
|
||
margin: 0px;
|
||
margin-right: 5px;
|
||
}
|
||
.el-upload__text {
|
||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||
font-weight: 400;
|
||
font-size: 14px;
|
||
color: #a2a4af;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
.upload-tip {
|
||
width: 321px;
|
||
margin-left: 215px;
|
||
margin-top: 5px;
|
||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||
font-weight: 400;
|
||
font-size: 12px;
|
||
line-height: 18px;
|
||
color: #a2a4af;
|
||
}
|
||
.upload-tip-sub {
|
||
width: 321px;
|
||
margin-left: 215px;
|
||
margin-top: 5px;
|
||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||
font-weight: 400;
|
||
font-size: 14px;
|
||
color: #5181f6;
|
||
line-height: 16px;
|
||
}
|
||
}
|
||
.dialog_content {
|
||
padding: 0 100px;
|
||
.el-form-item--small.el-form-item {
|
||
margin-bottom: 10px;
|
||
}
|
||
}
|
||
.addPerson_content {
|
||
padding: 0 25px;
|
||
.el-form-item--small.el-form-item {
|
||
margin-bottom: 10px;
|
||
}
|
||
.type-change {
|
||
margin: 5px 0px;
|
||
}
|
||
}
|
||
|
||
.shut_icon {
|
||
position: absolute;
|
||
right: -11px;
|
||
top: -11px;
|
||
z-index: 1000;
|
||
margin: 5px;
|
||
cursor: pointer;
|
||
}
|
||
.dialog_content {
|
||
height: 617px;
|
||
}
|
||
.examination {
|
||
margin-top: -30px;
|
||
}
|
||
.custom-tree-node {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
width: 90%;
|
||
padding-right: 10px;
|
||
box-sizing: border-box;
|
||
}
|
||
/deep/ .el-tree-node__content {
|
||
height: 36px;
|
||
}
|
||
|
||
/deep/ .el-tree-node.is-current > .el-tree-node__content {
|
||
background-color: rgba(168, 191, 230, 0.69) !important;
|
||
}
|
||
|
||
/deep/ .el-tree-node__content:hover {
|
||
background: transparent;
|
||
}
|
||
|
||
/deep/ .el-tree-node__expand-icon {
|
||
font-size: 20px;
|
||
}
|
||
.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;
|
||
}
|
||
}
|
||
|
||
.valuesColor {
|
||
color: #fff;
|
||
padding: 3px;
|
||
}
|
||
|
||
.yellow {
|
||
background-color: #fbe000;
|
||
}
|
||
.green {
|
||
background-color: #72cb40;
|
||
}
|
||
.red {
|
||
background-color: #ec373e;
|
||
}
|
||
|
||
::v-deep {
|
||
.el-table .yellow2 {
|
||
background-color: #fffce6;
|
||
}
|
||
.el-table .green2 {
|
||
background-color: #f1faec;
|
||
}
|
||
.el-table .red2 {
|
||
background-color: #feebed;
|
||
}
|
||
|
||
.dialog-footer {
|
||
margin-top: 20px;
|
||
}
|
||
.pagerBox {
|
||
margin-top: 0;
|
||
}
|
||
|
||
.tableBtns .operationText {
|
||
margin-right: 0;
|
||
}
|
||
}
|
||
</style>
|