feat:添加劳务管理模块中人员管理的批量删除功能

fix:解绑劳务管理中人员管理和花名册的全选按钮与其他按钮的绑定
This commit is contained in:
Vce 2024-06-17 15:37:18 +08:00
parent f7f2365989
commit e33bd23541
3 changed files with 84 additions and 3 deletions

View File

@ -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);
export const checkfaceHikvisionApi = data => post('xmgl/recognition/checkfaceHikvision', data);
//人员管理批量删除
export const onBatchDeletionApi = data => post('xmgl/workerInfo/deleteBatch', data);

View File

@ -297,7 +297,7 @@
<el-button
v-if="isIscDevice"
v-permission="{
key: 'rygl_distributeAccessEquipment',
key: 'rygl_check_all',
menuPath: '/project/labor/personManage',
}"
size="medium"
@ -689,6 +689,19 @@
@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
@ -2417,6 +2430,7 @@ import {
xmglXzHikvisionSyncGetNewestList,
xmglXzHikvisionSyncRetryAPI,
checkfaceHikvisionApi,
onBatchDeletionApi,
} from "@/assets/js/api/laborPerson";
import {
selectUserDevAuthorityByUserIdApi,
@ -2853,6 +2867,48 @@ export default {
//
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 = {

View File

@ -184,7 +184,7 @@
type="primary"
@click="checkAllFn"
v-permission="{
key: 'hmc_batch_authorization',
key: 'hmc_check_all',
menuPath: '/project/labor/roster',
}"
>全选</el-button
@ -198,6 +198,15 @@
}"
>批量授权门禁权限</el-button
>
<!-- <el-button
type="primary"
@click="onBatchDeletion"
v-permission="{
key: 'hmc_batch_deletion',
menuPath: '/project/labor/roster',
}"
>批量删除</el-button
> -->
</el-form-item>
</el-form>
</div>
@ -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) {