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