提交 d3470bf7 编写于 作者: kai.wang's avatar kai.wang

Merge branch 'dev-yqLive-20200611' of...

Merge branch 'dev-yqLive-20200611' of 192.168.110.53:com.pica.cloud.education.frontend/pica.cloud.web-education-admin into dev-yqLive-20200611
......@@ -65,35 +65,40 @@
<el-table-column label="操作" min-width="300" align="center">
<template slot-scope="scope">
<el-button
v-if="scope.row.level == 0"
@click="promote(scope.row)"
v-if="this.idType != 1 && scope.row.level == 0"
@click="promote(scope.row, 1)"
type="text"
size="small"
>升为管理员</el-button>
size="small">升为管理员</el-button>
<el-button
v-if="scope.row.level == 1"
@click="promote(scope.row)"
v-if="this.idType != 1 && scope.row.level == 0"
@click="promote(scope.row, 2)"
type="text"
size="small"
>升为主管理员</el-button>
size="small">升为主管理员</el-button>
<el-button
v-if="scope.row.level == 2"
@click="promote(scope.row)"
v-if="this.idType != 1 && scope.row.level == 1"
@click="promote(scope.row, 2)"
type="text"
size="small"
>升为审核人员</el-button>
size="small">升为主管理员</el-button>
<el-button
v-if="scope.row.level == 3"
@click="promote(scope.row)"
v-if="this.idType != 1 && scope.row.level == 1"
@click="promote(scope.row, 0)"
type="text"
size="small"
>升为审核人员</el-button>
size="small">降为普通成员</el-button>
<el-button
v-if="scope.row.level == 0"
v-if="this.idType != 1 && scope.row.level == 2"
@click="promote(scope.row, 1)"
type="text"
size="small">降为管理员</el-button>
<el-button
v-if="this.idType != 1 && scope.row.level == 2"
@click="promote(scope.row, 0)"
type="text"
size="small">降为普通成员</el-button>
<el-button
v-if="this.idType != 1"
@click="addBlackList(scope.row)"
type="text"
size="small"
>加入黑名单</el-button>
size="small">加入黑名单</el-button>
</template>
</el-table-column>
</el-table>
......@@ -204,6 +209,8 @@ export default {
vm = this;
this.id = this.$route.query.id;
vm.getOrganization();
this.idType = localStorage.getItem('storageIdType')
console.log("storageIdType = " + localStorage.getItem('storageIdType'));
},
methods: {
searchList() {
......@@ -234,7 +241,7 @@ export default {
// let roleName = "";
// switch (data[i].role_id) {
// case 0:
// roleName = "普通 1:管理员 2:主管理员 3:审核人员";
// roleName = "普通成员 1:管理员 2:主管理员 3:审核人员";
// break;
// case 1:
// roleName = "管理员";
......@@ -246,7 +253,7 @@ export default {
// roleName = "审核人员";
// break;
// default:
// roleName = "普通";
// roleName = "普通成员";
// }
// let obj = {
......@@ -337,26 +344,29 @@ export default {
return org;
},
//管理员升级
promote(row) {
promote(row, willLevel) {
vm = this;
let currentName = "",
willName, operation, willLevel;
willName, operation;
if (row.level == 0) {
currentName = "普通人";
willName = "管理员";
operation = "升为";
willLevel = 1;
currentName = "普通成员";
} else if (row.level == 1) {
currentName = "管理员";
willName = "主管理员";
operation = "升为";
willLevel = 2;
} else if (row.level == 2) {
currentName = "主管理员";
willName = "审核人员";
}
if (willLevel > row.level) {
operation = "升为";
} else {
operation = "降为";
willLevel = 3;
}
if (willLevel == 0) {
willName = "普通成员";
} else if (willLevel == 1) {
willName = "管理员";
} else if (willLevel == 2) {
willName = "主管理员";
}
vm.$confirm(`确定将${currentName}${row.name}${operation}${willName}?`, "", {
confirmButtonText: "确定",
cancelButtonText: "取消",
......@@ -442,7 +452,7 @@ export default {
handleNumChange(val) {
this.searchForm.pageNo = val;
this.searchList();
}
},
}
};
</script>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册