|
@@ -7,7 +7,7 @@
|
|
|
:search="search"
|
|
|
>
|
|
|
<template #extraItem>
|
|
|
- <a-form-model-item label="人员姓名">
|
|
|
+ <a-form-model-item label="人员姓名: ">
|
|
|
<a-input
|
|
|
style="width: 200px"
|
|
|
v-model="queryData.name"
|
|
@@ -69,6 +69,8 @@
|
|
|
import ReportQuery from "@/components/report/common/reportQuery.vue";
|
|
|
import Card from "@/components/common/card.vue";
|
|
|
import * as XLSX from "xlsx";
|
|
|
+import html2canvas from "html2canvas";
|
|
|
+import jsPDF from "jspdf";
|
|
|
export default {
|
|
|
components: {
|
|
|
Card,
|
|
@@ -139,6 +141,12 @@ export default {
|
|
|
key: "name",
|
|
|
align: "center",
|
|
|
},
|
|
|
+ {
|
|
|
+ title: "身份证号",
|
|
|
+ dataIndex: "ID",
|
|
|
+ key: "ID",
|
|
|
+ align: "center",
|
|
|
+ },
|
|
|
{
|
|
|
title: "人员类型",
|
|
|
dataIndex: "people_type",
|
|
@@ -146,7 +154,7 @@ export default {
|
|
|
align: "center",
|
|
|
},
|
|
|
{
|
|
|
- title: "部门",
|
|
|
+ title: "所属部门名称",
|
|
|
dataIndex: "department",
|
|
|
key: "department",
|
|
|
align: "center",
|
|
@@ -157,7 +165,7 @@ export default {
|
|
|
key: "time",
|
|
|
},
|
|
|
{
|
|
|
- title: "通行设备",
|
|
|
+ title: "设备名称",
|
|
|
dataIndex: "equipment",
|
|
|
key: "equipment",
|
|
|
align: "center",
|
|
@@ -169,7 +177,7 @@ export default {
|
|
|
align: "center",
|
|
|
},
|
|
|
{
|
|
|
- title: "行为感知",
|
|
|
+ title: "异常类型",
|
|
|
key: "operation",
|
|
|
fixed: "right",
|
|
|
width: 100,
|
|
@@ -180,6 +188,7 @@ export default {
|
|
|
{
|
|
|
key: "1",
|
|
|
name: "潘夏彤",
|
|
|
+ ID:"332987********8765",
|
|
|
people_type: "自有员工",
|
|
|
department: "业务一部",
|
|
|
time: "2023-03-11 12:00:00",
|
|
@@ -191,6 +200,7 @@ export default {
|
|
|
{
|
|
|
key: "2",
|
|
|
name: "庞慧",
|
|
|
+ ID:"332987********8765",
|
|
|
people_type: "协作员工",
|
|
|
department: "业务二部",
|
|
|
time: "2023-03-15 12:00:00",
|
|
@@ -202,6 +212,7 @@ export default {
|
|
|
{
|
|
|
key: "3",
|
|
|
name: "李天泽",
|
|
|
+ ID:"332987********8765",
|
|
|
people_type: "访客",
|
|
|
department: "业务二部",
|
|
|
time: "2023-03-24 12:00:00",
|
|
@@ -213,6 +224,7 @@ export default {
|
|
|
{
|
|
|
key: "4",
|
|
|
name: "李天泽",
|
|
|
+ ID:"332987********8765",
|
|
|
people_type: "访客",
|
|
|
department: "业务二部",
|
|
|
time: "2022-09-11 12:00:00",
|
|
@@ -224,6 +236,7 @@ export default {
|
|
|
{
|
|
|
key: "5",
|
|
|
name: "李天泽",
|
|
|
+ ID:"332987********8765",
|
|
|
people_type: "访客",
|
|
|
department: "业务二部",
|
|
|
time: "2022-09-11 12:00:00",
|
|
@@ -235,6 +248,7 @@ export default {
|
|
|
{
|
|
|
key: "6",
|
|
|
name: "李天泽",
|
|
|
+ ID:"332987********8765",
|
|
|
people_type: "访客",
|
|
|
department: "业务二部",
|
|
|
time: "2022-09-11 12:00:00",
|
|
@@ -246,6 +260,7 @@ export default {
|
|
|
{
|
|
|
key: "7",
|
|
|
name: "李天泽",
|
|
|
+ ID:"332987********8765",
|
|
|
people_type: "访客",
|
|
|
department: "业务三部",
|
|
|
time: "2022-08-26 12:00:00",
|
|
@@ -257,6 +272,7 @@ export default {
|
|
|
{
|
|
|
key: "8",
|
|
|
name: "李天泽",
|
|
|
+ ID:"332987********8765",
|
|
|
people_type: "访客",
|
|
|
department: "业务三部",
|
|
|
time: "2022-08-26 12:00:00",
|
|
@@ -268,6 +284,7 @@ export default {
|
|
|
{
|
|
|
key: "9",
|
|
|
name: "李天泽",
|
|
|
+ ID:"332987********8765",
|
|
|
people_type: "访客",
|
|
|
department: "业务三部",
|
|
|
time: "2022-08-26 12:00:00",
|
|
@@ -279,6 +296,7 @@ export default {
|
|
|
{
|
|
|
key: "10",
|
|
|
name: "李天泽",
|
|
|
+ ID:"332987********8765",
|
|
|
people_type: "访客",
|
|
|
department: "业务三部",
|
|
|
time: "2022-08-26 12:00:00",
|
|
@@ -290,6 +308,7 @@ export default {
|
|
|
{
|
|
|
key: "11",
|
|
|
name: "李天泽",
|
|
|
+ ID:"332987********8765",
|
|
|
people_type: "访客",
|
|
|
department: "业务一部",
|
|
|
time: "2022-08-26 12:00:00",
|
|
@@ -301,6 +320,7 @@ export default {
|
|
|
{
|
|
|
key: "12",
|
|
|
name: "李天泽",
|
|
|
+ ID:"332987********8765",
|
|
|
people_type: "访客",
|
|
|
department: "业务一部",
|
|
|
time: "2022-08-26 12:00:00",
|
|
@@ -312,6 +332,7 @@ export default {
|
|
|
{
|
|
|
key: "13",
|
|
|
name: "李天泽",
|
|
|
+ ID:"332987********8765",
|
|
|
people_type: "访客",
|
|
|
department: "业务一部",
|
|
|
time: "2022-08-26 12:00:00",
|
|
@@ -323,6 +344,7 @@ export default {
|
|
|
{
|
|
|
key: "14",
|
|
|
name: "李天泽",
|
|
|
+ ID:"332987********8765",
|
|
|
people_type: "访客",
|
|
|
department: "业务一部",
|
|
|
time: "2022-08-26 12:00:00",
|
|
@@ -334,6 +356,7 @@ export default {
|
|
|
{
|
|
|
key: "15",
|
|
|
name: "李天泽",
|
|
|
+ ID:"332987********8765",
|
|
|
people_type: "访客",
|
|
|
department: "业务一部",
|
|
|
time: "2022-08-26 12:00:00",
|
|
@@ -345,6 +368,7 @@ export default {
|
|
|
{
|
|
|
key: "16",
|
|
|
name: "李天泽",
|
|
|
+ ID:"332987********8765",
|
|
|
people_type: "访客",
|
|
|
department: "业务一部",
|
|
|
time: "2022-08-26 12:00:00",
|
|
@@ -356,6 +380,7 @@ export default {
|
|
|
{
|
|
|
key: "17",
|
|
|
name: "李天泽",
|
|
|
+ ID:"332987********8765",
|
|
|
people_type: "访客",
|
|
|
department: "业务一部",
|
|
|
time: "2022-08-26 12:00:00",
|
|
@@ -367,6 +392,7 @@ export default {
|
|
|
{
|
|
|
key: "18",
|
|
|
name: "李天泽",
|
|
|
+ ID:"332987********8765",
|
|
|
people_type: "访客",
|
|
|
department: "业务一部",
|
|
|
time: "2022-08-26 12:00:00",
|
|
@@ -378,6 +404,7 @@ export default {
|
|
|
{
|
|
|
key: "19",
|
|
|
name: "李天泽",
|
|
|
+ ID:"332987********8765",
|
|
|
people_type: "访客",
|
|
|
department: "业务三部",
|
|
|
time: "2022-08-26 12:00:00",
|
|
@@ -389,6 +416,7 @@ export default {
|
|
|
{
|
|
|
key: "20",
|
|
|
name: "李天泽",
|
|
|
+ ID:"332987********8765",
|
|
|
people_type: "访客",
|
|
|
department: "业务三部",
|
|
|
time: "2022-08-26 12:00:00",
|
|
@@ -400,6 +428,7 @@ export default {
|
|
|
{
|
|
|
key: "21",
|
|
|
name: "李天泽",
|
|
|
+ ID:"332987********8765",
|
|
|
people_type: "访客",
|
|
|
department: "业务三部",
|
|
|
time: "2022-08-26 12:00:00",
|
|
@@ -420,6 +449,23 @@ export default {
|
|
|
this.tableData = JSON.parse(JSON.stringify(this.originalData));
|
|
|
},
|
|
|
exportFunc() {
|
|
|
+ // 获取表格的 DOM 节点
|
|
|
+ const table = document.querySelector(".ant-table-wrapper");
|
|
|
+ // 使用 html2canvas 将表格转换成图片
|
|
|
+ html2canvas(table, {
|
|
|
+ allowTaint: true,
|
|
|
+ useCORS: true,
|
|
|
+ }).then((canvas) => {
|
|
|
+ // 获取图片的 base64 编码
|
|
|
+ const base64URL = canvas.toDataURL("image/png");
|
|
|
+ // 将图片导出成 PDF 或者图片文件
|
|
|
+ const pdf = new jsPDF("landscape", "px", [canvas.width, canvas.height]);
|
|
|
+ pdf.addImage(base64URL, "PNG", 0, 0, canvas.width, canvas.height);
|
|
|
+ pdf.save("智慧安防-安防人员.pdf"); // 保存为 PDF 文件
|
|
|
+ // window.open(base64URL); // 在新窗口中打开图片
|
|
|
+ });
|
|
|
+ },
|
|
|
+ exportFunc1() {
|
|
|
console.log("打印报表");
|
|
|
const data = [
|
|
|
["姓名", "年龄", "性别", "毕业院校"],
|