This commit is contained in:
熊丽君
2021-10-13 17:07:54 +08:00
parent 7b4192c9af
commit 8b14ddd015

View File

@ -45,6 +45,13 @@
align="center" align="center"
prop="loginTime" prop="loginTime"
></el-table-column> ></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"> <el-table-column label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button @click="handlePage(scope.row.id)" type="text" size="small" <el-button @click="handlePage(scope.row.id)" type="text" size="small"
@ -66,7 +73,7 @@
> --> > -->
<el-button <el-button
v-if="scope.row.status!=2" v-if="scope.row.status!=2"
@click="handleStatus(scope.row.id, 2)" @click="handleStatus(scope.row, 2)"
type="text" type="text"
size="small" size="small"
>升级</el-button >升级</el-button
@ -128,8 +135,9 @@ export default {
this.total = data.total this.total = data.total
}); });
}, },
handleStatus(userId, status) { handleStatus(row, status) {
handleUser({ userId, status }).then(({ message }) => { if(row.status==0) return this.msgInfo('请先启用该用户企业');
handleUser({ userId:row.id, status }).then(({ message }) => {
this.msgSuccess(message); this.msgSuccess(message);
this.getList(); this.getList();
}); });