| | |
| | | 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') |
| | | } |
| | | }) |
| | | }, |
| | |
| | | </view> |
| | | <view> |
| | | <text style="color: #ff6d00;" wx:if="{{item.linkType == 'Creator'}}">创建人</text> |
| | | <text style="color: #ff6d00;" wx:if="{{item.state == 'Reject'}}">已拒绝</text> |
| | | <t-button bindtap="selectIdentity" data-item="{{item}}" style="margin: 0;color: #67c23a;" size="extra-small" wx:if="{{item.state != 'Normal' && item.linkType != 'Creator' && item.state != 'Reject'}}" variant="text">通过</t-button> |
| | | <t-button bindtap="removeStudent" data-item="{{item}}" style="margin: 0;color: red;" size="extra-small" wx:if="{{item.linkType != 'Creator' && item.state == 'Normal' }}" variant="text">移除</t-button> |
| | | <t-button bindtap="removeStudent" data-item="{{item}}" style="margin: 0;color: red;" size="extra-small" wx:if="{{item.linkType != 'Creator' && (item.state == 'Normal' || item.state == 'Reject')}}" variant="text">移除</t-button> |
| | | <t-button bindtap="updateStateReject" data-item="{{item}}" style="margin: 0;color: #ff6d00;" size="extra-small" wx:if="{{item.linkType != 'Creator' && item.state != 'Normal' && item.state != 'Reject' }}" variant="text">拒绝</t-button> |
| | | </view> |
| | | </view> |
| | |
| | | </view> |
| | | <view class="navBottom"> |
| | | <view class="navBottom-check"> |
| | | <t-checkbox block="{{false}}" label="全选" checked="{{isAll}}" bind:change="selectAll" /> |
| | | <t-checkbox block="{{false}}" label="全选" disabled="{{userList.length == 1 && currentState == 'Normal' }}" checked="{{isAll}}" bind:change="selectAll" /> |
| | | </view> |
| | | <view class="navBtn"> |
| | | <t-button class="custom-css" wx:if="{{currentState == 'WaitValid'}}" disabled="{{!isEnbled}}" style="margin-right:10px;" size="extra-small" bindtap="updateStateNormalDatas">批量通过</t-button> |
| | |
| | | |
| | | .contentList { |
| | | width: 100%; |
| | | height: calc(100% - 55px - 45px - 48px); |
| | | height: calc(100% - 55px - 48px - 48px); |
| | | background-color: #fff; |
| | | } |
| | | |
| | |
| | | |
| | | .navBottom { |
| | | width: 100%; |
| | | height: 45px; |
| | | height: 46px; |
| | | background-color: #fff; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | border-top: 1rpx solid #eee; |
| | | padding: 5px 10px; |
| | | padding: 0 10px; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | |
| | | return false |
| | | } |
| | | wx.navigateTo({ |
| | | url: '/packageCourse/pages/teachClass/index?classId=' + classId + '&courseId=' + this.data.courseId + '&author=' + this.data.bookData.author + '&isbn=' + this.data.bookData.isbn + '&bookId=' + this.data.bookData.id + '&rootCmsItemId=' + this.data.bookData.rootCmsItemId + "&bookRefCode=" + this.data.defaultCmsPath, |
| | | url: '/packageCourse/pages/teachClass/index?classId=' + classId + '&courseId=' + this.data.courseId + '&author=' + this.data.bookData.author + '&isbn=' + this.data.bookData.isbn + '&bookId=' + this.data.bookData.id + '&rootCmsItemId=' + this.data.bookData.rootCmsItemId + "&bookRefCode=" + item.linkProductDto.product.refCode, |
| | | }) |
| | | }, |
| | | |