创建人分页

This commit is contained in:
shijingjing
2022-08-02 11:17:34 +08:00
parent 1e9726cbda
commit 2eff172e2a

View File

@@ -30,6 +30,7 @@ export default {
return { return {
selected: [], selected: [],
userList: [], userList: [],
current: 1,
} }
}, },
computed: { computed: {
@@ -49,10 +50,13 @@ export default {
getDeptsAndUsersByParent() { getDeptsAndUsersByParent() {
this.userList = [] this.userList = []
this.$http.post(`/app/appmasssendingtask/list`, null, { this.$http.post(`/app/appmasssendingtask/list`, null, {
params: {} params: {
current: this.current
}
}).then(res => { }).then(res => {
if (res?.data) { if (res?.data) {
let userArr = res.data.records.map(e => ({userId: e.createUserId, isChecked: this.isSelected(e.createUserId)})) let list = this.current == 1? res.data.records:[...list, ...res.data.records]
let userArr = list.map(e => ({userId: e.createUserId, isChecked: this.isSelected(e.createUserId)}))
this.userList = [] this.userList = []
userArr.forEach(item=> { userArr.forEach(item=> {
if(!this.userList.find(o=> o.userId === item.userId)) { if(!this.userList.find(o=> o.userId === item.userId)) {