安琪酵母(西藏)益生菌信息采集中心智能实验室
longyvfengyun
2023-09-06 093388d51f56e95d155f204971d49fe303b76408
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<script setup>
import doorInfoHistoryModule from "@/views/accessControl/js/doorInfoHistoryModule";
import {onMounted} from "vue";
const props = defineProps({
    id: {
        type: [Number, String],
        default: 0
    },
    name: {
        type: [Number, String],
        default: 0
    }
});
 
const {page, doorHistoryData, searchDoorHistory, exportFile} = doorInfoHistoryModule(props.id);
const handleSizeChange = (size)=>{
    page.value.pageSize = size;
    searchDoorHistory();
}
const handleCurrentChange = (current)=>{
    page.value.pageCurr = current;
    searchDoorHistory();
}
 
onMounted(()=>{
    searchDoorHistory();
});
</script>
 
<template>
    <div class="tbl-wrapper">
        <div class="tbl-container">
            <el-table
                stripe
                empty-text="暂无数据"
                :data="doorHistoryData"
                height="100%">
                <el-table-column
                    type="index"
                    label="编号"
                    width="80">
                </el-table-column>
                <el-table-column
                    align="center"
                    prop="carcameraName"
                    label="门禁名称">
                </el-table-column>
                <el-table-column
                    align="center"
                    prop="recordTime"
                    label="开门时间">
                </el-table-column>
                <el-table-column
                    align="center"
                    prop="state"
                    label="状态变换">
                </el-table-column>
            </el-table>
        </div>
        <div class="paging-wrapper">
            <el-button type="primary" size="small" @click="searchDoorHistory()">查询</el-button>
            <el-popover placement="top" effect="dark" :width="200" trigger="click">
                <template #reference>
                    <el-button type="primary" size="small" style="margin-right: 16px">导出</el-button>
                </template>
                <el-button type="primary" size="small" @click="exportFile">导出当前页</el-button>
                <el-button type="primary" size="small" @click="exportFile(true)">导出全部</el-button>
            </el-popover>
            <div class="paging-container">
                <el-pagination
                    @size-change="handleSizeChange"
                    @current-change="handleCurrentChange"
                    :current-page.sync="page.pageCurr"
                    :page-size="page.pageSize"
                    layout="total, sizes, prev, pager, next"
                    :total="page.total">
                </el-pagination>
            </div>
        </div>
    </div>
</template>
 
<style scoped>
.tbl-wrapper {
    background-color: #FFFFFF;
}
.tbl-container {
    width: 700px;
    height: 440px;
}
.paging-wrapper {
    text-align: center;
    padding: 4px 8px;
}
.paging-container {
    margin-left: 8px;
    display: inline-block;
}
</style>