30730
This commit is contained in:
@@ -41,28 +41,23 @@ export default {
|
|||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.selected = uni.getStorageSync('userSelect') || []
|
this.selected = uni.getStorageSync('userSelect') || []
|
||||||
this.getDeptsAndUsersByParent()
|
this.getCreateUserList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
isSelected(id) {
|
isSelected(id) {
|
||||||
return this.selected.userId===id
|
return this.selected.userId===id
|
||||||
},
|
},
|
||||||
getDeptsAndUsersByParent() {
|
getCreateUserList() {
|
||||||
this.userList = []
|
this.userList = []
|
||||||
this.$http.post(`/app/appmasssendingtask/list`, null, {
|
this.$http.post(`app/appmasssendingtask/createUserlist`).then(res => {
|
||||||
params: {
|
|
||||||
current: this.current
|
|
||||||
}
|
|
||||||
}).then(res => {
|
|
||||||
if (res?.data) {
|
if (res?.data) {
|
||||||
let list = this.current == 1? res.data.records:[...list, ...res.data.records]
|
// let userArr = res.data.records.map(e => ({userId: e.createUserId, isChecked: this.isSelected(e.createUserId)}))
|
||||||
let userArr = list.map(e => ({userId: e.createUserId, isChecked: this.isSelected(e.createUserId)}))
|
this.userList = res.data.map(e => ({userId: e, isChecked: this.isSelected(e)}))
|
||||||
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)) {
|
// this.userList.push(item)
|
||||||
this.userList.push(item)
|
// }
|
||||||
}
|
// })
|
||||||
})
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user