feat:添加劳务管理模块中人员管理的批量删除功能
fix:解绑劳务管理中人员管理和花名册的全选按钮与其他按钮的绑定
This commit is contained in:
parent
f7f2365989
commit
e33bd23541
@ -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,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);
|
||||||
|
|||||||
@ -297,7 +297,7 @@
|
|||||||
<el-button
|
<el-button
|
||||||
v-if="isIscDevice"
|
v-if="isIscDevice"
|
||||||
v-permission="{
|
v-permission="{
|
||||||
key: 'rygl_distributeAccessEquipment',
|
key: 'rygl_check_all',
|
||||||
menuPath: '/project/labor/personManage',
|
menuPath: '/project/labor/personManage',
|
||||||
}"
|
}"
|
||||||
size="medium"
|
size="medium"
|
||||||
@ -689,6 +689,19 @@
|
|||||||
@click="workerExitBtn(checkedWorker, 2)"
|
@click="workerExitBtn(checkedWorker, 2)"
|
||||||
>{{ $t("message.laborMange.batchBowOutWith") }}</el-button
|
>{{ $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>
|
||||||
<div>
|
<div>
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@ -2417,6 +2430,7 @@ import {
|
|||||||
xmglXzHikvisionSyncGetNewestList,
|
xmglXzHikvisionSyncGetNewestList,
|
||||||
xmglXzHikvisionSyncRetryAPI,
|
xmglXzHikvisionSyncRetryAPI,
|
||||||
checkfaceHikvisionApi,
|
checkfaceHikvisionApi,
|
||||||
|
onBatchDeletionApi,
|
||||||
} from "@/assets/js/api/laborPerson";
|
} from "@/assets/js/api/laborPerson";
|
||||||
import {
|
import {
|
||||||
selectUserDevAuthorityByUserIdApi,
|
selectUserDevAuthorityByUserIdApi,
|
||||||
@ -2853,6 +2867,48 @@ export default {
|
|||||||
// 全选按钮值切换
|
// 全选按钮值切换
|
||||||
this.$refs.multipleTable.toggleAllSelection();
|
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() {
|
passEquipment() {
|
||||||
let requestData = {
|
let requestData = {
|
||||||
|
|||||||
@ -184,7 +184,7 @@
|
|||||||
type="primary"
|
type="primary"
|
||||||
@click="checkAllFn"
|
@click="checkAllFn"
|
||||||
v-permission="{
|
v-permission="{
|
||||||
key: 'hmc_batch_authorization',
|
key: 'hmc_check_all',
|
||||||
menuPath: '/project/labor/roster',
|
menuPath: '/project/labor/roster',
|
||||||
}"
|
}"
|
||||||
>全选</el-button
|
>全选</el-button
|
||||||
@ -198,6 +198,15 @@
|
|||||||
}"
|
}"
|
||||||
>批量授权门禁权限</el-button
|
>批量授权门禁权限</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-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
@ -1163,6 +1172,19 @@ export default {
|
|||||||
this.getConfig();
|
this.getConfig();
|
||||||
},
|
},
|
||||||
methods: {
|
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() {
|
onBatchSynchronization() {
|
||||||
if (this.multipleSelection.length == 0) {
|
if (this.multipleSelection.length == 0) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user