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