diff --git a/src/assets/js/api/laborPerson.js b/src/assets/js/api/laborPerson.js
index 19b0017c..709c2a07 100644
--- a/src/assets/js/api/laborPerson.js
+++ b/src/assets/js/api/laborPerson.js
@@ -35,7 +35,7 @@ export const regionViolationPageApi = data => post('xmgl/regionViolation/page',
// 批量人员绑定设备
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 onBatchEntryApi = data => post('xmgl/workerInfo/batchEntry', data);
// 分页列表查询人员考勤组信息
export const getWorkerAttendanceGroupV2PageApi = data => get('/xmgl/workerAttendanceGroupV2/page', data);
diff --git a/src/views/projectFront/laborManage/personModule/administration.vue b/src/views/projectFront/laborManage/personModule/administration.vue
index 9ee85c64..afba1f9e 100644
--- a/src/views/projectFront/laborManage/personModule/administration.vue
+++ b/src/views/projectFront/laborManage/personModule/administration.vue
@@ -359,12 +359,26 @@
menuPath: '/project/labor/personManage',
}"
size="medium"
- @click="passEquipment()"
+ @click="onBatchBinddevice()"
type="primary"
style="margin-left: 5px"
:disabled="checkedWorker.length <= 0"
>下发通行设备
+ 取消设备授权
+
- 重试
-
+ -->
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -2314,6 +2367,8 @@ import {
xmglXzHikvisionSyncRetryAPI,
checkfaceHikvisionApi,
getWorkerAttendanceGroupV2ListApi,
+ batchBindDevForWorkersApi,
+ batchCancelDevForWorkersApi
} from "@/assets/js/api/laborPerson";
import { selectUserDevAuthorityByUserIdApi } from "@/assets/js/api/configManage";
import { getProjectConfigListApi } from "@/assets/js/api/project.js";
@@ -2545,6 +2600,34 @@ export default {
userId: "",
workerNatureList: [],
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() {
@@ -2605,6 +2688,79 @@ export default {
},
},
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() {
getWorkerAttendanceGroupV2ListApi({
projectSn: this.$store.state.projectSn,
@@ -3070,6 +3226,7 @@ export default {
if (result.result) {
this.isUploadToHouse = result.result.housing ? true : false;
this.isIscDevice =
+ result.result.supplierType == 11 ||
result.result.supplierType == 10 ||
result.result.supplierType == 9 ||
result.result.supplierType == 8
diff --git a/src/views/projectFront/laborManage/personModule/laborComponent.vue b/src/views/projectFront/laborManage/personModule/laborComponent.vue
index 27601911..f5dab24d 100644
--- a/src/views/projectFront/laborManage/personModule/laborComponent.vue
+++ b/src/views/projectFront/laborManage/personModule/laborComponent.vue
@@ -319,13 +319,14 @@
key: 'rygl_distributeAccessEquipment',
menuPath: '/project/labor/personManage',
}"
+ @click="onBatchBinddevice()"
size="medium"
- @click="passEquipment()"
type="primary"
style="margin-left: 5px"
:disabled="checkedWorker.length <= 0"
>下发通行设备
+
批量删除
+
+
@@ -2534,6 +2545,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -2574,7 +2624,10 @@ import {
getDangongWorkerFaceStatusPageList,
checkfaceHikvisionApi,
onBatchDeletionApi,
- getWorkerAttendanceGroupV2ListApi
+ getWorkerAttendanceGroupV2ListApi,
+ onBatchEntryApi,
+ batchBindDevForWorkersApi,
+ batchCancelDevForWorkersApi
} from "@/assets/js/api/laborPerson";
import {
selectUserDevAuthorityByUserIdApi,
@@ -2850,6 +2903,34 @@ export default {
userId: "",
workerNatureList: [],
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() {
@@ -2909,6 +2990,79 @@ export default {
},
},
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() {
getWorkerAttendanceGroupV2ListApi({
projectSn: this.$store.state.projectSn,
@@ -3093,6 +3247,48 @@ export default {
// 全选按钮值切换
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() {
if (this.checkedWorker.length == 0) {
@@ -3366,6 +3562,7 @@ export default {
if (result.result) {
this.isUploadToHouse = result.result.housing ? true : false;
this.isIscDevice =
+ result.result.supplierType == 11 ||
result.result.supplierType == 10 ||
result.result.supplierType == 9 ||
result.result.supplierType == 8
diff --git a/src/views/projectFront/laborManage/rosterNew.vue b/src/views/projectFront/laborManage/rosterNew.vue
index ca6a1a09..8fbedc24 100644
--- a/src/views/projectFront/laborManage/rosterNew.vue
+++ b/src/views/projectFront/laborManage/rosterNew.vue
@@ -1026,7 +1026,7 @@ export default {
}).then((result) => {
if (result.success) {
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;
}
}