From e33bd235417884c47e0b4c92b4bc803afa715ab1 Mon Sep 17 00:00:00 2001 From: Vce Date: Mon, 17 Jun 2024 15:37:18 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=B7=BB=E5=8A=A0=E5=8A=B3=E5=8A=A1?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E6=A8=A1=E5=9D=97=E4=B8=AD=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=9A=84=E6=89=B9=E9=87=8F=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=20fix:=E8=A7=A3=E7=BB=91=E5=8A=B3=E5=8A=A1?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E4=B8=AD=E4=BA=BA=E5=91=98=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=92=8C=E8=8A=B1=E5=90=8D=E5=86=8C=E7=9A=84=E5=85=A8=E9=80=89?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E4=B8=8E=E5=85=B6=E4=BB=96=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E7=9A=84=E7=BB=91=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/js/api/laborPerson.js | 5 +- .../personModule/laborComponent.vue | 58 ++++++++++++++++++- .../projectFront/laborManage/rosterNew.vue | 24 +++++++- 3 files changed, 84 insertions(+), 3 deletions(-) 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) {