up
This commit is contained in:
@ -45,6 +45,13 @@
|
||||
align="center"
|
||||
prop="loginTime"
|
||||
></el-table-column>
|
||||
<el-table-column label="启用状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.status==2" type="success">已升级</el-tag>
|
||||
<el-tag v-if="scope.row.status==0" type="info">已禁用</el-tag>
|
||||
<el-tag v-if="scope.row.status==1" type="warning">已启用</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="handlePage(scope.row.id)" type="text" size="small"
|
||||
@ -66,7 +73,7 @@
|
||||
> -->
|
||||
<el-button
|
||||
v-if="scope.row.status!=2"
|
||||
@click="handleStatus(scope.row.id, 2)"
|
||||
@click="handleStatus(scope.row, 2)"
|
||||
type="text"
|
||||
size="small"
|
||||
>升级</el-button
|
||||
@ -128,8 +135,9 @@ export default {
|
||||
this.total = data.total
|
||||
});
|
||||
},
|
||||
handleStatus(userId, status) {
|
||||
handleUser({ userId, status }).then(({ message }) => {
|
||||
handleStatus(row, status) {
|
||||
if(row.status==0) return this.msgInfo('请先启用该用户企业');
|
||||
handleUser({ userId:row.id, status }).then(({ message }) => {
|
||||
this.msgSuccess(message);
|
||||
this.getList();
|
||||
});
|
||||
|
Reference in New Issue
Block a user