| | |
| | | currentState: e.detail.value, |
| | | userList: [], |
| | | isAll: false, |
| | | isEnbled: false |
| | | isEnbled: false, |
| | | searchKey: '' |
| | | }) |
| | | this.getStudentList() |
| | | }, |
| | |
| | | |
| | | // 批量通过 |
| | | updateStateNormalDatas() { |
| | | const dataUser = this.data.userList.filter((item) => item.isCheck == true) |
| | | const dataUser = this.data.userList.filter((item) => item.isCheck == true && item.linkType != 'Creator') |
| | | const data = { |
| | | groupId: this.properties.classId, |
| | | requests: dataUser.map((item) => { |
| | |
| | | } |
| | | app.MG.identity.updateAppUserGroupLink(data).then((res) => { |
| | | if (res) { |
| | | wx.showToast({ |
| | | title: '已通过', |
| | | duration: 1000, |
| | | icon: 'none', |
| | | }) |
| | | this.setData({ |
| | | userList: [] |
| | | }) |
| | |
| | | return |
| | | } |
| | | if (res.confirm) { |
| | | const dataUser = this.data.userList.filter((item) => item.isCheck == true) |
| | | const dataUser = this.data.userList.filter((item) => item.isCheck == true && item.linkType != 'Creator') |
| | | const data = { |
| | | groupId: this.properties.classId, |
| | | appUserIds: dataUser.map((item) => item.appUser.id) |
| | | } |
| | | app.MG.identity.removeAppUserFromGroup(data).then((res) => { |
| | | if (res) { |
| | | wx.showToast({ |
| | | title: '已移除', |
| | | duration: 1000, |
| | | icon: 'none', |
| | | }) |
| | | this.setData({ |
| | | userList: [] |
| | | }) |
| | |
| | | |
| | | // 批量拒绝 |
| | | updateStateRejectDatas() { |
| | | const dataUser = this.data.userList.filter((item) => item.isCheck == true) |
| | | const dataUser = this.data.userList.filter((item) => item.isCheck == true && item.linkType != 'Creator') |
| | | const data = { |
| | | groupId: this.properties.classId, |
| | | requests: dataUser.map((item) => { |
| | |
| | | } |
| | | app.MG.identity.updateAppUserGroupLink(data).then((res) => { |
| | | if (res) { |
| | | wx.showToast({ |
| | | title: '已拒绝', |
| | | duration: 1000, |
| | | icon: 'none', |
| | | }) |
| | | this.setData({ |
| | | userList: [] |
| | | }) |
| | |
| | | } |
| | | app.MG.identity.updateAppUserGroupLink(data).then((res) => { |
| | | if (res) { |
| | | wx.showToast({ |
| | | title: '已拒绝', |
| | | duration: 1000, |
| | | icon: 'none', |
| | | }) |
| | | this.setData({ |
| | | userList: [] |
| | | }) |
| | | this.getStudentList() |
| | | } |
| | | }) |
| | |
| | | this.setData({ |
| | | userList: list, |
| | | total: totalSize, |
| | | isAll: false, |
| | | isEnbled: false, |
| | | skeletonLoding: false, |
| | | bottomLoading: false |
| | | }) |
| | |
| | | |
| | | // 移除学生 |
| | | removeStudent(e) { |
| | | const { |
| | | item |
| | | } = e.currentTarget.dataset |
| | | const data = { |
| | | groupId: this.properties.classId, |
| | | appUserIds: [item.appUser.id] |
| | | } |
| | | app.MG.identity.removeAppUserFromGroup(data).then((res) => { |
| | | if (res) { |
| | | wx.showToast({ |
| | | title: '已移除', |
| | | duration: 1000, |
| | | icon: 'none', |
| | | }) |
| | | this.getStudentList() |
| | | this.newNotice(item, 'remove') |
| | | wx.showModal({ |
| | | title: '提示', |
| | | content: '是否移除当前成员?', |
| | | complete: (res) => { |
| | | if (res.cancel) { |
| | | return |
| | | } |
| | | if (res.confirm) { |
| | | const { |
| | | item |
| | | } = e.currentTarget.dataset |
| | | const data = { |
| | | groupId: this.properties.classId, |
| | | appUserIds: [item.appUser.id] |
| | | } |
| | | app.MG.identity.removeAppUserFromGroup(data).then((res) => { |
| | | if (res) { |
| | | wx.showToast({ |
| | | title: '已移除', |
| | | duration: 1000, |
| | | icon: 'none', |
| | | }) |
| | | this.setData({ |
| | | userList: [], |
| | | isAll: false, |
| | | isEnbled: false |
| | | }) |
| | | this.getStudentList() |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | |
| | | duration: 1000, |
| | | icon: 'success', |
| | | }) |
| | | this.setData({ |
| | | userList: [], |
| | | isAll: false, |
| | | isEnbled: false |
| | | }) |
| | | this.cancle() |
| | | this.getStudentList() |
| | | this.newNotice(this.data.currentIdentity, 'success') |
| | | } |
| | | }) |
| | | }, |