v1.9 优化员工页面分页问题

This commit is contained in:
wuxw 2025-10-31 10:26:43 +08:00
parent cbeb361bfd
commit c54a6f92fb

View File

@ -15,7 +15,7 @@
<el-input :placeholder="$t('staff.phoneNumber')" v-model="searchConditions.tel" clearable />
</el-col>
<el-col :span="6">
<el-button type="primary" @click="queryStaff">
<el-button type="primary" @click="searchStaff">
{{ $t('staff.search') }}
</el-button>
</el-col>
@ -67,7 +67,7 @@
<el-row class="margin-top">
<el-col :span="16">
<div class="tip-text">{{ $t('staff.tip') }}</div>
<div class="tip-text"></div>
</el-col>
<el-col :span="8" class="text-right">
<el-pagination :current-page="pagination.current" :page-sizes="[10, 20, 30, 50]" :page-size="pagination.size"
@ -128,6 +128,10 @@ export default {
console.error('获取字典数据失败:', error)
}
},
searchStaff() {
this.pagination.current = 1
this.queryStaff()
},
async queryStaff() {
try {
const params = {
@ -146,7 +150,7 @@ export default {
relCdName: relCdItem ? relCdItem.name : ''
}
})
this.pagination.total = res.data.total
this.pagination.total = res.total
} catch (error) {
console.error('查询员工信息失败:', error)