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

成员权限

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