shish 2 лет назад
Родитель
Сommit
3feb861615
1 измененных файлов с 8 добавлено и 10 удалено
  1. 8 10
      hdApp/src/admin/staff/list.vue

+ 8 - 10
hdApp/src/admin/staff/list.vue

@@ -138,11 +138,9 @@ export default {
 					name: '角色管理'
 					name: '角色管理'
 				}
 				}
 			],
 			],
-			// 删除弹窗操作
 			delModal: false,
 			delModal: false,
 			delModalText: '确定删除该员工吗?',
 			delModalText: '确定删除该员工吗?',
 			operateData: {},
 			operateData: {},
-			// 角色弹窗操作
 			roleModal: false,
 			roleModal: false,
 			roleModalText: '添加',
 			roleModalText: '添加',
 			roleModalVal: '',
 			roleModalVal: '',
@@ -151,7 +149,7 @@ export default {
 	},
 	},
 	onPullDownRefresh() {
 	onPullDownRefresh() {
 		this.resetList()
 		this.resetList()
-		this._list().then(res => {
+		this.getStaffList().then(res => {
 			uni.stopPullDownRefresh()
 			uni.stopPullDownRefresh()
 		})
 		})
 	},
 	},
@@ -160,7 +158,7 @@ export default {
 	},
 	},
 	onReachBottom() {
 	onReachBottom() {
 		if (!this.list.finished) {
 		if (!this.list.finished) {
-			this._list().then(res => {
+			this.getStaffList().then(res => {
 				uni.stopPullDownRefresh()
 				uni.stopPullDownRefresh()
 			})
 			})
 		} else {
 		} else {
@@ -170,11 +168,11 @@ export default {
 	onLoad: function() {},
 	onLoad: function() {},
 	methods: {
 	methods: {
 		async init() {
 		async init() {
-			this._list()
+			this.getStaffList()
 		},
 		},
-		_list() {
+		getStaffList() {
 			let hostFn = this.tabIndex == 0 ? getStaffList : this.tabIndex == 1 ? getRoleList : getLogList
 			let hostFn = this.tabIndex == 0 ? getStaffList : this.tabIndex == 1 ? getRoleList : getLogList
-			return hostFn().then(res => {
+			return hostFn({page: this.list.page}).then(res => {
 				this.completes(res)
 				this.completes(res)
 			})
 			})
 		},
 		},
@@ -184,7 +182,7 @@ export default {
 			} else {
 			} else {
 				this.tabIndex = e.index
 				this.tabIndex = e.index
 				this.resetList()
 				this.resetList()
-				this._list()
+				this.getStaffList()
 			}
 			}
 		},
 		},
 		// 关闭弹窗
 		// 关闭弹窗
@@ -211,7 +209,7 @@ export default {
 					this.$msg('删除成功!')
 					this.$msg('删除成功!')
 					setTimeout(() => {
 					setTimeout(() => {
 						this.resetList()
 						this.resetList()
-						this._list()
+						this.getStaffList()
 					}, 1000)
 					}, 1000)
 				})
 				})
 			}
 			}
@@ -245,7 +243,7 @@ export default {
 					this.$msg(`${this.roleModalText}成功!`)
 					this.$msg(`${this.roleModalText}成功!`)
 					setTimeout(() => {
 					setTimeout(() => {
 						this.resetList()
 						this.resetList()
-						this._list()
+						this.getStaffList()
 					}, 1000)
 					}, 1000)
 				})
 				})
 			}
 			}