Commit c54a6f92fb4f2eeb90587e1ce2dbea2cef8cfbf3

Authored by wuxw
1 parent cbeb361b

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

src/views/staff/aStaffList.vue
... ... @@ -15,7 +15,7 @@
15 15 <el-input :placeholder="$t('staff.phoneNumber')" v-model="searchConditions.tel" clearable />
16 16 </el-col>
17 17 <el-col :span="6">
18   - <el-button type="primary" @click="queryStaff">
  18 + <el-button type="primary" @click="searchStaff">
19 19 {{ $t('staff.search') }}
20 20 </el-button>
21 21 </el-col>
... ... @@ -67,7 +67,7 @@
67 67  
68 68 <el-row class="margin-top">
69 69 <el-col :span="16">
70   - <div class="tip-text">{{ $t('staff.tip') }}</div>
  70 + <div class="tip-text"></div>
71 71 </el-col>
72 72 <el-col :span="8" class="text-right">
73 73 <el-pagination :current-page="pagination.current" :page-sizes="[10, 20, 30, 50]" :page-size="pagination.size"
... ... @@ -128,6 +128,10 @@ export default {
128 128 console.error('获取字典数据失败:', error)
129 129 }
130 130 },
  131 + searchStaff() {
  132 + this.pagination.current = 1
  133 + this.queryStaff()
  134 + },
131 135 async queryStaff() {
132 136 try {
133 137 const params = {
... ... @@ -146,7 +150,7 @@ export default {
146 150 relCdName: relCdItem ? relCdItem.name : ''
147 151 }
148 152 })
149   - this.pagination.total = res.data.total
  153 + this.pagination.total = res.total
150 154  
151 155 } catch (error) {
152 156 console.error('查询员工信息失败:', error)
... ...