Kaynağa Gözat

会员关联项目

小黑屋调整
Long 2 gün önce
ebeveyn
işleme
eadb618320
1 değiştirilmiş dosya ile 6 ekleme ve 3 silme
  1. 6 3
      src/views/users/user/darkRoom.vue

+ 6 - 3
src/views/users/user/darkRoom.vue

@@ -32,6 +32,7 @@
     <el-table  height="500" border v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="用户id" align="center" prop="userId" />
+      <el-table-column label="项目" align="center" prop="projectName" />
       <el-table-column label="用户昵称" align="center" prop="nickname" />
       <el-table-column label="用户头像" align="center" prop="avatar">
         <template slot-scope="scope">
@@ -121,8 +122,9 @@ export default {
         pageNum: 1,
         pageSize: 10,
         keyword: null,
-        isBlack: true
+        status: 2
       },
+      selectUser: []
     };
   },
   created() {
@@ -151,12 +153,13 @@ export default {
     // 多选框选中数据
     handleSelectionChange(selection) {
       this.ids = selection.map(item => item.userId)
+      this.selectedUser = selection.map(item => {return {userId: item.userId, projectId: item.projectId}})
       this.single = selection.length!==1
       this.multiple = !selection.length
     },
     // 启用
     handleUpdate(row) {
-      enabledUsers([row.userId]).then(response => {
+      enabledUsers([{userId: row.userId, projectId: row.projectId}]).then(response => {
         if (response.code === 200) {
           this.msgSuccess("取消禁用成功");
           this.getList();
@@ -167,7 +170,7 @@ export default {
     },
     // 启用
     handleUpdateBatch() {
-      enabledUsers(this.ids).then(response => {
+      enabledUsers(this.selectedUser).then(response => {
         if (response.code === 200) {
           this.msgSuccess("取消禁用成功");
           this.getList();