From 8fb7cc0325027caa4ed7574443e24f5bd7a8efb7 Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期一, 02 九月 2024 23:09:45 +0800 Subject: [PATCH] 考核结果图表bug,登录路由权限控制 --- src/layout/components/Navbar.vue | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index c3202d4..90c59ec 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -39,7 +39,7 @@ </div> <div class="button-container"> - <el-button type="primary" @click="toScreen" size="small">鍙鍖栧ぇ灞�</el-button> + <el-button v-if="roles.includes('admin') || roles.includes('county_leader') || roles.includes('city_leader')" type="primary" @click="toScreen" size="small">鍙鍖栧ぇ灞�</el-button> </div> <div class="button-container"> <el-button type="primary" @click="toSystemB" size="small">璺宠浆B绯荤粺</el-button> @@ -76,7 +76,8 @@ ...mapGetters([ 'sidebar', 'avatar', - 'device' + 'device', + 'roles' ]), setting: { get() { -- Gitblit v1.8.0