Compare commits

...

2 Commits

Author SHA1 Message Date
6a9266f624 合并冲突 2025-08-28 09:10:08 +08:00
5e1fbbd24c 人员通行设备 2025-08-28 09:09:00 +08:00
4 changed files with 363 additions and 7 deletions

View File

@ -35,7 +35,7 @@ export const regionViolationPageApi = data => post('xmgl/regionViolation/page',
// 批量人员绑定设备 // 批量人员绑定设备
export const batchBindDevForWorkersApi = data => post('xmgl/workerInfo/batchBindDevForWorkers', data); //批量绑定设备 export const batchBindDevForWorkersApi = data => post('xmgl/workerInfo/batchBindDevForWorkers', data); //批量绑定设备
export const batchCancelDevForWorkersApi = data => post('/xmgl/workerApi/deleteFaceAuth', data); //批量取消绑定设备
//详情 //详情
@ -300,6 +300,8 @@ export const checkfaceHikvisionApi = data => post('xmgl/recognition/checkFace',
//人员管理批量删除 //人员管理批量删除
export const onBatchDeletionApi = data => post('xmgl/workerInfo/deleteBatch', data); export const onBatchDeletionApi = data => post('xmgl/workerInfo/deleteBatch', data);
// 人员管理批量进场
export const onBatchEntryApi = data => post('xmgl/workerInfo/batchEntry', data);
// 分页列表查询人员考勤组信息 // 分页列表查询人员考勤组信息
export const getWorkerAttendanceGroupV2PageApi = data => get('/xmgl/workerAttendanceGroupV2/page', data); export const getWorkerAttendanceGroupV2PageApi = data => get('/xmgl/workerAttendanceGroupV2/page', data);

View File

@ -359,12 +359,26 @@
menuPath: '/project/labor/personManage', menuPath: '/project/labor/personManage',
}" }"
size="medium" size="medium"
@click="passEquipment()" @click="onBatchBinddevice()"
type="primary" type="primary"
style="margin-left: 5px" style="margin-left: 5px"
:disabled="checkedWorker.length <= 0" :disabled="checkedWorker.length <= 0"
>下发通行设备</el-button >下发通行设备</el-button
> >
<el-button
v-if="!isDangong"
v-permission="{
key: 'rygl_cancelBindEquipment',
menuPath: '/project/labor/personManage',
}"
size="medium"
@click="onBatchCancelDevice()"
type="primary"
style="margin-left: 5px"
:disabled="checkedWorker.length <= 0"
>取消设备授权</el-button
>
<!-- @click="passEquipment()" -->
<el-button <el-button
v-if="isIscDevice" v-if="isIscDevice"
v-permission="{ v-permission="{
@ -2196,7 +2210,7 @@
: "" : ""
}}</template> }}</template>
</el-table-column> </el-table-column>
<el-table-column <!-- <el-table-column
:label=" :label="
$t('message.personnelPosition.beaconManage.table.operation') $t('message.personnelPosition.beaconManage.table.operation')
" "
@ -2212,7 +2226,7 @@
<span style="color: #5381f6">重试</span> <span style="color: #5381f6">重试</span>
</div> </div>
</template> </template>
</el-table-column> </el-table-column> -->
</template> </template>
<template v-else> <template v-else>
<el-table-column <el-table-column
@ -2273,6 +2287,45 @@
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :modal-append-to-body="false" title="批量人员下发通行设备" :visible.sync="batchBindDialog" width="668px">
<!-- <div class="dialog_content"> -->
<el-form ref="batchBindForm" :model="batchBindForm" :rules="batchBindRules" label-width="130px" size="medium">
<el-form-item label="人脸设备" prop="ufaceDevId">
<el-select style="width: 320px" v-model="batchBindForm.ufaceDevId" multiple collapse-tags filterable placeholder="请选择">
<el-option v-for="item in ufaceDevAllList" :key="item.id" :label="item.devName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-form>
<!-- </div> -->
<div class="dialog-footer">
<el-button class="cancleBtn" @click="batchBindDialog = false" icon="el-icon-circle-close" size="medium">{{
$t("message.alarmValueSet.cancel") }}
</el-button>
<el-button type="primary" icon="el-icon-circle-check" @click="onBatchBindSubmit" size="medium">确定
</el-button>
</div>
</el-dialog>
<el-dialog :modal-append-to-body="false" title="批量人员取消设备授权" :visible.sync="batchCancelBindDialog" width="668px">
<!-- <div class="dialog_content"> -->
<el-form ref="batchCancelBindForm" :model="batchCancelBindForm" :rules="batchCancelBindRules" label-width="130px" size="medium">
<el-form-item label="人脸设备" prop="ufaceDevId">
<el-select style="width: 320px" v-model="batchCancelBindForm.ufaceDevId" multiple collapse-tags filterable placeholder="请选择">
<el-option v-for="item in ufaceDevAllList" :key="item.id" :label="item.devName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-form>
<!-- </div> -->
<div class="dialog-footer">
<el-button class="cancleBtn" @click="batchCancelBindDialog = false" icon="el-icon-circle-close" size="medium">{{
$t("message.alarmValueSet.cancel") }}
</el-button>
<el-button type="primary" icon="el-icon-circle-check" @click="onBatchCancelBindSubmit" size="medium">确定
</el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
@ -2314,6 +2367,8 @@ import {
xmglXzHikvisionSyncRetryAPI, xmglXzHikvisionSyncRetryAPI,
checkfaceHikvisionApi, checkfaceHikvisionApi,
getWorkerAttendanceGroupV2ListApi, getWorkerAttendanceGroupV2ListApi,
batchBindDevForWorkersApi,
batchCancelDevForWorkersApi
} from "@/assets/js/api/laborPerson"; } from "@/assets/js/api/laborPerson";
import { selectUserDevAuthorityByUserIdApi } from "@/assets/js/api/configManage"; import { selectUserDevAuthorityByUserIdApi } from "@/assets/js/api/configManage";
import { getProjectConfigListApi } from "@/assets/js/api/project.js"; import { getProjectConfigListApi } from "@/assets/js/api/project.js";
@ -2545,6 +2600,34 @@ export default {
userId: "", userId: "",
workerNatureList: [], workerNatureList: [],
workerAttendanceGroupList: [], workerAttendanceGroupList: [],
batchCancelBindDialog: false,
batchCancelBindForm: {
ufaceDevId: [],
},
batchCancelBindRules: {
ufaceDevId: [
{
type: "array",
required: true,
message: "请选择设备",
trigger: "change",
},
],
},
batchBindDialog: false,
batchBindForm: {
ufaceDevId: [],
},
batchBindRules: {
ufaceDevId: [
{
type: "array",
required: true,
message: "请选择设备",
trigger: "change",
},
],
},
}; };
}, },
created() { created() {
@ -2605,6 +2688,79 @@ export default {
}, },
}, },
methods: { methods: {
onBatchBindSubmit() {
this.$refs["batchBindForm"].validate((valid) => {
if (valid) {
let requestData = {
projectSn: this.projectSn,
personType: "1",
userId: this.$store.state.userInfo.userId,
ufaceDevId: this.batchBindForm.ufaceDevId.join(","),
enterpriseId: this.checkedId,
};
if (this.checkedWorker.length > 0) {
// const ids = this.checkedWorker.map((item) => item.id).join(",");
// requestData.workerIds = ids;
const ids = this.checkedWorker.map((item) => item.id)
requestData.workerIdList = ids;
}
batchBindDevForWorkersApi(requestData).then((res) => {
if (res.code == 200) {
this.$message({
message: "操作成功,已在后台下发,请稍后查看!",
type: "success",
});
this.batchBindDialog = false;
}
});
}
});
},
onBatchBinddevice() {
if (this.checkedWorker.length == 0) {
this.$message.warning("请选择需要批量绑定的数据!");
return;
}
this.batchBindForm.ufaceDevId = [];
this.batchBindDialog = true;
// const ids = this.checkedWorker.map((item) => item.id).join(",");
},
onBatchCancelDevice() {
if (this.checkedWorker.length == 0) {
this.$message.warning("请选择需要批量取消授权的数据!");
return;
}
this.batchCancelBindForm.ufaceDevId = [];
this.batchCancelBindDialog = true;
// const ids = this.checkedWorker.map((item) => item.id).join(",");
},
onBatchCancelBindSubmit() {
this.$refs["batchCancelBindForm"].validate((valid) => {
if (valid) {
let requestData = {
projectSn: this.projectSn,
personType: "1",
userId: this.$store.state.userInfo.userId,
ufaceDevIds: this.batchCancelBindForm.ufaceDevId.join(","),
enterpriseId: this.checkedId,
};
if (this.checkedWorker.length > 0) {
const ids = this.checkedWorker.map((item) => item.id).join(",");
requestData.workerIdStr = ids;
}
batchCancelDevForWorkersApi(requestData).then((res) => {
if (res.code == 200) {
this.$message({
message: "操作成功",
type: "success",
});
this.batchCancelBindDialog = false;
this.getTableData();
}
});
}
});
},
getWorkerAttendanceGroupV2List() { getWorkerAttendanceGroupV2List() {
getWorkerAttendanceGroupV2ListApi({ getWorkerAttendanceGroupV2ListApi({
projectSn: this.$store.state.projectSn, projectSn: this.$store.state.projectSn,
@ -3070,6 +3226,7 @@ export default {
if (result.result) { if (result.result) {
this.isUploadToHouse = result.result.housing ? true : false; this.isUploadToHouse = result.result.housing ? true : false;
this.isIscDevice = this.isIscDevice =
result.result.supplierType == 11 ||
result.result.supplierType == 10 || result.result.supplierType == 10 ||
result.result.supplierType == 9 || result.result.supplierType == 9 ||
result.result.supplierType == 8 result.result.supplierType == 8

View File

@ -319,13 +319,14 @@
key: 'rygl_distributeAccessEquipment', key: 'rygl_distributeAccessEquipment',
menuPath: '/project/labor/personManage', menuPath: '/project/labor/personManage',
}" }"
@click="onBatchBinddevice()"
size="medium" size="medium"
@click="passEquipment()"
type="primary" type="primary"
style="margin-left: 5px" style="margin-left: 5px"
:disabled="checkedWorker.length <= 0" :disabled="checkedWorker.length <= 0"
>下发通行设备</el-button >下发通行设备</el-button
> >
<!-- @click="passEquipment()" -->
<el-button <el-button
v-if="isIscDevice" v-if="isIscDevice"
v-permission="{ v-permission="{
@ -762,6 +763,16 @@
:disabled="checkedWorker.length <= 0" :disabled="checkedWorker.length <= 0"
>批量删除</el-button >批量删除</el-button
> >
<!-- v-permission="{
key: 'rygl_onBatchEntry',
menuPath: '/project/labor/personManage',
}" -->
<!-- <el-button
type="text"
@click="onBatchEntry"
:disabled="checkedWorker.length <= 0"
>批量进场</el-button
> -->
<!-- size="medium" --> <!-- size="medium" -->
<!-- style="margin-left: 5px" --> <!-- style="margin-left: 5px" -->
</div> </div>
@ -2534,6 +2545,45 @@
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :modal-append-to-body="false" title="批量人员下发通行设备" :visible.sync="batchBindDialog" width="668px">
<!-- <div class="dialog_content"> -->
<el-form ref="batchBindForm" :model="batchBindForm" :rules="batchBindRules" label-width="130px" size="medium">
<el-form-item label="人脸设备" prop="ufaceDevId">
<el-select style="width: 320px" v-model="batchBindForm.ufaceDevId" multiple collapse-tags filterable placeholder="请选择">
<el-option v-for="item in ufaceDevAllList" :key="item.id" :label="item.devName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-form>
<!-- </div> -->
<div class="dialog-footer">
<el-button class="cancleBtn" @click="batchBindDialog = false" icon="el-icon-circle-close" size="medium">{{
$t("message.alarmValueSet.cancel") }}
</el-button>
<el-button type="primary" icon="el-icon-circle-check" @click="onBatchBindSubmit" size="medium">确定
</el-button>
</div>
</el-dialog>
<el-dialog :modal-append-to-body="false" title="批量人员取消设备授权" :visible.sync="batchCancelBindDialog" width="668px">
<!-- <div class="dialog_content"> -->
<el-form ref="batchCancelBindForm" :model="batchCancelBindForm" :rules="batchCancelBindRules" label-width="130px" size="medium">
<el-form-item label="人脸设备" prop="ufaceDevId">
<el-select style="width: 320px" v-model="batchCancelBindForm.ufaceDevId" multiple collapse-tags filterable placeholder="请选择">
<el-option v-for="item in ufaceDevAllList" :key="item.id" :label="item.devName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-form>
<!-- </div> -->
<div class="dialog-footer">
<el-button class="cancleBtn" @click="batchCancelBindDialog = false" icon="el-icon-circle-close" size="medium">{{
$t("message.alarmValueSet.cancel") }}
</el-button>
<el-button type="primary" icon="el-icon-circle-check" @click="onBatchCancelBindSubmit" size="medium">确定
</el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
@ -2574,7 +2624,10 @@ import {
getDangongWorkerFaceStatusPageList, getDangongWorkerFaceStatusPageList,
checkfaceHikvisionApi, checkfaceHikvisionApi,
onBatchDeletionApi, onBatchDeletionApi,
getWorkerAttendanceGroupV2ListApi getWorkerAttendanceGroupV2ListApi,
onBatchEntryApi,
batchBindDevForWorkersApi,
batchCancelDevForWorkersApi
} from "@/assets/js/api/laborPerson"; } from "@/assets/js/api/laborPerson";
import { import {
selectUserDevAuthorityByUserIdApi, selectUserDevAuthorityByUserIdApi,
@ -2850,6 +2903,34 @@ export default {
userId: "", userId: "",
workerNatureList: [], workerNatureList: [],
workerAttendanceGroupList: [], workerAttendanceGroupList: [],
batchCancelBindDialog: false,
batchCancelBindForm: {
ufaceDevId: [],
},
batchCancelBindRules: {
ufaceDevId: [
{
type: "array",
required: true,
message: "请选择设备",
trigger: "change",
},
],
},
batchBindDialog: false,
batchBindForm: {
ufaceDevId: [],
},
batchBindRules: {
ufaceDevId: [
{
type: "array",
required: true,
message: "请选择设备",
trigger: "change",
},
],
},
}; };
}, },
created() { created() {
@ -2909,6 +2990,79 @@ export default {
}, },
}, },
methods: { methods: {
onBatchBindSubmit() {
this.$refs["batchBindForm"].validate((valid) => {
if (valid) {
let requestData = {
projectSn: this.projectSn,
personType: "1",
userId: this.$store.state.userInfo.userId,
ufaceDevId: this.batchBindForm.ufaceDevId.join(","),
enterpriseId: this.checkedId,
};
if (this.checkedWorker.length > 0) {
// const ids = this.checkedWorker.map((item) => item.id).join(",");
// requestData.workerIds = ids;
const ids = this.checkedWorker.map((item) => item.id)
requestData.workerIdList = ids;
}
batchBindDevForWorkersApi(requestData).then((res) => {
if (res.code == 200) {
this.$message({
message: "操作成功,已在后台下发,请稍后查看!",
type: "success",
});
this.batchBindDialog = false;
}
});
}
});
},
onBatchBinddevice() {
if (this.checkedWorker.length == 0) {
this.$message.warning("请选择需要批量绑定的数据!");
return;
}
this.batchBindForm.ufaceDevId = [];
this.batchBindDialog = true;
// const ids = this.checkedWorker.map((item) => item.id).join(",");
},
onBatchCancelDevice() {
if (this.checkedWorker.length == 0) {
this.$message.warning("请选择需要批量取消授权的数据!");
return;
}
this.batchCancelBindForm.ufaceDevId = [];
this.batchCancelBindDialog = true;
// const ids = this.checkedWorker.map((item) => item.id).join(",");
},
onBatchCancelBindSubmit() {
this.$refs["batchCancelBindForm"].validate((valid) => {
if (valid) {
let requestData = {
projectSn: this.projectSn,
personType: "1",
userId: this.$store.state.userInfo.userId,
ufaceDevIds: this.batchCancelBindForm.ufaceDevId.join(","),
enterpriseId: this.checkedId,
};
if (this.checkedWorker.length > 0) {
const ids = this.checkedWorker.map((item) => item.id).join(",");
requestData.workerIdStr = ids;
}
batchCancelDevForWorkersApi(requestData).then((res) => {
if (res.code == 200) {
this.$message({
message: "操作成功",
type: "success",
});
this.batchCancelBindDialog = false;
this.getTableData();
}
});
}
});
},
getWorkerAttendanceGroupV2List() { getWorkerAttendanceGroupV2List() {
getWorkerAttendanceGroupV2ListApi({ getWorkerAttendanceGroupV2ListApi({
projectSn: this.$store.state.projectSn, projectSn: this.$store.state.projectSn,
@ -3093,6 +3247,48 @@ export default {
// //
this.$refs.multipleTable.toggleAllSelection(); this.$refs.multipleTable.toggleAllSelection();
}, },
//
onBatchEntry() {
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,
};
onBatchEntryApi(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: "已取消批量进场",
});
});
},
// //
onBatchDeletion() { onBatchDeletion() {
if (this.checkedWorker.length == 0) { if (this.checkedWorker.length == 0) {
@ -3366,6 +3562,7 @@ export default {
if (result.result) { if (result.result) {
this.isUploadToHouse = result.result.housing ? true : false; this.isUploadToHouse = result.result.housing ? true : false;
this.isIscDevice = this.isIscDevice =
result.result.supplierType == 11 ||
result.result.supplierType == 10 || result.result.supplierType == 10 ||
result.result.supplierType == 9 || result.result.supplierType == 9 ||
result.result.supplierType == 8 result.result.supplierType == 8

View File

@ -1026,7 +1026,7 @@ export default {
}).then((result) => { }).then((result) => {
if (result.success) { if (result.success) {
if (result.result) { if (result.result) {
this.isIscDevice = result.result.supplierType == 9 ? true : false; this.isIscDevice = [9, 11].includes(result.result.supplierType) ? true : false;
this.isDangong = result.result.supplierType == 8 ? true : false; this.isDangong = result.result.supplierType == 8 ? true : false;
} }
} }