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

View File

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

View File

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

View File

@ -180,8 +180,22 @@
@click="memberRegister" @click="memberRegister"
>人员录入</el-button >人员录入</el-button
> >
<el-button type="primary" @click="checkAllFn">全选</el-button> <el-button
<el-button type="primary" @click="onBatchSynchronization" 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-button
> >
</el-form-item> </el-form-item>
@ -388,7 +402,7 @@
: row.sendSuccessStatus === 3 : row.sendSuccessStatus === 3
? 'yellow' ? 'yellow'
: row.sendSuccessStatus === 4 : row.sendSuccessStatus === 4
? '' ? 'red'
: '', : '',
]" ]"
> >
@ -1625,7 +1639,7 @@ export default {
if (row.sendSuccessStatus === 1) { if (row.sendSuccessStatus === 1) {
return "green2"; return "green2";
} }
if (row.sendSuccessStatus === 2) { if (row.sendSuccessStatus === 2 || row.sendSuccessStatus === 4) {
return "red2"; return "red2";
} }
if (row.sendSuccessStatus === 3) { if (row.sendSuccessStatus === 3) {