月度考核分权显示
This commit is contained in:
parent
e31f625ef7
commit
0f9e53b453
|
|
@ -45,7 +45,7 @@
|
|||
<uv-tabbar :value="value" @change="index=>value = index">
|
||||
<uv-tabbar-item text="首页" icon="home"></uv-tabbar-item>
|
||||
<uv-tabbar-item text="工作台" icon="calendar"></uv-tabbar-item>
|
||||
<template v-if="true">
|
||||
<template v-if="admin_bst">
|
||||
<uv-tabbar-item text="月度考核 " icon="integral"></uv-tabbar-item>
|
||||
</template>
|
||||
<uv-tabbar-item text="客户管理" icon="kefu-ermai" ></uv-tabbar-item>
|
||||
|
|
@ -143,11 +143,15 @@ function addEvent(e) {
|
|||
}
|
||||
|
||||
const value=ref(0);
|
||||
|
||||
let admin_bst=ref(false);
|
||||
// 页面加载时请求接口
|
||||
onMounted(() => {
|
||||
const userStore = useUserStore();
|
||||
console.log('当前 token:', userStore.token);
|
||||
let roles = userStore.getUserInfo.roles
|
||||
admin_bst = roles.some((role) => ['admin', 'sys_admin','bst'].includes(role));
|
||||
console.log('admin_bst',admin_bst);
|
||||
|
||||
|
||||
// 请求用户信息接口
|
||||
getUserInfo().then(res => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user