浏览代码

bug fixed

duwendi 1 年之前
父节点
当前提交
f33552c0ba
共有 1 个文件被更改,包括 22 次插入19 次删除
  1. 22 19
      src/pages/index/components/personnel_management.vue

+ 22 - 19
src/pages/index/components/personnel_management.vue

@@ -106,7 +106,7 @@
106
           <el-row>
106
           <el-row>
107
             <el-col :span="8">
107
             <el-col :span="8">
108
               <el-form-item label="收费员姓名:">
108
               <el-form-item label="收费员姓名:">
109
-                <el-input v-model="formInline2.tollCollectorName" placeholder="请输入"></el-input>
109
+                <el-input v-model="formInline2.tollmanName" placeholder="请输入"></el-input>
110
               </el-form-item>
110
               </el-form-item>
111
             </el-col>
111
             </el-col>
112
             <el-col :span="6">
112
             <el-col :span="6">
@@ -134,7 +134,7 @@
134
           </el-table-column>
134
           </el-table-column>
135
         </el-table>
135
         </el-table>
136
         <div class="table-pagination">
136
         <div class="table-pagination">
137
-          <el-pagination layout="total, prev, pager, next, jumper" :total="total1" @current-change="handlePageChange2"
137
+          <el-pagination layout="total, prev, pager, next, jumper" :total="total2" @current-change="handlePageChange2"
138
                          :current-page.sync="pageNum2" :page-size.sync="pageSize2">
138
                          :current-page.sync="pageNum2" :page-size.sync="pageSize2">
139
           </el-pagination>
139
           </el-pagination>
140
         </div>
140
         </div>
@@ -268,7 +268,7 @@ export default {
268
       pageSize2: 10,
268
       pageSize2: 10,
269
       pageNum2: 1,
269
       pageNum2: 1,
270
       formInline2: {
270
       formInline2: {
271
-        tollCollectorName: '',
271
+        tollmanName: '',
272
       },
272
       },
273
       title2: '',
273
       title2: '',
274
       dialogVisible2: false,
274
       dialogVisible2: false,
@@ -279,6 +279,8 @@ export default {
279
         birthDay: '',
279
         birthDay: '',
280
         positionPermission: '',
280
         positionPermission: '',
281
       },
281
       },
282
+      queryParams1: {},
283
+      queryParams2: {}
282
     }
284
     }
283
   },
285
   },
284
   mounted() {
286
   mounted() {
@@ -294,13 +296,10 @@ export default {
294
       return rowIndex % 2 === 0 ? 'even-row' : 'odd-row';
296
       return rowIndex % 2 === 0 ? 'even-row' : 'odd-row';
295
     },
297
     },
296
     onSubmit1() {
298
     onSubmit1() {
297
-      this.loading1 = true
298
-      api_l.optPersonnelManagementShiftPage({parkId: this.formInline1.parkId}).then(res => {
299
-        this.tableData1 = res.data.records
300
-        this.total1 = res.data.total
301
-        this.loading1 = false
302
-      })
303
-      },
299
+      this.pageNum1 = 1
300
+      this.queryParams1 = {...this.formInline1}
301
+      this.getTableData1()
302
+    },
304
     handleAdd() {
303
     handleAdd() {
305
       this.title = '添加'
304
       this.title = '添加'
306
       this.formLabelAlign = {}
305
       this.formLabelAlign = {}
@@ -351,13 +350,9 @@ export default {
351
       }
350
       }
352
     },
351
     },
353
     onSubmit2() {
352
     onSubmit2() {
354
-      this.loading2 = true
355
-      api_l.optPersonnelManagementBasicDetail({tollmanName: this.formInline2.tollCollectorName}).then(res => {
356
-        this.tableData2 = res.data.records
357
-        this.total2 = res.data.total
358
-        this.loading2 = false
359
-      })
360
-
353
+      this.pageNum2 = 1
354
+      this.queryParams2 = {...this.formInline2}
355
+      this.getTableData2()
361
     },
356
     },
362
     handleAdd2() {
357
     handleAdd2() {
363
       this.title2 = '添加'
358
       this.title2 = '添加'
@@ -396,13 +391,21 @@ export default {
396
       this.getTableData1()
391
       this.getTableData1()
397
     },
392
     },
398
     getTableData1() {
393
     getTableData1() {
399
-      api_l.optPersonnelManagementShiftPage().then(res => {
394
+      this.loading1 = true
395
+      const {pageNum1, pageSize1} = this
396
+      api_l.optPersonnelManagementShiftPage({current: pageNum1, size: pageSize1, ...this.queryParams1}).then(res => {
397
+        this.loading1 = false
400
         this.tableData1 = res.data.records
398
         this.tableData1 = res.data.records
399
+        this.total1 = res.data.total
401
       })
400
       })
402
     },
401
     },
403
     getTableData2() {
402
     getTableData2() {
404
-      api_l.optPersonnelManagementBasicDetail({}).then(res => {
403
+      this.loading2 = true
404
+      const {pageNum2, pageSize2} = this
405
+      api_l.optPersonnelManagementBasicDetail({current: pageNum2, size: pageSize2, ...this.queryParams2}).then(res => {
406
+        this.loading2 = false
405
         this.tableData2 = res.data.records
407
         this.tableData2 = res.data.records
408
+        this.total2 = res.data.total
406
       })
409
       })
407
     },
410
     },
408
     handlePageChange2() {
411
     handlePageChange2() {