111
QYF-GitLab1
2025-01-02 c5b6f319a21021892a299036c22862b1a3b2ad53
packageCourse/components/studentManage/index.js
@@ -80,7 +80,8 @@
        currentState: e.detail.value,
        userList: [],
        isAll: false,
        isEnbled: false
        isEnbled: false,
        searchKey: ''
      })
      this.getStudentList()
    },
@@ -125,7 +126,7 @@
    // 批量通过
    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) => {
@@ -139,6 +140,11 @@
      }
      app.MG.identity.updateAppUserGroupLink(data).then((res) => {
        if (res) {
          wx.showToast({
            title: '已通过',
            duration: 1000,
            icon: 'none',
          })
          this.setData({
            userList: []
          })
@@ -157,13 +163,18 @@
            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: []
                })
@@ -177,7 +188,7 @@
    // 批量拒绝
    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) => {
@@ -191,6 +202,11 @@
      }
      app.MG.identity.updateAppUserGroupLink(data).then((res) => {
        if (res) {
          wx.showToast({
            title: '已拒绝',
            duration: 1000,
            icon: 'none',
          })
          this.setData({
            userList: []
          })
@@ -215,6 +231,14 @@
      }
      app.MG.identity.updateAppUserGroupLink(data).then((res) => {
        if (res) {
          wx.showToast({
            title: '已拒绝',
            duration: 1000,
            icon: 'none',
          })
          this.setData({
            userList: []
          })
          this.getStudentList()
        }
      })
@@ -284,6 +308,8 @@
          this.setData({
            userList: list,
            total: totalSize,
            isAll: false,
            isEnbled: false,
            skeletonLoding: false,
            bottomLoading: false
          })
@@ -359,6 +385,14 @@
    // 移除学生
    removeStudent(e) {
      wx.showModal({
        title: '提示',
        content: '是否移除当前成员?',
        complete: (res) => {
          if (res.cancel) {
            return
          }
          if (res.confirm) {
      const {
        item
      } = e.currentTarget.dataset
@@ -373,8 +407,15 @@
            duration: 1000,
            icon: 'none',
          })
                this.setData({
                  userList: [],
                  isAll: false,
                  isEnbled: false
                })
          this.getStudentList()
          this.newNotice(item, 'remove')
              }
            })
          }
        }
      })
    },
@@ -404,9 +445,13 @@
            duration: 1000,
            icon: 'success',
          })
          this.setData({
            userList: [],
            isAll: false,
            isEnbled: false
          })
          this.cancle()
          this.getStudentList()
          this.newNotice(this.data.currentIdentity, 'success')
        }
      })
    },