提交 54c7cc1f 编写于 作者: yi.li's avatar yi.li

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
<template> <template>
<div class="yqrange-index-wrapper"> <div class="yqrange-index-wrapper">
<bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond":curmbThird="curmbThird"></bread-crumb> <bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond" curmbThird="curmbThird"></bread-crumb>
<div class="yqrange-index-content screenSet" id="screenSet"> <div class="yqrange-index-content screenSet" id="screenSet">
<el-row class="step-content"> <el-row class="step-content">
<el-col :span="12"> <el-col :span="12">
...@@ -277,11 +277,10 @@ ...@@ -277,11 +277,10 @@
curmbFirst: '云鹊小圈', curmbFirst: '云鹊小圈',
curmbSecond: '直播管理', curmbSecond: '直播管理',
curmbThird: '新建直播', curmbThird: '新建直播',
circleId: null,
//页面展示位置 //页面展示位置
isCollectShow: false, isCollectShow: false,
formData: { formData: {
circleId: "",// 圈子ID circleId: "1",// 圈子ID
name: '',// 直播名称 name: '',// 直播名称
scope: "1",// 直播范围 1-非公开 2-公开 scope: "1",// 直播范围 1-非公开 2-公开
infoCollect: "0",// 是否采集用户信息 0-否 1-是 infoCollect: "0",// 是否采集用户信息 0-否 1-是
...@@ -401,9 +400,6 @@ ...@@ -401,9 +400,6 @@
}, },
mounted() { mounted() {
const rtcId = this.$route.query.rtcId; const rtcId = this.$route.query.rtcId;
const circleId = this.$route.query.circleId;
this.circleId = circleId;
this.formData.circleId = circleId;
// if(rtcId){ // if(rtcId){
// this.curmbThird = "编辑直播"; // this.curmbThird = "编辑直播";
// } // }
...@@ -428,7 +424,6 @@ ...@@ -428,7 +424,6 @@
}).then((data) => { }).then((data) => {
if(data.code == "000000") { if(data.code == "000000") {
this.formData = data.data; this.formData = data.data;
this.formData.circleId = this.circleId;
this.initFormData(); this.initFormData();
console.log(this.formData); console.log(this.formData);
} }
...@@ -692,8 +687,7 @@ ...@@ -692,8 +687,7 @@
// 封装数据 // 封装数据
setFormData(){ setFormData(){
if(!this.formData.circleId){ if(!this.formData.circleId){
// this.formData.circleId = 1;// 测试用 this.formData.circleId = 1;// 测试用
this.formData.circleId = '';
} }
if(this.formData.textContent){ if(this.formData.textContent){
this.formData.rtcIntroduces[0].type = 1; this.formData.rtcIntroduces[0].type = 1;
...@@ -754,9 +748,6 @@ ...@@ -754,9 +748,6 @@
this.$message.success("操作成功"); this.$message.success("操作成功");
this.$router.push({ this.$router.push({
path: '/live-manage', path: '/live-manage',
query: {
id: this.circleId
}
}) })
} }
else { else {
......
...@@ -307,7 +307,8 @@ export default { ...@@ -307,7 +307,8 @@ export default {
path: "/create-live", path: "/create-live",
query: { query: {
// rtcId: "16" // rtcId: "16"
rtcId: row.id rtcId: row.id,
} }
}); });
}, },
...@@ -326,8 +327,8 @@ export default { ...@@ -326,8 +327,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 => {
...@@ -347,6 +348,8 @@ export default { ...@@ -347,6 +348,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("重置");
...@@ -415,6 +391,7 @@ export default { ...@@ -415,6 +391,7 @@ export default {
message: "操作成功" message: "操作成功"
}); });
// vm.search(); // vm.search();
vm.searchList();
if (res.message != "success") { if (res.message != "success") {
vm.$message({ vm.$message({
message: res.message, message: res.message,
...@@ -437,9 +414,9 @@ export default { ...@@ -437,9 +414,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 +430,12 @@ export default { ...@@ -453,10 +430,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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册