diff --git a/src/project/saas/AppCooperationPropaganda/selectUser.vue b/src/project/saas/AppCooperationPropaganda/selectUser.vue index 6e078f6a..67387d01 100644 --- a/src/project/saas/AppCooperationPropaganda/selectUser.vue +++ b/src/project/saas/AppCooperationPropaganda/selectUser.vue @@ -41,28 +41,23 @@ export default { }, onLoad() { this.selected = uni.getStorageSync('userSelect') || [] - this.getDeptsAndUsersByParent() + this.getCreateUserList() }, methods: { isSelected(id) { return this.selected.userId===id }, - getDeptsAndUsersByParent() { + getCreateUserList() { this.userList = [] - this.$http.post(`/app/appmasssendingtask/list`, null, { - params: { - current: this.current - } - }).then(res => { + this.$http.post(`app/appmasssendingtask/createUserlist`).then(res => { if (res?.data) { - 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 = [] - userArr.forEach(item=> { - if(!this.userList.find(o=> o.userId === item.userId)) { - this.userList.push(item) - } - }) + // let userArr = res.data.records.map(e => ({userId: e.createUserId, isChecked: this.isSelected(e.createUserId)})) + this.userList = res.data.map(e => ({userId: e, isChecked: this.isSelected(e)})) + // userArr.forEach(item=> { + // if(!this.userList.find(o=> o.userId === item.userId)) { + // this.userList.push(item) + // } + // }) } }) },