first commit

This commit is contained in:
zc
2025-06-05 09:55:41 +08:00
commit 935360c185
459 changed files with 61034 additions and 0 deletions

View File

@@ -0,0 +1,507 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="识别记录日期" prop="showDate">
<!-- <el-date-picker clearable
v-model="queryParams.showDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择"
/> -->
<el-date-picker
v-model="dataArr"
type="datetimerange"
range-separator=""
@change="dataChange"
format="yyyy-MM-dd HH:mm"
value-format="yyyy-MM-dd HH:mm"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item label="设备名称" prop="equipmentId">
<el-select v-model="queryParams.equipmentId" placeholder="请选择" clearable @keyup.enter.native="handleQuery" @change="$forceUpdate()">
<el-option
v-for="item in equipmentOptions"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item label="人员姓名" prop="peopleName">
<el-input
v-model="queryParams.peopleName"
placeholder="请输入人员姓名"
clearable
@input="$forceUpdate()"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="施工单位" prop="visitingUnit">
<el-input
v-model="queryParams.visitingUnit"
placeholder="请输入施工单位"
clearable
@input="$forceUpdate()"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="部门名称" prop="branchName">
<el-input
v-model="queryParams.branchName"
placeholder="请输入部门名称"
clearable
@input="$forceUpdate()"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:peopleRecord:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:peopleRecord:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="peopleRecordList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="识别时间" align="center" prop="showDate" min-width="105">
<template v-slot="scope">
<span>{{ parseTime(scope.row.showDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="设备名称" align="center" prop="deviceName" min-width="100">
<template v-slot="scope">
<template v-if="scope.row.equipment!=null" >
{{scope.row.equipment.name}}
</template>
</template>
</el-table-column>
<el-table-column label="工号" align="center" prop="gh" min-width="105"/>
<el-table-column label="部门" align="center" prop="branchName" min-width="120"/>
<el-table-column label="施工单位" align="center" prop="visitingUnit" min-width="120"/>
<el-table-column label="人员姓名" align="center" prop="admitName" min-width="100">
<template v-slot="scope">
<template v-if="scope.row.peopleName!=null" >
{{scope.row.peopleName}}
</template>
</template>
</el-table-column>
<el-table-column label="设备序列号" align="center" prop="deviceNo" min-width="100"/>
<el-table-column label="识别模式" align="center" prop="recMode" min-width="100">
<template v-slot="scope">
<template v-if="scope.row.recMode=='0'">
人像验证
</template>
<template v-if="scope.row.recMode=='1'">
人卡合一
</template>
<template v-if="scope.row.recMode=='2'">
人证比对
</template>
<template v-if="scope.row.recMode=='3'">
刷卡验证
</template>
<template v-if="scope.row.recMode=='4'">
按钮开门
</template>
<template v-if="scope.row.recMode=='5'">
远程开门
</template>
<template v-if="scope.row.recMode=='6'">
密码开门
</template>
<template v-if="scope.row.recMode=='7'">
密码识别
</template>
<template v-if="scope.row.recMode=='8'">
二维码识别
</template>
<template v-if="scope.row.recMode=='9'">
指纹比对
</template>
<template v-if="scope.row.recMode=='10'">
二维码&人像验证
</template>
<template v-if="scope.row.recMode=='12'">
身份证验证
</template>
</template>
</el-table-column>
<el-table-column label="现场照" align="center" prop="filePath" >
<template v-slot="scope">
<el-image style="width: 80px; height: 80px" :src="scope.row.filePath" fit="cover"
:preview-src-list="[scope.row.filePath]"
/>
</template>
</el-table-column>
<!-- <el-table-column label="人员比对结果" align="center" prop="type" min-width="100">
<template v-slot="scope">
<template v-if="scope.row.type=='1'">
比对成功
</template>
<template v-if="scope.row.type=='2'">
比对失败
</template>
</template>
</el-table-column>-->
<el-table-column label="识别卡号" align="center" prop="cardNo" min-width="100"/>
<!-- <el-table-column label="有效日期" align="center" prop="permissionTimeType" min-width="100">
<template v-slot="scope">
<template v-if="scope.row.passTimeType=='1'">
有效期内
</template>
<template v-if="scope.row.passTimeType=='2'">
有效期外
</template>
<template v-if="scope.row.passTimeType=='3'">
未进行有效期判断
</template>
</template>
</el-table-column>
<el-table-column label="有效时间段" align="center" prop="passTimeType" min-width="100">
<template v-slot="scope">
<template v-if="scope.row.passTimeType=='1'">
时间段内
</template>
<template v-if="scope.row.passTimeType=='2'">
时间段外
</template>
<template v-if="scope.row.passTimeType=='3'">
未进行时间段判断
</template>
</template>
</el-table-column>-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:peopleRecord:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改人员识别记录对话框 -->
<!-- <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="人员id" prop="peopleId">
<el-input v-model="form.peopleId" placeholder="请输入人员id" />
</el-form-item>
<el-form-item label="设备id" prop="equipmentId">
<el-input v-model="form.equipmentId" placeholder="请输入设备id" />
</el-form-item>
<el-form-item label="设备内网ip" prop="deviceIp">
<el-input v-model="form.deviceIp" placeholder="请输入设备内网ip" />
</el-form-item>
<el-form-item label="人员guid 或者STRANGERBABY" prop="admitGuid">
<el-input v-model="form.admitGuid" placeholder="请输入人员guid 或者STRANGERBABY" />
</el-form-item>
<el-form-item label="识别模式,1:人像识别, 2:刷卡识别 ,3:人卡合一 4,人证比对 7:密码识别 8 二维码识别" prop="recMode">
<el-input v-model="form.recMode" placeholder="请输入识别模式,1:人像识别, 2:刷卡识别 ,3:人卡合一 4,人证比对 7:密码识别 8 二维码识别" />
</el-form-item>
<el-form-item label="现场照url" prop="filePath">
<el-input v-model="form.filePath" placeholder="请输入现场照url" />
</el-form-item>
<el-form-item label="识别记录时间戳" prop="showTime">
<el-input v-model="form.showTime" placeholder="请输入识别记录时间戳" />
</el-form-item>
<el-form-item label="识别记录时间" prop="showDate">
<el-date-picker clearable
v-model="form.showDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择识别记录时间">
</el-date-picker>
</el-form-item>
<el-form-item label="识别分数" prop="recScore">
<el-input v-model="form.recScore" placeholder="请输入识别分数" />
</el-form-item>
<el-form-item label="设备序列号" prop="deviceNo">
<el-input v-model="form.deviceNo" placeholder="请输入设备序列号" />
</el-form-item>
<el-form-item label="软件版本号" prop="deviceVersion">
<el-input v-model="form.deviceVersion" placeholder="请输入软件版本号" />
</el-form-item>
<el-form-item label="设备来源" prop="source">
<el-input v-model="form.source" placeholder="请输入设备来源" />
</el-form-item>
<el-form-item label="识别卡号" prop="cardNo">
<el-input v-model="form.cardNo" placeholder="请输入识别卡号" />
</el-form-item>
<el-form-item label="设备名称" prop="deviceName">
<el-input v-model="form.deviceName" placeholder="请输入设备名称" />
</el-form-item>
<el-form-item label="结果" prop="result">
<el-input v-model="form.result" placeholder="请输入结果" />
</el-form-item>
<el-form-item label="保留字段" prop="storageId">
<el-input v-model="form.storageId" placeholder="请输入保留字段" />
</el-form-item>
<el-form-item label="当前时间戳" prop="timestamp">
<el-input v-model="form.timestamp" placeholder="请输入当前时间戳" />
</el-form-item>
<el-form-item label="识别主体姓名" prop="admitName">
<el-input v-model="form.admitName" placeholder="请输入识别主体姓名" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>-->
</div>
</template>
<script>
import moment from 'moment';
import { listPeopleRecord, getPeopleRecord, delPeopleRecord, addPeopleRecord, updatePeopleRecord } from "@/api/system/peopleRecord";
import {alllistEquipment} from "@/api/system/equipment";
import {listSysPeople} from "@/api/system/sysPeople";
export default {
name: "PeopleRecord",
data() {
return {
dataArr:[],
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 人员识别记录表格数据
peopleRecordList: [],
equipmentOptions:[],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
peopleId: null,
equipmentId: null,
deviceIp: null,
admitGuid: null,
recMode: null,
filePath: null,
showTime: null,
showDate: null,
aliveType: null,
recScore: null,
deviceNo: null,
deviceVersion: null,
source: null,
type: null,
cardNo: null,
deviceName: null,
recType: null,
result: null,
permissionTimeType: null,
passTimeType: null,
recModeType: null,
storageId: null,
timestamp: null,
admitName: null,
flag:this.$route.query.flag,
},
// 表单参数
form: {
flag:this.$route.query.flag,
},
// 表单校验
rules: {
},
queryParams1: {
bigtype: 2,
},
};
},
created() {
this.getList();
this.getOptions();
},
methods: {
/** 查询选项列表 */
getOptions() {
this.equipmentOptions = []
alllistEquipment(this.queryParams1).then(response => {
this.equipmentOptions = response.data
})
},
/** 查询人员识别记录列表 */
getList() {
this.loading = true;
listPeopleRecord(this.queryParams).then(response => {
this.peopleRecordList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: null,
peopleId: null,
equipmentId: null,
deviceIp: null,
admitGuid: null,
recMode: null,
filePath: null,
showTime: null,
showDate: null,
aliveType: null,
recScore: null,
deviceNo: null,
deviceVersion: null,
source: null,
type: null,
cardNo: null,
deviceName: null,
recType: null,
result: null,
permissionTimeType: null,
passTimeType: null,
recModeType: null,
storageId: null,
timestamp: null,
admitName: null,
remark: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
//this.dataArr = [];
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.dataArr = [];
this.queryParams.showDateState = '';
this.queryParams.showDateEnd = '';
this.handleQuery();
},
dataChange(e){
this.queryParams.showDateState = moment(e[0]).format('yyyy-MM-DD HH:mm');
this.queryParams.showDateEnd = moment(e[1]).format('yyyy-MM-DD HH:mm');
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加人员识别记录";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getPeopleRecord(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改人员识别记录";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updatePeopleRecord(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addPeopleRecord(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除人员识别记录编号为"' + ids + '"的数据项?').then(function() {
return delPeopleRecord(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/peopleRecord/export', {
...this.queryParams
}, `peopleRecord_${new Date().getTime()}.xlsx`)
}
}
};
</script>