用户菜单功能分配隐藏

role1.0
fanluyan 1 year ago
parent 7b85da722b
commit 23b397081b

@ -115,14 +115,14 @@ export default {
index: "/userManagement", index: "/userManagement",
title: "用户管理", title: "用户管理",
}, },
{ // {
index: "/roleManagement", // index: "/roleManagement",
title: "角色管理", // title: "",
}, // },
{ // {
index: "/menuManagement", // index: "/menuManagement",
title: "菜单功能管理", // title: "",
}, // },
{ {
index: "/deviceUpgrade", index: "/deviceUpgrade",
title: "升级管理", title: "升级管理",
@ -324,7 +324,7 @@ export default {
} else if (this.role == 4) { } else if (this.role == 4) {
this.items = this.hnjcitems; this.items = this.hnjcitems;
} }
this.activeIndex = this.items[0].index; //this.activeIndex = this.items[0].index;
console.log(this.items); console.log(this.items);
console.log(this.activeIndex); console.log(this.activeIndex);
}, },

@ -106,14 +106,14 @@ export default {
this.formdata = JSON.parse(JSON.stringify(val)); this.formdata = JSON.parse(JSON.stringify(val));
}, },
// //
getRoleListAll() { // getRoleListAll() {
getRoleList() // getRoleList()
.then((res) => { // .then((res) => {
console.log("获取角色列表", res.data); // console.log("", res.data);
this.roleoptions = res.data.filter((role) => role.id !== 0); // this.roleoptions = res.data.filter((role) => role.id !== 0);
}) // })
.catch((err) => {}); // .catch((err) => {});
}, // },
// getRoleListAll() { // getRoleListAll() {
// getRoleList() // getRoleList()
// .then((res) => { // .then((res) => {
@ -163,7 +163,7 @@ export default {
display() { display() {
this.isShow = true; this.isShow = true;
this.roleUser = localStorage.getItem("role"); this.roleUser = localStorage.getItem("role");
this.getRoleListAll(); //this.getRoleListAll();
}, },
hide() { hide() {
this.isShow = false; this.isShow = false;

@ -32,12 +32,12 @@
<template slot-scope="scope">{{ scope.row.roleName }}</template> <template slot-scope="scope">{{ scope.row.roleName }}</template>
</el-table-column> --> </el-table-column> -->
<el-table-column label="角色" show-overflow-tooltip prop="roleName"> <el-table-column label="角色" show-overflow-tooltip prop="roleName">
<!-- <template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.role == 0"></span> <span v-if="scope.row.role == 0"></span>
<span v-else-if="scope.row.role == 1">管理员</span> <span v-else-if="scope.row.role == 1">管理员</span>
<span v-else-if="scope.row.role == 2">用户</span> <span v-else-if="scope.row.role == 2">用户</span>
<span v-else>{{ scope.row.role }}</span> <span v-else>{{ scope.row.role }}</span>
</template> --> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="备注" label="备注"

Loading…
Cancel
Save