fix: 人员管理和车辆黑白名单管理添加下发状态筛选

This commit is contained in:
kun 2024-06-15 13:48:27 +08:00
parent 153e8d9687
commit dea1172cdd
5 changed files with 2088 additions and 888 deletions

View File

@ -249,6 +249,8 @@
? 'red'
: row.sendSuccessStatus === 3
? 'yellow'
: row.sendSuccessStatus === 4
? 'red'
: '',
]"
>
@ -259,6 +261,8 @@
? "失败"
: row.sendSuccessStatus === 3
? "部分成功"
: row.sendSuccessStatus === 4
? '未下发'
: ""
}}</span
>
@ -1075,6 +1079,8 @@
? 'red'
: entityDetail.sendSuccessStatus === 3
? 'yellow'
: entityDetail.sendSuccessStatus === 4
? 'red'
: '',
]"
>
@ -1085,6 +1091,8 @@
? "失败"
: entityDetail.sendSuccessStatus === 3
? "部分成功"
: entityDetail.sendSuccessStatus === 4
? '未下发'
: ""
}}</span
>
@ -1310,6 +1318,7 @@ export default {
};
return {
sendStatusArr: [
{ name: "未下发", value: 4 },
{ name: "成功", value: 1 },
{ name: "失败", value: 2 },
{ name: "部分成功", value: 3 },

View File

@ -1,331 +1,415 @@
<template>
<div class="fullHeight">
<div class="searchBox whiteBlock">
<el-form>
<el-form-item>
<!-- v-permission="{ key: 'datavalidation_staffmanualcheck', menuPath: '/project/labor/dataValidation' }" -->
<!-- 人员手动校验 -->
<el-button type="primary" @click="onStaffIsCarManualCheck(1)">
人员手动校验
</el-button>
<!-- 车辆手动校验 -->
<el-button @click="onStaffIsCarManualCheck(2)" type="primary">
车辆手动校验
</el-button>
<!-- 批量同步 -->
<el-button @click="onBatchSynchronization()" type="primary">
批量同步
</el-button>
<el-button type="warning" plain @click="resetForm()">
{{ $t("message.personnelPosition.beaconManage.refresh") }}
</el-button>
<el-tooltip class="item" effect="light" placement="bottom-start">
<i class="el-icon-question"></i>
<div style="font-size: 14px" slot="content">
<p>
定时任务:每天凌晨做ISC与平台的人员组织信息人员基本信息人脸照片车辆基本信息数据比对<br />回所有比对结果手动批量同步同步成功后删除记录
</p>
<p style="margin-top: 6px">
人员手动校验:定时任务数据校验网络超时无法进行时使用手动校验ISC与平台的人员组织信息人员基<br />本信息人脸照片返回所有比对结果手动批量同步同步成功后删除记录
</p>
<p style="margin-top: 6px">
车辆手动校验:定时任务数据校验网络超时无法进行时使用手动校验ISC与平台的车辆基本信息返回所<br />有比对结果手动批量同步同步成功后删除记录
</p>
</div>
</el-tooltip>
</el-form-item>
</el-form>
</div>
<div class="table_wrap whiteBlock">
<el-tabs v-model="activeName" @tab-click="handleClick" style="padding: 0 15px">
<el-tab-pane label="人员组织" name="1"></el-tab-pane>
<el-tab-pane label="人员信息" name="2"></el-tab-pane>
<el-tab-pane label="人员照片" name="3"></el-tab-pane>
<el-tab-pane label="车辆信息" name="4"></el-tab-pane>
</el-tabs>
<el-table ref="multipleTable" class="tables" row-key="id" :data="tableList" @selection-change="handleSelectionChange">
<el-table-column align="center" type="selection" width="55" :reserve-selection="true">
</el-table-column>
<el-table-column show-overflow-tooltip v-if="activeName == '1'" align="center" prop="orgName"
label="组织名称"></el-table-column>
<el-table-column show-overflow-tooltip v-else-if="activeName == '2' || activeName == '3'" align="center"
prop="workerName" label="人员姓名"></el-table-column>
<el-table-column show-overflow-tooltip v-else-if="activeName == '4'" align="center" prop="carNumber"
label="车牌号"></el-table-column>
<el-table-column show-overflow-tooltip v-if="activeName == '2' || activeName == '3'" align="center" prop="idCard"
label="身份证号"></el-table-column>
<el-table-column align="center" label="ISC校验结果">
<template slot-scope="scope">
<div :class="scope.row.existIsc == 1 ? 'refreshbtn' : 'unrefreshbtn'">
{{ scope.row.existIsc == 1 ? "存在" : "不存在" }}
</div>
</template>
</el-table-column>
<el-table-column align="center" label="平台校验结果">
<template slot-scope="scope">
<div :class="
scope.row.existMyPlatform == 1 ? 'refreshbtn' : 'unrefreshbtn'
">
{{ scope.row.existMyPlatform == 1 ? "存在" : "不存在" }}
</div>
<!-- scope.row -->
</template>
</el-table-column>
<el-table-column align="center" label="同步结果">
<template slot-scope="scope">
<el-button class="synchronization" disabled :type="scope.row.syncResult == 1 ? 'info' : 'danger'">{{
scope.row.syncResult == 1 ? "未同步" : "同步失败"
}}</el-button>
<!-- <el-button class="synchronization" disabled type="danger">同步失败</el-button>
<el-button class="synchronization" disabled type="success">同步成功</el-button> -->
</template>
</el-table-column>
<el-table-column align="center" label="操作">
<template slot-scope="scope">
<!-- unrefreshbtn -->
<div @click="onHikvisionSync(scope.row.id)"
:class="scope.row.syncResult == 1 ? 'refreshbtn' : 'unrefreshbtn'" class="accessory">
<i class="el-icon-refresh"></i>
{{ scope.row.syncResult == 1 ? "同步" : "重试" }}
</div>
</template>
</el-table-column>
</el-table>
<el-pagination class="pagerBox" @size-change="sizeChange" @current-change="currentChange"
:current-page="pagInfo.pageNo" :page-sizes="pageSizeList" :page-size="pagInfo.pageSize"
layout="total, sizes, prev, pager, next" :total="Number(pagInfo.total)" background></el-pagination>
</div>
<div class="fullHeight">
<div class="searchBox whiteBlock">
<el-form>
<el-form-item>
<!-- v-permission="{ key: 'datavalidation_staffmanualcheck', menuPath: '/project/labor/dataValidation' }" -->
<!-- 人员手动校验 -->
<el-button
type="primary"
@click="onStaffIsCarManualCheck(1)"
v-permission="{
key: 'dataValidation_member_validator',
menuPath: '/project/labor/dataValidation',
}"
>
人员手动校验
</el-button>
<!-- 车辆手动校验 -->
<el-button
@click="onStaffIsCarManualCheck(2)"
type="primary"
v-permission="{
key: 'dataValidation_car_validator',
menuPath: '/project/labor/dataValidation',
}"
>
车辆手动校验
</el-button>
<!-- 批量同步 -->
<el-button
@click="onBatchSynchronization()"
type="primary"
v-permission="{
key: 'dataValidation_batch_sync',
menuPath: '/project/labor/dataValidation',
}"
>
批量同步
</el-button>
<el-button type="warning" plain @click="resetForm()">
{{ $t("message.personnelPosition.beaconManage.refresh") }}
</el-button>
<el-tooltip class="item" effect="light" placement="bottom-start">
<i class="el-icon-question"></i>
<div style="font-size: 14px" slot="content">
<p>
定时任务:每天凌晨做ISC与平台的人员组织信息人员基本信息人脸照片车辆基本信息数据比对<br />回所有比对结果手动批量同步同步成功后删除记录
</p>
<p style="margin-top: 6px">
人员手动校验:定时任务数据校验网络超时无法进行时使用手动校验ISC与平台的人员组织信息人员基<br />本信息人脸照片返回所有比对结果手动批量同步同步成功后删除记录
</p>
<p style="margin-top: 6px">
车辆手动校验:定时任务数据校验网络超时无法进行时使用手动校验ISC与平台的车辆基本信息返回所<br />有比对结果手动批量同步同步成功后删除记录
</p>
</div>
</el-tooltip>
</el-form-item>
</el-form>
</div>
<div class="table_wrap whiteBlock">
<el-tabs
v-model="activeName"
@tab-click="handleClick"
style="padding: 0 15px"
>
<el-tab-pane label="人员组织" name="1"></el-tab-pane>
<el-tab-pane label="人员信息" name="2"></el-tab-pane>
<el-tab-pane label="人员照片" name="3"></el-tab-pane>
<el-tab-pane label="车辆信息" name="4"></el-tab-pane>
</el-tabs>
<el-table
ref="multipleTable"
class="tables"
row-key="id"
:data="tableList"
@selection-change="handleSelectionChange"
>
<el-table-column
align="center"
type="selection"
width="55"
:reserve-selection="true"
>
</el-table-column>
<el-table-column
show-overflow-tooltip
v-if="activeName == '1'"
align="center"
prop="orgName"
label="组织名称"
></el-table-column>
<el-table-column
show-overflow-tooltip
v-else-if="activeName == '2' || activeName == '3'"
align="center"
prop="workerName"
label="人员姓名"
></el-table-column>
<el-table-column
show-overflow-tooltip
v-else-if="activeName == '4'"
align="center"
prop="carNumber"
label="车牌号"
></el-table-column>
<el-table-column
show-overflow-tooltip
v-if="activeName == '2' || activeName == '3'"
align="center"
prop="idCard"
label="身份证号"
></el-table-column>
<el-table-column align="center" label="ISC校验结果">
<template slot-scope="scope">
<div
:class="scope.row.existIsc == 1 ? 'refreshbtn' : 'unrefreshbtn'"
>
{{ scope.row.existIsc == 1 ? "存在" : "不存在" }}
</div>
</template>
</el-table-column>
<el-table-column align="center" label="平台校验结果">
<template slot-scope="scope">
<div
:class="
scope.row.existMyPlatform == 1 ? 'refreshbtn' : 'unrefreshbtn'
"
>
{{ scope.row.existMyPlatform == 1 ? "存在" : "不存在" }}
</div>
<!-- scope.row -->
</template>
</el-table-column>
<el-table-column align="center" label="同步结果">
<template slot-scope="scope">
<el-button
class="synchronization"
disabled
:type="scope.row.syncResult == 1 ? 'info' : 'danger'"
>{{
scope.row.syncResult == 1 ? "未同步" : "同步失败"
}}</el-button
>
<!-- <el-button class="synchronization" disabled type="danger">同步失败</el-button>
<el-button class="synchronization" disabled type="success">同步成功</el-button> -->
</template>
</el-table-column>
<el-table-column align="center" label="操作">
<template slot-scope="scope">
<!-- unrefreshbtn -->
<div
v-permission="{
key: 'dataValidation_sync',
menuPath: '/project/labor/dataValidation',
}"
@click="onHikvisionSync(scope.row.id)"
:class="scope.row.syncResult == 1 ? 'refreshbtn' : 'unrefreshbtn'"
class="accessory"
>
<i class="el-icon-refresh"></i>
{{ scope.row.syncResult == 1 ? "同步" : "重试" }}
</div>
</template>
</el-table-column>
</el-table>
<el-pagination
class="pagerBox"
@size-change="sizeChange"
@current-change="currentChange"
:current-page="pagInfo.pageNo"
:page-sizes="pageSizeList"
:page-size="pagInfo.pageSize"
layout="total, sizes, prev, pager, next"
:total="Number(pagInfo.total)"
background
></el-pagination>
</div>
</div>
</template>
<script>
import {
getHikvisionExceptionApi,
getHikvisionPageApi,
getHikvisionSyncApi,
getHikvisionManualCompareApi,
getHikvisionExceptionApi,
getHikvisionPageApi,
getHikvisionSyncApi,
getHikvisionManualCompareApi,
} from "@/assets/js/api/laborPerson";
import mqtt from "mqtt";
var client = null;
const options = {
connectTimeout: 40000,
clientId: "mqttjs_" + Math.random().toString(16).substr(2, 8),
username: "root",
password: "123456",
clean: true,
connectTimeout: 40000,
clientId: "mqttjs_" + Math.random().toString(16).substr(2, 8),
username: "root",
password: "123456",
clean: true,
};
export default {
data() {
return {
pageSizeList: [],
projectSn: "",
activeName: "1", //tab
pagInfo: {
//
pageNo: 1,
pageSize: 10,
total: 0,
},
tableList: [],
multipleSelection: [],
topicName: "topic",
userId: "",
};
data() {
return {
pageSizeList: [],
projectSn: "",
activeName: "1", //tab
pagInfo: {
//
pageNo: 1,
pageSize: 10,
total: 0,
},
tableList: [],
multipleSelection: [],
topicName: "topic",
userId: "",
};
},
created() {
this.projectSn = this.$store.state.projectSn;
this.getHikvisionException();
this.pageSizeList = JSON.parse(JSON.stringify(this.$store.state.PAGESIZRS));
// this.tableList = [
// {
// id: "1",
// name: "",
// workerName: "",
// syncResult: 1,
// idCard: "123456",
// carNumber: "G-320"
// },
// {
// id: "2",
// name: "",
// workerName: "",
// syncResult: 2,
// idCard: "1234567",
// carNumber: "G-320"
// },
// ];
},
mounted() {
this.userId = this.$store.state.userInfo.userId;
this.topicName = this.$store.state.userInfo.scope;
client = mqtt.connect(mqttUrl, options);
this.mqttMSG();
},
methods: {
// mqtt
mqttMSG() {
// mqtt +"/#" +workerId
client.on("connect", (e) => {
// console.log(':', this.topicName + this.userId)
client.subscribe(this.topicName + this.userId, { qos: 0 }, (error) => {
if (!error) {
// console.log('123')
} else {
console.log("订阅失败");
}
});
});
//
client.on("message", (topic, message) => {
console.log(message);
this.getHikvisionPage();
});
//
// client.on("reconnect", (error) => {
// console.log(":", error);
// });
//
client.on("error", (error) => {
console.log("连接失败:", error);
});
},
created() {
this.projectSn = this.$store.state.projectSn;
this.getHikvisionException();
this.pageSizeList = JSON.parse(JSON.stringify(this.$store.state.PAGESIZRS));
// this.tableList = [
// {
// id: "1",
// name: "",
// workerName: "",
// syncResult: 1,
// idCard: "123456",
// carNumber: "G-320"
// },
// {
// id: "2",
// name: "",
// workerName: "",
// syncResult: 2,
// idCard: "1234567",
// carNumber: "G-320"
// },
// ];
},
mounted() {
this.userId = this.$store.state.userInfo.userId;
this.topicName = this.$store.state.userInfo.scope;
client = mqtt.connect(mqttUrl, options);
this.mqttMSG();
},
methods: {
// mqtt
mqttMSG() {
// mqtt +"/#" +workerId
client.on("connect", (e) => {
// console.log(':', this.topicName + this.userId)
client.subscribe(this.topicName + this.userId, { qos: 0 }, (error) => {
if (!error) {
// console.log('123')
} else {
console.log("订阅失败");
}
});
});
//
client.on("message", (topic, message) => {
console.log(message);
this.getHikvisionPage();
});
//
// client.on("reconnect", (error) => {
// console.log(":", error);
// });
//
client.on("error", (error) => {
console.log("连接失败:", error);
});
},
// ||
onBatchSynchronization() {
if (this.multipleSelection.length == 0) {
this.$message.warning("请选择需要同步的数据!");
return;
}
// ||
onBatchSynchronization() {
if (this.multipleSelection.length == 0) {
this.$message.warning("请选择需要同步的数据!");
return;
}
console.log(this.multipleSelection);
const ids = this.multipleSelection.map((item) => item.id).join(",");
this.onHikvisionSync(ids);
},
onHikvisionSync(ids) {
getHikvisionSyncApi({
projectSn: this.projectSn,
ids,
}).then((res) => {
if (res.code == 200) {
this.$message.success(res.message);
} else {
this.$message.error(res.result.msg);
}
});
},
//
handleSelectionChange(val) {
this.multipleSelection = val;
},
// |
onStaffIsCarManualCheck(type) {
getHikvisionManualCompareApi({
projectSn: this.projectSn,
type: type,
}).then((res) => {
if (res.code == 200) {
this.$message.success(res.message);
this.getHikvisionPage();
} else {
this.$message.error(res.message);
}
});
},
//
getHikvisionException() {
getHikvisionExceptionApi({
projectSn: this.projectSn,
type: Number(this.activeName),
}).then((res) => {
console.log(res);
if (res.code == 200) {
this.getHikvisionPage();
} else {
this.$message.error(res.result.msg);
}
});
},
//
getHikvisionPage() {
getHikvisionPageApi({
projectSn: this.projectSn,
pageNo: this.pagInfo.pageNo,
pageSize: this.pagInfo.pageSize,
type: Number(this.activeName),
}).then((res) => {
if (res.code == 200) {
this.tableList = res.result.records;
this.pagInfo.total = res.result.total;
if(+res.result.total>this.pageSizeList[this.pageSizeList.length - 1]){
this.pageSizeList.push(+res.result.total)
}
}
});
},
//Tab
handleClick(val) {
// console.log(val.name);
this.activeName = val.name;
this.$refs.multipleTable.clearSelection();
this.pageSizeList = JSON.parse(JSON.stringify(this.$store.state.PAGESIZRS));
this.initClear();
this.getHikvisionPage();
},
//
initClear() {
this.pagInfo = {
pageNo: 1,
pageSize: 10,
total: 0,
};
this.multipleSelection = [];
},
//
resetForm() {
this.initClear();
this.getHikvisionException();
},
//
sizeChange(val) {
this.pagInfo.pageSize = val;
this.getHikvisionPage();
},
//
currentChange(val) {
this.pagInfo.pageNo = val;
this.getHikvisionPage();
},
console.log(this.multipleSelection);
const ids = this.multipleSelection.map((item) => item.id).join(",");
this.onHikvisionSync(ids);
},
onHikvisionSync(ids) {
getHikvisionSyncApi({
projectSn: this.projectSn,
ids,
}).then((res) => {
if (res.code == 200) {
this.$message.success(res.message);
} else {
this.$message.error(res.result.msg);
}
});
},
//
handleSelectionChange(val) {
this.multipleSelection = val;
},
// |
onStaffIsCarManualCheck(type) {
getHikvisionManualCompareApi({
projectSn: this.projectSn,
type: type,
}).then((res) => {
if (res.code == 200) {
this.$message.success(res.message);
this.getHikvisionPage();
} else {
this.$message.error(res.message);
}
});
},
//
getHikvisionException() {
getHikvisionExceptionApi({
projectSn: this.projectSn,
type: Number(this.activeName),
}).then((res) => {
console.log(res);
if (res.code == 200) {
this.getHikvisionPage();
} else {
this.$message.error(res.result.msg);
}
});
},
//
getHikvisionPage() {
getHikvisionPageApi({
projectSn: this.projectSn,
pageNo: this.pagInfo.pageNo,
pageSize: this.pagInfo.pageSize,
type: Number(this.activeName),
}).then((res) => {
if (res.code == 200) {
this.tableList = res.result.records;
this.pagInfo.total = res.result.total;
if (
+res.result.total > this.pageSizeList[this.pageSizeList.length - 1]
) {
this.pageSizeList.push(+res.result.total);
}
}
});
},
//Tab
handleClick(val) {
// console.log(val.name);
this.activeName = val.name;
this.$refs.multipleTable.clearSelection();
this.pageSizeList = JSON.parse(
JSON.stringify(this.$store.state.PAGESIZRS)
);
this.initClear();
this.getHikvisionPage();
},
//
initClear() {
this.pagInfo = {
pageNo: 1,
pageSize: 10,
total: 0,
};
this.multipleSelection = [];
},
//
resetForm() {
this.initClear();
this.getHikvisionException();
},
//
sizeChange(val) {
this.pagInfo.pageSize = val;
this.getHikvisionPage();
},
//
currentChange(val) {
this.pagInfo.pageNo = val;
this.getHikvisionPage();
},
},
};
</script>
<style lang="less" scoped>
/deep/ .el-icon-question {
font-size: 22px;
margin-left: 10px;
font-size: 22px;
margin-left: 10px;
}
.synchronization {
padding: 8px 16px;
cursor: text !important;
padding: 8px 16px;
cursor: text !important;
}
.refreshbtn {
color: #5181f6;
color: #5181f6;
}
.unrefreshbtn {
color: #f56c6c;
color: #f56c6c;
}
.tables {
min-height: 535px;
max-height: calc(100% - 128px);
min-height: 535px;
max-height: calc(100% - 128px);
}
.pagerBox {
margin-top: 30px;
margin-top: 30px;
}
.accessory {
cursor: pointer;
cursor: pointer;
}
</style>

View File

@ -213,7 +213,8 @@
></i>
</div>
<div class="laborComponent_table_wrap whiteBlock">
<div class="search_wrap" :class="{ flex: COMPANY != 'nanchang' }">
<!-- :class="{ flex: COMPANY != 'nanchang' }" -->
<div class="search_wrap">
<!-- 人员录入 -->
<el-button
v-permission="{
@ -289,17 +290,45 @@
size="medium"
@click="passEquipment()"
type="primary"
style="margin-left: 5px; margin-right: 10px"
style="margin-left: 5px;"
:disabled="checkedWorker.length <= 0"
>下发通行设备</el-button
>
<!-- <br /> -->
<el-button
v-if="isIscDevice"
v-permission="{
key: 'rygl_distributeAccessEquipment',
menuPath: '/project/labor/personManage',
}"
size="medium"
@click="checkAllFn()"
type="primary"
style="margin-left: 5px;"
>全选</el-button
>
<br />
<el-form
:inline="true"
:model="tableParameter"
size="medium"
class="demo-form-inline"
style="margin-left: 5px"
style="margin-top: 5px;"
>
<el-form-item label="人员下发状态" v-if="isIscDevice">
<el-select
size="medium"
v-model="tableParameter.sendSuccessStatus"
placeholder="请选择"
style="width: 120px"
>
<el-option
v-for="(item, index) in sendStatusArr"
:key="index"
:label="item.name"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('message.laborMange.workingState')">
<el-select
v-model="tableParameter.inserviceType"
@ -388,12 +417,9 @@
key: 'rygl_refresh',
menuPath: '/project/labor/personManage',
}" -->
<el-button
type="warning"
@click="refreshBtn"
plain
>{{ $t("message.laborMange.refresh") }}</el-button
>
<el-button type="warning" @click="refreshBtn" plain>{{
$t("message.laborMange.refresh")
}}</el-button>
<!-- 导出 -->
<el-button
title="按班组导出"
@ -415,7 +441,7 @@
</el-form-item>
</el-form>
</div>
<vue-scroll style="height: calc(100% - 80px)">
<vue-scroll style="height: calc(100% - 100px)">
<el-table
ref="multipleTable"
:data="tableListData"
@ -567,12 +593,8 @@
v-if="scope.row.inserviceType == 1"
>{{ $t("message.laborMange.bowOutWith") }}</el-button
>
<!-- 删除人员 -->
<!-- 再次进场 -->
<el-button
v-permission="{
key: 'rygl_delete',
menuPath: '/project/labor/personManage',
}"
size="medium"
type="text"
class="operationText"
@ -580,7 +602,12 @@
v-if="scope.row.inserviceType == 2"
>{{ $t("message.laborMange.toPlayAgain") }}</el-button
>
<!-- 删除人员 -->
<div
v-permission="{
key: 'rygl_delete',
menuPath: '/project/labor/personManage',
}"
class="operationText"
@click="removeWorkerInfo(scope.row)"
>
@ -665,6 +692,7 @@
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="page"
:page-sizes="pageSizeList"
:page-size="pageSize"
layout="total, sizes, prev, pager, next"
:total="Number(total)"
@ -2413,6 +2441,13 @@ export default {
},
data() {
return {
pageSizeList: [],
sendStatusArr: [
{ name: "未下发", value: 4 },
{ name: "成功", value: 1 },
{ name: "失败", value: 2 },
{ name: "部分成功", value: 3 },
],
issuePointList: [],
typeRadio: 1,
refreshPage: true, //
@ -2501,6 +2536,7 @@ export default {
teamId: "",
workerName: "",
inserviceType: "",
sendSuccessStatus: null,
enterDate: "",
codeState: "",
},
@ -2609,6 +2645,7 @@ export default {
};
},
created() {
this.pageSizeList = JSON.parse(JSON.stringify(this.$store.state.PAGESIZRS));
this.projectSn = this.$store.state.projectSn;
this.uploadUrl = this.$store.state.UPLOADURL;
this.fileUrl = this.$store.state.FILEURL;
@ -2772,14 +2809,23 @@ export default {
this.imgFileList = [];
this.imgImportDialog = true;
},
checkAllFn() {
//
this.$refs.multipleTable.toggleAllSelection();
},
//
passEquipment() {
sendBatchWokerApi({
let requestData = {
projectSn: this.projectSn,
personType: "1",
userId: this.$store.state.userInfo.userId,
enterpriseId: this.checkedId,
}).then((res) => {
enterpriseId: this.checkedId
}
if(this.checkedWorker.length > 0){
const ids = this.checkedWorker.map((item) => item.id).join(",");
requestData.workerIds = ids
}
sendBatchWokerApi(requestData).then((res) => {
if (res.code == 200) {
this.$message({
message: "操作成功,已在后台下发,请稍后查看!",
@ -2995,7 +3041,7 @@ export default {
if (result.success) {
if (result.result) {
this.isUploadToHouse = result.result.housing ? true : false;
this.isIscDevice = result.result.supplierType == 9 ? true: false;
this.isIscDevice = result.result.supplierType == 9 ? true : false;
}
}
});
@ -3443,6 +3489,11 @@ export default {
this.checkAllStatus =
this.tableListData.length == 0 ? true : boole ? true : false;
this.total = res.result.total;
if (
+res.result.total > this.pageSizeList[this.pageSizeList.length - 1]
) {
this.pageSizeList.push(+res.result.total);
}
}
});
},
@ -3948,6 +3999,7 @@ export default {
this.tableParameter.idCard = "";
this.tableParameter.workerName = "";
this.tableParameter.inserviceType = "";
this.tableParameter.sendSuccessStatus = null;
this.tableParameter.enterDate = "";
this.tableParameter.codeState = "";
this.getTableData();
@ -3971,7 +4023,7 @@ export default {
this.$message.error(this.$t("message.companyDiagram.uploadMsg")); //
return false;
} else if (type == 7) {
console.log(file)
console.log(file);
if (
file.type != "image/jpeg" &&
file.type != "image/jpg"
@ -3981,9 +4033,9 @@ export default {
return false;
}
let imgSize = Number(file.size / 1024);
console.log(11111111, imgSize)
console.log(11111111, imgSize);
if (imgSize <= 10 || imgSize >= 200) {
this.$message.error("文件大小不能超过200kb小于10kb,请重新上传!")
this.$message.error("文件大小不能超过200kb小于10kb,请重新上传!");
return false;
}
}
@ -4692,13 +4744,13 @@ export default {
});
},
tableRowClassName({ row, rowIndex }) {
if(!this.isIscDevice){
return
if (!this.isIscDevice) {
return;
}
if (row.sendSuccessStatus === 1) {
return "green2";
}
if (row.sendSuccessStatus === 2) {
if (row.sendSuccessStatus === 2 || row.sendSuccessStatus === 4) {
return "red2";
}
if (row.sendSuccessStatus === 3) {

View File

@ -180,8 +180,22 @@
@click="memberRegister"
>人员录入</el-button
>
<el-button type="primary" @click="checkAllFn">全选</el-button>
<el-button type="primary" @click="onBatchSynchronization"
<el-button
type="primary"
@click="checkAllFn"
v-permission="{
key: 'hmc_batch_authorization',
menuPath: '/project/labor/roster',
}"
>全选</el-button
>
<el-button
type="primary"
@click="onBatchSynchronization"
v-permission="{
key: 'hmc_batch_authorization',
menuPath: '/project/labor/roster',
}"
>批量授权门禁权限</el-button
>
</el-form-item>
@ -388,7 +402,7 @@
: row.sendSuccessStatus === 3
? 'yellow'
: row.sendSuccessStatus === 4
? ''
? 'red'
: '',
]"
>
@ -1625,7 +1639,7 @@ export default {
if (row.sendSuccessStatus === 1) {
return "green2";
}
if (row.sendSuccessStatus === 2) {
if (row.sendSuccessStatus === 2 || row.sendSuccessStatus === 4) {
return "red2";
}
if (row.sendSuccessStatus === 3) {