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