diff --git a/src/assets/js/api/laborPerson.js b/src/assets/js/api/laborPerson.js index 3a2a3ab2..bf9ad63c 100644 --- a/src/assets/js/api/laborPerson.js +++ b/src/assets/js/api/laborPerson.js @@ -271,4 +271,7 @@ export const getHikvisionManualCompareApi = data => post('xmgl/xzHikvisionCompar //海康人脸评分接口 // export const checkfaceHikvisionApi = (data,token) => post('xmgl/recognition/checkfaceHikvision', data, { headers: {Authorization: token}}); -export const checkfaceHikvisionApi = data => post('xmgl/recognition/checkfaceHikvision', data); \ No newline at end of file +export const checkfaceHikvisionApi = data => post('xmgl/recognition/checkfaceHikvision', data); + +//人员管理批量删除 +export const onBatchDeletionApi = data => post('xmgl/workerInfo/deleteBatch', data); diff --git a/src/views/projectFront/laborManage/personModule/laborComponent.vue b/src/views/projectFront/laborManage/personModule/laborComponent.vue index b82c7bc4..cbb9deb3 100644 --- a/src/views/projectFront/laborManage/personModule/laborComponent.vue +++ b/src/views/projectFront/laborManage/personModule/laborComponent.vue @@ -297,7 +297,7 @@ {{ $t("message.laborMange.batchBowOutWith") }} + + 批量删除 + +
{ + 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 = { diff --git a/src/views/projectFront/laborManage/rosterNew.vue b/src/views/projectFront/laborManage/rosterNew.vue index 44617aa4..1f7c97a5 100644 --- a/src/views/projectFront/laborManage/rosterNew.vue +++ b/src/views/projectFront/laborManage/rosterNew.vue @@ -184,7 +184,7 @@ type="primary" @click="checkAllFn" v-permission="{ - key: 'hmc_batch_authorization', + key: 'hmc_check_all', menuPath: '/project/labor/roster', }" >全选批量授权门禁权限 +
@@ -1163,6 +1172,19 @@ export default { this.getConfig(); }, methods: { + // 批量删除 + // onBatchDeletion(){ + // if (this.multipleSelection.length == 0) { + // this.$message.warning("请选择需要删除的数据!"); + // return; + // } + // console.log("999999999999999999999999999") + // console.log(this.multipleSelection) + // console.log("999999999999999999999999999") + // const deleteIds = this.multipleSelection.map((item) => item.id).join(","); + // console.log(deleteIds) + // }, + // 批量授权 onBatchSynchronization() { if (this.multipleSelection.length == 0) {