浏览代码

feat:项目会员管理-优化解绑

caoliqin 1 天之前
父节点
当前提交
cf3d8c9322
共有 1 个文件被更改,包括 8 次插入5 次删除
  1. 8 5
      src/views/his/user/indexProject.vue

+ 8 - 5
src/views/his/user/indexProject.vue

@@ -564,7 +564,7 @@ export default {
 
 
     /** 查询用户列表 */
-    getList() {
+    async getList() {
       this.loading = true;
       this.queryParams.companyUserIdMulti =this.queryParams.companyUserIds.join(",");
       listUserByProject(this.queryParams).then(response => {
@@ -737,7 +737,11 @@ export default {
     },
 
     // 解绑会员
-    handleUnbind() {
+    async handleUnbind() {
+      // 解绑前先主动搜索一下
+      this.queryParams.pageNum = 1;
+      await this.getList();
+
       // 检查是否有勾选列表行
       if (this.selectedUser.length > 0) {
         // 有勾选行,获取选中的userId列表
@@ -752,7 +756,7 @@ export default {
         }).then(() => {
           this.msgSuccess("解绑成功");
           this.getList();
-        }).catch(function() {
+        }).catch(function () {
           this.$message.error('解绑失败');
         });
       } else {
@@ -767,7 +771,7 @@ export default {
         }).then(() => {
           this.msgSuccess("解绑成功");
           this.getList();
-        }).catch(function() {
+        }).catch(function () {
           this.$message.error('解绑失败');
         });
       }
@@ -801,7 +805,6 @@ export default {
       if (!this.changeCompanyUserForm.companyId) {
         this.$message.warning('请先选择公司');
         this.changeCompanyUserForm.companyUserId = null;
-
         return;
       }
     },