董国庆
2025-04-11 aa6ab634ff987ad35d960efcad6eb0f7c6af6ea7
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<template>
    <div class="app-container">
        <!-- 搜索区域 -->
        <div class="search-area">
            <el-form :inline="true" :model="queryParams" class="search-form">
                <el-form-item label="镇街">
                    <el-select v-model="queryParams.street" placeholder="请选择" clearable size="small">
                        <el-option v-for="item in streetOptions" :key="item.dictCode" :label="item.dictLabel"
                            :value="item.dictLabel"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item>
                    <el-button type="default" @click="resetQuery">重置</el-button>
                    <el-button type="primary" @click="handleQuery">查询</el-button>
                </el-form-item>
            </el-form>
        </div>
 
        <!-- 表格区域 -->
        <el-table v-loading="loading" :data="tableData" border style="width: 100%">
            <el-table-column type="index" width="50" label="序号" align="center" />
            <el-table-column prop="street" label="镇(街道)" min-width="120" align="center" />
            <el-table-column prop="errorNum" label="报错次数总计" min-width="100" align="center">
            </el-table-column>
            <el-table-column prop="totalApplicants" label="错误类型" min-width="100" align="center">
                <el-table-column prop="settleNum" label="安置人员信息错误" min-width="150" align="center" />
                <el-table-column prop="areaNum" label="安置面积计算错误" min-width="150" align="center" />
                <el-table-column prop="compensationNum" label="补偿金额计算错误" min-width="150" align="center" />
                <el-table-column prop="houseNum" label="房源面积数据错误" min-width="150" align="center" />
            </el-table-column>
        </el-table>
 
        <!-- 分页区域 -->
        <div class="pagination-container">
            <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange"
                :current-page="queryParams.pageNum" :page-sizes="[10, 20, 30, 40]" :page-size="queryParams.pageSize"
                layout="total, sizes, prev, pager, next, jumper" :total="total">
            </el-pagination>
        </div>
    </div>
</template>
 
<script>
import Pagination from "@/components/Pagination";
import { getPageList } from "@/api/error-log";
import { getDictData } from '@/api/placement'
 
export default {
    name: "StoringData",
    components: {
        Pagination,
    },
    data() {
        return {
            // 遮罩层
            loading: false,
            // 总条数
            total: 4,
            // 审核相关
            // 表格数据
            tableData: [],
            // 查询参数
            queryParams: {
                pageNum: 1,
                pageSize: 10,
                street: undefined,
            },
            streetOptions: []
        };
    },
    created() {
        this.getList();
        // 镇(街道)
        getDictData('street').then(response => {
            this.streetOptions = response.data
        })
    },
    methods: {
        /** 查询列表 */
        getList() {
            getPageList(this.queryParams).then(res => {
                this.tableData = res.data.records;
                this.total = res.data.total;
            });
        },
        /** 搜索按钮操作 */
        handleQuery() {
            this.queryParams.pageNum = 1;
            this.getList();
        },
        /** 重置按钮操作 */
        resetQuery() {
            this.queryParams = {
                pageNum: 1,
                pageSize: 10,
                street: undefined,
            };
            this.handleQuery();
        },       
        /** 每页条数改变 */
       handleSizeChange(size) {
            this.queryParams.pageSize = size;
            this.getList();
        },
        /** 当前页改变 */
        handleCurrentChange(page) {
            this.queryParams.pageNum = page;
            this.getList();
        },
    },
};
</script>
 
<style lang="scss" scoped>
.app-container {
    padding: 20px;
    background-color: #fff;
 
    .search-area {
        background-color: #fff;
        padding: 15px 0;
        margin-bottom: 20px;
        border-radius: 4px;
 
        .search-form {
            display: flex;
            align-items: center;
 
            .el-form-item {
                margin-bottom: 0;
                margin-right: 20px;
            }
        }
    }
 
    .action-buttons {
        margin-bottom: 20px;
 
        .el-button {
            margin-right: 10px;
        }
    }
 
    .el-table {
        margin-bottom: 20px;
 
        .el-button--text {
            padding: 0 8px;
 
            &:not(:last-child) {
                border-right: 1px solid #dcdfe6;
            }
        }
    }
 
    .pagination-container {
        text-align: center;
        margin-top: 20px;
    }
 
    .el-tag {
        border-radius: 2px;
    }
}
</style>