提交 7b0c59e1 编写于 作者: alex.zhang's avatar alex.zhang

成员权限

上级 57291adc
此差异已折叠。
......@@ -210,7 +210,7 @@ export default {
//新建直播
createLive() {
this.$router.push({
path: "/create-live"
path: "/create-live?circleId=" + this.circleId,
});
},
//弹出直播链接弹窗
......@@ -304,7 +304,8 @@ export default {
path: "/create-live",
query: {
// rtcId: "16"
rtcId: row.id
rtcId: row.id,
}
});
},
......@@ -323,8 +324,8 @@ export default {
circleId: this.circleId,
name: name,
liveStatus: status,
pageNo: 1,
pageSize: 10
pageNo: this.searchForm.pageNo,
pageSize: this.searchForm.pageSize
};
console.log("alex name = " + name + ", status = " + status);
vm.POST("rtc/liveAdmin/list", req).then(res => {
......@@ -344,6 +345,8 @@ export default {
listData.push(obj);
}
this.tableData = listData;
this.totalRows = res.data.totalRows;
} else {
this.tableData = [];
}
......
......@@ -65,49 +65,31 @@
<el-table-column label="操作" min-width="300" align="center">
<template slot-scope="scope">
<el-button
v-if="this.idType != 1 && scope.row.level == 0"
v-if="(idType == 1 && scope.row.level == 0) ||
(idType != 1 && scope.row.level == 0 && selfRoleId > scope.row.level)"
@click="promote(scope.row, 1)"
type="text"
size="small"
>升为管理员</el-button>
<el-button
v-if="this.idType != 1 && scope.row.level == 0"
@click="promote(scope.row, 2)"
type="text"
size="small"
>升为主管理员</el-button>
<el-button
v-if="this.idType != 1 && scope.row.level == 1"
@click="promote(scope.row, 2)"
type="text"
size="small"
>升为主管理员</el-button>
<el-button
v-if="this.idType != 1 && scope.row.level == 1"
@click="promote(scope.row, 0)"
type="text"
size="small"
>降为普通成员</el-button>
<el-button
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"
v-if="(idType == 1 && scope.row.level == 1) ||
(idType != 1 && scope.row.level == 1 && selfRoleId > scope.row.level)"
@click="promote(scope.row, 0)"
type="text"
size="small"
>降为普通成员</el-button>
<el-button
v-if="this.idType != 1 && scope.row.status == 1"
v-if="scope.row.level != 2 &&
(idType == 1 || selfRoleId > scope.row.level) &&
scope.row.status == 1"
@click="addBlackList(scope.row)"
type="text"
size="small"
>加入黑名单</el-button>
<el-button
v-if="this.idType != 1 && scope.row.status == 2"
v-if="scope.row.level != 2 &&
(idType == 1 || selfRoleId > scope.row.level) &&
scope.row.status == 2"
@click="addBlackList(scope.row)"
type="text"
size="small"
......@@ -215,26 +197,27 @@ export default {
name: "第二医院"
}
],
id: null
id: null,
selfRoleId: 0
};
},
created() {
vm = this;
this.id = this.$route.query.id;
// vm.getOrganization();
this.searchList();
this.idType = localStorage.getItem("storageIdType");
console.log("storageIdType = " + localStorage.getItem("storageIdType"));
console.log("storageIdType = " + this.idType);
this.searchList();
},
methods: {
searchList() {
console.log("查询");
let req = {
name: this.searchForm.searchName,
hospitaName: this.searchForm.searchHospital,
hospitalName: this.searchForm.searchHospital,
id: this.id,
pageNo: 1,
pageSize: 10
pageNo: this.searchForm.pageNo,
pageSize: this.searchForm.pageSize
};
vm.POST("circle/circle/members", req)
.then(res => {
......@@ -253,9 +236,9 @@ export default {
let listData = [];
for (let i = 0; i < res.data.memberList.length; i++) {
let roleName = "";
switch (res.data.memberList[i].role_id) {
switch (res.data.memberList[i].roleId) {
case 0:
roleName = "普通成员 1:管理员 2:主管理员 3:审核人员";
roleName = "普通成员";
break;
case 1:
roleName = "管理员";
......@@ -276,13 +259,20 @@ export default {
proTitle: res.data.memberList[i].title,
department: res.data.memberList[i].departmentName,
hospital: res.data.memberList[i].hospitalName,
level: res.data.memberList[i].role_id,
level: res.data.memberList[i].roleId,
doctorId: res.data.memberList[i].id,
status: res.data.memberList[i].status
};
listData.push(obj);
}
this.tableData = listData;
this.selfRoleId = res.data.roleId;
// console.log("searchList() : this.selfRoleId = " + this.selfRoleId +
// ", name = " + tableData[1].name + ", level = " + tableData[1].level +
// ", doctorId = " + tableData[1].doctorId + ", status = " + tableData[1].status);
console.log("searchList() : this.selfRoleId = " + this.selfRoleId)
this.totalRows = res.data.count;
} else {
// vm.$message.info(res.message);
// vm.$message.info("操作失败,请重试");
......@@ -291,20 +281,6 @@ export default {
.catch(function(error) {
vm.$message.error(error);
});
//model data
// let listData = [];
// let obj = {
// role: "大总管",
// name: "小小",
// proTitle: "妇科老大",
// department: "总经办",
// hospital: "青山神经病院",
// level: 3,
// doctorId: 789
// };
// listData.push(obj);
// this.tableData = listData;
},
resetForm() {
console.log("重置");
......@@ -437,9 +413,9 @@ export default {
//加入黑名单
addBlackList(row) {
vm = this;
let option = "加入黑名单"
let option = "加入黑名单";
if (row.status == 2) {
option = "移出黑名单"
option = "移出黑名单";
}
this.$confirm(`确定将“${row.name}${option}吗`, "", {
confirmButtonText: "确定",
......@@ -453,10 +429,12 @@ export default {
);
let req = {
id: this.id,
doctorId: row.doctorId,
doctorId: row.doctorId
};
vm.GET(
"circle/circle/" + this.id + "/" + row.doctorId + "/freeControl", req)
"circle/circle/" + this.id + "/" + row.doctorId + "/freeControl",
req
)
.then(res => {
if (res.code == "000000") {
vm.$message({
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册