Commit c54a6f92fb4f2eeb90587e1ce2dbea2cef8cfbf3

Authored by wuxw
1 parent cbeb361b

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

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