Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
提交
议题看板
打开侧边栏
jingqi.liu
pica.cloud.web-education-admin
提交
23c3faab
提交
23c3faab
编写于
6月 17, 2020
作者:
alex.zhang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
成员权限变更优化
上级
ddd4786b
变更
1
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
43 行增加
和
33 行删除
+43
-33
role-manage.vue
src/views/yqrange/role-manage.vue
+43
-33
未找到文件。
src/views/yqrange/role-manage.vue
浏览文件 @
23c3faab
...
@@ -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,25 +344,28 @@ export default {
...
@@ -337,25 +344,28 @@ 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
:
"确定"
,
...
@@ -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
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录