人员通行设备
This commit is contained in:
parent
5353c9d16a
commit
5e1fbbd24c
208
package.json
208
package.json
@ -1,106 +1,106 @@
|
||||
{
|
||||
"name": "zhgdyun",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"start": "npm run dev",
|
||||
"dev": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@microsoft/fetch-event-source": "^2.0.1",
|
||||
"@turf/turf": "^7.1.0",
|
||||
"axios": "^0.19.2",
|
||||
"better-scroll": "^2.4.1",
|
||||
"copy-webpack-plugin": "^6.3.2",
|
||||
"core-js": "^3.6.5",
|
||||
"crypto-js": "^4.2.0",
|
||||
"css-declaration-sorter": "^6.3.1",
|
||||
"dhtmlx-gantt": "^7.1.13",
|
||||
"dom-to-image": "^2.6.0",
|
||||
"dompurify": "^3.2.5",
|
||||
"echarts": "^5.6.0",
|
||||
"echarts4": "npm:echarts@^4.8.0",
|
||||
"element-ui": "^2.13.2",
|
||||
"ezuikit-js": "^7.7.8",
|
||||
"fabric": "^3.6.3",
|
||||
"flv.js": "^1.6.2",
|
||||
"gantt-elastic": "^1.0.12",
|
||||
"github-markdown-css": "^5.8.1",
|
||||
"h5player": "^2.0.0",
|
||||
"hls.js": "^1.4.3",
|
||||
"html-entities": "^2.5.2",
|
||||
"html2canvas": "^1.0.0-rc.7",
|
||||
"jquery": "^3.6.3",
|
||||
"jquery-ui-dist": "^1.13.2",
|
||||
"js-base64": "^3.7.2",
|
||||
"js-file-download": "^0.4.12",
|
||||
"js-md5": "^0.7.3",
|
||||
"konva": "^9.3.20",
|
||||
"lrz": "^4.9.41",
|
||||
"markdown-it": "^12.1.0",
|
||||
"mars3d": "^3.3.4",
|
||||
"mars3d-cesium": "^1.121.1",
|
||||
"mitt": "^3.0.1",
|
||||
"moment": "^2.29.1",
|
||||
"monitorjs_horse": "^2.2.1",
|
||||
"mqtt": "^4.2.6",
|
||||
"node-polyfill-webpack-plugin": "^2.0.1",
|
||||
"node-rsa": "^1.1.1",
|
||||
"postcss-normalize-string": "^5.1.0",
|
||||
"prismjs": "^1.30.0",
|
||||
"qrcodejs2": "0.0.2",
|
||||
"react": "^17.0.2",
|
||||
"sortablejs": "^1.15.6",
|
||||
"spark-md5": "^3.0.1",
|
||||
"style-resources-loader": "^1.3.3",
|
||||
"stylus-loader": "^3.0.2",
|
||||
"swiper": "^5.4.5",
|
||||
"turf": "^3.0.14",
|
||||
"typed.js": "^2.1.0",
|
||||
"vconsole": "^3.15.1",
|
||||
"videojs-contrib-hls": "^5.15.0",
|
||||
"vue": "^2.6.11",
|
||||
"vue-awesome-swiper": "^4.1.1",
|
||||
"vue-color": "^2.8.1",
|
||||
"vue-count-to": "^1.0.13",
|
||||
"vue-cropper": "^0.5.5",
|
||||
"vue-esign": "^1.1.4",
|
||||
"vue-matomo": "^4.1.0",
|
||||
"vue-monoplasty-slide-verify": "^1.3.1",
|
||||
"vue-photo-preview": "^1.1.3",
|
||||
"vue-quill-editor": "^3.0.6",
|
||||
"vue-router": "^3.2.0",
|
||||
"vue-seamless-scroll": "^1.1.23",
|
||||
"vue-simple-uploader": "^0.7.6",
|
||||
"vue2-scale-box": "^0.1.7",
|
||||
"vuedraggable": "^2.24.3",
|
||||
"vuescroll": "^4.16.1",
|
||||
"vuex": "^3.4.0",
|
||||
"vuex-persistedstate": "^3.1.0",
|
||||
"xhl-mqttx": "^1.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "~4.4.0",
|
||||
"@vue/cli-plugin-router": "~4.4.0",
|
||||
"@vue/cli-plugin-vuex": "~4.4.0",
|
||||
"@vue/cli-service": "~4.4.0",
|
||||
"compression-webpack-plugin": "^5.0.2",
|
||||
"file-loader": "^6.2.0",
|
||||
"less": "^3.0.4",
|
||||
"less-loader": "^5.0.0",
|
||||
"sass": "^1.75.0",
|
||||
"sass-loader": "^7.3.1",
|
||||
"stylus": "^0.54.8",
|
||||
"terser-webpack-plugin": "^4.2.3",
|
||||
"url-loader": "^4.1.1",
|
||||
"vue-cli-plugin-element": "~1.0.1",
|
||||
"vue-i18n": "^8.21.0",
|
||||
"vue-template-compiler": "^2.6.11"
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions",
|
||||
"not dead"
|
||||
]
|
||||
"name": "zhgdyun",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"start": "npm run dev",
|
||||
"dev": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@microsoft/fetch-event-source": "^2.0.1",
|
||||
"@turf/turf": "^7.1.0",
|
||||
"axios": "^0.19.2",
|
||||
"better-scroll": "^2.4.1",
|
||||
"copy-webpack-plugin": "^6.3.2",
|
||||
"core-js": "^3.6.5",
|
||||
"crypto-js": "^4.2.0",
|
||||
"css-declaration-sorter": "^6.3.1",
|
||||
"dhtmlx-gantt": "^7.1.13",
|
||||
"dom-to-image": "^2.6.0",
|
||||
"dompurify": "^3.2.5",
|
||||
"echarts": "^6.0.0",
|
||||
"echarts4": "npm:echarts@^4.8.0",
|
||||
"element-ui": "^2.13.2",
|
||||
"ezuikit-js": "^7.7.8",
|
||||
"fabric": "^3.6.3",
|
||||
"flv.js": "^1.6.2",
|
||||
"gantt-elastic": "^1.0.12",
|
||||
"github-markdown-css": "^5.8.1",
|
||||
"h5player": "^2.0.0",
|
||||
"hls.js": "^1.4.3",
|
||||
"html-entities": "^2.5.2",
|
||||
"html2canvas": "^1.0.0-rc.7",
|
||||
"jquery": "^3.6.3",
|
||||
"jquery-ui-dist": "^1.13.2",
|
||||
"js-base64": "^3.7.2",
|
||||
"js-file-download": "^0.4.12",
|
||||
"js-md5": "^0.7.3",
|
||||
"konva": "^9.3.20",
|
||||
"lrz": "^4.9.41",
|
||||
"markdown-it": "^12.1.0",
|
||||
"mars3d": "^3.3.4",
|
||||
"mars3d-cesium": "^1.121.1",
|
||||
"mitt": "^3.0.1",
|
||||
"moment": "^2.29.1",
|
||||
"monitorjs_horse": "^2.2.1",
|
||||
"mqtt": "^4.2.6",
|
||||
"node-polyfill-webpack-plugin": "^2.0.1",
|
||||
"node-rsa": "^1.1.1",
|
||||
"postcss-normalize-string": "^5.1.0",
|
||||
"prismjs": "^1.30.0",
|
||||
"qrcodejs2": "0.0.2",
|
||||
"react": "^17.0.2",
|
||||
"sortablejs": "^1.15.6",
|
||||
"spark-md5": "^3.0.1",
|
||||
"style-resources-loader": "^1.3.3",
|
||||
"stylus-loader": "^3.0.2",
|
||||
"swiper": "^5.4.5",
|
||||
"turf": "^3.0.14",
|
||||
"typed.js": "^2.1.0",
|
||||
"vconsole": "^3.15.1",
|
||||
"videojs-contrib-hls": "^5.15.0",
|
||||
"vue": "^2.6.11",
|
||||
"vue-awesome-swiper": "^4.1.1",
|
||||
"vue-color": "^2.8.1",
|
||||
"vue-count-to": "^1.0.13",
|
||||
"vue-cropper": "^0.5.5",
|
||||
"vue-esign": "^1.1.4",
|
||||
"vue-matomo": "^4.1.0",
|
||||
"vue-monoplasty-slide-verify": "^1.3.1",
|
||||
"vue-photo-preview": "^1.1.3",
|
||||
"vue-quill-editor": "^3.0.6",
|
||||
"vue-router": "^3.2.0",
|
||||
"vue-seamless-scroll": "^1.1.23",
|
||||
"vue-simple-uploader": "^0.7.6",
|
||||
"vue2-scale-box": "^0.1.7",
|
||||
"vuedraggable": "^2.24.3",
|
||||
"vuescroll": "^4.16.1",
|
||||
"vuex": "^3.4.0",
|
||||
"vuex-persistedstate": "^3.1.0",
|
||||
"xhl-mqttx": "^1.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "~4.4.0",
|
||||
"@vue/cli-plugin-router": "~4.4.0",
|
||||
"@vue/cli-plugin-vuex": "~4.4.0",
|
||||
"@vue/cli-service": "~4.4.0",
|
||||
"compression-webpack-plugin": "^5.0.2",
|
||||
"file-loader": "^6.2.0",
|
||||
"less": "^3.0.4",
|
||||
"less-loader": "^5.0.0",
|
||||
"sass": "^1.75.0",
|
||||
"sass-loader": "^7.3.1",
|
||||
"stylus": "^0.54.8",
|
||||
"terser-webpack-plugin": "^4.2.3",
|
||||
"url-loader": "^4.1.1",
|
||||
"vue-cli-plugin-element": "~1.0.1",
|
||||
"vue-i18n": "^8.21.0",
|
||||
"vue-template-compiler": "^2.6.11"
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions",
|
||||
"not dead"
|
||||
]
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -359,12 +359,26 @@
|
||||
menuPath: '/project/labor/personManage',
|
||||
}"
|
||||
size="medium"
|
||||
@click="passEquipment()"
|
||||
@click="onBatchBinddevice()"
|
||||
type="primary"
|
||||
style="margin-left: 5px"
|
||||
:disabled="checkedWorker.length <= 0"
|
||||
>下发通行设备</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
|
||||
v-if="isIscDevice"
|
||||
v-permission="{
|
||||
@ -2196,7 +2210,7 @@
|
||||
: ""
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
<!-- <el-table-column
|
||||
:label="
|
||||
$t('message.personnelPosition.beaconManage.table.operation')
|
||||
"
|
||||
@ -2212,7 +2226,7 @@
|
||||
<span style="color: #5381f6">重试</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-table-column
|
||||
@ -2273,6 +2287,45 @@
|
||||
</div>
|
||||
</div>
|
||||
</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>
|
||||
</template>
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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"
|
||||
>下发通行设备</el-button
|
||||
>
|
||||
<!-- @click="passEquipment()" -->
|
||||
<el-button
|
||||
v-if="isIscDevice"
|
||||
v-permission="{
|
||||
@ -762,6 +763,16 @@
|
||||
:disabled="checkedWorker.length <= 0"
|
||||
>批量删除</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" -->
|
||||
<!-- style="margin-left: 5px" -->
|
||||
</div>
|
||||
@ -2534,6 +2545,45 @@
|
||||
</div>
|
||||
</div>
|
||||
</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>
|
||||
</template>
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user